diff --git a/.cspell.yaml b/.cspell.yaml index 77a94e1..72a6728 100644 --- a/.cspell.yaml +++ b/.cspell.yaml @@ -28,7 +28,10 @@ words: - frontmatter - ANTLR - GHDL + - archs - hrefs + - iface + - interp - invocability - isysroot - isystem @@ -42,6 +45,7 @@ words: - Linkify - linkify - Linq + - maxcount - misattributed - msbuild - MSBuild @@ -49,6 +53,7 @@ words: - mylib - MYLIB - nameof + - testbenches - testlib - NDEBUG - netstandard @@ -77,6 +82,10 @@ words: - unparseable - versionmark - writability + - DOWNTO + - INOUT + - metacharacter + - metacharacters - VHDL - vswhere - Weasyprint @@ -97,4 +106,5 @@ ignorePaths: - '**/obj/**' - '**/generated/**' - '**/packages/**' + - '**/VhdlAst/Antlr/**' - package-lock.json diff --git a/.github/codeql-config.yml b/.github/codeql-config.yml index ac0c554..81de565 100644 --- a/.github/codeql-config.yml +++ b/.github/codeql-config.yml @@ -1,26 +1,28 @@ --- # CodeQL configuration for ApiMark # Suppresses intentional generic catch clauses - -name: "ApiMark CodeQL Config" - +name: ApiMark CodeQL Config # Globally ignore build output and generated files paths-ignore: - - "**/obj/**" - - "**/bin/**" + - '**/obj/**' + - '**/bin/**' # Query filters to disable specific queries for certain paths query-filters: # Suppress warnings in all generated build output under obj/ - exclude: id: cs/useless-assignment-to-local - paths: - - "**/obj/**/*.cs" + paths: ['**/obj/**/*.cs'] - exclude: id: cs/missed-ternary-operator - paths: - - "**/obj/**/*.cs" + paths: ['**/obj/**/*.cs'] - exclude: id: cs/catch-of-all-exceptions - paths: - - src/ApiMark.Tool/Cli/Context.cs - - src/ApiMark.Tool/Program.cs + paths: [src/ApiMark.Tool/Cli/Context.cs, src/ApiMark.Tool/Program.cs] + # Suppress warnings in ANTLR4-generated lexer/parser files — these are generated + # code that cannot be modified and do not reflect hand-authored design decisions. + - exclude: + id: cs/virtual-call-in-constructor + paths: ['**/VhdlAst/Antlr/**'] + - exclude: + id: cs/missed-readonly-modifier + paths: ['**/VhdlAst/Antlr/**'] diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4c7a6be..f8dfe30 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -8,7 +8,6 @@ on: secrets: SONAR_TOKEN: required: true - jobs: # Performs quick quality checks for project formatting consistency including # markdown linting, spell checking, and YAML validation. @@ -21,24 +20,19 @@ jobs: # === INSTALL DEPENDENCIES === # This section installs all required dependencies and tools for quality checks. # Downstream projects: Add any additional dependency installations here. - - name: Checkout uses: actions/checkout@v6 - - name: Setup dotnet uses: actions/setup-dotnet@v5 with: dotnet-version: 10.x - - name: Restore Tools run: > dotnet tool restore - - name: Setup Node.js uses: actions/setup-node@v6 with: node-version: 24.x - - name: Setup Python uses: actions/setup-python@v6 with: @@ -47,7 +41,6 @@ jobs: # === CAPTURE TOOL VERSIONS === # This section captures the versions of all tools used in the build process. # Downstream projects: Add any additional tools to capture here. - - name: Capture tool versions shell: bash run: | @@ -62,7 +55,6 @@ jobs: # This section runs the self-validation of each OTS tool and saves TRX results # so that OTS Software Requirements in requirements.yaml can be satisfied. # Downstream projects: Add any additional OTS tool self-validation steps here. - - name: Run VersionMark self-validation run: > dotnet versionmark @@ -72,7 +64,6 @@ jobs: # === RUN QUALITY CHECKS === # This section runs the linting and quality checks for the project. # Downstream projects: Add any additional quality check steps here. - - name: Run linters shell: pwsh run: ./lint.ps1 @@ -80,7 +71,6 @@ jobs: # === UPLOAD ARTIFACTS === # This section uploads all generated artifacts for use by downstream jobs. # Downstream projects: Add any additional artifact uploads here. - - name: Upload quality artifacts uses: actions/upload-artifact@v7 with: @@ -96,24 +86,19 @@ jobs: permissions: contents: read pull-requests: write - strategy: matrix: os: [windows-latest, ubuntu-latest, macos-latest] - runs-on: ${{ matrix.os }} - steps: # === INSTALL DEPENDENCIES === # This section installs all required dependencies and tools for building the project. # Downstream projects: Add any additional dependency installations here. - - name: Checkout uses: actions/checkout@v6 with: fetch-depth: 0 - - name: Setup dotnet uses: actions/setup-dotnet@v5 with: @@ -121,7 +106,6 @@ jobs: 8.x 9.x 10.x - - name: Restore Tools run: > dotnet tool restore @@ -129,7 +113,6 @@ jobs: # === CAPTURE TOOL VERSIONS === # This section captures the versions of all tools used in the build process. # Downstream projects: Add any additional tools to capture here. - - name: Capture tool versions shell: bash run: | @@ -147,7 +130,6 @@ jobs: # This section runs the self-validation of each OTS tool and saves TRX results # so that OTS Software Requirements in requirements.yaml can be satisfied. # Downstream projects: Add any additional OTS tool self-validation steps here. - - name: Run VersionMark self-validation run: > dotnet versionmark @@ -157,11 +139,9 @@ jobs: # === BUILD AND TEST === # This section builds and tests the project. # Downstream projects: Add any additional build or test steps here. - - name: Restore Dependencies run: > dotnet restore - - name: Start Sonar Scanner env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -174,14 +154,12 @@ jobs: /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths=**/*.opencover.xml /d:sonar.scanner.scanAll=false - - name: Build run: > dotnet build --no-restore --configuration Release --property:Version=${{ inputs.version }} - - name: Pack MSBuild Package # Must run before tests — the package integration tests require the .nupkg run: > @@ -191,7 +169,6 @@ jobs: --configuration Release --property:PackageVersion=${{ inputs.version }} --output test/packages - - name: Test env: APIMARK_TEST_PACKAGES_DIR: ${{ github.workspace }}/test/packages @@ -203,7 +180,6 @@ jobs: --collect "XPlat Code Coverage;Format=opencover" --logger "trx;LogFilePrefix=${{ matrix.os }}" --results-directory artifacts - - name: End Sonar Scanner env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -211,7 +187,6 @@ jobs: dotnet dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}" - - name: Pack All Packages run: > dotnet pack @@ -224,13 +199,11 @@ jobs: # === UPLOAD ARTIFACTS === # This section uploads all generated artifacts for use by downstream jobs. # Downstream projects: Add any additional artifact uploads here. - - name: Upload build artifacts uses: actions/upload-artifact@v7 with: name: artifacts-build-${{ matrix.os }} path: artifacts/ - - name: Upload packages uses: actions/upload-artifact@v7 with: @@ -247,17 +220,14 @@ jobs: actions: read contents: read security-events: write - steps: # === INSTALL DEPENDENCIES === # This section installs all required dependencies and tools for CodeQL analysis. # Downstream projects: Add any additional dependency installations here. - - name: Checkout uses: actions/checkout@v6 with: fetch-depth: 0 - - name: Initialize CodeQL uses: github/codeql-action/init@v4 with: @@ -265,7 +235,6 @@ jobs: build-mode: manual queries: security-and-quality config-file: ./.github/codeql-config.yml - - name: Setup dotnet uses: actions/setup-dotnet@v5 with: @@ -273,11 +242,9 @@ jobs: 8.x 9.x 10.x - - name: Restore Tools run: > dotnet tool restore - - name: Restore Dependencies run: > dotnet restore @@ -285,25 +252,22 @@ jobs: # === BUILD AND ANALYZE === # This section builds the project and performs CodeQL analysis. # Downstream projects: Add any additional analysis steps here. - - name: Build run: > dotnet build --no-restore --configuration Release --property:Version=${{ inputs.version }} - - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v4 with: - category: "/language:csharp" + category: /language:csharp output: artifacts upload: false # === UPLOAD ARTIFACTS === # This section uploads all generated artifacts for use by downstream jobs. # Downstream projects: Add any additional artifact uploads here. - - name: Upload CodeQL artifacts uses: actions/upload-artifact@v7 with: @@ -319,39 +283,32 @@ jobs: needs: build permissions: contents: read - strategy: matrix: os: [windows-latest, ubuntu-latest, macos-latest] - dotnet-version: ['8.x', '9.x', '10.x'] - + dotnet-version: [8.x, 9.x, 10.x] steps: # === INSTALL DEPENDENCIES === # This section installs all required dependencies and tools for integration testing. # Downstream projects: Add any additional dependency installations here. - - name: Checkout uses: actions/checkout@v6 with: sparse-checkout: | .versionmark.yaml .config/dotnet-tools.json - - name: Download package uses: actions/download-artifact@v8 with: name: packages-${{ matrix.os }} path: packages - - name: Setup dotnet uses: actions/setup-dotnet@v5 with: dotnet-version: ${{ matrix.dotnet-version }} - - name: Restore Tools run: > dotnet tool restore - - name: Install tool from package shell: bash run: | @@ -364,7 +321,6 @@ jobs: # === CAPTURE TOOL VERSIONS === # This section captures the versions of all tools used in the integration tests. # Downstream projects: Add any additional tools to capture here. - - name: Capture tool versions shell: bash run: | @@ -382,28 +338,24 @@ jobs: # === RUN INTEGRATION TESTS === # This section runs the integration tests for the tool. # Downstream projects: Add any additional integration test steps here. - - name: Test version display shell: bash run: | echo "Testing apimark --version..." apimark --version || { echo "✗ Version command failed"; exit 1; } echo "✓ Version command succeeded" - - name: Test help display shell: bash run: | echo "Testing apimark --help..." apimark --help || { echo "✗ Help command failed"; exit 1; } echo "✓ Help command succeeded" - - name: Test dotnet subcommand help shell: bash run: | echo "Testing apimark dotnet --help..." apimark dotnet --help || { echo "✗ Dotnet help command failed"; exit 1; } echo "✓ Dotnet help command succeeded" - - name: Run self-validation shell: bash run: | @@ -416,12 +368,12 @@ jobs: # === UPLOAD ARTIFACTS === # This section uploads all generated artifacts for use by downstream jobs. # Downstream projects: Add any additional artifact uploads here. - - name: Upload validation artifacts if: always() uses: actions/upload-artifact@v7 with: - name: artifacts-validation-${{ matrix.os }}-dotnet${{ matrix.dotnet-version }} + name: artifacts-validation-${{ matrix.os }}-dotnet${{ matrix.dotnet-version + }} path: artifacts/ # Builds the supporting documentation including user guides, requirements, @@ -432,40 +384,33 @@ jobs: needs: [build, integration-test, codeql] permissions: contents: read - steps: # === CHECKOUT AND DOWNLOAD ARTIFACTS === # This section retrieves the code and all necessary artifacts from previous jobs. # Downstream projects: Add any additional artifact downloads here. - - name: Checkout uses: actions/checkout@v6 - - name: Download all job artifacts uses: actions/download-artifact@v8 with: path: artifacts - pattern: 'artifacts-*' + pattern: artifacts-* merge-multiple: true continue-on-error: true # === INSTALL DEPENDENCIES === # This section installs all required dependencies and tools for document generation. # Downstream projects: Add any additional dependency installations here. - - name: Setup Node.js uses: actions/setup-node@v6 with: - node-version: 'lts/*' - + node-version: lts/* - name: Setup dotnet uses: actions/setup-dotnet@v5 with: dotnet-version: 10.x - - name: Install npm dependencies run: npm install - - name: Set browser path for Mermaid (Windows) shell: pwsh run: | @@ -480,14 +425,12 @@ jobs: break } } - - name: Restore Tools run: dotnet tool restore # === CAPTURE TOOL VERSIONS === # This section captures the versions of all tools used in the build process. # Downstream projects: Add any additional tools to capture here. - - name: Capture tool versions for build-docs shell: bash run: | @@ -503,7 +446,6 @@ jobs: # Creates the shared docs/generated/ folder that all document sections write PDFs into. # This step is intentionally separate from the document sections so any individual # section can be commented out without breaking the shared output directory. - - name: Create documents output directory shell: bash run: mkdir -p docs/generated @@ -514,23 +456,19 @@ jobs: # Pandoc converts the markdown to HTML, WeasyPrint renders the HTML to PDF, and FileAssert # validates the outputs contain expected content. # Downstream projects: Add any additional build notes steps here. - - name: Create build notes output directories shell: bash run: mkdir -p docs/build_notes/generated - - name: Run BuildMark self-validation run: > dotnet buildmark --validate --results artifacts/buildmark-self-validation.trx - - name: Run VersionMark self-validation run: > dotnet versionmark --validate --results artifacts/versionmark-self-validation.trx - - name: Generate Build Notes with BuildMark shell: bash env: @@ -540,13 +478,11 @@ jobs: --build-version ${{ inputs.version }} --report docs/build_notes/generated/build_notes.md --report-depth 1 - - name: Display Build Notes Report shell: bash run: | echo "=== Build Notes Report ===" cat docs/build_notes/generated/build_notes.md - - name: Publish Tool Versions shell: bash run: | @@ -554,13 +490,11 @@ jobs: dotnet versionmark --publish --report docs/build_notes/generated/versions.md --report-depth 1 \ -- "artifacts/**/versionmark-*.json" echo "✓ Tool versions published" - - name: Display Tool Versions Report shell: bash run: | echo "=== Tool Versions Report ===" cat docs/build_notes/generated/versions.md - - name: Generate Build Notes HTML with Pandoc shell: bash run: > @@ -570,20 +504,17 @@ jobs: --metadata version="${{ inputs.version }}" --metadata date="$(date +'%Y-%m-%d')" --output docs/build_notes/generated/build_notes.html - - name: Generate Build Notes PDF with WeasyPrint run: > dotnet weasyprint --pdf-variant pdf/a-3u docs/build_notes/generated/build_notes.html "docs/generated/ApiMark Build Notes.pdf" - - name: Assert Build Notes Documents with FileAssert run: > dotnet fileassert --results artifacts/fileassert-build-notes.trx build-notes - - name: Copy Build Notes report to docs/generated shell: bash run: cp docs/build_notes/generated/build_notes.md docs/generated/build_notes.md @@ -594,23 +525,19 @@ jobs: # Pandoc converts the markdown to HTML, WeasyPrint renders the HTML to PDF, and FileAssert # validates the outputs contain expected content. # Downstream projects: Add any additional code quality steps here. - - name: Create code quality output directory shell: bash run: mkdir -p docs/code_quality/generated - - name: Run SarifMark self-validation run: > dotnet sarifmark --validate --results artifacts/sarifmark-self-validation.trx - - name: Run SonarMark self-validation run: > dotnet sonarmark --validate --results artifacts/sonarmark-self-validation.trx - - name: Generate CodeQL Quality Report with SarifMark run: > dotnet sarifmark @@ -618,13 +545,11 @@ jobs: --report docs/code_quality/generated/codeql-quality.md --heading "ApiMark CodeQL Analysis" --report-depth 1 - - name: Display CodeQL Quality Report shell: bash run: | echo "=== CodeQL Quality Report ===" cat docs/code_quality/generated/codeql-quality.md - - name: Generate SonarCloud Quality Report shell: bash env: @@ -637,13 +562,11 @@ jobs: --token "$SONAR_TOKEN" --report docs/code_quality/generated/sonar-quality.md --report-depth 1 - - name: Display SonarCloud Quality Report shell: bash run: | echo "=== SonarCloud Quality Report ===" cat docs/code_quality/generated/sonar-quality.md - - name: Generate Code Quality HTML with Pandoc shell: bash run: > @@ -653,14 +576,12 @@ jobs: --metadata version="${{ inputs.version }}" --metadata date="$(date +'%Y-%m-%d')" --output docs/code_quality/generated/quality.html - - name: Generate Code Quality PDF with WeasyPrint run: > dotnet weasyprint --pdf-variant pdf/a-3u docs/code_quality/generated/quality.html "docs/generated/ApiMark Code Quality.pdf" - - name: Assert Code Quality Documents with FileAssert run: > dotnet fileassert @@ -673,17 +594,14 @@ jobs: # on its output. Pandoc converts the markdown to HTML, WeasyPrint renders the HTML to # PDF, and FileAssert validates the outputs contain expected content. # Downstream projects: Add any additional code review steps here. - - name: Create code review output directories shell: bash run: mkdir -p docs/code_review_plan/generated docs/code_review_report/generated - - name: Run ReviewMark self-validation run: > dotnet reviewmark --validate --results artifacts/reviewmark-self-validation.trx - - name: Generate Review Plan and Review Report with ReviewMark shell: bash # TODO: Add --enforce once reviews branch is populated with review evidence PDFs and index.json @@ -693,19 +611,16 @@ jobs: --plan-depth 1 --report docs/code_review_report/generated/report.md --report-depth 1 - - name: Display Review Plan shell: bash run: | echo "=== Review Plan ===" cat docs/code_review_plan/generated/plan.md - - name: Display Review Report shell: bash run: | echo "=== Review Report ===" cat docs/code_review_report/generated/report.md - - name: Generate Review Plan HTML with Pandoc shell: bash run: > @@ -715,14 +630,12 @@ jobs: --metadata version="${{ inputs.version }}" --metadata date="$(date +'%Y-%m-%d')" --output docs/code_review_plan/generated/plan.html - - name: Generate Review Plan PDF with WeasyPrint run: > dotnet weasyprint --pdf-variant pdf/a-3u docs/code_review_plan/generated/plan.html "docs/generated/ApiMark Review Plan.pdf" - - name: Generate Review Report HTML with Pandoc shell: bash run: > @@ -732,14 +645,12 @@ jobs: --metadata version="${{ inputs.version }}" --metadata date="$(date +'%Y-%m-%d')" --output docs/code_review_report/generated/report.html - - name: Generate Review Report PDF with WeasyPrint run: > dotnet weasyprint --pdf-variant pdf/a-3u docs/code_review_report/generated/report.html "docs/generated/ApiMark Review Report.pdf" - - name: Assert Code Review Documents with FileAssert run: > dotnet fileassert @@ -750,11 +661,9 @@ jobs: # This section generates the Design document using Pandoc and WeasyPrint. # FileAssert validates that the HTML and PDF outputs contain expected content. # Downstream projects: Add any additional design document steps here. - - name: Create design output directory shell: bash run: mkdir -p docs/design/generated - - name: Generate Design HTML with Pandoc shell: bash run: > @@ -764,14 +673,12 @@ jobs: --metadata version="${{ inputs.version }}" --metadata date="$(date +'%Y-%m-%d')" --output docs/design/generated/design.html - - name: Generate Design PDF with WeasyPrint run: > dotnet weasyprint --pdf-variant pdf/a-3u docs/design/generated/design.html "docs/generated/ApiMark Software Design.pdf" - - name: Assert Design Documents with FileAssert run: > dotnet fileassert @@ -782,11 +689,9 @@ jobs: # This section generates the Verification document using Pandoc and WeasyPrint. # FileAssert validates that the HTML and PDF outputs contain expected content. # Downstream projects: Add any additional verification steps here. - - name: Create verification output directory shell: bash run: mkdir -p docs/verification/generated - - name: Generate Verification HTML with Pandoc shell: bash run: > @@ -796,14 +701,12 @@ jobs: --metadata version="${{ inputs.version }}" --metadata date="$(date +'%Y-%m-%d')" --output docs/verification/generated/verification.html - - name: Generate Verification PDF with WeasyPrint run: > dotnet weasyprint --pdf-variant pdf/a-3u docs/verification/generated/verification.html "docs/generated/ApiMark Software Verification Design.pdf" - - name: Assert Verification Documents with FileAssert run: > dotnet fileassert @@ -814,11 +717,9 @@ jobs: # This section generates the User Guide document using Pandoc and WeasyPrint. # FileAssert validates that the HTML and PDF outputs contain expected content. # Downstream projects: Add any additional user guide steps here. - - name: Create user guide output directory shell: bash run: mkdir -p docs/user_guide/generated - - name: Generate User Guide HTML with Pandoc shell: bash run: > @@ -828,14 +729,12 @@ jobs: --metadata version="${{ inputs.version }}" --metadata date="$(date +'%Y-%m-%d')" --output docs/user_guide/generated/user_guide.html - - name: Generate User Guide PDF with WeasyPrint run: > dotnet weasyprint --pdf-variant pdf/a-3u docs/user_guide/generated/user_guide.html "docs/generated/ApiMark User Guide.pdf" - - name: Assert User Guide Documents with FileAssert run: > dotnet fileassert @@ -848,7 +747,6 @@ jobs: # providing strong OTS evidence for both tools before ReqStream runs. FileAssert # self-validation confirms the assertion tool itself is operational. # Downstream projects: Add any additional FileAssert self-validation steps here. - - name: Run FileAssert self-validation run: > dotnet fileassert @@ -863,17 +761,14 @@ jobs: # validates their outputs. These final assertions do not contribute to OTS evidence but # confirm the requirements pipeline produced well-formed documents. # Downstream projects: Add any additional requirements steps here. - - name: Create requirements output directories shell: bash run: mkdir -p docs/requirements_doc/generated docs/requirements_report/generated - - name: Run ReqStream self-validation run: > dotnet reqstream --validate --results artifacts/reqstream-self-validation.trx - - name: Generate Requirements Report, Justifications, and Trace Matrix run: > dotnet reqstream @@ -883,7 +778,6 @@ jobs: --justifications docs/requirements_doc/generated/justifications.md --matrix docs/requirements_report/generated/trace_matrix.md --enforce - - name: Generate Requirements HTML with Pandoc shell: bash run: > @@ -893,14 +787,12 @@ jobs: --metadata version="${{ inputs.version }}" --metadata date="$(date +'%Y-%m-%d')" --output docs/requirements_doc/generated/requirements.html - - name: Generate Requirements PDF with WeasyPrint run: > dotnet weasyprint --pdf-variant pdf/a-3u docs/requirements_doc/generated/requirements.html "docs/generated/ApiMark Requirements.pdf" - - name: Generate Trace Matrix HTML with Pandoc shell: bash run: > @@ -910,14 +802,12 @@ jobs: --metadata version="${{ inputs.version }}" --metadata date="$(date +'%Y-%m-%d')" --output docs/requirements_report/generated/trace_matrix.html - - name: Generate Trace Matrix PDF with WeasyPrint run: > dotnet weasyprint --pdf-variant pdf/a-3u docs/requirements_report/generated/trace_matrix.html "docs/generated/ApiMark Trace Matrix.pdf" - - name: Assert Requirements Documents with FileAssert run: > dotnet fileassert @@ -927,7 +817,6 @@ jobs: # === UPLOAD ARTIFACTS === # This section uploads all generated documentation artifacts. # Downstream projects: Add any additional artifact uploads here. - - name: Upload documentation uses: actions/upload-artifact@v7 with: diff --git a/.github/workflows/build_on_push.yaml b/.github/workflows/build_on_push.yaml index 344b21a..cd8832c 100644 --- a/.github/workflows/build_on_push.yaml +++ b/.github/workflows/build_on_push.yaml @@ -1,12 +1,10 @@ --- name: Build on Push - on: push: workflow_dispatch: schedule: - - cron: '0 17 * * 1' # 5PM UTC every Monday - + - cron: 0 17 * * 1 # 5PM UTC every Monday jobs: build: name: Build diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5d3adc2..37b2520 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,22 +1,17 @@ --- name: Release - on: workflow_dispatch: inputs: version: - description: 'Release version (1.0.0)' + description: Release version (1.0.0) required: true type: string publish: - description: 'Publish type' + description: Publish type required: true type: choice - options: - - none - - release - - publish - + options: [none, release, publish] jobs: # Calls the reusable build workflow to build, test, and generate documentation # for the release version. @@ -41,7 +36,6 @@ jobs: needs: build permissions: contents: write - steps: - name: Setup dotnet uses: actions/setup-dotnet@v5 @@ -50,19 +44,16 @@ jobs: 8.x 9.x 10.x - - name: Download package artifacts uses: actions/download-artifact@v8 with: name: packages-ubuntu-latest path: artifacts - - name: Download documents artifact uses: actions/download-artifact@v8 with: name: documents path: artifacts - - name: Create GitHub Release if: inputs.publish == 'release' || inputs.publish == 'publish' uses: ncipollo/release-action@v1 @@ -71,7 +62,6 @@ jobs: artifacts: artifacts/* bodyFile: artifacts/build_notes.md generateReleaseNotes: false - - name: Publish to NuGet.org if: inputs.publish == 'publish' run: |- diff --git a/.gitignore b/.gitignore index d5a19c0..af40687 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,7 @@ node_modules/ **/generated/ # Generated API documentation output (written by ApiMark; never committed) +output/ **/api-gradual/ **/api-single/ **/api/ diff --git a/.markdownlint-cli2.yaml b/.markdownlint-cli2.yaml index dcb524f..c5515b5 100644 --- a/.markdownlint-cli2.yaml +++ b/.markdownlint-cli2.yaml @@ -10,6 +10,7 @@ ignores: - '**/third-party/**' - '**/3rd-party/**' - '**/generated/**' + - '**/VhdlAst/Antlr/**' - '**/.agent-logs/**' - '**/bin/**' - test/ApiMark.Cpp.Fixtures/api-gradual/** diff --git a/.reviewmark.yaml b/.reviewmark.yaml index 4bbc5cc..0e76982 100644 --- a/.reviewmark.yaml +++ b/.reviewmark.yaml @@ -16,6 +16,7 @@ needs-review: - '!**/obj/**' # Exclude build output - '!**/bin/**' # Exclude build output - '!**/generated/**' # Exclude generated output + - '!**/VhdlAst/Antlr/**' # Exclude ANTLR4-generated lexer/parser files evidence-source: type: none reviews: @@ -45,10 +46,14 @@ reviews: - docs/reqstream/api-mark-core/**/*.yaml - id: ApiMark-Core-Design title: Review that ApiMark Core Design is Consistent and Complete - paths: [docs/design/api-mark-core.md, docs/design/api-mark-core/**/*.md] + paths: + - docs/design/ots.md + - docs/design/api-mark-core.md + - docs/design/api-mark-core/**/*.md - id: ApiMark-Core-Verification title: Review that ApiMark Core Verification is Consistent and Complete paths: + - docs/verification/ots.md - docs/verification/api-mark-core.md - docs/verification/api-mark-core/**/*.md - id: ApiMark-Core-TestHelpers @@ -56,7 +61,7 @@ reviews: paths: - test/ApiMark.Core.TestHelpers/**/*.cs - # ApiMarkCore - IApiGenerator + # ApiMarkCore - Units - id: ApiMark-Core-IApiGenerator title: Review that ApiMark Core IApiGenerator Implementation is Correct paths: @@ -65,8 +70,6 @@ reviews: - docs/verification/api-mark-core/i-api-generator.md - src/ApiMark.Core/IApiGenerator.cs - test/ApiMark.Core.Tests/IApiGeneratorTests.cs - - # ApiMarkCore - IApiEmitter - id: ApiMark-Core-IApiEmitter title: Review that ApiMark Core IApiEmitter Implementation is Correct paths: @@ -74,9 +77,7 @@ reviews: - docs/design/api-mark-core/i-api-emitter.md - docs/verification/api-mark-core/i-api-emitter.md - src/ApiMark.Core/IApiEmitter.cs - - test/ApiMark.Core.Tests/IApiGeneratorTests.cs - - # ApiMarkCore - EmitConfig + - test/ApiMark.Core.Tests/IApiEmitterTests.cs - id: ApiMark-Core-EmitConfig title: Review that ApiMark Core EmitConfig Implementation is Correct paths: @@ -85,8 +86,6 @@ reviews: - docs/verification/api-mark-core/emit-config.md - src/ApiMark.Core/EmitConfig.cs - src/ApiMark.Core/OutputFormat.cs - - # ApiMarkCore - IContext - id: ApiMark-Core-IContext title: Review that ApiMark Core IContext Implementation is Correct paths: @@ -96,8 +95,6 @@ reviews: - src/ApiMark.Core/IContext.cs - test/ApiMark.Core.TestHelpers/InMemoryContext.cs - test/ApiMark.Core.Tests/IContextTests.cs - - # ApiMarkCore - MarkdownWriter - id: ApiMark-Core-MarkdownWriter title: Review that ApiMark Core IMarkdownWriter Implementation is Correct paths: @@ -108,8 +105,6 @@ reviews: - src/ApiMark.Core/FileMarkdownWriter.cs - test/ApiMark.Core.Tests/IMarkdownWriterTests.cs - test/ApiMark.Core.Tests/FileMarkdownWriterTests.cs - - # ApiMarkCore - MarkdownWriterFactory - id: ApiMark-Core-MarkdownWriterFactory title: Review that ApiMark Core IMarkdownWriterFactory Implementation is Correct paths: @@ -120,8 +115,6 @@ reviews: - src/ApiMark.Core/FileMarkdownWriterFactory.cs - test/ApiMark.Core.Tests/IMarkdownWriterFactoryTests.cs - test/ApiMark.Core.Tests/FileMarkdownWriterFactoryTests.cs - - # ApiMarkCore - PathHelpers - id: ApiMark-Core-PathHelpers title: Review that ApiMark Core PathHelpers Implementation is Correct paths: @@ -130,6 +123,14 @@ reviews: - docs/verification/api-mark-core/path-helpers.md - src/ApiMark.Core/PathHelpers.cs - test/ApiMark.Core.Tests/PathHelpersTests.cs + - id: ApiMark-Core-GlobFileCollector + title: Review that ApiMark Core GlobFileCollector Implementation is Correct + paths: + - docs/reqstream/api-mark-core/glob-file-collector.yaml + - docs/design/api-mark-core/glob-file-collector.md + - docs/verification/api-mark-core/glob-file-collector.md + - src/ApiMark.Core/GlobFileCollector.cs + - test/ApiMark.Core.Tests/GlobFileCollectorTests.cs # ApiMarkDotNet - Specials - id: ApiMark-DotNet-Architecture @@ -148,15 +149,17 @@ reviews: - id: ApiMark-DotNet-Design title: Review that ApiMark DotNet Design is Consistent and Complete paths: + - docs/design/ots.md - docs/design/api-mark-dot-net.md - docs/design/api-mark-dot-net/**/*.md - id: ApiMark-DotNet-Verification title: Review that ApiMark DotNet Verification is Consistent and Complete paths: + - docs/verification/ots.md - docs/verification/api-mark-dot-net.md - docs/verification/api-mark-dot-net/**/*.md - # ApiMarkDotNet - DotNetGenerator + # ApiMarkDotNet - Units - id: ApiMark-DotNet-DotNetGenerator title: Review that ApiMark DotNet DotNetGenerator Implementation is Correct paths: @@ -168,8 +171,6 @@ reviews: - src/ApiMark.DotNet/DotNetGeneratorOptions.cs - test/ApiMark.DotNet.Tests/DotNetGeneratorTests.cs - test/ApiMark.DotNet.Tests/FixturePaths.cs - - # ApiMarkDotNet - DotNetAstModel - id: ApiMark-DotNet-DotNetAstModel title: Review that ApiMark DotNet DotNetAstModel Implementation is Correct paths: @@ -178,8 +179,6 @@ reviews: - docs/verification/api-mark-dot-net/dot-net-ast-model.md - src/ApiMark.DotNet/DotNetAstModel.cs - test/ApiMark.DotNet.Tests/DotNetAstModelTests.cs - - # ApiMarkDotNet - DotNetEmitter - id: ApiMark-DotNet-DotNetEmitter title: Review that ApiMark DotNet DotNetEmitter Implementation is Correct paths: @@ -187,9 +186,8 @@ reviews: - docs/design/api-mark-dot-net/dot-net-emitter.md - docs/verification/api-mark-dot-net/dot-net-emitter.md - src/ApiMark.DotNet/DotNetEmitter.cs + - src/ApiMark.DotNet/ExternalTypeInfo.cs - test/ApiMark.DotNet.Tests/DotNetEmitterTests.cs - - # ApiMarkDotNet - DotNetEmitterGradualDisclosure - id: ApiMark-DotNet-DotNetEmitterGradualDisclosure title: Review that ApiMark DotNet DotNetEmitterGradualDisclosure Implementation is Correct @@ -200,8 +198,6 @@ reviews: - src/ApiMark.DotNet/DotNetEmitterGradualDisclosure.cs - test/ApiMark.DotNet.Fixtures/**/*.cs - test/ApiMark.DotNet.Tests/DotNetEmitterGradualDisclosureTests.cs - - # ApiMarkDotNet - DotNetEmitterSingleFile - id: ApiMark-DotNet-DotNetEmitterSingleFile title: Review that ApiMark DotNet DotNetEmitterSingleFile Implementation is Correct paths: @@ -211,8 +207,6 @@ reviews: - src/ApiMark.DotNet/DotNetEmitterSingleFile.cs - test/ApiMark.DotNet.Fixtures/**/*.cs - test/ApiMark.DotNet.Tests/DotNetEmitterSingleFileTests.cs - - # ApiMarkDotNet - XmlDocReader - id: ApiMark-DotNet-XmlDocReader title: Review that ApiMark DotNet XmlDocReader Implementation is Correct paths: @@ -221,8 +215,6 @@ reviews: - docs/verification/api-mark-dot-net/xml-doc-reader.md - src/ApiMark.DotNet/XmlDocReader.cs - test/ApiMark.DotNet.Tests/XmlDocReaderTests.cs - - # ApiMarkDotNet - TypeLinkResolver - id: ApiMark-DotNet-TypeLinkResolver title: Review that ApiMark DotNet TypeLinkResolver Implementation is Correct paths: @@ -231,8 +223,6 @@ reviews: - docs/verification/api-mark-dot-net/type-link-resolver.md - src/ApiMark.DotNet/TypeLinkResolver.cs - test/ApiMark.DotNet.Tests/TypeLinkResolverTests.cs - - # ApiMarkDotNet - TypeNameSimplifier - id: ApiMark-DotNet-TypeNameSimplifier title: Review that ApiMark DotNet TypeNameSimplifier Implementation is Correct paths: @@ -258,14 +248,18 @@ reviews: - docs/reqstream/api-mark-cpp/**/*.yaml - id: ApiMark-Cpp-Design title: Review that ApiMark Cpp Design is Consistent and Complete - paths: [docs/design/api-mark-cpp.md, docs/design/api-mark-cpp/**/*.md] + paths: + - docs/design/ots.md + - docs/design/api-mark-cpp.md + - docs/design/api-mark-cpp/**/*.md - id: ApiMark-Cpp-Verification title: Review that ApiMark Cpp Verification is Consistent and Complete paths: + - docs/verification/ots.md - docs/verification/api-mark-cpp.md - docs/verification/api-mark-cpp/**/*.md - # ApiMarkCpp - CppGenerator + # ApiMarkCpp - Units - id: ApiMark-Cpp-CppGenerator title: Review that ApiMark Cpp CppGenerator Implementation is Correct paths: @@ -275,31 +269,9 @@ reviews: - src/ApiMark.Cpp/ApiVisibility.cs - src/ApiMark.Cpp/CppGenerator.cs - src/ApiMark.Cpp/CppGeneratorOptions.cs + - test/ApiMark.Cpp.Tests/CppGeneratorFixture.cs - test/ApiMark.Cpp.Tests/CppGeneratorTests.cs - test/ApiMark.Cpp.Tests/FixturePaths.cs - - # ApiMarkCpp - CppAstModel - - id: ApiMark-Cpp-CppAstModel - title: Review that ApiMark Cpp CppAstModel Implementation is Correct - paths: - - docs/reqstream/api-mark-cpp/cpp-ast-model.yaml - - docs/design/api-mark-cpp/cpp-ast-model.md - - docs/verification/api-mark-cpp/cpp-ast-model.md - - src/ApiMark.Cpp/CppAst/CppAstModel.cs - - test/ApiMark.Cpp.Tests/CppAstModelTests.cs - - # ApiMarkCpp - ClangAstParser - - id: ApiMark-Cpp-ClangAstParser - title: Review that ApiMark Cpp ClangAstParser Implementation is Correct - paths: - - docs/reqstream/api-mark-cpp/clang-ast-parser.yaml - - docs/design/api-mark-cpp/clang-ast-parser.md - - docs/verification/api-mark-cpp/clang-ast-parser.md - - src/ApiMark.Cpp/CppAst/ClangAstParser.cs - - test/ApiMark.Cpp.Fixtures/**/*.h - - test/ApiMark.Cpp.Tests/ClangAstParserTests.cs - - # ApiMarkCpp - CppEmitter - id: ApiMark-Cpp-CppEmitter title: Review that ApiMark Cpp CppEmitter Implementation is Correct paths: @@ -307,9 +279,8 @@ reviews: - docs/design/api-mark-cpp/cpp-emitter.md - docs/verification/api-mark-cpp/cpp-emitter.md - src/ApiMark.Cpp/CppEmitter.cs + - src/ApiMark.Cpp/CppExternalTypeInfo.cs - test/ApiMark.Cpp.Tests/CppEmitterTests.cs - - # ApiMarkCpp - CppEmitterGradualDisclosure - id: ApiMark-Cpp-CppEmitterGradualDisclosure title: Review that ApiMark Cpp CppEmitterGradualDisclosure Implementation is Correct paths: @@ -319,8 +290,6 @@ reviews: - src/ApiMark.Cpp/CppEmitterGradualDisclosure.cs - test/ApiMark.Cpp.Fixtures/**/*.h - test/ApiMark.Cpp.Tests/CppEmitterGradualDisclosureTests.cs - - # ApiMarkCpp - CppEmitterSingleFile - id: ApiMark-Cpp-CppEmitterSingleFile title: Review that ApiMark Cpp CppEmitterSingleFile Implementation is Correct paths: @@ -329,8 +298,6 @@ reviews: - docs/verification/api-mark-cpp/cpp-emitter-single-file.md - src/ApiMark.Cpp/CppEmitterSingleFile.cs - test/ApiMark.Cpp.Tests/CppEmitterSingleFileTests.cs - - # ApiMarkCpp - CppTypeLinkResolver - id: ApiMark-Cpp-CppTypeLinkResolver title: Review that ApiMark Cpp CppTypeLinkResolver Implementation is Correct paths: @@ -340,6 +307,110 @@ reviews: - src/ApiMark.Cpp/CppTypeLinkResolver.cs - test/ApiMark.Cpp.Tests/CppTypeLinkResolverTests.cs + # ApiMarkCpp.CppAst - Units + - id: ApiMark-Cpp-CppAstModel + title: Review that ApiMark Cpp CppAstModel Implementation is Correct + paths: + - docs/reqstream/api-mark-cpp/cpp-ast-model.yaml + - docs/design/api-mark-cpp/cpp-ast-model.md + - docs/verification/api-mark-cpp/cpp-ast-model.md + - src/ApiMark.Cpp/CppAst/CppAstModel.cs + - test/ApiMark.Cpp.Tests/CppAstModelTests.cs + - id: ApiMark-Cpp-ClangAstParser + title: Review that ApiMark Cpp ClangAstParser Implementation is Correct + paths: + - docs/reqstream/api-mark-cpp/clang-ast-parser.yaml + - docs/design/api-mark-cpp/clang-ast-parser.md + - docs/verification/api-mark-cpp/clang-ast-parser.md + - src/ApiMark.Cpp/CppAst/ClangAstParser.cs + - test/ApiMark.Cpp.Fixtures/**/*.h + - test/ApiMark.Cpp.Tests/ClangAstParserTests.cs + + # ApiMarkVhdl - Specials + - id: ApiMark-Vhdl-Architecture + title: Review that ApiMark Vhdl Architecture Satisfies Requirements + paths: + - docs/reqstream/api-mark-vhdl.yaml + - docs/design/introduction.md + - docs/design/api-mark-vhdl.md + - docs/verification/introduction.md + - docs/verification/api-mark-vhdl.md + - id: ApiMark-Vhdl-AllRequirements + title: Review that All ApiMark Vhdl Requirements are Complete + paths: + - docs/reqstream/api-mark-vhdl.yaml + - docs/reqstream/api-mark-vhdl/**/*.yaml + - id: ApiMark-Vhdl-Design + title: Review that ApiMark Vhdl Design is Consistent and Complete + paths: + - docs/design/ots.md + - docs/design/api-mark-vhdl.md + - docs/design/api-mark-vhdl/**/*.md + - id: ApiMark-Vhdl-Verification + title: Review that ApiMark Vhdl Verification is Consistent and Complete + paths: + - docs/verification/ots.md + - docs/verification/api-mark-vhdl.md + - docs/verification/api-mark-vhdl/**/*.md + + # ApiMarkVhdl - Units + - id: ApiMark-Vhdl-VhdlGenerator + title: Review that ApiMark Vhdl VhdlGenerator Implementation is Correct + paths: + - docs/reqstream/api-mark-vhdl/vhdl-generator.yaml + - docs/design/api-mark-vhdl/vhdl-generator.md + - docs/verification/api-mark-vhdl/vhdl-generator.md + - src/ApiMark.Vhdl/VhdlGenerator.cs + - src/ApiMark.Vhdl/VhdlGeneratorOptions.cs + - test/ApiMark.Vhdl.Tests/VhdlGeneratorTests.cs + - test/ApiMark.Vhdl.Tests/FixturePaths.cs + - id: ApiMark-Vhdl-VhdlEmitter + title: Review that ApiMark Vhdl VhdlEmitter Implementation is Correct + paths: + - docs/reqstream/api-mark-vhdl/vhdl-emitter.yaml + - docs/design/api-mark-vhdl/vhdl-emitter.md + - docs/verification/api-mark-vhdl/vhdl-emitter.md + - src/ApiMark.Vhdl/VhdlEmitter.cs + - test/ApiMark.Vhdl.Tests/VhdlEmitterTests.cs + - id: ApiMark-Vhdl-VhdlEmitterGradualDisclosure + title: Review that ApiMark Vhdl VhdlEmitterGradualDisclosure Implementation is + Correct + paths: + - docs/reqstream/api-mark-vhdl/vhdl-emitter-gradual-disclosure.yaml + - docs/design/api-mark-vhdl/vhdl-emitter-gradual-disclosure.md + - docs/verification/api-mark-vhdl/vhdl-emitter-gradual-disclosure.md + - src/ApiMark.Vhdl/VhdlEmitterGradualDisclosure.cs + - test/ApiMark.Vhdl.Tests/Fixtures/counter.vhd + - test/ApiMark.Vhdl.Tests/VhdlEmitterGradualDisclosureTests.cs + - id: ApiMark-Vhdl-VhdlEmitterSingleFile + title: Review that ApiMark Vhdl VhdlEmitterSingleFile Implementation is Correct + paths: + - docs/reqstream/api-mark-vhdl/vhdl-emitter-single-file.yaml + - docs/design/api-mark-vhdl/vhdl-emitter-single-file.md + - docs/verification/api-mark-vhdl/vhdl-emitter-single-file.md + - src/ApiMark.Vhdl/VhdlEmitterSingleFile.cs + - test/ApiMark.Vhdl.Tests/Fixtures/counter.vhd + - test/ApiMark.Vhdl.Tests/VhdlEmitterSingleFileTests.cs + + # ApiMarkVhdl.VhdlAst - Units + - id: ApiMark-Vhdl-VhdlAstModel + title: Review that ApiMark Vhdl VhdlAstModel Implementation is Correct + paths: + - docs/reqstream/api-mark-vhdl/vhdl-ast-model.yaml + - docs/design/api-mark-vhdl/vhdl-ast-model.md + - docs/verification/api-mark-vhdl/vhdl-ast-model.md + - src/ApiMark.Vhdl/VhdlAst/VhdlAstModel.cs + - test/ApiMark.Vhdl.Tests/VhdlAstParserTests.cs + - id: ApiMark-Vhdl-VhdlAstParser + title: Review that ApiMark Vhdl VhdlAstParser Implementation is Correct + paths: + - docs/reqstream/api-mark-vhdl/vhdl-ast-parser.yaml + - docs/design/api-mark-vhdl/vhdl-ast-parser.md + - docs/verification/api-mark-vhdl/vhdl-ast-parser.md + - src/ApiMark.Vhdl/VhdlAst/VhdlAstParser.cs + - test/ApiMark.Vhdl.Tests/Fixtures/counter.vhd + - test/ApiMark.Vhdl.Tests/VhdlAstParserTests.cs + # ApiMarkMSBuild - Specials - id: ApiMark-MSBuild-Architecture title: Review that ApiMark MSBuild Architecture Satisfies Requirements @@ -357,15 +428,17 @@ reviews: - id: ApiMark-MSBuild-Design title: Review that ApiMark MSBuild Design is Consistent and Complete paths: + - docs/design/ots.md - docs/design/api-mark-msbuild.md - docs/design/api-mark-msbuild/**/*.md - id: ApiMark-MSBuild-Verification title: Review that ApiMark MSBuild Verification is Consistent and Complete paths: + - docs/verification/ots.md - docs/verification/api-mark-msbuild.md - docs/verification/api-mark-msbuild/**/*.md - # ApiMarkMSBuild - ApiMarkTask + # ApiMarkMSBuild - Units - id: ApiMark-MSBuild-Task title: Review that ApiMark MSBuild ApiMarkTask Implementation is Correct paths: @@ -375,6 +448,7 @@ reviews: - src/ApiMark.MSBuild/ApiMarkTask.cs - src/ApiMark.MSBuild/build/DemaConsulting.ApiMark.MSBuild.targets - test/ApiMark.MSBuild.Tests/ApiMarkTaskTests.cs + - test/ApiMark.MSBuild.Tests/FixturePaths.cs - test/ApiMark.MSBuild.PackageTests/**/*.cs # ApiMarkTool - Specials @@ -393,14 +467,18 @@ reviews: - docs/reqstream/api-mark-tool/**/*.yaml - id: ApiMark-Tool-Design title: Review that ApiMark Tool Design is Consistent and Complete - paths: [docs/design/api-mark-tool.md, docs/design/api-mark-tool/**/*.md] + paths: + - docs/design/ots.md + - docs/design/api-mark-tool.md + - docs/design/api-mark-tool/**/*.md - id: ApiMark-Tool-Verification title: Review that ApiMark Tool Verification is Consistent and Complete paths: + - docs/verification/ots.md - docs/verification/api-mark-tool.md - docs/verification/api-mark-tool/**/*.md - # ApiMarkTool - Program + # ApiMarkTool - Units - id: ApiMark-Tool-Program title: Review that ApiMark Tool Program Implementation is Correct paths: @@ -410,7 +488,7 @@ reviews: - src/ApiMark.Tool/Program.cs - test/ApiMark.Tool.Tests/ProgramTests.cs - # ApiMarkTool - Cli + # ApiMarkTool.Cli - Units - id: ApiMark-Tool-Cli title: Review that ApiMark Tool Cli Satisfies Subsystem Requirements paths: @@ -426,7 +504,7 @@ reviews: - src/ApiMark.Tool/Cli/Context.cs - test/ApiMark.Tool.Tests/Cli/ContextTests.cs - # ApiMarkTool - SelfTest + # ApiMarkTool.SelfTest - Units - id: ApiMark-Tool-SelfTest title: Review that ApiMark Tool SelfTest Satisfies Subsystem Requirements paths: @@ -467,3 +545,15 @@ reviews: - docs/reqstream/ots/cpp-ast-net.yaml - docs/design/ots/cpp-ast-net.md - docs/verification/ots/cpp-ast-net.md + - id: OTS-Antlr4 + title: Review that ANTLR4 Provides Required Functionality + paths: + - docs/reqstream/ots/antlr4.yaml + - docs/design/ots/antlr4.md + - docs/verification/ots/antlr4.md + - id: OTS-FileSystemGlobbing + title: Review that Microsoft.Extensions.FileSystemGlobbing Provides Required Functionality + paths: + - docs/reqstream/ots/file-system-globbing.yaml + - docs/design/ots/file-system-globbing.md + - docs/verification/ots/file-system-globbing.md diff --git a/ApiMark.slnx b/ApiMark.slnx index d5ba274..3a27854 100644 --- a/ApiMark.slnx +++ b/ApiMark.slnx @@ -1,6 +1,7 @@ + @@ -10,6 +11,7 @@ + diff --git a/README.md b/README.md index 623a24e..6e137d0 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ type page — consuming only as much context as the task requires. - 💡 **Example Code Blocks** - `` (C#) and `@code`/`@endcode` (Doxygen) blocks rendered in output - 🔷 **C#/.NET Support** - Mono.Cecil + XML documentation comments - ➕ **C++ Support** - `clang -ast-dump=json` + Doxygen-style comments +- 🔶 **VHDL Support** - Entities, packages, and subprograms from ANTLR4 vhdl2008 grammar + `--!` doc comments - 🔧 **MSBuild Integration** - Auto-documents `.csproj` and `.vcxproj` builds - 🖥️ **CLI Tool** - `apimark` dotnet tool covering all languages - 🤖 **AI-Optimized** - Minimal noise, explicit navigation links @@ -36,11 +37,11 @@ type page — consuming only as much context as the task requires. ## Platform Support -| Platform | .NET | C++ | -| --- | --- | --- | -| Windows | ✅ | ✅ | -| Linux | ✅ | ✅ | -| macOS | ✅ | ✅ | +| Platform | .NET | C++ | VHDL | +| --- | --- | --- | --- | +| Windows | ✅ | ✅ | ✅ | +| Linux | ✅ | ✅ | ✅ | +| macOS | ✅ | ✅ | ✅ | ## Prerequisites @@ -54,6 +55,11 @@ C++ documentation generation requires `clang` to be installed and available: - **macOS**: Xcode Command Line Tools (`xcode-select --install`) — `clang` is included. - **Linux**: Install via the system package manager (e.g. `apt install clang` or `dnf install clang`). +### VHDL Support + +VHDL documentation generation has no additional prerequisites. Parsing is done +in-process using the ANTLR4 vhdl2008 grammar — no external tools required. + .NET support has no additional prerequisites beyond the .NET SDK. ## Installation @@ -119,9 +125,15 @@ apimark cpp \ --api-headers "!include/detail/**" \ --api-headers "include/detail/public_api.h" \ --output docs/api + +# Generate API documentation from all .vhd files in the src directory +apimark vhdl --source "src/**/*.vhd" --output docs/api + +# Generate with exclusions (gitignore-style) +apimark vhdl --source "src/**/*.vhd" --source "!src/tb/**/*.vhd" --output docs/api ``` -Run `apimark --help` for all options. Run `apimark dotnet --help` or `apimark cpp --help` for language-specific options. +Run `apimark --help` for all options. Run `apimark dotnet --help`, `apimark cpp --help`, or `apimark vhdl --help` for language-specific options. ### MSBuild Usage diff --git a/ROADMAP.md b/ROADMAP.md index 135d31b..8f26fed 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -1,131 +1,63 @@ # ApiMark Roadmap -This document captures planned future features in implementation order — each -phase builds on the foundation laid by the previous. + + +This document captures ideas for future features. --- -## Phase 1 — Configurable Output Formats - -Allow users to choose between output strategies depending on their use case: - -- **Gradual disclosure** *(current default)* — index page linking to per-namespace - and per-type pages; optimized for AI agents that navigate progressively. -- **Single-file** — entire API rendered into one `api.md`; suitable for dropping - directly into a system prompt, replacing a Doxygen HTML output, or archiving. - -The current architecture couples symbol extraction and Markdown rendering tightly -inside each language generator. Supporting multiple output formats cleanly requires -separating these two concerns into a two-stage pipeline. This refactor is done -simultaneously across DotNet and Cpp — two working emitters against two existing -languages is the proof that the abstraction is correct. - -### Stage 1 — Symbol Extraction (language-specific) - -Each language `IApiGenerator` parses its source and populates its own -language-specific symbol tree. These trees are intentionally not unified — C# has -interfaces, generics, and XML doc comments; C++ has templates and preprocessor -defines; VHDL has entities, architectures, and port maps. Forcing them into a -common abstraction loses the fidelity needed for accurate documentation. - -### Stage 2 — Document Rendering (language-specific, format-selectable) - -Each language provides its own `IDocumentGenerator` implementation that understands -its symbol tree. The output *format* is then an orthogonal strategy injected into -that generator — it controls file layout decisions without touching symbol -interpretation: - -| Format strategy | Behavior | -| --- | --- | -| `GradualDisclosureStrategy` | Current behavior — index → namespace → type pages | -| `SingleFileStrategy` | Entire tree in one `api.md`; heading levels offset by depth | -| *(future)* `DoxygenStyleStrategy` | Per-type files with full member detail, cross-links | - -Because Stage 1 (source parsing) is the expensive step, the symbol tree can be -passed to **multiple format strategies in a single build** — each writing to its -own output directory with its own visibility filter — at negligible extra cost. -The symbol tree is populated at the broadest useful visibility (`All`); each -emitter then filters independently based on its configured audience. For example, -a `.csproj` could simultaneously produce internal developer docs (all members) and -a public NuGet consumer reference (public only): - -```xml - - - $(MSBuildProjectDirectory)\docs\api - single-file - All - - - $(MSBuildProjectDirectory)\api - gradual - Public - - -``` +## Python Document Generation -This means visibility is no longer a global parse-time gate — it becomes a -per-output rendering concern. Adding a new audience (e.g. `PublicAndProtected` -for subclass authors) costs nothing in parse time and requires no additional -source analysis. +Document public classes, functions, and module-level constants from Python source. +Type annotations and docstrings (Google, NumPy, or reStructuredText style) are +the primary documentation source. CLI-only. -The existing scalar `ApiMarkOutputDir` / `--output` properties default to a single -gradual-disclosure output and remain fully backward-compatible. The `ApiMarkOutput` -item group is opt-in for multi-format scenarios. +**Proposed implementation**: Invoke `python` as a subprocess with a one-liner that +uses the built-in `ast` module — no native DLLs, no grammar, no separate helper +script to deploy: -**Definition of done**: Both DotNet and Cpp generate correct output under both -`GradualDisclosureStrategy` and `SingleFileStrategy`. New languages drop straight -into the proven two-stage architecture without any further restructuring. +```text +python -c "import ast, sys; print(ast.dump(ast.parse(open(sys.argv[1]).read()), indent=4))" module.py +``` + +The AST dump is parsed by a new `ApiMark.Python` assembly using the same subprocess +pattern as `ApiMark.Cpp` with `clang -ast-dump=json` — a visitor walks the tree and +feeds the two-stage pipeline. --- -## Phase 2 — VHDL Document Generation +## VHDL Deeper Type Documentation -Document the public contract of VHDL design units - entities, architectures, -packages, and components - from source files and associated Doxygen-style doc -comments. Internal signal and process details are excluded; this is documentation -for IP consumers, not implementors. Likely CLI-only given the niche toolchain. +Extend the VHDL model with richer type information currently captured but not +emitted: -The first greenfield two-stage implementation — validates that the Phase 1 -architecture holds for a language with a fundamentally different symbol model. +- **Record type fields** — emit field name, type, and doc comment inline on the + type paragraph rather than showing only the type definition string. +- **Enumeration literals** — list enumeration values with their doc comments. +- **Protected types** — document protected type members (subprograms exposed as + part of the type's interface). +- **VHDL-2008 generic packages** — document generic-mapped package instantiations + as a distinct construct. -**Proposed implementation - Option A (ANTLR4, pure managed)**: Parse VHDL source -using an [ANTLR4 VHDL grammar](https://github.com/antlr/grammars-v4) and a -`ParseTreeVisitor` walking entity declarations, port maps, and generic lists. -Doc comments (lines starting with `--!`) are harvested from the preceding comment -block. No external tool dependency; all processing stays in-process. +--- -**Proposed implementation - Option B (Python + hdlConvertor, preferred)**: Invoke -`python` as a subprocess using [hdlConvertor](https://github.com/Nic30/hdlConvertor), -a battle-tested HDL parser that natively preserves Doxygen-style doc comments -attached to ports and generics - no comment scraping needed: +## SystemVerilog / Verilog Document Generation -```text -python -c "from hdlConvertor import HdlConvertor; import json, sys; ..." design.vhd -``` +Document modules, interfaces, and packages from SystemVerilog (or Verilog) source. +An ANTLR4 SystemVerilog grammar exists in the grammars-v4 repository — the same +in-process approach used for VHDL applies directly. Doc comments use the `//!` or +`/** */` Doxygen convention common in SystemVerilog codebases. -Consistent with the `clang -ast-dump=json` and Python `ast` subprocess patterns; -the JSON output is consumed by `ApiMark.Vhdl` feeding the two-stage pipeline. -Requires `pip install hdlConvertor` on the host. +Complements VHDL support for mixed-HDL projects. --- -## Phase 3 — Python Document Generation - -Document public classes, functions, and module-level constants from Python source. -Type annotations and docstrings (Google, NumPy, or reStructuredText style) are -the primary documentation source. Likely CLI-only. - -**Proposed implementation**: Invoke `python` as a subprocess with a one-liner that -uses the built-in `ast` module - no native DLLs, no grammar, no separate helper -script to deploy: - -```text -python -c "import ast, sys; print(ast.dump(ast.parse(open(sys.argv[1]).read()), indent=4))" module.py -``` +## Rust Document Generation -The AST dump is parsed by a new `ApiMark.Python` assembly using the same subprocess -pattern as `ApiMark.Cpp` with `clang -ast-dump=json` — a visitor walks the tree and -feeds the two-stage pipeline. +Document public items (structs, enums, traits, functions, type aliases) from Rust +source. `rustdoc --output-format json` produces a stable, richly typed JSON tree — +analogous to `clang -ast-dump=json` for C++. A new `ApiMark.Rust` assembly consumes +the JSON and feeds the two-stage pipeline. Requires `rustdoc` (ships with the +standard Rust toolchain). --- diff --git a/docs/design/api-mark-core.md b/docs/design/api-mark-core.md index ab4763f..c6f2338 100644 --- a/docs/design/api-mark-core.md +++ b/docs/design/api-mark-core.md @@ -20,6 +20,7 @@ flowchart TD IContext IMarkdownWriterFactory IMarkdownWriter + GlobFileCollector FileMarkdownWriterFactory --> |implements| IMarkdownWriterFactory FileMarkdownWriter --> |implements| IMarkdownWriter IMarkdownWriterFactory --> |creates| IMarkdownWriter @@ -29,14 +30,15 @@ flowchart TD IApiEmitter --> |Emit uses| IContext ``` -ApiMarkDotNet and ApiMarkCpp each implement IApiGenerator. The `Parse` method -returns an `IApiEmitter` (a private nested class) that holds the parsed symbol +ApiMarkDotNet, ApiMarkCpp, and ApiMarkVhdl each implement IApiGenerator. The `Parse` +method returns an `IApiEmitter` (a private nested class) that holds the parsed symbol model. The caller then calls `IApiEmitter.Emit` with an `EmitConfig` and `IMarkdownWriterFactory` to write the documentation tree. ApiMarkTool directly consumes IApiGenerator; ApiMarkMsbuild spawns ApiMarkTool as a child process and never calls IApiGenerator in-process. PathHelpers remains an internal utility used by ApiMarkCore implementations rather than a public dependency -surface. +surface. GlobFileCollector is a public static utility consumed by ApiMarkCpp +and ApiMarkVhdl to discover source files using glob patterns. ## External Interfaces @@ -129,6 +131,19 @@ supplied relative path segments with a trusted base path. - *Constraints*: Rejects combinations that resolve outside the base directory, and rejects null arguments. +**GlobFileCollector (public utility)**: Stateless public static utility for discovering +files on the filesystem using gitignore-style glob patterns. + +- *Type*: In-process .NET public API. +- *Role*: Shared utility — ApiMarkCpp and ApiMarkVhdl call it to convert caller-supplied + `--api-headers` and `--source` patterns into a sorted, deduplicated list of absolute + file paths. +- *Contract*: `IReadOnlyList Collect(IEnumerable patterns, + IEnumerable languageExtensions, string workingDirectory)` — evaluates inclusion + and exclusion patterns against the filesystem and returns matching absolute paths. +- *Constraints*: Non-existent roots are silently skipped; `!`-prefixed patterns remove + matching files; bare `*` final segments trigger language-extension filtering. + ## Dependencies N/A — ApiMarkCore has no dependencies on other systems, OTS items, or shared @@ -144,7 +159,8 @@ ApiMarkCore does not process data at runtime. Its contribution to the overall da flow is: 1. Language generators parse symbol data by reading assembly or header files during - `IApiGenerator.Parse`. + `IApiGenerator.Parse`. CppGenerator and VhdlGenerator use GlobFileCollector to + discover which source files to parse based on caller-supplied glob patterns. 2. Language emitters write Markdown content by calling IMarkdownWriter methods in document order inside `IApiEmitter.Emit`. 3. ApiMarkTool invokes `IApiGenerator.Parse` then `IApiEmitter.Emit` to trigger the diff --git a/docs/design/api-mark-core/glob-file-collector.md b/docs/design/api-mark-core/glob-file-collector.md new file mode 100644 index 0000000..e2049f9 --- /dev/null +++ b/docs/design/api-mark-core/glob-file-collector.md @@ -0,0 +1,108 @@ +## GlobFileCollector + + + +### Purpose + +GlobFileCollector is a stateless utility class in ApiMarkCore that provides +flexible, filesystem-based file discovery using gitignore-style glob patterns. +It is shared across all ApiMark language generators that require pattern-driven +file collection (currently C++ and VHDL). Callers supply an ordered list of +inclusion and exclusion patterns, a set of language-specific file extensions, +and a working directory for relative pattern resolution; the collector returns a +sorted, deduplicated list of absolute file paths. + +### Data Model + +`GlobFileCollector` is a `public static class` with no instance state. All +members are stateless and thread-safe. + +Internal fields: + +- `GlobMetacharacters` (`char[]`, private static readonly): the set of glob + metacharacters (`*`, `?`, `[`, `{`) used to locate the boundary between the + static path prefix and the glob tail in absolute patterns. + +### Key Methods + +**GlobFileCollector.Collect** (public static): Collects files from the +filesystem matching the specified patterns. + +- *Parameters*: + - `IEnumerable patterns` — ordered list of glob patterns; entries + prefixed with `!` are exclusion patterns (the `!` is stripped before + processing). + - `IEnumerable languageExtensions` — file extensions including the + leading dot (e.g. `.vhd`, `.h`) used to filter results when a pattern's + final segment is a bare `*`. + - `string workingDirectory` — absolute path used as the root for relative + patterns. +- *Returns*: `IReadOnlyList` — sorted, deduplicated absolute file paths. +- *Preconditions*: none — empty patterns return an empty list; non-existent + roots are silently skipped. +- *Algorithm*: + 1. For each pattern, strip a leading `!` (marks exclusion) and trim whitespace. + 2. Call `ParsePattern` to obtain a `(root, globTail)` pair. Relative patterns + use `workingDirectory` as root; absolute patterns derive their root from the + longest non-glob path prefix (see `SplitAbsolutePattern`). + 3. Skip the pattern silently if `globTail` is empty or `root` does not exist. + 4. Call `HasBareStarFinalSegment` to determine whether extension inference + applies (final segment is exactly `*`). + 5. Run `Microsoft.Extensions.FileSystemGlobbing.Matcher.GetResultsInFullPath` + from the resolved root. + 6. If extension inference applies, filter results to files whose extension + (case-insensitive) is in `languageExtensions`. + 7. Delegate to `AccumulateResults`: inclusion patterns add matching paths to the + result set; exclusion patterns remove matching paths from the result set. + 8. Return results sorted by ordinal string order. + +**GlobFileCollector.AccumulateResults** (private static): Adds or removes a set of +matched file paths from the collected set. + +- *Parameters*: `HashSet collected`, `IEnumerable results`, + `bool isExclusion`. +- *Algorithm*: when `isExclusion` is true, calls `collected.Remove` for each + full path; otherwise calls `collected.Add`. + +**GlobFileCollector.ParsePattern** (private static): Splits a pattern body into +a filesystem root and a glob tail. + +- Relative patterns: root = `workingDirectory`, tail = full pattern body. +- Absolute patterns: delegates to `SplitAbsolutePattern` after normalizing + backslashes to forward slashes. + +**GlobFileCollector.SplitAbsolutePattern** (private static): Splits a +forward-slash-normalized absolute pattern at the boundary between the longest +non-glob path prefix and the first glob metacharacter. + +- Returns `(root, tail)` where root is the longest static prefix (a real + directory) and tail is passed to `Matcher.AddInclude`. +- If no metacharacter is found, returns `(pattern, "")` — no glob tail. +- If no `/` precedes the first metacharacter, returns `("", pattern)` — no + static root. + +**GlobFileCollector.HasBareStarFinalSegment** (private static): Returns `true` +when the final path segment of the glob tail is exactly `*` (a bare wildcard +with no extension), triggering language-extension filtering. + +### Error Handling + +`GlobFileCollector.Collect` never throws for missing directories or empty +pattern lists. Non-existent roots are skipped silently. All other exceptions +(e.g. I/O errors from `Matcher.GetResultsInFullPath`) propagate to the caller. + +### Dependencies + +- **Microsoft.Extensions.FileSystemGlobbing** (NuGet) — `Matcher` class used + for recursive glob evaluation. + +### Callers + +- **CppGenerator** — calls `GlobFileCollector.Collect` with C++ header + extensions (`.h`, `.hpp`, `.hxx`, `.h++`) and the configured + `ApiHeaderPatterns` to determine which headers are passed to Clang and + documented. +- **VhdlGenerator** — calls `GlobFileCollector.Collect` with VHDL extensions + (`.vhd`, `.vhdl`) and the configured `Sources` patterns to discover which + VHDL files are parsed. diff --git a/docs/design/api-mark-core/i-markdown-writer-factory.md b/docs/design/api-mark-core/i-markdown-writer-factory.md index 58fecda..d268882 100644 --- a/docs/design/api-mark-core/i-markdown-writer-factory.md +++ b/docs/design/api-mark-core/i-markdown-writer-factory.md @@ -46,7 +46,7 @@ disk; test doubles capture writes in memory. - *Throws*: `ArgumentException` when `outputDirectory` is null, empty, or whitespace. **FileMarkdownWriterFactory.CreateMarkdown**: Combines `_outputDirectory` with `subFolder` -using `Path.Join` (platform separator inserted between segments), calls +using `PathHelpers.SafePathCombine` (path-traversal checked), calls `Directory.CreateDirectory` on the resulting target path, then opens a UTF-8 `StreamWriter` at `{targetDirectory}/{name}.md` and wraps it in a `FileMarkdownWriter`. @@ -81,6 +81,8 @@ The `IMarkdownWriterFactory` interface itself has no dependencies; the following and calls CreateMarkdown once per output file produced during generation. - **CppGenerator** — receives an IMarkdownWriterFactory passed to `IApiEmitter.Emit` and calls CreateMarkdown once per output file produced during generation. +- **VhdlGenerator** — receives an IMarkdownWriterFactory passed to `IApiEmitter.Emit` + and calls CreateMarkdown once per output file produced during generation. - **ApiMarkTask** — spawns ApiMark.Tool as a child process, within which Program creates the `FileMarkdownWriterFactory`. ApiMarkTask does not use IMarkdownWriterFactory directly. diff --git a/docs/design/api-mark-core/i-markdown-writer.md b/docs/design/api-mark-core/i-markdown-writer.md index 1479f0f..ef43c21 100644 --- a/docs/design/api-mark-core/i-markdown-writer.md +++ b/docs/design/api-mark-core/i-markdown-writer.md @@ -26,10 +26,10 @@ implementation, `FileMarkdownWriter`, holds: **IMarkdownWriter.WriteHeading**: Writes a Markdown heading at the specified depth. -- *Parameters*: `int level` — heading depth (1–4); `string text` — heading text. +- *Parameters*: `int level` — heading depth (1–6); `string text` — heading text. - *Returns*: `void` -- *Preconditions*: `level` must be between 1 and 4 inclusive. -- *Postconditions*: A Markdown heading line (`# text` through `#### text`) is +- *Preconditions*: `level` must be between 1 and 6 inclusive. +- *Postconditions*: A Markdown heading line (`# text` through `###### text`) is appended to the current output file. **IMarkdownWriter.WriteSignature**: Writes a code-fenced API signature block. @@ -109,3 +109,7 @@ on other units, OTS items, or shared packages. for each namespace, type, and member discovered in the public headers. Writers are obtained from the IMarkdownWriterFactory passed to `IApiEmitter.Emit` and disposed after each file is complete. +- **VhdlGenerator** — calls IMarkdownWriter write methods to emit Markdown content + for each entity and package discovered in the VHDL source files. Writers are + obtained from the IMarkdownWriterFactory passed to `IApiEmitter.Emit` and + disposed after each file is complete. diff --git a/docs/design/api-mark-cpp.md b/docs/design/api-mark-cpp.md index 30f1f98..ee829ac 100644 --- a/docs/design/api-mark-cpp.md +++ b/docs/design/api-mark-cpp.md @@ -121,10 +121,10 @@ N/A — not a safety-classified software item. include root, avoiding processing of system and third-party headers. 4. `ClangAstParser` returns a `CppCompilationResult` containing all declarations physically located in the public headers, already filtered by ownership. -5. CppGenerator applies the IsOwnedDeclaration filter to each declaration: - only declarations whose source file normalizes to a path under a - PublicIncludeRoot that was selected by ApiHeaderPatterns are documented. - System and third-party declarations are used for type resolution only. +5. `ClangAstParser` rejects declarations whose source file is not in the + pre-selected header set (built by `CollectHeaderFiles()` via `GlobFileCollector`). + Only declarations from selected headers are documented; system and third-party + declarations are used for type resolution only. 6. For each owned declaration, CppGenerator derives the canonical #include path as the source file path relative to its matching PublicIncludeRoot, expressed with forward slashes. diff --git a/docs/design/api-mark-cpp/cpp-emitter.md b/docs/design/api-mark-cpp/cpp-emitter.md index 004eb61..4ecf959 100644 --- a/docs/design/api-mark-cpp/cpp-emitter.md +++ b/docs/design/api-mark-cpp/cpp-emitter.md @@ -63,8 +63,10 @@ declaration shown in the signature block. **CppEmitter.WriteCombinedMemberPage** (internal): Writes a single combined page for members whose base names collide on case-insensitive filesystems. -- *Parameters*: factory, nsKey, nsDisplayName, cls, lowerKey (the shared lowercase - key), members list (at least two; functions or fields). +- *Parameters*: `IMarkdownWriterFactory factory`, `string nsKey`, `string nsDisplayName`, + `CppClass cls`, `string lowerKey` (the shared lowercase key), members list (at + least two; functions or fields), `CppTypeLinkResolver cppResolver` — type link + resolver used to linkify parameter type cells. - *Returns*: `void` - *Algorithm*: Creates `{nsKey}/{cls.Name}/{lowerKey}.md`; writes H1 heading using `lowerKey`; for each function member writes an H2 heading and delegates to diff --git a/docs/design/api-mark-cpp/cpp-generator.md b/docs/design/api-mark-cpp/cpp-generator.md index 5286655..5ae874c 100644 --- a/docs/design/api-mark-cpp/cpp-generator.md +++ b/docs/design/api-mark-cpp/cpp-generator.md @@ -6,14 +6,12 @@ ### Purpose CppGenerator implements IApiGenerator for C++ libraries. It accepts a -configured set of public include roots and parse-environment options, invokes -`clang -Xclang -ast-dump=json` to obtain a fully resolved C++ AST, applies a file-provenance filter -to identify declarations that belong to the documented public API, derives the -canonical `#include` path for each owned type from its source file relative to -its matching include root, and writes the complete gradual-disclosure Markdown -tree through IMarkdownWriterFactory. The output structure mirrors -DotNetGenerator: a library-level entrypoint, per-namespace summaries, per-type -pages, and per-member detail pages for every visible member. +configured set of public include roots and parse-environment options, collects +the selected header files via `GlobFileCollector`, invokes +`clang -Xclang -ast-dump=json` on a temporary combined header, and returns a +`CppEmitter` ready to write the complete Markdown output tree. The output +structure mirrors DotNetGenerator: a library-level entrypoint, per-namespace +summaries, per-type pages, and per-member detail pages for every visible member. The implementation is split across six files in the `ApiMark.Cpp` package: @@ -119,84 +117,45 @@ for use during Generate. - *Parameters*: `CppGeneratorOptions options` — fully populated options object. - *Preconditions*: `options` must not be null; `LibraryName` must be non-empty; `PublicIncludeRoots` must contain at least one entry. -- *Postconditions*: The generator instance is ready to call Generate. - -**CppGenerator.Generate**: Parses the public headers, applies the ownership -filter, and writes the full Markdown output tree. - -- *Parameters*: `IMarkdownWriterFactory factory` — factory used to create each - Markdown output file. `IContext context` — output channel for diagnostic and - progress messages emitted during parsing and generation. -- *Returns*: `void` -- *Preconditions*: Each path in `PublicIncludeRoots` must exist on disk - (`DirectoryNotFoundException` is thrown if any path is missing); system - headers must be resolvable via `SystemIncludePaths`; `factory` and `context` - must not be null. Public headers are required to be self-contained — each - header must parse successfully on its own under the configured options. -- *Postconditions*: The factory has produced a complete Markdown tree. Output - file naming follows these conventions: - - `factory.CreateMarkdown("", "api")` — library entrypoint listing all - namespaces with a declaration count column (classes + enums + free - functions per namespace) and one-line descriptions, giving AI agents a - complete navigation map and scope signal in one read. The entrypoint also - includes a File Naming and Path Convention table with these entries: - - | Symbol kind | Path pattern | - | ----------- | ------------ | - | Namespace | `{Namespace}.md` | - | Type | `{Namespace}/{TypeName}.md` | - | Type alias | `{Namespace}/{AliasName}.md` | - | Member | `{Namespace}/{TypeName}/{MemberName}.md` | - | Free function | `{Namespace}/{FunctionName}.md` | - | Enum | `{Namespace}/{EnumName}.md` | - | Operators (class) | `{Namespace}/{TypeName}/operators.md` | - | Operators (namespace) | `{Namespace}/operators.md` | - - - `factory.CreateMarkdown(qualifiedNamespace, qualifiedNamespace)` — - namespace summary listing owned types and free functions, grouped by source - header. `qualifiedNamespace` is the C++ qualified name with `::` replaced - by `.` for file-path compatibility (e.g. `mylib.rendering`). - - `factory.CreateMarkdown(qualifiedNamespace, typeName)` — type page with - the canonical `#include ` at the top, followed by the class - declaration, inheritance information, template parameters (for primary - templates), and grouped sub-tables with links to all member detail pages. - When the class is marked `final` or has direct base classes, a class - declaration line (e.g. `class FinalClass final`, `class Circle : public Shape`) - is appended to the signature block so consumers can see the constraint and - inheritance chain without opening the header. - - `factory.CreateMarkdown($"{qualifiedNamespace}/{typeName}", memberName)` — - dedicated page for every visible non-operator member. All non-operator members - always receive their own page, making navigation fully deterministic. - - `factory.CreateMarkdown($"{qualifiedNamespace}/{typeName}", "operators")` — - single combined page for all operator overloads declared in a class (e.g. - `operator+`, `operator==`). Grouping prevents file-name collisions caused by - sanitizing multiple operator names to the same safe file name. - - `factory.CreateMarkdown(qualifiedNamespace, "operators")` — - single combined page for all namespace-level operator free functions (e.g. - `operator<<` for a type). Same grouping rationale as the class operators page. - - Global-namespace declarations are collected under the reserved namespace - name `"global"`. - -Execution steps: enumerate candidate header files under each PublicIncludeRoot -applying ApiHeaderPatterns with gitignore-style last-match-wins semantics; build -Clang options from all configured paths, defines, standard, and additional arguments; -write a temporary combined header that `#include`s all candidate headers, invoke -`clang -Xclang -ast-dump=json -fparse-all-comments -fsyntax-only` on it, parse the resulting -JSON AST; walk the AST and apply IsOwnedDeclaration to each declaration; apply -Visibility and IncludeDeprecated filters; write the library entrypoint; for -each namespace write the namespace summary; for each owned type: collect all -visible constructors, methods, and fields; partition methods into operator -overloads (names starting with `"operator"`) and regular methods; build a -case-insensitive map keyed by the lowercase of each regular member's base name -(see `GetMemberBaseName`); for each key with a single regular member emit an -individual detail page via `WriteMemberPage`; for each key with multiple regular -members (case-insensitive collision) emit a single combined page via -`WriteCombinedMemberPage`; if operator overloads are present emit a single -`operators.md` page via `WriteClassOperatorsPage`; emit grouped sub-tables with -links; for each namespace with operator free functions emit a single -`operators.md` page via `WriteNamespaceOperatorsPage` instead of individual -pages; for each owned type alias emit a type alias page via `WriteTypeAliasPage`; -delete the temporary combined header file. +- *Postconditions*: The generator instance is ready to call Parse. + +**CppGenerator.Parse**: Collects candidate header files, invokes clang to obtain +a fully resolved C++ AST, applies visibility and deprecation filters, and returns +a `CppEmitter` holding all parsed data. + +- *Parameters*: `IContext context` — output channel for diagnostic and progress + messages emitted during parsing. Must not be null. +- *Returns*: `IApiEmitter` — a `CppEmitter` instance holding the parsed + namespace, type, and member data ready for emission. +- *Preconditions*: Each path in `PublicIncludeRoots` must exist on disk when + `ApiHeaderPatterns` is empty (`DirectoryNotFoundException` is thrown if any + path is missing); system headers must be resolvable via `SystemIncludePaths`; + `context` must not be null. Public headers are required to be self-contained — + each header must parse successfully on its own under the configured options. +- *Postconditions*: The returned `CppEmitter` contains all namespaces, types, + and members parsed from the selected headers, filtered by `Visibility` and + `IncludeDeprecated`. The caller must subsequently invoke `IApiEmitter.Emit` to + write Markdown output. + +Execution steps: call `CollectHeaderFiles()` which uses `GlobFileCollector.Collect()` +to build the selected-header set from `ApiHeaderPatterns` and `PublicIncludeRoots`; +when `ApiHeaderPatterns` is empty all headers under all roots are used directly; +when `ApiHeaderPatterns` is non-empty relative patterns are expanded against each +include root via `ExpandExplicitPatterns`; build Clang options from all configured +paths, defines, standard, and additional arguments; write a temporary combined +header that `#include`s all selected headers; invoke +`clang -Xclang -ast-dump=json -fparse-all-comments -fsyntax-only` on it, parse the +resulting JSON AST; `ClangAstParser` rejects non-selected declarations during AST +walking using the pre-built selected-header set; apply `Visibility` and +`IncludeDeprecated` filters; delete the temporary combined header file; return a +`CppEmitter` holding all parsed data. + +**CppGenerator.ExpandExplicitPatterns** (private): Expands relative +`ApiHeaderPatterns` entries against each configured include root. + +- *Returns*: `List` — all patterns with relative entries resolved to + absolute paths under each root; absolute patterns passed through unchanged; + exclusion prefix `!` preserved. **CppEmitter.Emit** (implements `IApiEmitter`): Writes the full Markdown output tree using the format specified by `config.Format`. @@ -210,37 +169,13 @@ format specified by `config.Format`. is passed. - *Postconditions (GradualDisclosure)*: Delegates all page writing to a new `CppEmitterGradualDisclosure` instance, producing one file per namespace, type, member, and - operator group as described in `CppGenerator.Generate`. + operator group as described in `CppGenerator.Parse`. - *Postconditions (SingleFile)*: Delegates all page writing to a new `CppEmitterSingleFile` instance, producing a single `api.md` file with an H{depth} library title, H{depth+1} namespace heading, H{depth+2} type/function/enum heading (with signature and member bullet list), and H{depth+3} individual member headings. Type links are omitted to prevent anchor collisions in the single-file layout. The convention appendix is not included in single-file output. -**IsOwnedDeclaration** (internal): Determines whether a declaration belongs to -the documented public API. - -- *Parameters*: declaration source file (absolute, normalized path). -- *Returns*: `(bool owned, string includeRoot, string relativePath)` — owned - is true when the file falls under a PublicIncludeRoot and is selected by - ApiHeaderPatterns; includeRoot and relativePath are set when owned is true. -- *Algorithm*: - 1. Normalize the declaration source file path: resolve to absolute path, - normalize directory separators to the OS separator, resolve `..` and - symbolic links. - 2. For each PublicIncludeRoot (normalized to absolute path), test whether the - declaration file starts with the root path. Collect all matching roots. - 3. Select the longest matching root (most specific path wins when roots - overlap). - 4. Compute relative path: strip the root prefix and normalize separators to - forward slashes. - 5. When ApiHeaderPatterns is non-empty, test whether the file is selected using - gitignore-style last-match-wins evaluation. Patterns are first evaluated - CWD-relative (when the file falls within the current working directory); when - the root is outside the CWD the file path relative to the root is used instead. - Return owned=true only when the final evaluated state is included. When - ApiHeaderPatterns is empty, all files under the matched root are owned. - **CppEmitter.WriteCombinedMemberPage** (internal static): Writes a single combined Markdown page for a group of members whose base names collide on case-insensitive filesystems. diff --git a/docs/design/api-mark-dot-net.md b/docs/design/api-mark-dot-net.md index 43a3b00..5e5be52 100644 --- a/docs/design/api-mark-dot-net.md +++ b/docs/design/api-mark-dot-net.md @@ -102,12 +102,14 @@ N/A — not a safety-classified software item. type and member metadata from disk without loading the assembly into the AppDomain. 3. DotNetGenerator parses the XML documentation file and indexes entries by member identifier string. -4. DotNetGenerator calls `factory.CreateMarkdown("", "api")` and writes the +4. DotNetEmitter selects the active emitter sub-component (DotNetEmitterGradualDisclosure + or DotNetEmitterSingleFile) based on EmitConfig.Format. For gradual-disclosure output, + DotNetEmitterGradualDisclosure calls `factory.CreateMarkdown("", "api")` and writes the assembly-level entrypoint file listing all namespaces. -5. For each namespace, DotNetGenerator calls `factory.CreateMarkdown(namespaceName, +5. For each namespace, DotNetEmitterGradualDisclosure calls `factory.CreateMarkdown(namespaceFolderPath, namespaceName)` and writes a namespace summary listing all visible types. -6. For each visible type, DotNetGenerator writes every member to its own dedicated - file via `factory.CreateMarkdown(namespaceName, typeName)` and links all members +6. For each visible type, DotNetEmitterGradualDisclosure writes every member to its own dedicated + file via `factory.CreateMarkdown(namespaceFolderPath, typeName)` and links all members from the type page. Each member receives its own page, except where case-insensitive filename collisions on a single type require combining colliding members onto one shared page. diff --git a/docs/design/api-mark-dot-net/dot-net-emitter-gradual-disclosure.md b/docs/design/api-mark-dot-net/dot-net-emitter-gradual-disclosure.md index 5c8d6e2..46fecef 100644 --- a/docs/design/api-mark-dot-net/dot-net-emitter-gradual-disclosure.md +++ b/docs/design/api-mark-dot-net/dot-net-emitter-gradual-disclosure.md @@ -34,10 +34,11 @@ iterates all namespaces and types, writing namespace summary and type pages. page for a group of members whose sanitized file names collide on case-insensitive file systems. -- *Algorithm*: Creates `{namespaceFolderPath}/{type.Name}/{lowerKey}.md` via the +- *Algorithm*: Creates `{namespaceFolderPath}/{FlattenArity(type.Name)}/{lowerKey}.md` via the factory; writes an H1 heading using `lowerKey`; for each member writes an H2 heading of the form `{displayName} ({kindLabel})`; delegates to - `WriteMethodDocumentation` for `MethodDefinition` members. + `WriteMethodDocumentation` for `MethodDefinition` members and to + `WriteNonMethodMemberContent` for all other member kinds. **IsPureMethodOverloadGroup** (private static): Returns true when all members in a collision group are `MethodDefinition` instances sharing the same exact @@ -55,7 +56,9 @@ in table cells. ### Path Conventions - Assembly index: `factory.CreateMarkdown("", "api")` -- Namespace summary: `factory.CreateMarkdown(namespaceFolderPath, namespaceFolderPath)` +- Namespace summary: `factory.CreateMarkdown(subFolder, shortName)` where `subFolder` + and `shortName` are produced by splitting `namespaceFolderPath` at the last separator + (e.g. for `ApiMark.DotNet.Fixtures`, `subFolder=""` and `shortName="ApiMark.DotNet.Fixtures"`) - Type page: `factory.CreateMarkdown(namespaceFolderPath, typeSimpleName)` - Member detail: `factory.CreateMarkdown("{namespaceFolderPath}/{typeSimpleName}", memberName)` - Operators page: `factory.CreateMarkdown("{namespaceFolderPath}/{typeSimpleName}", "operators")` diff --git a/docs/design/api-mark-dot-net/dot-net-emitter-single-file.md b/docs/design/api-mark-dot-net/dot-net-emitter-single-file.md index f536b9d..0f4e4de 100644 --- a/docs/design/api-mark-dot-net/dot-net-emitter-single-file.md +++ b/docs/design/api-mark-dot-net/dot-net-emitter-single-file.md @@ -36,6 +36,20 @@ into that writer at heading levels `HeadingDepth` (assembly title), type cells contain plain text rather than relative file links that are meaningless inside a single document. +**WriteSingleFileTypeSections** (private): Writes all content for a single type — +type heading, signature code block, summary, remarks, example, compact member +bullet list, and then dispatches to `WriteSingleFileMemberSection` for each +visible member. Recursively calls `WriteSingleFileNestedTypes` when the type +contains nested types. + +**WriteSingleFileMemberSection** (private): Writes the full per-member block for +one member — member heading, signature code block, summary, parameter table, +returns documentation, exception table, and example block. + +**WriteSingleFileNestedTypes** (private): Recursively emits documentation for +nested types within a type section by calling `WriteSingleFileTypeSections` for +each visible nested type at the appropriate heading level. + ### Error Handling Exceptions from `IMarkdownWriterFactory.CreateMarkdown` or from writer methods diff --git a/docs/design/api-mark-dot-net/dot-net-emitter.md b/docs/design/api-mark-dot-net/dot-net-emitter.md index 36e21c4..2fbc376 100644 --- a/docs/design/api-mark-dot-net/dot-net-emitter.md +++ b/docs/design/api-mark-dot-net/dot-net-emitter.md @@ -26,7 +26,8 @@ sub-emitters: - *DescriptionColumnHeader*: `"Description"` — column header for all generated Markdown tables. - *NoDescriptionPlaceholder*: `"*No description provided.*"` — placeholder - emitted when no XML doc summary is available. + emitted when no XML doc summary is available, and also used as the fallback + cell value in parameter tables when a `` tag carries no description text. - *ConstructorMethodName*: `".ctor"` — the .NET metadata method name used for all instance constructors. @@ -61,6 +62,29 @@ C# declaration signature for a type definition. - *Returns*: `string` — e.g. `public class Name`, `public interface Name`, or `public class Name : BaseClass, IInterface`. +**Shared Helper Methods** (internal static): DotNetEmitter exposes shared helper +methods consumed by DotNetEmitterGradualDisclosure and DotNetEmitterSingleFile. +These helpers are grouped by concern: + +- *Visibility filters* — `IsTypeVisible`, `IsMemberVisible`, `GetVisibleMembers`, + `ShouldIncludeMember`: determine which types and members are included based on + the configured visibility level and `IncludeObsolete` flag. +- *ID and file-name builders* — `BuildMemberId`, `BuildMethodId`, + `BuildMemberFileName`, `BuildMethodFileName`, `GetMethodGroupName`: produce the + XML-doc member IDs and sanitized file-name segments used by both emitters. +- *Signature builders* — `BuildMemberSignature`, `BuildMethodSignature`, + `BuildPropertySignature`, `BuildFieldSignature`, `BuildEventSignature`: produce + the human-readable C# declaration strings written into code-fence blocks. +- *Type predicates* — `IsOperator`, `IsDelegate`, `IsSpecialNameNonConstructor`, + `IsExtensionMethod`, `IsBackingField`, `IsNamespaceDocCarrier`: categorize + members to drive conditional rendering paths. +- *Accessibility helpers* — `GetAccessibilityKeyword` (overloads for + `TypeDefinition`, `MethodDefinition`, `FieldDefinition`, `PropertyDefinition`, + `EventDefinition`): map Mono.Cecil access flags to C# keywords. +- *Type utilities* — `GetMemberTypeRef`, `IsMemberTypeNullableAnnotated`, + `StripArity`, `SanitizeFileName`: extract type references, detect nullable + annotations, and produce filesystem-safe name segments. + ### Error Handling `DotNetEmitter.Emit` throws `ArgumentNullException` when `factory` is null. diff --git a/docs/design/api-mark-dot-net/dot-net-generator.md b/docs/design/api-mark-dot-net/dot-net-generator.md index 4ecb952..1066ec8 100644 --- a/docs/design/api-mark-dot-net/dot-net-generator.md +++ b/docs/design/api-mark-dot-net/dot-net-generator.md @@ -15,7 +15,7 @@ tree (one file per concept) or a single-file Markdown document through detail page in gradual-disclosure mode, making all navigation paths fully deterministic. -The implementation is split across seven files in the `ApiMark.DotNet` package: +The implementation is split across eight files in the `ApiMark.DotNet` package: - **DotNetGenerator.cs** — thin `IApiGenerator` that parses the assembly and returns a `DotNetEmitter`. @@ -29,6 +29,8 @@ The implementation is split across seven files in the `ApiMark.DotNet` package: - **DotNetEmitterSingleFile.cs** — all single-file page writers. - **TypeLinkResolver.cs** — resolves Mono.Cecil type references to Markdown link text for use in table cells. See TypeLinkResolver Design for full details. +- **TypeNameSimplifier.cs** — simplifies CLR type names into idiomatic C# display + text. See TypeNameSimplifier Design for full details. - **XmlDocReader.cs** — reads and indexes the XML documentation file for O(1) per-member lookups. See XmlDocReader Design for full details. @@ -77,8 +79,9 @@ instance for use during Parse. **DotNetGenerator.Parse**: Reads the assembly and XML documentation file into memory and returns a `DotNetEmitter` ready to emit. -- *Parameters*: `IContext context` — output channel for diagnostic and progress - messages emitted during parsing. +- *Parameters*: `IContext context` — output channel reserved for future diagnostic + and progress messages; DotNetGenerator does not currently emit any messages + through this channel during parsing. - *Returns*: `IApiEmitter` — a `DotNetEmitter` holding all parsed namespace, type, and member data. - *Preconditions*: `AssemblyPath` and `XmlDocPath` must exist on disk; `context` @@ -97,9 +100,9 @@ tree using the format specified by `config.Format`. - *Postconditions (GradualDisclosure)*: The factory has produced a complete Markdown tree for the configured assembly. Output file naming follows: - `factory.CreateMarkdown("", "api")` — assembly entrypoint. - - `factory.CreateMarkdown(namespaceName, namespaceName)` — namespace summary. - - `factory.CreateMarkdown(namespaceName, typeSimpleName)` — type page. - - `factory.CreateMarkdown($"{namespaceName}/{typeSimpleName}", memberName)` — + - `factory.CreateMarkdown(namespaceFolderPath, namespaceName)` — namespace summary. + - `factory.CreateMarkdown(namespaceFolderPath, typeSimpleName)` — type page. + - `factory.CreateMarkdown($"{namespaceFolderPath}/{typeSimpleName}", memberName)` — dedicated file for every visible member. - *Postconditions (SingleFile)*: A single `api.md` is created via `factory.CreateMarkdown("", "api")` containing the full documentation tree @@ -162,7 +165,7 @@ case-insensitive collision. comparison. **DotNetEmitterGradualDisclosure.GetMemberKindLabel** (private static): Maps an `IMemberDefinition` to -a short human-readable kind string used in combined page H4 headings. +a short human-readable kind string used in combined page H2 headings. - *Parameters*: `IMemberDefinition member` — the member to classify. - *Returns*: `string` — one of `"Field"`, `"Property"`, `"Event"`, diff --git a/docs/design/api-mark-dot-net/xml-doc-reader.md b/docs/design/api-mark-dot-net/xml-doc-reader.md index 455c101..8618b2b 100644 --- a/docs/design/api-mark-dot-net/xml-doc-reader.md +++ b/docs/design/api-mark-dot-net/xml-doc-reader.md @@ -42,7 +42,8 @@ absent. May contain multiple lines. **GetParams**: Returns parameter names and descriptions for `memberId` as `IReadOnlyList<(string Name, string? Description)>`. Returns an empty list -when the member is absent. +when the member is absent. `` elements without a `name` attribute are +silently filtered out. **GetReturns**: Returns trimmed returns text for `memberId`, or `null` if absent. diff --git a/docs/design/api-mark-msbuild/api-mark-task.md b/docs/design/api-mark-msbuild/api-mark-task.md index 5178605..832e31e 100644 --- a/docs/design/api-mark-msbuild/api-mark-task.md +++ b/docs/design/api-mark-msbuild/api-mark-task.md @@ -22,7 +22,8 @@ when true, the task returns success immediately with no side effects, allowing projects to opt out of documentation generation without removing the package. **ApiMarkTask.ApiMarkLanguage**: `string` — MSBuild property `$(ApiMarkLanguage)`; -selects the generation language. Accepted values: `dotnet`, `cpp`. When not set, +selects the generation language. Accepted values: `dotnet`, `cpp`. Any other value +causes `Execute` to log an error and return `false`. When not set, the task infers the language: `.vcxproj` project → `cpp`, all others → `dotnet`. **ApiMarkTask.ProjectExtension**: `string` — MSBuild property @@ -36,7 +37,8 @@ the directory where Markdown output is written. **ApiMarkTask.ApiMarkVisibility**: `string` — MSBuild property `$(ApiMarkVisibility)`; the visibility filter forwarded to the tool. Accepted -values: `Public`, `PublicAndProtected`, `All`. Defaults to `Public` when not set. +values: `Public`, `PublicAndProtected`, `All`. When not set, the `--visibility` +flag is omitted and the tool applies its own default of `Public`. **ApiMarkTask.ApiMarkIncludeObsolete**: `bool` — MSBuild property `$(ApiMarkIncludeObsolete)`; when true, the tool includes members marked @@ -149,23 +151,33 @@ argument list, spawns the tool process, and pipes its output to the MSBuild log. Execution steps: check `DisableApiMark` — if true, return true immediately; resolve language from `ApiMarkLanguage` or project extension inference; if language is +not `dotnet` or `cpp`, log an error and return false; if language is `dotnet` and `ApiMarkXmlDocPath` is not set, return true (skip generation); if language is `cpp` and `ApiMarkIncludePaths` is not set, return true (skip generation with an informational log message); resolve the `dotnet` executable path (check `DOTNET_HOST_PATH` environment variable first, then search `PATH`); -if `ApiMarkOutputs` is non-empty, spawn one child process per item using metadata -overrides for `OutputDir`, `Format`, and `Visibility`; otherwise build the -argument list from scalar MSBuild properties according to language-specific -mapping (for `cpp`, split `ApiMarkIncludePaths` on `;` and emit one `--includes` -flag per entry; split `ApiMarkApiHeaders` on `;` and emit one `--api-headers` -flag per entry, order-preserved including `!` exclusion patterns; if `ApiMarkLibraryName` -is set, append `--library-name`; if `ApiMarkLibraryDescription` is set, append -`--library-description`; if `ApiMarkDefines` is set, convert semicolons to commas -and append `--defines`; if `ApiMarkCppStandard` is set, append `--cpp-standard`; -if `ApiMarkClangPath` is set, append `--clang-path`; if `ApiMarkFormat` is set, -append `--format`); start the child process and pipe stdout lines as MSBuild -messages and stderr lines as MSBuild errors; wait for exit; return true if exit -code is zero, otherwise log an error with the exit code and return false. +if `ApiMarkOutputs` is non-empty, delegate to `ExecuteAllOutputs` which spawns one +child process per item using metadata overrides for `OutputDir`, `Format`, and +`Visibility`; otherwise build the argument list from scalar MSBuild properties +according to language-specific mapping (for `cpp`, split `ApiMarkIncludePaths` on +`;` and emit one `--includes` flag per entry; split `ApiMarkApiHeaders` on `;` and +emit one `--api-headers` flag per entry, order-preserved including `!` exclusion +patterns; if `ApiMarkLibraryName` is set, append `--library-name`; if +`ApiMarkLibraryDescription` is set, append `--library-description`; if +`ApiMarkDefines` is set, convert semicolons to commas and append `--defines`; if +`ApiMarkCppStandard` is set, append `--cpp-standard`; if `ApiMarkClangPath` is set, +append `--clang-path`; if `ApiMarkFormat` is set, append `--format`); start the +child process and pipe stdout lines as MSBuild messages and stderr lines as MSBuild +errors; wait for exit; return true if exit code is zero, otherwise log an error +with the exit code and return false. + +**ApiMarkTask.ExecuteAllOutputs** (private): Iterates `ApiMarkOutputs` and spawns +one child process per item. + +- *Parameters*: `string dotnetExe`, `string language`. +- *Returns*: `bool` — true only when every child process exits with code zero. +- *Algorithm*: for each `ApiMarkOutputs` item calls `BuildArgumentsForOutput` then + `RunToolProcess`; accumulates failures; returns false if any process failed. ### Error Handling diff --git a/docs/design/api-mark-tool.md b/docs/design/api-mark-tool.md index 4986499..a853c3a 100644 --- a/docs/design/api-mark-tool.md +++ b/docs/design/api-mark-tool.md @@ -38,7 +38,7 @@ users or CI pipelines. `-v, --version`, `-?, -h, --help`, `--silent`, `--validate`, `--results ` (alias: `--result `), `--format ` (values: `gradual (default)`, `single-file`), `--depth <#>`, `--log `. - Supported subcommands: `dotnet`, `cpp`. + Supported subcommands: `dotnet`, `cpp`, `vhdl`. Options for `dotnet`: `--assembly `, `--xml-doc `, `--output `, `--visibility `, `--include-obsolete`. Options for `cpp`: `--includes ` (repeatable), `--api-headers ` @@ -46,6 +46,8 @@ users or CI pipelines. `--library-name `, `--library-description `, `--defines `, `--cpp-standard `, `--clang-path `, `--output `, `--visibility `, `--include-obsolete`. + Options for `vhdl`: `--source ` (repeatable, ordered, supports `!` exclusion patterns), + `--output `, `--library-name `, `--library-description `. Standard flags are valid anywhere in the argument list, before or after the language subcommand (single-pass parser). - *Constraints*: Exits non-zero on error; writes a descriptive message to stderr; @@ -71,6 +73,8 @@ implementations from ApiMarkCore and dispatches to them using the two-stage pipe subcommand — see ApiMarkDotNet System Design. - **ApiMarkCpp**: Program constructs `CppGenerator` for the `cpp` subcommand — see ApiMarkCpp System Design. +- **ApiMarkVhdl**: Program constructs `VhdlGenerator` for the `vhdl` subcommand — see + ApiMarkVhdl System Design. - **ApiMarkCore**: Program references `IApiGenerator` from ApiMarkCore — see ApiMarkCore System Design. - **DemaConsulting.TestResults**: Program uses `TrxSerializer` and `JUnitSerializer` @@ -91,7 +95,8 @@ N/A — not a safety-classified software item. 3. Program validates that all required options for the requested language are present; exits non-zero with a usage message if any are missing. 4. Program constructs the appropriate `IApiGenerator` implementation based on the - language subcommand (`DotNetGenerator` for `dotnet`; `CppGenerator` for `cpp`). + language subcommand (`DotNetGenerator` for `dotnet`; `CppGenerator` for `cpp`; + `VhdlGenerator` for `vhdl`). 5. Program creates a `FileMarkdownWriterFactory` for the output directory, builds an `EmitConfig` from the parsed context (using `--format` and `--depth`), calls `IApiGenerator.Parse(context)` to obtain an `IApiEmitter`, and then calls diff --git a/docs/design/api-mark-tool/cli.md b/docs/design/api-mark-tool/cli.md index c3db37e..fdb24a1 100644 --- a/docs/design/api-mark-tool/cli.md +++ b/docs/design/api-mark-tool/cli.md @@ -25,7 +25,7 @@ can be tested independently. file cannot be opened. - `Context` (IDisposable) — exposes parsed flags and options as typed properties (`Version`, `Help`, `Silent`, `Validate`, `Language`, - `Assembly`, `XmlDoc`, `Includes`, `ApiHeaders`, `Output`, `Visibility`, + `Assembly`, `XmlDoc`, `Includes`, `ApiHeaders`, `Sources`, `Output`, `Visibility`, `IncludeObsolete`, `ResultsFile`, `HeadingDepth`, `Format`, `LibraryName`, `LibraryDescription`, `Defines`, `CppStandard`, `ClangPath`, `ExitCode`) and provides `WriteLine` and `WriteError` for all program output routing. @@ -44,7 +44,7 @@ flags (`-v`, `--version`, `-?`/`-h`/`--help`, `--silent`, `--validate`, `--log`, `--results`/`--result`, `--depth`, `--format`) are recognized anywhere in the argument list. The first positional non-flag token (a token that does not start with `-`) is captured as the language subcommand. Language-specific options (`--assembly`, -`--xml-doc`, `--includes`, `--api-headers`, `--output`, `--visibility`, +`--xml-doc`, `--includes`, `--api-headers`, `--source`, `--output`, `--visibility`, `--include-obsolete`, `--library-name`, `--library-description`, `--defines`, `--cpp-standard`, `--clang-path`) may appear anywhere in the argument list after the language token is recognized. diff --git a/docs/design/api-mark-tool/cli/context.md b/docs/design/api-mark-tool/cli/context.md index 2b3c114..e90fdb1 100644 --- a/docs/design/api-mark-tool/cli/context.md +++ b/docs/design/api-mark-tool/cli/context.md @@ -29,6 +29,7 @@ argument array. | `XmlDoc` | `string?` | `null` | Path from `--xml-doc` | | `Includes` | `string[]` | `[]` | Plain directory paths accumulated from repeated `--includes` invocations | | `ApiHeaders` | `string[]` | `[]` | Ordered patterns from repeated `--api-headers` invocations (may start with `!`) | +| `Sources` | `string[]` | `[]` | Ordered glob patterns accumulated from repeated `--source` invocations; `!`-prefixed patterns are exclusions | | `Output` | `string?` | `null` | Directory from `--output` | | `Visibility` | `string` | `"Public"` | Value from `--visibility` | | `IncludeObsolete` | `bool` | `false` | `--include-obsolete` flag | @@ -62,7 +63,9 @@ construction path. optionally opens the log file. Each `--includes` flag appends a single directory path to the `Includes` list; each `--api-headers` flag appends a single pattern string (which may start with `!`) to the `ApiHeaders` - list, preserving order for gitignore-style evaluation. + list, preserving order for gitignore-style evaluation; each `--source` flag + appends a single glob pattern string (which may start with `!`) to the + `Sources` list, preserving order for gitignore-style evaluation. - *Preconditions*: `args` must be non-null. - *Postconditions*: All properties reflect the parsed argument values; log file is open if `--log` was specified. diff --git a/docs/design/api-mark-tool/program.md b/docs/design/api-mark-tool/program.md index 92cae06..c8f57e2 100644 --- a/docs/design/api-mark-tool/program.md +++ b/docs/design/api-mark-tool/program.md @@ -59,8 +59,9 @@ the generator, and calls `Parse` then `Emit`. - _Parameters_: `Context context`. - Validates `Language` and `Output` for all subcommands; additionally validates `Assembly` and - `XmlDoc` for dotnet, and `Includes` for cpp; calls `context.WriteError` and `PrintHelp` if any - are missing. + `XmlDoc` for dotnet, `Includes` for cpp, and at least one non-exclusion `--source` pattern + (i.e. a pattern not prefixed with `!`) for vhdl; calls `context.WriteError` and `PrintHelp` + if any are missing. - Calls `CreateGenerator(context)`, then `generator.Parse(context)` to get an `IApiEmitter`, then `emitter.Emit(factory, emitConfig, context)` where `emitConfig` is constructed from `context.Format` and `context.HeadingDepth`. @@ -79,7 +80,12 @@ the generator, and calls `Parse` then `Emit`. `PublicIncludeRoots` (from `context.Includes`), `ApiHeaderPatterns` (from `context.ApiHeaders`), and the other cpp-specific options (`LibraryName`, `Description`, `Defines`, `CppStandard`, `Visibility`, `IncludeDeprecated`, - `ClangPath`). + `ClangPath`). The `LibraryName` is resolved from `context.LibraryName` when + set; otherwise it falls back to the last segment of `context.Output`, or + `"Library"` if the output path is also absent. +- For the `vhdl` language, `VhdlGeneratorOptions` is populated with `Sources` + (from `context.Sources`), `LibraryName` (from `context.LibraryName`, same + fallback as C++), and `Description` (from `context.LibraryDescription`). **Program.PrintBanner** (private static): Prints the application banner (tool name, version, copyright line, and a blank line). @@ -116,6 +122,8 @@ re-thrown. language subcommand — see DotNetGenerator Unit Design. - **CppGenerator** (ApiMarkCpp) — instantiated for the `cpp` subcommand — see ApiMarkCpp Component Design. +- **VhdlGenerator** (ApiMarkVhdl) — instantiated for the `vhdl` subcommand — see + ApiMarkVhdl Component Design. ### Callers diff --git a/docs/design/api-mark-tool/self-test/validation.md b/docs/design/api-mark-tool/self-test/validation.md index fdda16d..78f015d 100644 --- a/docs/design/api-mark-tool/self-test/validation.md +++ b/docs/design/api-mark-tool/self-test/validation.md @@ -103,6 +103,7 @@ created via `CreateTestResult(testName)` and collected in a #### Error Handling +- Throws `ArgumentNullException` when `context` is null. - Failed self-tests call `context.WriteError` for each failure, setting `context.ExitCode` to `1`. - Unsupported results file extension calls `context.WriteError` and returns @@ -125,4 +126,4 @@ created via `CreateTestResult(testName)` and collected in a #### Callers - **Program.Run** — calls `Validation.Run(context)` when `context.Validate` - is `true` (priority 4 in the dispatch chain). + is `true` (priority 3 in the dispatch chain). diff --git a/docs/design/api-mark-vhdl.md b/docs/design/api-mark-vhdl.md new file mode 100644 index 0000000..e76f15e --- /dev/null +++ b/docs/design/api-mark-vhdl.md @@ -0,0 +1,125 @@ +# ApiMarkVhdl + + + +## Architecture + +ApiMarkVhdl provides VHDL language support. It reads a set of VHDL source +files, parses them using the ANTLR4 vhdl2008 grammar, pre-processes source +lines to extract --! doc comments, and produces the Markdown output defined +by the Core interfaces. The system contains the following units: + +- **VhdlGenerator** — accepts `VhdlGeneratorOptions` specifying source file glob + patterns, invokes `GlobFileCollector` to enumerate VHDL source files, delegates + parsing to `VhdlAstParser`, and returns a `VhdlEmitter` that writes the complete + Markdown documentation. +- **VhdlAstModel** — group of immutable record types (`VhdlEntityDecl`, + `VhdlArchitectureDecl`, `VhdlPackageDecl`, `VhdlTypeDecl`, `VhdlConstantDecl`, + `VhdlComponentDecl`, `VhdlSubprogramDecl`, `VhdlParamDecl`, `VhdlParamDoc`, + `VhdlPortDoc`, `VhdlGenericDoc`, `VhdlDocComment`, and the `VhdlSubprogramKind` + enum) that represent the parsed VHDL AST. +- **VhdlAstParser** — internal parser that pre-processes source lines to + extract --! doc comments, invokes the ANTLR4 vhdl2008 grammar to parse the + file, walks the parse tree to collect entity, architecture, and package + declarations, and returns a `VhdlFileModel`. +- **VhdlEmitter** — `IApiEmitter` implementation that validates the mandatory + factory argument and dispatches to the appropriate format-specific emitter. +- **VhdlEmitterGradualDisclosure** — writes one file per entity, architecture, + and package, plus an `api.md` index page listing all entities and packages. +- **VhdlEmitterSingleFile** — writes all documentation into a single `api.md` + file using heading levels offset by `EmitConfig.HeadingDepth`. + +```mermaid +flowchart TD + VhdlGenerator --> VhdlAstParser["VhdlAstParser (internal)"] + VhdlGenerator --> VhdlEmitter + VhdlAstParser --> vhdl2008Parser["vhdl2008Parser (ANTLR4, OTS)"] + VhdlAstParser --> VhdlAstModel["VhdlAstModel (records)"] + VhdlEmitter --> VhdlEmitterGradualDisclosure + VhdlEmitter --> VhdlEmitterSingleFile + VhdlEmitter --> IMarkdownWriterFactory +``` + +VhdlGenerator depends on VhdlAstParser and the ApiMarkCore interfaces. +VhdlAstParser invokes the ANTLR4 vhdl2008 parser to produce a concrete +syntax tree, then walks it to produce the VhdlFileModel. + +## External Interfaces + +**IApiGenerator / IApiEmitter (provided)**: VhdlGenerator implements IApiGenerator +from ApiMarkCore; parsing is separated from emit via the two-stage pipeline. + +- *Type*: In-process .NET public API. +- *Role*: Provider — ApiMarkTool constructs VhdlGenerator and calls the two-stage + pipeline through the IApiGenerator / IApiEmitter interfaces. +- *Contract*: `VhdlGenerator(VhdlGeneratorOptions options)` constructs a + configured generator; `IApiGenerator.Parse(IContext context)` parses all + configured VHDL files and returns a `VhdlEmitter` (implements `IApiEmitter`); + `IApiEmitter.Emit(IMarkdownWriterFactory factory, EmitConfig config, IContext context)` + writes the full Markdown tree using the supplied factory and the format selected + by `config`. +- *Constraints*: VhdlGeneratorOptions.LibraryName must be non-empty before calling + Parse; Sources glob patterns must match at least one `.vhd` or `.vhdl` file at + parse time — if no files are matched, an error is emitted via `context.WriteError`. + +**ANTLR4 vhdl2008 grammar (consumed)**: VhdlAstParser uses the pre-generated +ANTLR4 parser to parse VHDL-2008 source files. + +- *Type*: In-process .NET library (Antlr4.Runtime.Standard NuGet package, generated parser classes). +- *Role*: Consumer — `VhdlAstParser` creates an `AntlrInputStream` from the source + text, runs the `vhdl2008Lexer` and `vhdl2008Parser`, and walks the resulting + parse tree using a `vhdl2008BaseVisitor` subclass. +- *Contract*: The parser handles VHDL-2008 syntax as defined by the vhdl2008.g4 grammar. + Comments and whitespace are discarded via `-> skip` rules; doc comments are + extracted by pre-processing source lines before parsing. +- *Constraints*: The ANTLR-generated files in `VhdlAst/Antlr/` must not be modified. + +## Dependencies + +- **Antlr4.Runtime.Standard**: NuGet package providing the ANTLR4 runtime for parsing + VHDL source files using the pre-generated vhdl2008 grammar. + +## Risk Control Measures + +N/A — not a safety-classified software item. + +## Data Flow + +1. The caller (ApiMarkTool) constructs `VhdlGeneratorOptions` with + LibraryName, Sources (glob patterns), and Description, then calls + `VhdlGenerator.Parse(context)` to obtain a `VhdlEmitter`. The caller then + passes an IMarkdownWriterFactory and an EmitConfig to + `VhdlEmitter.Emit(factory, config, context)`. +2. VhdlGenerator calls `GlobFileCollector.Collect(_options.Sources, vhdlExtensions, cwd)` + to build the selected-file set. If no files are matched, an error is emitted via + `context.WriteError` and an empty `VhdlEmitter` is returned. +3. VhdlGenerator calls `VhdlAstParser.Parse(filePath)` for each file. + `VhdlAstParser` reads the file as text, pre-processes source lines to build + a line-number-to-comment mapping, creates an ANTLR4 pipeline, parses the + file using the vhdl2008 grammar, and walks the parse tree to collect + `VhdlEntityDecl`, `VhdlArchitectureDecl`, and `VhdlPackageDecl` records. +4. `VhdlAstParser` returns a `VhdlFileModel` containing all declarations + found in the file, with associated doc comments extracted from --! annotations. +5. VhdlGenerator collects all VhdlFileModel results and constructs a + `VhdlEmitter` wrapping the options and file models. +6. When Emit is called, VhdlEmitter dispatches to `VhdlEmitterGradualDisclosure` + or `VhdlEmitterSingleFile` based on `config.Format`. +7. For gradual disclosure: `factory.CreateMarkdown("", "api")` creates the index + page; `factory.CreateMarkdown("", entityName)` creates each entity page (with + architectures rendered inline); `factory.CreateMarkdown("", packageName)` creates + each package page. +8. For single-file: `factory.CreateMarkdown("", "api")` is the only file created. + +## Design Constraints + +- Platform: targets net8.0 as a class library (the project targets net8.0 only). +- Parse environment: ANTLR4 vhdl2008 grammar discards all comments via skip rules; + doc comment extraction is performed by pre-processing source lines independently + of the ANTLR parse step. +- The ANTLR-generated files in `VhdlAst/Antlr/` are off-limits for modification. +- VHDL identifiers are case-insensitive; entity and architecture names are preserved + as-is from the source file for file naming. +- v1 scope: entities, architectures, and packages are documented; package bodies, + configurations, and signal/component declarations inside architectures are + out of scope. diff --git a/docs/design/api-mark-vhdl/vhdl-ast-model.md b/docs/design/api-mark-vhdl/vhdl-ast-model.md new file mode 100644 index 0000000..4e0d7ea --- /dev/null +++ b/docs/design/api-mark-vhdl/vhdl-ast-model.md @@ -0,0 +1,90 @@ +## VhdlAstModel + + + +### Purpose + +VhdlAstModel defines the immutable record types that represent the parsed result +of a VHDL source file. These records are constructed exclusively by `VhdlAstParser` +and consumed by the VHDL emitters. + +### Data Model + +**VhdlParamDoc**: `(string Name, string Description)` — one entry per `@param` tag. + +**VhdlDocComment**: `(string? Summary, string? Details, IReadOnlyList Params, +string? Returns)` — structured doc comment extracted from `--!` comment blocks. + +**VhdlPortDoc**: `(string Name, string Direction, string TypeName, VhdlDocComment? Doc)` — +a single port in an entity. + +**VhdlGenericDoc**: `(string Name, string TypeName, string? DefaultValue, +VhdlDocComment? Doc)` — a single generic in an entity. + +**VhdlEntityDecl**: `(string Name, IReadOnlyList Generics, +IReadOnlyList Ports, VhdlDocComment? Doc)` — an entity declaration. + +**VhdlArchitectureDecl**: `(string Name, string EntityName, VhdlDocComment? Doc)` — +an architecture body declaration. + +**VhdlPackageDecl**: `(string Name, VhdlDocComment? Doc, IReadOnlyList Types, +IReadOnlyList Constants, IReadOnlyList Components, +IReadOnlyList Subprograms)` — a package declaration with all its +contained members. + +**VhdlTypeDecl**: `(string Name, string Definition, VhdlDocComment? Doc)` — a type +declaration within a package. + +**VhdlConstantDecl**: `(string Name, string TypeName, string? Value, VhdlDocComment? Doc)` — +a constant declaration within a package. + +**VhdlComponentDecl**: `(string Name, VhdlDocComment? Doc)` — a component declaration +within a package. + +**VhdlSubprogramKind**: enum with values `Procedure` and `Function` — distinguishes +procedures from functions in a package. + +**VhdlParamDecl**: `(string Name, string Mode, string TypeName)` — a parameter in a +subprogram; `Mode` contains the raw token(s) from the parameter declaration: one of +the direction keywords (`IN`, `OUT`, `INOUT`, `BUFFER`), one of the object-class +keywords (`SIGNAL`, `VARIABLE`, `CONSTANT`, `FILE`), a combination of both (e.g. +`SIGNAL IN`), or an empty string when no explicit mode is specified. + +**VhdlSubprogramDecl**: `(string Name, VhdlSubprogramKind Kind, string Signature, +IReadOnlyList Parameters, string? ReturnType, VhdlDocComment? Doc)` — +a subprogram (procedure or function) declaration within a package. + +**VhdlFileModel**: `(string FilePath, IReadOnlyList Entities, +IReadOnlyList Architectures, +IReadOnlyList Packages)` — all declarations extracted from one +VHDL source file. + +Design invariants: + +- All records use C# positional record syntax for conciseness. +- `IReadOnlyList` is used for all collections to prevent mutation after construction. +- All text fields are pre-normalized by `VhdlAstParser` before being stored in the records. +- `null` means "no documentation found" for all optional doc fields. + +### Key Methods + +N/A — VhdlAstModel contains only immutable record definitions; it exposes no methods +beyond the C# positional-record auto-generated members (constructor, deconstruct, +equality). + +### Error Handling + +N/A — VhdlAstModel is a pure data model with no runtime logic; error handling is +the responsibility of `VhdlAstParser` during record construction. + +### Dependencies + +N/A — VhdlAstModel has no dependencies on other units, OTS packages, or shared +packages; it uses only BCL types (`IReadOnlyList`, `string`). + +### Callers + +- **VhdlAstParser** — constructs all record instances from the ANTLR4 parse tree. +- **VhdlEmitter**, **VhdlEmitterGradualDisclosure**, **VhdlEmitterSingleFile** — + consume the records to generate Markdown output. diff --git a/docs/design/api-mark-vhdl/vhdl-ast-parser.md b/docs/design/api-mark-vhdl/vhdl-ast-parser.md new file mode 100644 index 0000000..0f1eeeb --- /dev/null +++ b/docs/design/api-mark-vhdl/vhdl-ast-parser.md @@ -0,0 +1,183 @@ +## VhdlAstParser + + + +### Purpose + +VhdlAstParser reads a VHDL source file, pre-processes its lines to extract `--!` +doc comments, invokes the ANTLR4 vhdl2008 grammar to parse the file, and walks +the resulting parse tree to produce a `VhdlFileModel`. + +### Data Model + +N/A — VhdlAstParser is a stateless static class; all state is local to each `Parse` +call and returned as a `VhdlFileModel`. + +### Key Methods + +**VhdlAstParser.Parse** (internal static): Parses a single VHDL source file and +returns its declaration model. + +- *Parameters*: `string filePath` — absolute or working-directory-relative path to a + `.vhd` or `.vhdl` source file. +- *Returns*: `VhdlFileModel` — all entities, architectures, and packages found in the + file. +- *Preconditions*: `filePath` is not null and refers to a readable file. +- *Postconditions*: the returned `VhdlFileModel` contains all top-level declarations + found in the file with associated doc comments; never returns null. +- *Algorithm*: + 1. Read the file content as `string sourceText`; split into `string[] lines`. + 2. Create the ANTLR4 pipeline: `AntlrInputStream` → `vhdl2008Lexer` → + `CommonTokenStream` → `vhdl2008Parser`. + 2a. Replace the default `ConsoleErrorListener` on both the lexer and the parser + with a `CollectingErrorListener`; call `ThrowIfErrors(filePath)` after + `parser.design_file()` returns so that any syntax error throws an + `InvalidOperationException` instead of silently producing a corrupt parse tree. + 3. Call `parser.design_file()` to obtain the root `Design_fileContext`. + 4. Walk the tree using a `private sealed class VhdlVisitor : vhdl2008BaseVisitor`. + 5. **VisitEntity_declaration**: extract name via `context.identifier(0).GetText()`; + extract preceding doc comment; delegate generic parsing to `ParseEntityGenerics` + and port parsing to `ParseEntityPorts`. + 6. **VisitArchitecture_body**: extract arch name via `context.identifier(0).GetText()`; + extract entity name via `context.name().GetText()`; extract preceding doc comment. + 7. **VisitPackage_declaration**: extract name via `context.identifier(0).GetText()` + and preceding doc comment. Iterates every `package_declarative_item` and + dispatches by declaration type: + - `full_type_declaration` / `subtype_declaration` → `VhdlTypeDecl(name, definition, doc)`. + - `constant_declaration` → `VhdlConstantDecl(name, typeName, value?, doc)`. + - `component_declaration` → `VhdlComponentDecl(name, doc)`. + - `subprogram_declaration` — delegates to `ParseSubprogramDecl` to resolve + the spec as a function or procedure, extract name, kind, formal parameters, + return type, and signature, then appends a `VhdlSubprogramDecl`. Does not + recurse into child contexts (returns null). + 8. **Preceding doc comment extraction**: walk backward from `declarationLine - 1`, + collecting consecutive lines that begin with `--!` after trimming; reverse and + parse with `ParseDocCommentLines`. + 9. **Inline trailing comment extraction**: scan the raw line at the port/generic + line number for the last `--!` occurrence; extract text after the marker. + 10. **Identifier list expansion**: when `identifier_list` contains multiple + identifiers, create one `VhdlPortDoc` or `VhdlGenericDoc` per identifier with + the same type, direction, and default value. + 11. **Type text extraction**: use + `sourceText[ctx.Start.StartIndex..(ctx.Stop.StopIndex + 1)]` to recover the + full type text including whitespace (which ANTLR's skip rules strip from + `ctx.GetText()`). + +**VhdlAstParser.ParseEntityGenerics** (private): Extracts generic declarations +from an entity header context into a list of `VhdlGenericDoc` records. + +- *Parameters*: `Entity_declarationContext context`. +- *Returns*: `List` — empty when no generic clause is present. +- *Algorithm*: navigates `entity_header → generic_clause → generic_list → + interface_list → interface_declaration`; for each `interface_constant_declaration` + expands the identifier list and records name, type, optional default value, and + inline trailing doc comment. + +**VhdlAstParser.ParseEntityPorts** (private): Extracts port declarations from an +entity header context into a list of `VhdlPortDoc` records. + +- *Parameters*: `Entity_declarationContext context`. +- *Returns*: `List` — empty when no port clause is present. +- *Algorithm*: navigates `entity_header → port_clause → port_list → + interface_list → interface_declaration`; for each declaration delegates to + `ParsePortInterfaceDeclaration` and appends the results. + +**VhdlAstParser.ParsePortInterfaceDeclaration** (private): Converts a single +`Interface_declarationContext` into zero or more `VhdlPortDoc` records. + +- *Parameters*: `Interface_declarationContext iface`. +- *Returns*: `IEnumerable`. +- *Algorithm*: tries `interface_signal_declaration` first (explicit port); falls + back to `interface_constant_declaration` (ANTLR may parse bare `name : IN type` + as a constant). Both branches expand the identifier list and emit one record per + identifier with direction (uppercase `IN`/`OUT`/`INOUT`/`BUFFER`) and type name. + +**VhdlAstParser.ParseSubprogramDecl** (private): Resolves a +`Subprogram_declarationContext` into a `VhdlSubprogramDecl` record or returns null. + +- *Parameters*: `Package_declarative_itemContext item`, `Subprogram_specificationContext spec`. +- *Returns*: `VhdlSubprogramDecl?` — null when the spec cannot be resolved. +- *Algorithm*: checks `subprogram_specification` for either a + `function_specification` or `procedure_specification`; extracts name, kind, + formal parameters via `ExtractFormalParameters`, return type (functions only), + source-range signature text, and preceding doc comment. + +**VhdlAstParser.ExtractFormalParameters** (private): Converts a +`Formal_parameter_listContext` into a list of `VhdlParamDecl` records. + +- *Parameters*: `Formal_parameter_listContext? formalParams` — may be null. +- *Returns*: `List` — empty list when `formalParams` is null + or contains no interface declarations. +- *Algorithm*: iterates each `interface_object_declaration` (via LINQ + `Select`/`Where` to skip nulls); tries three variants in order by delegating + to extraction helpers: + 1. `ExtractSignalParams` — `interface_signal_declaration`. + 2. `ExtractVariableParams` — `interface_variable_declaration`. + 3. `ExtractConstantParams` — `interface_constant_declaration` (also matches + undecorated parameters). + +**VhdlAstParser.ExtractSignalParams** (private): Extracts `VhdlParamDecl` records +from an `Interface_signal_declarationContext`. + +- Class keyword `SIGNAL` (optional) + direction from `mode_rule`; one record per identifier. + +**VhdlAstParser.ExtractVariableParams** (private): Extracts `VhdlParamDecl` records +from an `Interface_variable_declarationContext`. + +- Class keyword `VARIABLE` (optional) + direction from `mode_rule`; one record per identifier. + +**VhdlAstParser.ExtractConstantParams** (private): Extracts `VhdlParamDecl` records +from an `Interface_constant_declarationContext`. + +- Class keyword `CONSTANT` (optional) + direction `IN` when explicitly present; one record per identifier. + +**VhdlAstParser.ExtractModeText** (private static): Converts a `Mode_ruleContext` +into an upper-case direction string. + +- *Parameters*: `Mode_ruleContext? modeCtx` — may be null. +- *Returns*: `string` — one of `"OUT"`, `"INOUT"`, `"BUFFER"`, `"IN"`, or `""` when + the context is null or specifies no explicit mode. + +**VhdlAstParser.CollectingErrorListener** (private sealed class): ANTLR4 error +listener that accumulates syntax errors and throws rather than writing to +`Console.Error`. + +- Implements both `IAntlrErrorListener` (lexer) and `IAntlrErrorListener` + (parser). +- **ThrowIfErrors**: throws `InvalidOperationException` with all collected messages + when at least one error was recorded; no-op otherwise. + +a `VhdlDocComment`. + +- `@brief ` → `Summary` +- `@param ` → `VhdlParamDoc` entry in `Params` +- `@return ` → `Returns` +- Non-tagged lines → `Details` (or `Summary` when no `@brief` is present) + +### Error Handling + +- Parse errors from the ANTLR4 lexer or parser are collected by + `CollectingErrorListener` and thrown as `InvalidOperationException` via + `ThrowIfErrors` after `parser.design_file()` returns. This prevents silently + producing corrupt output from partially recovered parse trees. +- File I/O exceptions (e.g., `FileNotFoundException`, `IOException`) are not caught + by `VhdlAstParser` and propagate to `VhdlGenerator`, which logs them via + `context.WriteError` and skips the file. +- Malformed or missing doc-comment blocks produce `null` optional fields in the + resulting records rather than throwing. + +### Dependencies + +- **VhdlAstModel** (internal) — produces record instances (`VhdlFileModel`, + `VhdlEntityDecl`, `VhdlArchitectureDecl`, `VhdlPackageDecl`, `VhdlPortDoc`, + `VhdlGenericDoc`, `VhdlDocComment`, `VhdlParamDoc`) defined there. +- **ANTLR4 Runtime** (NuGet OTS) — provides `AntlrInputStream`, `CommonTokenStream`, + and the visitor base class. +- **vhdl2008 grammar** (generated) — `vhdl2008Lexer`, `vhdl2008Parser`, + `vhdl2008BaseVisitor`, and associated context types. + +### Callers + +- **VhdlGenerator** — calls `VhdlAstParser.Parse(filePath)` once per matched source + file. diff --git a/docs/design/api-mark-vhdl/vhdl-emitter-gradual-disclosure.md b/docs/design/api-mark-vhdl/vhdl-emitter-gradual-disclosure.md new file mode 100644 index 0000000..a24afd1 --- /dev/null +++ b/docs/design/api-mark-vhdl/vhdl-emitter-gradual-disclosure.md @@ -0,0 +1,96 @@ +## VhdlEmitterGradualDisclosure + + + +### Purpose + +VhdlEmitterGradualDisclosure writes one Markdown file per VHDL entity and +package plus an `api.md` index page, enabling gradual disclosure navigation +from the index to individual declaration pages. Package subprograms each get +their own detail page under a per-package subfolder. + +### Data Model + +**VhdlEmitterGradualDisclosure** (internal sealed class): + +- `_emitter`: `VhdlEmitter` — parent emitter supplying options and shared helpers. +- `_fileModels`: `IReadOnlyList` — all parsed file models to emit. + +**Output file layout**: + +- `api.md` — library index listing all entities and packages with descriptions and + relative Markdown links. +- `{entityName}.md` — entity detail page with generics table, ports table, and + inline architecture list. +- `{packageName}.md` — package detail page with types, constants, components, and + subprogram index. +- `{packageName}/{subprogramName}.md` — subprogram detail page with parameters + table, optional returns section, and signature. + +### Key Methods + +**VhdlEmitterGradualDisclosure.Emit** (internal): Produces all Markdown output files. + +- *Parameters*: `IMarkdownWriterFactory factory`, `EmitConfig config`, + `IContext context`. +- *Returns*: `void`. +- *Preconditions*: `factory` is not null (enforced by the calling `VhdlEmitter`). +- *Postconditions*: all output files listed in the data model have been written. +- *Algorithm*: + 1. Collect all entities, architectures, and packages from all `VhdlFileModel` + instances. + 2. Delegate to `EmitApiIndexPage` to write `api.md`. + 3. For each entity delegate to `EmitEntityPage`. + 4. For each package delegate to `EmitPackagePage`, which calls + `EmitSubprogramDetailPage` for each subprogram. + +**VhdlEmitterGradualDisclosure.EmitApiIndexPage** (private): Writes the `api.md` +index page. + +- H1 library name heading, optional description paragraph, entities table + (Name/Description with relative links), packages table (Name/Description with + relative links). + +**VhdlEmitterGradualDisclosure.EmitEntityPage** (private static): Writes a single +entity detail page. + +- H1 entity name, summary, details, Generics table (Name/Type/Default/Description), + Ports table (Name/Direction/Type/Description), Architectures section (inline — + one bold entry per architecture with optional details paragraph). + +**VhdlEmitterGradualDisclosure.EmitPackagePage** (private static): Writes a single +package detail page and calls `EmitSubprogramDetailPage` for each subprogram. + +- H1 package name, summary, details, Types paragraphs, Constants paragraphs, + Components as `**name** — summary` paragraphs, Subprograms section with links + to per-subprogram detail pages. + +**VhdlEmitterGradualDisclosure.EmitSubprogramDetailPage** (private static): Writes +one `{packageName}/{subprogramName}.md` detail file. + +- H1 subprogram name, kind attribution, summary, details, Parameters table + (Name/Type/Description — type formatted by `VhdlEmitter.FormatParamType`), + optional Returns paragraph (functions only), Signature fenced code block. + +### Error Handling + +- Exceptions from `IMarkdownWriterFactory.CreateMarkdown` or from the Markdown writer + propagate to the caller (`VhdlEmitter.Emit`) without wrapping. +- Missing or null doc-comment fields produce the `VhdlEmitter.NoDescriptionPlaceholder` + string in table cells rather than throwing. + +### Dependencies + +- **VhdlEmitter** (internal) — instantiates this class and supplies `Options` and + shared helpers (`GetSummary`, `DescriptionColumnHeader`, `NoDescriptionPlaceholder`). +- **IMarkdownWriterFactory** (ApiMarkCore) — used to create each per-file Markdown + writer. +- **VhdlAstModel** (internal) — consumes `VhdlFileModel`, `VhdlEntityDecl`, + `VhdlArchitectureDecl`, `VhdlPackageDecl`, `VhdlSubprogramDecl`, and + `VhdlParamDecl` record types. + +### Callers + +- **VhdlEmitter** — instantiates and calls `Emit` when `config.Format` is + `GradualDisclosure`. diff --git a/docs/design/api-mark-vhdl/vhdl-emitter-single-file.md b/docs/design/api-mark-vhdl/vhdl-emitter-single-file.md new file mode 100644 index 0000000..d52df37 --- /dev/null +++ b/docs/design/api-mark-vhdl/vhdl-emitter-single-file.md @@ -0,0 +1,90 @@ +## VhdlEmitterSingleFile + + + +### Purpose + +VhdlEmitterSingleFile writes all VHDL API documentation into a single `api.md` +file using heading levels offset by `EmitConfig.HeadingDepth`. + +### Data Model + +**VhdlEmitterSingleFile** (internal sealed class): + +- `_emitter`: `VhdlEmitter` — parent emitter supplying options and shared helpers. +- `_fileModels`: `IReadOnlyList` — all parsed file models to emit. + +**Output file layout** (single `api.md`): + +- H{depth} library name. +- H{depth+1} Entities section — one H{depth+2} per entity, with H{depth+3} + Generics, Ports, and Architectures sub-sections. +- H{depth+1} Packages section — one H{depth+2} per package, with: + - H{depth+3} Types — one paragraph per type declaration. + - H{depth+3} Constants — one paragraph per constant declaration. + - H{depth+3} Components — one paragraph per component declaration. + - H{depth+3} per subprogram, each containing H{depth+4} Parameters (table), + H{depth+4} Returns (functions only), and H{depth+4} Signature sub-sections. + +### Key Methods + +**VhdlEmitterSingleFile.Emit** (internal): Produces the single consolidated Markdown +file. + +- *Parameters*: `IMarkdownWriterFactory factory`, `EmitConfig config`, + `IContext context`. +- *Returns*: `void`. +- *Preconditions*: `factory` is not null (enforced by the calling `VhdlEmitter`). +- *Postconditions*: a single `api.md` file containing all documented declarations + has been written. +- *Algorithm*: + 1. Write `` as the first output to suppress + duplicate-heading lint warnings caused by entities and packages sharing names. + 2. Create the output file via `factory.CreateMarkdown("", "api")` — called + exactly once. + 3. Write H{depth} library name heading and optional description. + 4. Write Entities section: H{depth+1} heading, then for each entity delegate to + `EmitEntitySection`. + 5. Write Packages section: H{depth+1} heading, then for each package delegate to + `EmitPackageSection`, which calls `EmitSubprogramSection` for each subprogram. + +**VhdlEmitterSingleFile.EmitEntitySection** (private static): Writes the per-entity +block within the single-file output. + +- H{depth+2} entity name, summary, details, optional Generics table (H{depth+3}), + optional Ports table (H{depth+3}), optional Architectures sub-section (H{depth+3}, + one bold paragraph per architecture with optional details). + +**VhdlEmitterSingleFile.EmitPackageSection** (private static): Writes the +per-package block within the single-file output. + +- H{depth+2} package name, summary, details, optional Types section (H{depth+3}), + optional Constants section (H{depth+3}), optional Components section (H{depth+3}), + then calls `EmitSubprogramSection` for each subprogram. + +**VhdlEmitterSingleFile.EmitSubprogramSection** (private static): Writes the +per-subprogram block within the single-file output. + +- H{depth+3} subprogram name, summary, details, optional Parameters table + (H{depth+4}), optional Returns section (H{depth+4}, functions only), Signature + fenced code block (H{depth+4}). + +### Error Handling + +- Exceptions from `IMarkdownWriterFactory.CreateMarkdown` or from the Markdown writer + propagate to the caller (`VhdlEmitter.Emit`) without wrapping. +- Missing or null doc-comment fields produce the `VhdlEmitter.NoDescriptionPlaceholder` + string in output cells rather than throwing. + +### Dependencies + +- **VhdlEmitter** (internal) — instantiates this class and supplies `Options` and + shared helpers (`GetSummary`, `DescriptionColumnHeader`, `NoDescriptionPlaceholder`). +- **IMarkdownWriterFactory** (ApiMarkCore) — used to create the single Markdown writer. +- **VhdlAstModel** (internal) — consumes `VhdlFileModel`, `VhdlEntityDecl`, + `VhdlArchitectureDecl`, and `VhdlPackageDecl` record types. + +### Callers + +- **VhdlEmitter** — instantiates and calls `Emit` when `config.Format` is `SingleFile`. diff --git a/docs/design/api-mark-vhdl/vhdl-emitter.md b/docs/design/api-mark-vhdl/vhdl-emitter.md new file mode 100644 index 0000000..7069da3 --- /dev/null +++ b/docs/design/api-mark-vhdl/vhdl-emitter.md @@ -0,0 +1,92 @@ +## VhdlEmitter + + + +### Purpose + +VhdlEmitter implements `IApiEmitter`, validates the mandatory `factory` argument, +and dispatches to `VhdlEmitterGradualDisclosure` or `VhdlEmitterSingleFile` based +on `config.Format`. It also holds shared constants and a helper used by both +format-specific emitters. + +### Data Model + +**VhdlEmitter** (internal sealed class): + +- `_options`: `VhdlGeneratorOptions` — generator options forwarded from `VhdlGenerator`. +- `_fileModels`: `IReadOnlyList` — all parsed file models to emit. +- `DescriptionColumnHeader`: `internal const string` — `"Description"`; column header + shared by both format-specific emitters. +- `NoDescriptionPlaceholder`: `internal const string` — `"*No description provided.*"`; + cell text used when no summary is available. +- `Options`: `VhdlGeneratorOptions` property (internal get) — exposes `_options` to + format-specific emitters. + +### Key Methods + +**VhdlEmitter constructor**: Stores options and file models. + +- *Parameters*: `VhdlGeneratorOptions options`, `IReadOnlyList fileModels`. +- *Returns*: a configured `VhdlEmitter` instance. + +**VhdlEmitter.Emit** (implements `IApiEmitter`): Dispatches to the appropriate +format-specific emitter. + +- *Parameters*: `IMarkdownWriterFactory factory` — must not be null; `EmitConfig config` + — includes `Format` (`GradualDisclosure` or `SingleFile`) and `HeadingDepth`; + `IContext context` — logging channel. +- *Returns*: `void`. +- *Preconditions*: `factory` is not null. +- *Postconditions*: all Markdown output files have been written via `factory`. +- *Algorithm*: validates `factory` is not null (throws `ArgumentNullException`); + returns immediately without writing any output when `_fileModels.Count == 0`; + when `config.Format == OutputFormat.SingleFile`, delegates to + `new VhdlEmitterSingleFile(this, _fileModels).Emit(factory, config, context)`; + otherwise delegates to + `new VhdlEmitterGradualDisclosure(this, _fileModels).Emit(factory, config, context)`. + +**VhdlEmitter.GetSummary** (internal static): Safely extracts the summary text from +an optional doc comment. + +- *Parameters*: `VhdlDocComment? doc` — may be null. +- *Returns*: `string?` — `doc.Summary` when `doc` is non-null and `Summary` is + non-empty; otherwise `null`. + +**VhdlEmitter.FormatParamType** (internal static): Formats a subprogram parameter's +type string for display in the parameters table. + +- *Parameters*: `VhdlParamDecl param`. +- *Returns*: `string` — object-class keywords (`SIGNAL`, `VARIABLE`, `CONSTANT`, + `FILE`) are stripped; direction keywords (`IN`, `OUT`, `INOUT`, `BUFFER`) are + prepended to the type name (e.g. `OUT STD_LOGIC`); bare type names are returned + as-is. + +**VhdlEmitter.SanitizeFileName** (internal static): Replaces characters that are +invalid in file-system names with underscores. + +- *Parameters*: `string name` — the raw declaration name. +- *Returns*: `string` — safe for use as a file-system file name segment. + +### Error Handling + +- `ArgumentNullException` — thrown by `Emit` when `factory` is null. +- Exceptions from `VhdlEmitterGradualDisclosure` or `VhdlEmitterSingleFile` propagate + to the caller without wrapping. + +### Dependencies + +- **IApiEmitter** (ApiMarkCore) — the interface this class implements. +- **IMarkdownWriterFactory** (ApiMarkCore) — received through `Emit`; passed to + format-specific emitters. +- **VhdlEmitterGradualDisclosure** (internal) — instantiated and called when + `config.Format` is `GradualDisclosure`. +- **VhdlEmitterSingleFile** (internal) — instantiated and called when + `config.Format` is `SingleFile`. +- **VhdlAstModel** (internal) — consumes `VhdlFileModel`, `VhdlEntityDecl`, + `VhdlArchitectureDecl`, `VhdlPackageDecl`, and `VhdlDocComment` record types. + +### Callers + +- **VhdlGenerator** — constructs a `VhdlEmitter` in `Parse` and returns it to the + caller as `IApiEmitter`. diff --git a/docs/design/api-mark-vhdl/vhdl-generator.md b/docs/design/api-mark-vhdl/vhdl-generator.md new file mode 100644 index 0000000..09d8ee0 --- /dev/null +++ b/docs/design/api-mark-vhdl/vhdl-generator.md @@ -0,0 +1,76 @@ +## VhdlGenerator + + + +### Purpose + +VhdlGenerator is the public entry point for VHDL API documentation generation. +It implements `IApiGenerator`, accepts `VhdlGeneratorOptions`, evaluates all +configured glob patterns to enumerate VHDL source files, delegates parsing to +`VhdlAstParser`, and returns a `VhdlEmitter` ready to produce Markdown output. + +### Data Model + +**VhdlGeneratorOptions** (public): Configuration record supplied by the caller. + +- `LibraryName`: `string` — the name of the VHDL library to document; must be non-empty. +- `Sources`: `IList` — glob patterns that identify source files to include. + Patterns prefixed with `!` are exclusion patterns. Evaluated with gitignore-style + last-match-wins semantics by `GlobFileCollector` from ApiMarkCore. An empty list + produces no matched files. +- `WorkingDirectory`: `string?` — the base directory for glob evaluation. When `null`, + defaults to `Directory.GetCurrentDirectory()`. +- Additional display and format options are forwarded to `VhdlEmitter` unchanged. + +### Key Methods + +**VhdlGenerator constructor**: Validates configuration at construction time. + +- *Parameters*: `VhdlGeneratorOptions options` — must not be null and `LibraryName` + must be non-empty. +- *Returns*: a configured `VhdlGenerator` instance. +- *Preconditions*: `options` is not null; `options.LibraryName` is not null or whitespace. +- *Postconditions*: the instance is ready to call `Parse`. +- *Algorithm*: throws `ArgumentNullException` when `options` is null; throws + `ArgumentException` when `options.LibraryName` is null or whitespace; normalizes + a null `options.Sources` to an empty list. + +**VhdlGenerator.Parse** (implements `IApiGenerator`): Enumerates source files and +returns a ready-to-emit `VhdlEmitter`. + +- *Parameters*: `IContext context` — logging channel; must not be null. +- *Returns*: `IApiEmitter` — a `VhdlEmitter` holding all parsed file models. +- *Algorithm*: + 1. Resolve the working directory: use `options.WorkingDirectory` when non-null, + otherwise `Directory.GetCurrentDirectory()`. + 2. Call `GlobFileCollector.Collect(_options.Sources, vhdlExtensions, cwd)` to build + the sorted, deduplicated list of matched `.vhd` and `.vhdl` files. + 3. When no files are matched, emit `"Error: no .vhd or .vhdl files matched the + --source patterns."` via `context.WriteError` and return an empty `VhdlEmitter`. + 4. Call `VhdlAstParser.Parse(filePath)` for each matched file path, emitting + `context.WriteLine($"Parsing {file}")` before each parse call. + 5. Construct and return `new VhdlEmitter(options, fileModels)`. + +### Error Handling + +- `ArgumentNullException` — thrown by the constructor when `options` is null, and by + `Parse` when `context` is null. +- `ArgumentException` — thrown by the constructor when `LibraryName` is null or + whitespace. +- File-level parse errors are caught per file: a warning is emitted via + `context.WriteError` and the file is skipped, so a single malformed file does not + abort the entire parse run. + +### Dependencies + +- **VhdlAstParser** (internal) — called once per matched source file. +- **VhdlEmitter** (internal) — constructed and returned from `Parse`. +- **IApiGenerator** (ApiMarkCore) — the interface this class implements. +- **GlobFileCollector** (ApiMarkCore) — used to evaluate `Sources` glob patterns + and return sorted, deduplicated file paths. + +### Callers + +- **ApiMark host / CLI** — constructs `VhdlGenerator` with a `VhdlGeneratorOptions` + instance and calls `Parse` to obtain an `IApiEmitter`. diff --git a/docs/design/definition.yaml b/docs/design/definition.yaml index 3ba1335..7f1ceb1 100644 --- a/docs/design/definition.yaml +++ b/docs/design/definition.yaml @@ -1,7 +1,5 @@ --- -resource-path: - - docs/design - - docs/template +resource-path: [docs/design, docs/template] input-files: - docs/design/title.txt - docs/design/introduction.md diff --git a/docs/design/introduction.md b/docs/design/introduction.md index 075fdaa..3b43290 100644 --- a/docs/design/introduction.md +++ b/docs/design/introduction.md @@ -4,9 +4,10 @@ ApiMark generates compact, AI-friendly API reference documentation in Markdown f source code and its associated metadata (XML doc comments, header files, docstrings, etc.). The output is designed for gradual disclosure: an AI can read a lightweight index, drill into a namespace summary, and then read a full type page — consuming only -as much context as the task requires. The project is structured as five independent +as much context as the task requires. The project is structured as six independent systems: ApiMark.Core (shared contracts and file-path helpers), ApiMark.DotNet -(C#/.NET language generator), ApiMark.Cpp (C++ language generator), ApiMark.MSBuild +(C#/.NET language generator), ApiMark.Cpp (C++ language generator), ApiMark.Vhdl +(VHDL language generator), ApiMark.MSBuild (unified MSBuild task that spawns ApiMark.Tool out-of-process), and ApiMark.Tool (the .NET executable invoked by ApiMarkTask and directly by users or CI pipelines). Three OTS items provide library support: Mono.Cecil for the DotNet system, clang (via @@ -27,6 +28,7 @@ Local items: - **ApiMarkCore**: system and unit design. - **ApiMarkDotNet**: system and unit design. - **ApiMarkCpp**: system and unit design. +- **ApiMarkVhdl**: system and unit design. - **ApiMarkMsbuild**: system and unit design. - **ApiMarkTool**: system and unit design. @@ -35,6 +37,7 @@ OTS items: - **Mono.Cecil**: integration and usage design. - **clang**: integration and usage design (via `clang -ast-dump=json`). - **DemaConsulting.TestResults**: integration and usage design. +- **Antlr4.Runtime.Standard / ANTLR4 vhdl2008 grammar**: integration and usage design. - **cpp-ast-net**: integration and usage design (archived; retained for historical reference). Out of scope: test projects, build pipeline CI configuration, and the internal design @@ -52,7 +55,8 @@ ApiMarkCore (System) ├── FileMarkdownWriterFactory (Unit) ├── IMarkdownWriter (Unit) ├── FileMarkdownWriter (Unit) -└── PathHelpers (Unit) +├── PathHelpers (Unit) +└── GlobFileCollector (Unit) ApiMarkDotNet (System) ├── DotNetGenerator (Unit) @@ -73,6 +77,14 @@ ApiMarkCpp (System) ├── CppEmitterSingleFile (Unit) └── CppTypeLinkResolver (Unit) +ApiMarkVhdl (System) +├── VhdlGenerator (Unit) +├── VhdlAstModel (Unit) +├── VhdlAstParser (Unit) +├── VhdlEmitter (Unit) +├── VhdlEmitterGradualDisclosure (Unit) +└── VhdlEmitterSingleFile (Unit) + ApiMarkMsbuild (System) └── ApiMarkTask (Unit) @@ -87,6 +99,7 @@ OTS Dependencies: ├── Mono.Cecil (OTS) ├── DemaConsulting.TestResults (OTS) ├── clang -ast-dump=json (OTS) +├── Antlr4.Runtime.Standard / ANTLR4 vhdl2008 grammar (OTS) └── cpp-ast-net (OTS) [archived] ``` @@ -103,6 +116,7 @@ src/ │ ├── IMarkdownWriterFactory.cs - factory interface for creating per-file markdown writers │ ├── IMarkdownWriter.cs - per-file markdown writing interface (IDisposable) │ ├── PathHelpers.cs - shared path-safety helper for combining validated relative paths +│ ├── GlobFileCollector.cs - shared glob-based file discovery utility (absolute/relative patterns, extension inference) │ ├── FileMarkdownWriterFactory.cs - file-system implementation of IMarkdownWriterFactory │ └── FileMarkdownWriter.cs - file-system implementation of IMarkdownWriter ├── ApiMark.DotNet/ @@ -127,6 +141,15 @@ src/ │ └── CppAst/ │ ├── CppAstModel.cs - C++ AST data model (types, functions, namespaces) │ └── ClangAstParser.cs - invokes clang -ast-dump=json and parses the AST +├── ApiMark.Vhdl/ +│ ├── VhdlGenerator.cs - VHDL IApiGenerator implementation +│ ├── VhdlGeneratorOptions.cs - configuration options for the VHDL generator +│ ├── VhdlEmitter.cs - dispatches to single-file or gradual-disclosure VHDL emitter +│ ├── VhdlEmitterGradualDisclosure.cs - writes multiple-file gradual-disclosure VHDL output +│ ├── VhdlEmitterSingleFile.cs - writes single-file VHDL output +│ └── VhdlAst/ +│ ├── VhdlAstModel.cs - VHDL AST data model (entities, architectures, packages) +│ └── VhdlAstParser.cs - parses .vhd files using ANTLR4 vhdl2008 grammar ├── ApiMark.MSBuild/ │ └── ApiMarkTask.cs - MSBuild task that spawns ApiMark.Tool out-of-process └── ApiMark.Tool/ @@ -146,6 +169,7 @@ test/ ├── ApiMark.DotNet.Tests/ - unit tests for DotNetGenerator and TypeNameSimplifier ├── ApiMark.Cpp.Fixtures/ - C++ fixture headers for CppGenerator integration tests ├── ApiMark.Cpp.Tests/ - unit tests for CppGenerator +├── ApiMark.Vhdl.Tests/ - unit tests for VhdlGenerator ├── ApiMark.MSBuild.Tests/ - unit tests for ApiMarkTask └── ApiMark.Tool.Tests/ - integration tests for the CLI tool ``` @@ -154,8 +178,7 @@ test/ Each local software item has corresponding artifacts in parallel directory trees: -- Requirements: `docs/reqstream/api-mark-core.yaml`, `docs/reqstream/api-mark-core/{item}.yaml`, - `docs/reqstream/api-mark-dot-net.yaml`, +- Requirements: `docs/reqstream/api-mark-core.yaml`, `docs/reqstream/api-mark-core/{item}.yaml`, `docs/reqstream/api-mark-dot-net.yaml`, `docs/reqstream/api-mark-dot-net/dot-net-generator.yaml`, `docs/reqstream/api-mark-dot-net/type-name-simplifier.yaml`, `docs/reqstream/api-mark-dot-net/dot-net-ast-model.yaml`, @@ -172,6 +195,13 @@ Each local software item has corresponding artifacts in parallel directory trees `docs/reqstream/api-mark-cpp/cpp-emitter-gradual-disclosure.yaml`, `docs/reqstream/api-mark-cpp/cpp-emitter-single-file.yaml`, `docs/reqstream/api-mark-cpp/cpp-type-link-resolver.yaml`, + `docs/reqstream/api-mark-vhdl.yaml`, + `docs/reqstream/api-mark-vhdl/vhdl-generator.yaml`, + `docs/reqstream/api-mark-vhdl/vhdl-ast-model.yaml`, + `docs/reqstream/api-mark-vhdl/vhdl-ast-parser.yaml`, + `docs/reqstream/api-mark-vhdl/vhdl-emitter.yaml`, + `docs/reqstream/api-mark-vhdl/vhdl-emitter-gradual-disclosure.yaml`, + `docs/reqstream/api-mark-vhdl/vhdl-emitter-single-file.yaml`, `docs/reqstream/api-mark-msbuild.yaml`, `docs/reqstream/api-mark-msbuild/{item}.yaml`, `docs/reqstream/api-mark-tool.yaml`, `docs/reqstream/api-mark-tool/{item}.yaml` - Design: `docs/design/api-mark-core.md`, `docs/design/api-mark-core/{item}.md`, @@ -192,6 +222,13 @@ Each local software item has corresponding artifacts in parallel directory trees `docs/design/api-mark-cpp/cpp-emitter-gradual-disclosure.md`, `docs/design/api-mark-cpp/cpp-emitter-single-file.md`, `docs/design/api-mark-cpp/cpp-type-link-resolver.md`, + `docs/design/api-mark-vhdl.md`, + `docs/design/api-mark-vhdl/vhdl-generator.md`, + `docs/design/api-mark-vhdl/vhdl-ast-model.md`, + `docs/design/api-mark-vhdl/vhdl-ast-parser.md`, + `docs/design/api-mark-vhdl/vhdl-emitter.md`, + `docs/design/api-mark-vhdl/vhdl-emitter-gradual-disclosure.md`, + `docs/design/api-mark-vhdl/vhdl-emitter-single-file.md`, `docs/design/api-mark-msbuild.md`, `docs/design/api-mark-msbuild/{item}.md`, `docs/design/api-mark-tool.md`, `docs/design/api-mark-tool/{item}.md` - Verification: `docs/verification/api-mark-core.md`, `docs/verification/api-mark-core/{item}.md`, @@ -212,11 +249,20 @@ Each local software item has corresponding artifacts in parallel directory trees `docs/verification/api-mark-cpp/cpp-emitter-gradual-disclosure.md`, `docs/verification/api-mark-cpp/cpp-emitter-single-file.md`, `docs/verification/api-mark-cpp/cpp-type-link-resolver.md`, + `docs/verification/api-mark-vhdl.md`, + `docs/verification/api-mark-vhdl/vhdl-generator.md`, + `docs/verification/api-mark-vhdl/vhdl-ast-model.md`, + `docs/verification/api-mark-vhdl/vhdl-ast-parser.md`, + `docs/verification/api-mark-vhdl/vhdl-emitter.md`, + `docs/verification/api-mark-vhdl/vhdl-emitter-gradual-disclosure.md`, + `docs/verification/api-mark-vhdl/vhdl-emitter-single-file.md`, `docs/verification/api-mark-msbuild.md`, `docs/verification/api-mark-msbuild/{item}.md`, `docs/verification/api-mark-tool.md`, `docs/verification/api-mark-tool/{item}.md` -- Source: `src/ApiMark.Core/`, `src/ApiMark.DotNet/`, `src/ApiMark.Cpp/`, `src/ApiMark.MSBuild/`, `src/ApiMark.Tool/` +- Source: `src/ApiMark.Core/`, `src/ApiMark.DotNet/`, `src/ApiMark.Cpp/`, `src/ApiMark.Vhdl/`, + `src/ApiMark.MSBuild/`, `src/ApiMark.Tool/` - Tests: `test/ApiMark.Core.TestHelpers/`, `test/ApiMark.Core.Tests/`, `test/ApiMark.DotNet.Tests/`, - `test/ApiMark.Cpp.Fixtures/`, `test/ApiMark.Cpp.Tests/`, `test/ApiMark.MSBuild.Tests/`, `test/ApiMark.Tool.Tests/` + `test/ApiMark.Cpp.Fixtures/`, `test/ApiMark.Cpp.Tests/`, `test/ApiMark.Vhdl.Tests/`, + `test/ApiMark.MSBuild.Tests/`, `test/ApiMark.Tool.Tests/` OTS items have integration/usage design documentation parallel to system folders: @@ -236,6 +282,12 @@ And for DemaConsulting.TestResults: - Design: `docs/design/ots/dema-consulting-test-results.md` - Verification: `docs/verification/ots/dema-consulting-test-results.md` +And for ANTLR4: + +- Requirements: `docs/reqstream/ots/antlr4.yaml` +- Design: `docs/design/ots/antlr4.md` +- Verification: `docs/verification/ots/antlr4.md` + And for cpp-ast-net (archived): - Requirements: `docs/reqstream/ots/cpp-ast-net.yaml` diff --git a/docs/design/ots/antlr4.md b/docs/design/ots/antlr4.md new file mode 100644 index 0000000..87cddd1 --- /dev/null +++ b/docs/design/ots/antlr4.md @@ -0,0 +1,52 @@ +## ANTLR4 + +ANTLR4 is a parser-generator tool. In ApiMark it was used **once**, manually, +to generate C# lexer and parser source files from the `vhdl2008.g4` grammar. +Those generated files are committed to the repository and treated as ordinary +source from that point on. ANTLR4 itself is not invoked during a normal build +or CI run. + +The `Antlr4.Runtime.Standard` NuGet package is the associated runtime library +that the generated parser code depends on. It is the only ANTLR4-related build +or runtime dependency. + +### Purpose + +ANTLR4 was chosen because the `antlr/grammars-v4` project maintains a +production-quality `vhdl2008.g4` grammar covering the full VHDL-2008 standard. +Writing an equivalent parser by hand would be prohibitively complex and brittle. +By generating the parser once and committing the result, ApiMark gains a +complete, standards-conformant VHDL parser with no ongoing tool dependency. + +Regeneration would only be needed if ApiMark were extended to support a newer +VHDL language standard (e.g., VHDL-2019) and a suitable updated grammar became +available. + +### Features Used + +- **Code generation (one-time)** — ANTLR4 tool was invoked once to generate + `vhdl2008Lexer.cs`, `vhdl2008Parser.cs`, `vhdl2008Visitor.cs`, + `vhdl2008BaseVisitor.cs`, and associated `.interp` and `.tokens` data files + from `vhdl2008.g4`. Regeneration instructions (including the specific jar + version) are in `src/ApiMark.Vhdl/VhdlAst/Antlr/README.md`. +- **Runtime support** — `Antlr4.Runtime.Standard` NuGet package provides the + base classes and token-stream infrastructure that the generated code depends + on at runtime. + +### Integration Pattern + +The generated files live in `src/ApiMark.Vhdl/VhdlAst/Antlr/` and are marked +`generated_code = true` in `.editorconfig` so that formatting and lint tools +skip them. `VhdlAstParser` imports the generated `vhdl2008Lexer` and +`vhdl2008Parser` classes directly; no wrapper or adapter layer is introduced. + +Regeneration instructions are maintained in +`src/ApiMark.Vhdl/VhdlAst/Antlr/README.md`. That file describes the required +Java runtime, the specific ANTLR4 jar version, and the exact command to run. + +### Known Compiler Suppressions + +The `vhdl2008.g4` grammar contains a rule named `base`, which conflicts with +the C# `base` keyword in the generated output. `ApiMark.Vhdl.csproj` suppresses +warnings CS1041, CS1584, CS1658, and CS3021 project-wide to accommodate this; +these suppressions do not affect any hand-written source files. diff --git a/docs/design/ots/clang.md b/docs/design/ots/clang.md index dbb86e5..8f99323 100644 --- a/docs/design/ots/clang.md +++ b/docs/design/ots/clang.md @@ -59,8 +59,14 @@ integration follows these steps: -fsyntax-only -x c++` followed by include path flags (`-I`, `-isystem`), preprocessor defines (`-D`), and the combined header file. 4. Clang is launched via `Process.Start`; stdout is read and deserialized as a `JsonDocument`. -5. `ClangAstParser` walks the JSON AST, collecting only nodes whose `"loc.file"` falls under a - configured public include root. The `"loc.file"` field is inherited by child nodes when not - explicitly present (sticky-file semantics from the clang AST format). +5. `ClangAstParser` walks the JSON AST, collecting only nodes that satisfy both + ownership conditions: (a) the node's `"loc.file"` falls under a configured + public include root, and (b) the file path is present in `_selectedHeaders` — + the set of header files resolved by `GlobFileCollector` from the + `ApiHeaderPatterns` glob list. This two-condition filter ensures that headers + transitively included from dependency libraries are excluded even when they + reside under a public include root. The `"loc.file"` field is inherited by + child nodes when not explicitly present (sticky-file semantics from the clang + AST format). 6. The collected declarations are assembled into a `CppCompilationResult` and returned to `CppGenerator` for output generation. diff --git a/docs/design/ots/cpp-ast-net.md b/docs/design/ots/cpp-ast-net.md index bda287e..7f7afec 100644 --- a/docs/design/ots/cpp-ast-net.md +++ b/docs/design/ots/cpp-ast-net.md @@ -1,6 +1,6 @@ ## CppAst.Net -> **Archived**: ApiMarkCpp no longer uses CppAst.Net. The C++ backend was rewritten +> **Archived**: ApiMark.Cpp no longer uses CppAst.Net. The C++ backend was rewritten > to invoke `clang -ast-dump=json` directly. This document is retained for historical > reference. See `docs/design/ots/clang.md` for the current integration design. diff --git a/docs/design/ots/file-system-globbing.md b/docs/design/ots/file-system-globbing.md new file mode 100644 index 0000000..e04c690 --- /dev/null +++ b/docs/design/ots/file-system-globbing.md @@ -0,0 +1,41 @@ +## Microsoft.Extensions.FileSystemGlobbing + +`Microsoft.Extensions.FileSystemGlobbing` is a Microsoft-provided NuGet package that +implements gitignore-style glob pattern matching against the file system. In ApiMark, +it is consumed exclusively by `GlobFileCollector` in `ApiMark.Core`, which is shared +by all language generators that require filesystem-based file discovery (`CppGenerator` +and `VhdlGenerator`). + +### Purpose + +FileSystemGlobbing was chosen because it provides production-quality glob matching +semantics — including `**/` recursive wildcards, single-segment `*` wildcards, and +character ranges — without requiring a custom pattern parser. It is a stable, +officially maintained .NET component with a minimal public API surface, reducing the +integration risk compared to third-party glob libraries. + +### Features Used + +- **`Matcher` class** — accumulates include glob patterns via `AddInclude`, then + executes them against a directory root using `GetResultsInFullPath(root)` to + return matching absolute file paths as `IEnumerable`. +- **Include-only matching** — `GlobFileCollector` always calls `AddInclude` for + every pattern. Exclusion semantics are implemented in `GlobFileCollector` itself + by calling `collected.Remove()` on paths returned for `!`-prefixed patterns, + rather than relying on `Matcher.AddExclude`. + +### Integration Pattern + +`GlobFileCollector.Collect` uses one `Matcher` instance per pattern: + +1. For each pattern, strip the optional `!` exclusion prefix and resolve the + filesystem root and glob tail via `ParsePattern`. +2. Create a new `Matcher(StringComparison.OrdinalIgnoreCase)` instance. +3. Call `matcher.AddInclude(globTail)` with the pattern's glob portion. +4. Call `matcher.GetResultsInFullPath(root)` to obtain an `IEnumerable` + of absolute paths. +5. For inclusion patterns, add results to the `collected` hash set. For exclusion + patterns, call `collected.Remove()` for each result. + +Non-existent roots are skipped before calling `GetResultsInFullPath` so the +library is never asked to traverse a missing directory. diff --git a/docs/reqstream/api-mark-core.yaml b/docs/reqstream/api-mark-core.yaml index 499b9ab..9c82afa 100644 --- a/docs/reqstream/api-mark-core.yaml +++ b/docs/reqstream/api-mark-core.yaml @@ -4,7 +4,9 @@ sections: - title: ApiMarkCore Requirements requirements: - id: ApiMarkCore-IApiGenerator-ProvideLanguageGeneratorContract - title: ApiMarkCore shall provide a two-stage language-generator contract (Parse + Emit) that callers can use to invoke any supported language module with a configurable output format. + title: ApiMarkCore shall provide a two-stage language-generator contract (Parse + + Emit) that callers can use to invoke any supported language module with + a configurable output format. justification: | ApiMark needs a common contract so the CLI and any build integration can trigger documentation generation without knowing the implementation details @@ -14,10 +16,11 @@ sections: children: - ApiMarkCore-IApiGenerator-DefineParseMethod - ApiMarkCore-IApiGenerator-AllowConstructionTimeConfiguration - tests: - - ApiMarkCore_GeneratorContract_SupportedLanguage_CanBeInvoked + tests: [ApiMarkCore_GeneratorContract_SupportedLanguage_CanBeInvoked] - id: ApiMarkCore-IContext-ProvideOutputChannel - title: ApiMarkCore shall provide a minimal output channel interface that language generators can use to emit informational and error messages without depending on Console. + title: ApiMarkCore shall provide a minimal output channel interface that language + generators can use to emit informational and error messages without depending + on Console. justification: | ApiMark generators need to emit diagnostic output without depending on Console directly, so the channel can be captured, suppressed, or @@ -26,10 +29,10 @@ sections: children: - ApiMarkCore-IContext-DefineWriteLineMethod - ApiMarkCore-IContext-DefineWriteErrorMethod - tests: - - InMemoryContext_WriteLineAndWriteError_RouteToSeparateChannels + tests: [InMemoryContext_WriteLineAndWriteError_RouteToSeparateChannels] - id: ApiMarkCore-IMarkdownWriterFactory-ProvideMarkdownWriterFactoryInterface - title: ApiMarkCore shall provide a factory interface for creating per-file Markdown writers so that language generators are decoupled from the file-system. + title: ApiMarkCore shall provide a factory interface for creating per-file + Markdown writers so that language generators are decoupled from the file-system. justification: | Decoupling generators from the file-system via a factory contract allows the same generator code to write to disk in production and to memory in @@ -39,10 +42,10 @@ sections: - ApiMarkCore-IMarkdownWriterFactory-SupportRootLevelFiles - ApiMarkCore-IMarkdownWriterFactory-RejectInvalidOutputDirectory - ApiMarkCore-IMarkdownWriterFactory-EnsureOutputDirectory - tests: - - ApiMarkCore_WriterFactory_CanCreate_RootAndSubfolderWriters + tests: [ApiMarkCore_WriterFactory_CanCreate_RootAndSubfolderWriters] - id: ApiMarkCore-IMarkdownWriter-ProvideMarkdownOutputInterface - title: ApiMarkCore shall provide a markdown output interface for writing individual documentation files. + title: ApiMarkCore shall provide a markdown output interface for writing individual + documentation files. justification: | A shared markdown-writing abstraction keeps the generated document shape consistent while allowing output helpers to evolve without changing each @@ -55,10 +58,10 @@ sections: - ApiMarkCore-IMarkdownWriter-DefineWriteTable - ApiMarkCore-IMarkdownWriter-DefineWriteCodeBlock - ApiMarkCore-IMarkdownWriter-DefineWriteLink - tests: - - InMemoryMarkdownWriter_Write_AllOperations_RecordsInOrder + tests: [InMemoryMarkdownWriter_Write_AllOperations_RecordsInOrder] - id: ApiMarkCore-PathHelpers-ProvideSafePathCombinationHelper - title: ApiMarkCore shall provide an internal helper for safely combining caller-supplied relative path segments with a trusted base path. + title: ApiMarkCore shall provide an internal helper for safely combining caller-supplied + relative path segments with a trusted base path. justification: | ApiMark needs one auditable place to enforce path-safety rules so file-based helpers do not each implement their own traversal checks inconsistently. @@ -92,3 +95,26 @@ sections: children: - ApiMarkCore-EmitConfig-DefineFormat - ApiMarkCore-EmitConfig-DefineHeadingDepth + - id: ApiMarkCore-GlobFileCollector-ProvideGlobFileCollector + title: ApiMark Core shall provide a shared utility for discovering files from + the filesystem using gitignore-style glob patterns. + justification: | + Multiple language generators (C++ and VHDL) need to discover source files + based on caller-supplied glob patterns. Providing a shared, tested utility + in ApiMarkCore avoids duplicated pattern-evaluation logic and ensures + consistent behavior (absolute/relative patterns, bare-star extension + inference, exclusion semantics, deduplication) across all generators. + children: + - ApiMarkCore-GlobFileCollector-CollectFilesViaGlobPatterns + - ApiMarkCore-GlobFileCollector-SupportAbsolutePatterns + - ApiMarkCore-GlobFileCollector-InferExtensionsFromBareStar + - ApiMarkCore-GlobFileCollector-SupportExclusionPatterns + - ApiMarkCore-GlobFileCollector-SkipNonExistentRoots + tests: + - GlobFileCollector_Collect_EmptyPatterns_ReturnsEmptyList + - GlobFileCollector_Collect_RelativeVhdPattern_FindsVhdFiles + - GlobFileCollector_Collect_BareStarWithVhdlExtensions_FiltersToVhdlOnly + - GlobFileCollector_Collect_AbsolutePattern_FindsFiles + - GlobFileCollector_Collect_ExclusionPattern_RemovesMatchedFiles + - GlobFileCollector_Collect_NonExistentRoot_ReturnsEmptyWithoutThrowing + - GlobFileCollector_Collect_OverlappingPatterns_ReturnsSortedDeduplicated diff --git a/docs/reqstream/api-mark-core/emit-config.yaml b/docs/reqstream/api-mark-core/emit-config.yaml index a3a9363..5f9682f 100644 --- a/docs/reqstream/api-mark-core/emit-config.yaml +++ b/docs/reqstream/api-mark-core/emit-config.yaml @@ -6,7 +6,8 @@ sections: - title: EmitConfig Requirements requirements: - id: ApiMarkCore-EmitConfig-DefineFormat - title: EmitConfig shall make the output format selectable, defaulting to gradual-disclosure (multi-file) output. + title: EmitConfig shall make the output format selectable, defaulting + to gradual-disclosure (multi-file) output. justification: | The output format must be selectable at emit time rather than at parse time so that callers (CLI, MSBuild task) can control the file-layout strategy @@ -17,12 +18,12 @@ sections: - IApiGenerator_Emit_GradualDisclosure_ProducesMultipleFiles - IApiGenerator_Emit_SingleFile_ProducesSingleApiMd - id: ApiMarkCore-EmitConfig-DefineHeadingDepth - title: EmitConfig shall make the top-level heading level selectable, defaulting to level 1. + title: EmitConfig shall make the top-level heading level selectable, defaulting + to level 1. justification: | When producing single-file output, the caller must be able to embed the generated content inside a larger document at any heading level. HeadingDepth controls the absolute heading level of the top-level section so that the emitter can shift all headings consistently. Defaulting to 1 produces H1 top-level headings, matching the expected output for standalone documents. - tests: - - IApiGenerator_Emit_SingleFile_ProducesSingleApiMd + tests: [IApiGenerator_Emit_SingleFile_ProducesSingleApiMd] diff --git a/docs/reqstream/api-mark-core/glob-file-collector.yaml b/docs/reqstream/api-mark-core/glob-file-collector.yaml new file mode 100644 index 0000000..0fb8285 --- /dev/null +++ b/docs/reqstream/api-mark-core/glob-file-collector.yaml @@ -0,0 +1,57 @@ +--- +# GlobFileCollector unit requirements +sections: + - title: ApiMarkCore Requirements + sections: + - title: GlobFileCollector Requirements + requirements: + - id: ApiMarkCore-GlobFileCollector-CollectFilesViaGlobPatterns + title: GlobFileCollector shall collect files from the filesystem using an + ordered list of glob patterns, returning a sorted deduplicated list of + absolute file paths. + justification: | + ApiMark language generators (C++ and VHDL) need a single reusable + utility to discover source files based on caller-supplied glob patterns + without duplicating pattern-evaluation logic across generators. + tests: + - GlobFileCollector_Collect_EmptyPatterns_ReturnsEmptyList + - GlobFileCollector_Collect_RelativeVhdPattern_FindsVhdFiles + - GlobFileCollector_Collect_OverlappingPatterns_ReturnsSortedDeduplicated + - id: ApiMarkCore-GlobFileCollector-SupportAbsolutePatterns + title: GlobFileCollector shall support absolute path patterns so that callers + can discover files outside the current working directory. + justification: | + C++ include roots and VHDL source trees may reside anywhere on the + filesystem, including paths on different drives or mount points. Absolute + pattern support gives callers full filesystem reach without requiring a + working-directory change. + tests: + - GlobFileCollector_Collect_AbsolutePattern_FindsFiles + - id: ApiMarkCore-GlobFileCollector-InferExtensionsFromBareStar + title: GlobFileCollector shall filter results to the configured language + extensions when a pattern's final path segment is a bare wildcard (*) + with no extension. + justification: | + Users who write patterns like src/** or ** want all files of the relevant + language type without needing to enumerate each extension explicitly. + Extension inference from a bare * provides a natural default. + tests: + - GlobFileCollector_Collect_BareStarWithVhdlExtensions_FiltersToVhdlOnly + - id: ApiMarkCore-GlobFileCollector-SupportExclusionPatterns + title: GlobFileCollector shall remove files matched by exclusion patterns + (entries prefixed with !) from the accumulated inclusion result. + justification: | + Callers need to exclude subsets of files (e.g., test benches, detail + headers) from an otherwise broad inclusion pattern. Exclusion support + allows this without requiring callers to enumerate every included path. + tests: + - GlobFileCollector_Collect_ExclusionPattern_RemovesMatchedFiles + - id: ApiMarkCore-GlobFileCollector-SkipNonExistentRoots + title: GlobFileCollector shall return an empty result when a pattern's root + directory does not exist, without throwing an exception. + justification: | + Callers may supply patterns for directories that do not yet exist on the + current machine (e.g., optional SDK paths). Silent skipping prevents + spurious failures and allows partial results from other patterns. + tests: + - GlobFileCollector_Collect_NonExistentRoot_ReturnsEmptyWithoutThrowing diff --git a/docs/reqstream/api-mark-core/i-api-emitter.yaml b/docs/reqstream/api-mark-core/i-api-emitter.yaml index 76bbe6e..613e856 100644 --- a/docs/reqstream/api-mark-core/i-api-emitter.yaml +++ b/docs/reqstream/api-mark-core/i-api-emitter.yaml @@ -6,7 +6,9 @@ sections: - title: IApiEmitter Requirements requirements: - id: ApiMarkCore-IApiEmitter-DefineEmitMethod - title: IApiEmitter shall write the Markdown output for the previously parsed component using a caller-supplied output-writer factory, output configuration, and diagnostic channel. + title: IApiEmitter shall write the Markdown output for the previously + parsed component using a caller-supplied output-writer factory, output + configuration, and diagnostic channel. justification: | Callers need one consistent invocation point for writing Markdown output after parsing is complete. Accepting IMarkdownWriterFactory decouples the @@ -18,25 +20,26 @@ sections: - IApiGenerator_Parse_WithMinimalStub_ExecutesSuccessfully - IApiGenerator_Emit_OutputDirectory_ContainsApiMd - id: ApiMarkCore-IApiEmitter-SupportGradualDisclosure - title: IApiEmitter.Emit shall support writing multi-file gradual-disclosure output when EmitConfig.Format is GradualDisclosure. + title: IApiEmitter.Emit shall support writing multi-file gradual-disclosure + output when EmitConfig.Format is GradualDisclosure. justification: | The gradual-disclosure tree (one file per concept) is the primary output format optimized for AI agent navigation. An emitter must honor this format when selected so callers can produce the expected multi-file layout without knowing which language module generated the symbol data. - tests: - - IApiGenerator_Emit_GradualDisclosure_ProducesMultipleFiles + tests: [IApiGenerator_Emit_GradualDisclosure_ProducesMultipleFiles] - id: ApiMarkCore-IApiEmitter-SupportSingleFile - title: IApiEmitter.Emit shall support writing all content into a single api.md file when EmitConfig.Format is SingleFile. + title: IApiEmitter.Emit shall support writing all content into a single + api.md file when EmitConfig.Format is SingleFile. justification: | The single-file format is optimized for direct reading or embedding in a larger document. An emitter must honor this format when selected so callers can produce a single consolidated Markdown file without knowing which language module generated the symbol data. - tests: - - IApiGenerator_Emit_SingleFile_ProducesSingleApiMd + tests: [IApiGenerator_Emit_SingleFile_ProducesSingleApiMd] - id: ApiMarkCore-IApiEmitter-ProduceApiMdEntrypoint - title: IApiEmitter.Emit shall produce a file named "api.md" as the fixed top-level entrypoint of every generated output tree. + title: IApiEmitter.Emit shall produce a file named "api.md" as the fixed + top-level entrypoint of every generated output tree. justification: | Callers (CLI and MSBuild) need a predictable entry point to reference or present to the user without inspecting output directory contents. A fixed diff --git a/docs/reqstream/api-mark-core/i-api-generator.yaml b/docs/reqstream/api-mark-core/i-api-generator.yaml index d96eb76..495ecd5 100644 --- a/docs/reqstream/api-mark-core/i-api-generator.yaml +++ b/docs/reqstream/api-mark-core/i-api-generator.yaml @@ -6,7 +6,8 @@ sections: - title: IApiGenerator Requirements requirements: - id: ApiMarkCore-IApiGenerator-DefineParseMethod - title: IApiGenerator shall accept a caller-supplied diagnostic channel and return an emitter ready to write the parsed component's documentation. + title: IApiGenerator shall accept a caller-supplied diagnostic channel + and return an emitter ready to write the parsed component's documentation. justification: | The caller needs one consistent invocation point for every language generator so symbol parsing can be triggered without knowing the @@ -15,13 +16,12 @@ sections: caller to choose the output format at emit time rather than at parse time. IContext decouples generators from Console so output can be captured, suppressed, or redirected by the caller. - tests: - - IApiGenerator_Parse_WithMinimalStub_ExecutesSuccessfully + tests: [IApiGenerator_Parse_WithMinimalStub_ExecutesSuccessfully] - id: ApiMarkCore-IApiGenerator-AllowConstructionTimeConfiguration - title: IApiGenerator shall allow language-specific configuration to be supplied when an implementation is constructed before Parse is called. + title: IApiGenerator shall allow language-specific configuration to be + supplied when an implementation is constructed before Parse is called. justification: | Language modules require different inputs and policies, such as input file paths or visibility settings, so configuration must be captured before parsing starts while keeping the runtime invocation uniform. - tests: - - IApiGenerator_Implementation_UsesConstructionConfiguration + tests: [IApiGenerator_Implementation_UsesConstructionConfiguration] diff --git a/docs/reqstream/api-mark-core/i-context.yaml b/docs/reqstream/api-mark-core/i-context.yaml index ba5806d..7538466 100644 --- a/docs/reqstream/api-mark-core/i-context.yaml +++ b/docs/reqstream/api-mark-core/i-context.yaml @@ -6,19 +6,19 @@ sections: - title: IContext Requirements requirements: - id: ApiMarkCore-IContext-DefineWriteLineMethod - title: IContext shall define a WriteLine method that accepts a string message parameter for informational output. + title: IContext shall define a WriteLine method that accepts a string + message parameter for informational output. justification: | Generators need a consistent way to emit informational messages without depending on Console so output can be captured, suppressed, or redirected by different hosts (CLI, test doubles, MSBuild tasks). - tests: - - IContext_WriteLine_CapturesMessage_InLines + tests: [IContext_WriteLine_CapturesMessage_InLines] - id: ApiMarkCore-IContext-DefineWriteErrorMethod - title: IContext shall define a WriteError method that accepts a string message parameter for error and warning output. + title: IContext shall define a WriteError method that accepts a string + message parameter for error and warning output. justification: | Generators need to distinguish error and warning messages from informational output so hosts can route them to the appropriate channel (for example stderr or a build-system error log) without parsing message content. - tests: - - IContext_WriteError_CapturesMessage_InErrors + tests: [IContext_WriteError_CapturesMessage_InErrors] diff --git a/docs/reqstream/api-mark-core/i-markdown-writer-factory.yaml b/docs/reqstream/api-mark-core/i-markdown-writer-factory.yaml index ad1983a..564436b 100644 --- a/docs/reqstream/api-mark-core/i-markdown-writer-factory.yaml +++ b/docs/reqstream/api-mark-core/i-markdown-writer-factory.yaml @@ -6,23 +6,24 @@ sections: - title: IMarkdownWriterFactory Requirements requirements: - id: ApiMarkCore-IMarkdownWriterFactory-DefineCreateMarkdownMethod - title: IMarkdownWriterFactory shall define a CreateMarkdown operation that accepts a subFolder string and a name string and returns an IMarkdownWriter. + title: IMarkdownWriterFactory shall define a CreateMarkdown operation + that accepts a subFolder string and a name string and returns an IMarkdownWriter. justification: | Language generators need to open individual output files without knowing the storage mechanism so that the same generator code can write to disk in production and to memory in tests. - tests: - - IMarkdownWriterFactory_HasCreateMarkdown_Method + tests: [IMarkdownWriterFactory_HasCreateMarkdown_Method] - id: ApiMarkCore-IMarkdownWriterFactory-SupportRootLevelFiles - title: IMarkdownWriterFactory shall support creating root-level files when subFolder is an empty string. + title: IMarkdownWriterFactory shall support creating root-level files + when subFolder is an empty string. justification: | The api.md entrypoint file is always at the root of the output tree, so the factory must accept an empty subFolder without error to allow generators to create that fixed entrypoint. - tests: - - IMarkdownWriterFactory_CreateMarkdown_EmptySubFolder_IsRootLevel + tests: [IMarkdownWriterFactory_CreateMarkdown_EmptySubFolder_IsRootLevel] - id: ApiMarkCore-IMarkdownWriterFactory-RejectInvalidOutputDirectory - title: IMarkdownWriterFactory shall reject a null, empty, or whitespace output directory path at construction time. + title: IMarkdownWriterFactory shall reject a null, empty, or whitespace + output directory path at construction time. justification: | Failing fast at construction with a clear ArgumentException prevents obscure I/O failures later when the first file is created, making @@ -31,7 +32,9 @@ sections: - FileMarkdownWriterFactory_Constructor_NullDirectory_ThrowsArgumentException - FileMarkdownWriterFactory_Constructor_WhitespaceDirectory_ThrowsArgumentException - id: ApiMarkCore-IMarkdownWriterFactory-EnsureOutputDirectory - title: IMarkdownWriterFactory shall create the output directory and any required subdirectory before returning the writer, so that callers do not need to pre-create the directory structure. + title: IMarkdownWriterFactory shall create the output directory and any + required subdirectory before returning the writer, so that callers do + not need to pre-create the directory structure. justification: | Language generators work with logical paths and must not be responsible for managing the physical directory tree; delegating directory creation diff --git a/docs/reqstream/api-mark-core/i-markdown-writer.yaml b/docs/reqstream/api-mark-core/i-markdown-writer.yaml index 0f6ed0b..e22eafc 100644 --- a/docs/reqstream/api-mark-core/i-markdown-writer.yaml +++ b/docs/reqstream/api-mark-core/i-markdown-writer.yaml @@ -6,52 +6,52 @@ sections: - title: IMarkdownWriter Requirements requirements: - id: ApiMarkCore-IMarkdownWriter-ImplementIDisposable - title: IMarkdownWriter shall extend IDisposable so that implementations flush and close the underlying output file when disposed. + title: IMarkdownWriter shall extend IDisposable so that implementations + flush and close the underlying output file when disposed. justification: | Generators open one writer per output file and must be able to flush and close each file reliably; IDisposable provides the standard .NET pattern for deterministic resource cleanup and enables using-statement ergonomics. - tests: - - IMarkdownWriter_IsDisposable_ExtendsIDisposable + tests: [IMarkdownWriter_IsDisposable_ExtendsIDisposable] - id: ApiMarkCore-IMarkdownWriter-DefineWriteHeading - title: IMarkdownWriter shall define a WriteHeading operation that accepts a heading level and heading text. + title: IMarkdownWriter shall define a WriteHeading operation that accepts + a heading level and heading text. justification: | Generated files need a consistent way to emit section headings so readers can navigate summary and detail pages with a predictable markdown structure. - tests: - - IMarkdownWriter_WriteHeading_ValidArgs_DoesNotThrow + tests: [IMarkdownWriter_WriteHeading_ValidArgs_DoesNotThrow] - id: ApiMarkCore-IMarkdownWriter-DefineWriteSignature - title: IMarkdownWriter shall define a WriteSignature operation that accepts a language identifier and code text. + title: IMarkdownWriter shall define a WriteSignature operation that accepts + a language identifier and code text. justification: | Type and member signatures must be rendered distinctly from prose so the generated documentation preserves the API surface in a readable format. - tests: - - IMarkdownWriter_WriteSignature_ValidArgs_DoesNotThrow + tests: [IMarkdownWriter_WriteSignature_ValidArgs_DoesNotThrow] - id: ApiMarkCore-IMarkdownWriter-DefineWriteParagraph - title: IMarkdownWriter shall define a WriteParagraph operation that accepts paragraph text. + title: IMarkdownWriter shall define a WriteParagraph operation that accepts + paragraph text. justification: | Summaries, remarks, and return descriptions need a plain prose-writing operation so generators can emit narrative documentation consistently. - tests: - - IMarkdownWriter_WriteParagraph_ValidText_DoesNotThrow + tests: [IMarkdownWriter_WriteParagraph_ValidText_DoesNotThrow] - id: ApiMarkCore-IMarkdownWriter-DefineWriteTable - title: IMarkdownWriter shall define a WriteTable operation that accepts headers and rows. + title: IMarkdownWriter shall define a WriteTable operation that accepts + headers and rows. justification: | Namespace, type, and member summaries rely on tables to present compact API information that can be scanned quickly by humans and AI tools. - tests: - - IMarkdownWriter_WriteTable_ValidArgs_DoesNotThrow + tests: [IMarkdownWriter_WriteTable_ValidArgs_DoesNotThrow] - id: ApiMarkCore-IMarkdownWriter-DefineWriteCodeBlock - title: IMarkdownWriter shall define a WriteCodeBlock operation that accepts a language identifier and code text. + title: IMarkdownWriter shall define a WriteCodeBlock operation that accepts + a language identifier and code text. justification: | Example content and other multi-line snippets need fenced code blocks so documentation remains readable and syntax-aware in markdown viewers. - tests: - - IMarkdownWriter_WriteCodeBlock_ValidArgs_DoesNotThrow + tests: [IMarkdownWriter_WriteCodeBlock_ValidArgs_DoesNotThrow] - id: ApiMarkCore-IMarkdownWriter-DefineWriteLink - title: IMarkdownWriter shall define a WriteLink operation that accepts link text and a relative path. + title: IMarkdownWriter shall define a WriteLink operation that accepts + link text and a relative path. justification: | Gradual disclosure depends on explicit links between generated files, so the writer contract must support relative navigation links directly. - tests: - - IMarkdownWriter_WriteLink_ValidArgs_DoesNotThrow + tests: [IMarkdownWriter_WriteLink_ValidArgs_DoesNotThrow] diff --git a/docs/reqstream/api-mark-core/path-helpers.yaml b/docs/reqstream/api-mark-core/path-helpers.yaml index fc758b4..6661842 100644 --- a/docs/reqstream/api-mark-core/path-helpers.yaml +++ b/docs/reqstream/api-mark-core/path-helpers.yaml @@ -6,7 +6,9 @@ sections: - title: PathHelpers Requirements requirements: - id: ApiMarkCore-PathHelpers-CombineValidRelativeSegments - title: PathHelpers shall combine a trusted base path with one or more caller-supplied path segments in order, provided the result resolves within the base. + title: PathHelpers shall combine a trusted base path with one or more + caller-supplied path segments in order, provided the result resolves + within the base. justification: | ApiMark callers need one reusable helper that can build derived file-system paths without duplicating path-joining logic at every call site. Segments @@ -22,7 +24,8 @@ sections: - PathHelpers_SafePathCombine_FilenameWithDoubleDots_CombinesCorrectly - PathHelpers_SafePathCombine_AbsoluteSegment_WithinBase_CombinesCorrectly - id: ApiMarkCore-PathHelpers-RejectTraversalSegments - title: PathHelpers shall reject any caller-supplied path combination that resolves outside the base directory. + title: PathHelpers shall reject any caller-supplied path combination that + resolves outside the base directory. justification: | Caller-supplied path fragments must never be allowed to escape the intended output root because traversal would create a directory-traversal vulnerability. diff --git a/docs/reqstream/api-mark-cpp.yaml b/docs/reqstream/api-mark-cpp.yaml index b9d2cb2..faf7eaa 100644 --- a/docs/reqstream/api-mark-cpp.yaml +++ b/docs/reqstream/api-mark-cpp.yaml @@ -4,7 +4,8 @@ sections: - title: ApiMarkCpp Requirements requirements: - id: ApiMarkCpp-CppGenerator-GenerateDocumentationFromCppHeaders - title: ApiMarkCpp shall generate API documentation from C++ header files and their Doxygen doc comments. + title: ApiMarkCpp shall generate API documentation from C++ header files and + their Doxygen doc comments. justification: | ApiMark needs to document C++ libraries from public header files without requiring a full build, using the headers for API structure and Doxygen doc comments for the @@ -34,5 +35,4 @@ sections: - ApiMarkCpp-CppEmitterGradualDisclosure - ApiMarkCpp-CppEmitterSingleFile - ApiMarkCpp-CppTypeLinkResolver - tests: - - CppGenerator_Generate_ValidHeaders_CreatesApiEntrypoint + tests: [CppGenerator_Generate_ValidHeaders_CreatesApiEntrypoint] diff --git a/docs/reqstream/api-mark-cpp/clang-ast-parser.yaml b/docs/reqstream/api-mark-cpp/clang-ast-parser.yaml index a5b3dad..4efe548 100644 --- a/docs/reqstream/api-mark-cpp/clang-ast-parser.yaml +++ b/docs/reqstream/api-mark-cpp/clang-ast-parser.yaml @@ -14,8 +14,7 @@ sections: resolved C++ AST. Delegating parse to ClangAstParser keeps the I/O and JSON-deserialization logic isolated from the higher-level generation logic, making each unit independently testable. - children: - - ApiMarkCpp-ClangAstParser-ParseHeaders + children: [ApiMarkCpp-ClangAstParser-ParseHeaders] - id: ApiMarkCpp-ClangAstParser-ParseHeaders title: >- ClangAstParser.Parse shall write a temporary combined header, invoke diff --git a/docs/reqstream/api-mark-cpp/cpp-emitter-gradual-disclosure.yaml b/docs/reqstream/api-mark-cpp/cpp-emitter-gradual-disclosure.yaml index 0d5ffcb..b315d77 100644 --- a/docs/reqstream/api-mark-cpp/cpp-emitter-gradual-disclosure.yaml +++ b/docs/reqstream/api-mark-cpp/cpp-emitter-gradual-disclosure.yaml @@ -20,7 +20,8 @@ sections: - ApiMarkCpp-CppEmitterGradualDisclosure-EmitNamespaceAndTypePages - id: ApiMarkCpp-CppEmitterGradualDisclosure-EmitApiIndexPage title: >- - CppEmitterGradualDisclosure shall produce an api index page listing all + CppEmitterGradualDisclosure shall produce an api index page listing + all namespaces with the library name as the top-level heading. justification: | The api index is the single entry point from which all other pages are diff --git a/docs/reqstream/api-mark-cpp/cpp-emitter-single-file.yaml b/docs/reqstream/api-mark-cpp/cpp-emitter-single-file.yaml index 6ac5202..06c29b7 100644 --- a/docs/reqstream/api-mark-cpp/cpp-emitter-single-file.yaml +++ b/docs/reqstream/api-mark-cpp/cpp-emitter-single-file.yaml @@ -13,8 +13,7 @@ sections: Single-file output is required for consumers who want a compact, linear reference instead of the gradual-disclosure folder tree. Writing all content into one file simplifies indexing and search. - children: - - ApiMarkCpp-CppEmitterSingleFile-EmitSingleApiFile + children: [ApiMarkCpp-CppEmitterSingleFile-EmitSingleApiFile] - id: ApiMarkCpp-CppEmitterSingleFile-EmitSingleApiFile title: >- CppEmitterSingleFile shall create exactly one writer keyed as api, diff --git a/docs/reqstream/api-mark-cpp/cpp-emitter.yaml b/docs/reqstream/api-mark-cpp/cpp-emitter.yaml index 4cb7354..4f1a0dc 100644 --- a/docs/reqstream/api-mark-cpp/cpp-emitter.yaml +++ b/docs/reqstream/api-mark-cpp/cpp-emitter.yaml @@ -15,8 +15,7 @@ sections: format-specific logic allows each format emitter to be tested in isolation while keeping shared utilities (visibility filters, signature builders, include-path resolution) in one place. - children: - - ApiMarkCpp-CppEmitter-WriteCombinedMemberPage + children: [ApiMarkCpp-CppEmitter-WriteCombinedMemberPage] tests: - CppEmitter_Emit_GradualDisclosureFormat_ProducesMultipleFiles - CppEmitter_Emit_SingleFileFormat_ProducesSingleApiFile diff --git a/docs/reqstream/api-mark-cpp/cpp-generator.yaml b/docs/reqstream/api-mark-cpp/cpp-generator.yaml index 0c8577e..6506e90 100644 --- a/docs/reqstream/api-mark-cpp/cpp-generator.yaml +++ b/docs/reqstream/api-mark-cpp/cpp-generator.yaml @@ -27,11 +27,12 @@ sections: inheritance relationships across headers are available for accurate documentation generation; invoking clang directly produces a complete, standards-compliant AST without requiring a bundled parser library. - tests: [CppGenerator_Generate_ValidHeaders_CreatesApiEntrypoint, - ClangAstParser_Parse_FixtureHeaders_ReturnsNonEmptyNamespaces, - ClangAstParser_Parse_FixtureHeaders_ContainsFixturesNamespace, - ClangAstParser_Parse_FixtureHeaders_FixturesNamespaceContainsSampleClass, - ClangAstParser_Parse_FixtureHeaders_SampleClassHasMembers] + tests: + - CppGenerator_Generate_ValidHeaders_CreatesApiEntrypoint + - ClangAstParser_Parse_FixtureHeaders_ReturnsNonEmptyNamespaces + - ClangAstParser_Parse_FixtureHeaders_ContainsFixturesNamespace + - ClangAstParser_Parse_FixtureHeaders_FixturesNamespaceContainsSampleClass + - ClangAstParser_Parse_FixtureHeaders_SampleClassHasMembers - id: ApiMarkCpp-CppGenerator-FilterDeclarationsByOwnership title: >- CppGenerator shall apply a file-provenance filter that documents only @@ -106,7 +107,8 @@ sections: - CppGenerator_Generate_IncludeDeprecatedFalse_ExcludesDeprecatedClass - CppGenerator_Generate_IncludeDeprecatedTrue_IncludesDeprecatedClass - id: ApiMarkCpp-CppGenerator-RenderDoxygenDocComments - title: CppGenerator shall extract and render Doxygen doc comments from parsed declarations. + title: CppGenerator shall extract and render Doxygen doc comments from + parsed declarations. justification: | Developer-authored Doxygen comments contain the descriptions, parameter explanations, return-value documentation, and example code that belong in the published API reference. @@ -166,8 +168,10 @@ sections: - CppGenerator_Generate_NamespaceFreeOperator_CreatesNamespaceOperatorsPage - id: ApiMarkCpp-CppGenerator-ShowDirectInheritanceInTypeSignature title: >- - CppGenerator shall include a class declaration line in the signature block showing - direct base class names and the final specifier for classes that have direct base + CppGenerator shall include a class declaration line in the signature + block showing + direct base class names and the final specifier for classes that have + direct base classes or are marked final. justification: | The direct base class list tells AI agents the contract a type satisfies and @@ -209,6 +213,19 @@ sections: - CppGenerator_Generate_ApiHeaderPatterns_ExcludePattern_ExcludesMatchingFiles - CppGenerator_Generate_ApiHeaderPatterns_ReInclude_GitignoreSemantics_IncludesReIncludedHeader - CppGenerator_Generate_ApiHeaderPatterns_ExcludeWithoutReInclude_ExcludesHeader + - id: ApiMarkCpp-CppGenerator-SupportAbsoluteAndRelativeHeaderPatterns + title: >- + CppGenerator shall support both absolute and relative ApiHeaderPatterns glob + patterns: relative patterns shall be expanded against each PublicIncludeRoot, + and absolute patterns shall be forwarded directly to GlobFileCollector. + justification: | + Relative patterns allow build authors to write root-agnostic patterns such as + "**/MyHeader.h" that resolve under every configured include root without + hard-coding directory paths. Absolute patterns allow headers on other drives or + outside all configured roots to be included directly, supporting build layouts + where public headers are not all under a common tree. + tests: + - GlobFileCollector_Collect_AbsolutePattern_FindsFiles - id: ApiMarkCpp-CppGenerator-EmitExternalTypesSection title: CppGenerator shall emit an "External Types" section at the bottom of each generated page that references at least one non-std external @@ -252,7 +269,8 @@ sections: - CppGenerator_Generate_TypeAliasPage_ContainsDeclarationAndSummary - CppGenerator_Generate_NamespacePage_ListsTypeAliases - id: ApiMarkCpp-CppGenerator-EmitSingleFileOutput - title: CppGenerator shall emit a single api.md file when OutputFormat.SingleFile is selected. + title: CppGenerator shall emit a single api.md file when OutputFormat.SingleFile + is selected. justification: | Single-file output is required for consumers who want a compact, linear reference instead of the gradual-disclosure folder tree. diff --git a/docs/reqstream/api-mark-cpp/cpp-type-link-resolver.yaml b/docs/reqstream/api-mark-cpp/cpp-type-link-resolver.yaml index cb0a726..10bdf4b 100644 --- a/docs/reqstream/api-mark-cpp/cpp-type-link-resolver.yaml +++ b/docs/reqstream/api-mark-cpp/cpp-type-link-resolver.yaml @@ -7,15 +7,15 @@ sections: requirements: - id: ApiMarkCpp-CppTypeLinkResolver title: >- - CppTypeLinkResolver shall resolve C++ type strings to Markdown link text + CppTypeLinkResolver shall resolve C++ type strings to Markdown link + text for table cells in the generated API documentation. justification: | Clickable Markdown links in type and parameter cells allow AI agents and human readers to navigate directly to the referenced type page rather than requiring a separate search. Correct handling of ambiguous short names and unresolvable external types prevents broken links and incorrect navigation. - children: - - ApiMarkCpp-CppTypeLinkResolver-Linkify + children: [ApiMarkCpp-CppTypeLinkResolver-Linkify] - id: ApiMarkCpp-CppTypeLinkResolver-Linkify title: >- CppTypeLinkResolver.Linkify shall emit a Markdown link for intra-library diff --git a/docs/reqstream/api-mark-dot-net.yaml b/docs/reqstream/api-mark-dot-net.yaml index 25bcd2a..803459b 100644 --- a/docs/reqstream/api-mark-dot-net.yaml +++ b/docs/reqstream/api-mark-dot-net.yaml @@ -4,7 +4,8 @@ sections: - title: ApiMarkDotNet Requirements requirements: - id: ApiMarkDotNet-DotNetGenerator-GenerateDocumentationFromAssembliesAndXml - title: ApiMarkDotNet shall generate API documentation from .NET assemblies and XML documentation files. + title: ApiMarkDotNet shall generate API documentation from .NET assemblies + and XML documentation files. justification: | ApiMark needs to document compiled .NET libraries without requiring source code access, using the assembly for API structure and the XML file for the @@ -31,10 +32,10 @@ sections: - ApiMarkDotNet-DotNetEmitterSingleFile-ProduceSingleApiMd - ApiMarkDotNet-TypeLinkResolver-ResolveTypeReferencesToMarkdownLinks - ApiMarkDotNet-XmlDocReader-ParseAndIndexXmlDocumentation - tests: - - ApiMarkDotNet_Generate_ValidAssemblyAndXml_ProducesMarkdown + tests: [ApiMarkDotNet_Generate_ValidAssemblyAndXml_ProducesMarkdown] - id: ApiMarkDotNet-TypeNameSimplifier-ProduceReadableTypeNames - title: ApiMarkDotNet shall render .NET type names in a concise C#-style form that is readable in generated documentation. + title: ApiMarkDotNet shall render .NET type names in a concise C#-style form + that is readable in generated documentation. justification: | Raw CLR type names are noisy and difficult to read, so the .NET system needs a consistent simplification policy that keeps signatures compact for both @@ -47,5 +48,4 @@ sections: - ApiMarkDotNet-TypeNameSimplifier-SimplifyContextNamespaceTypes - ApiMarkDotNet-TypeNameSimplifier-SimplifyGenericArgumentsRecursively - ApiMarkDotNet-TypeNameSimplifier-AppendNullableReferenceSuffix - tests: - - ApiMarkDotNet_TypeNames_CommonSignatures_RenderReadably + tests: [ApiMarkDotNet_TypeNames_CommonSignatures_RenderReadably] diff --git a/docs/reqstream/api-mark-dot-net/dot-net-ast-model.yaml b/docs/reqstream/api-mark-dot-net/dot-net-ast-model.yaml index e5afc70..60ef16a 100644 --- a/docs/reqstream/api-mark-dot-net/dot-net-ast-model.yaml +++ b/docs/reqstream/api-mark-dot-net/dot-net-ast-model.yaml @@ -6,7 +6,8 @@ sections: - title: DotNetAstModel Requirements requirements: - id: ApiMarkDotNet-DotNetAstModel-HoldParsedAssemblyData - title: DotNetAstModel shall hold all parsed assembly data required during the emit phase. + title: DotNetAstModel shall hold all parsed assembly data required during + the emit phase. justification: | The parse and emit phases are separated by the IApiGenerator / IApiEmitter contract. DotNetAstModel bridges these phases by holding the assembly diff --git a/docs/reqstream/api-mark-dot-net/dot-net-emitter-gradual-disclosure.yaml b/docs/reqstream/api-mark-dot-net/dot-net-emitter-gradual-disclosure.yaml index 89c10cc..69b0d57 100644 --- a/docs/reqstream/api-mark-dot-net/dot-net-emitter-gradual-disclosure.yaml +++ b/docs/reqstream/api-mark-dot-net/dot-net-emitter-gradual-disclosure.yaml @@ -6,7 +6,8 @@ sections: - title: DotNetEmitterGradualDisclosure Requirements requirements: - id: ApiMarkDotNet-DotNetEmitterGradualDisclosure-ProduceMultiFileTree - title: DotNetEmitterGradualDisclosure shall produce a multi-file gradual-disclosure Markdown tree with one file per namespace, type, and member. + title: DotNetEmitterGradualDisclosure shall produce a multi-file gradual-disclosure + Markdown tree with one file per namespace, type, and member. justification: | Gradual-disclosure output allows AI agents and human readers to navigate documentation hierarchically, reading only as much as the task requires. diff --git a/docs/reqstream/api-mark-dot-net/dot-net-emitter-single-file.yaml b/docs/reqstream/api-mark-dot-net/dot-net-emitter-single-file.yaml index 06633ae..61185d7 100644 --- a/docs/reqstream/api-mark-dot-net/dot-net-emitter-single-file.yaml +++ b/docs/reqstream/api-mark-dot-net/dot-net-emitter-single-file.yaml @@ -6,7 +6,8 @@ sections: - title: DotNetEmitterSingleFile Requirements requirements: - id: ApiMarkDotNet-DotNetEmitterSingleFile-ProduceSingleApiMd - title: DotNetEmitterSingleFile shall emit all API documentation into a single api.md file using heading levels offset by HeadingDepth. + title: DotNetEmitterSingleFile shall emit all API documentation into a + single api.md file using heading levels offset by HeadingDepth. justification: | Single-file output provides a compact, linear reference that is easier to consume in contexts where a hierarchical file tree is unwanted, such diff --git a/docs/reqstream/api-mark-dot-net/dot-net-emitter.yaml b/docs/reqstream/api-mark-dot-net/dot-net-emitter.yaml index c1cd7a7..ef38411 100644 --- a/docs/reqstream/api-mark-dot-net/dot-net-emitter.yaml +++ b/docs/reqstream/api-mark-dot-net/dot-net-emitter.yaml @@ -6,7 +6,8 @@ sections: - title: DotNetEmitter Requirements requirements: - id: ApiMarkDotNet-DotNetEmitter-DispatchToFormatSpecificEmitter - title: DotNetEmitter shall dispatch to the appropriate format-specific sub-emitter based on EmitConfig.Format. + title: DotNetEmitter shall dispatch to the appropriate format-specific + sub-emitter based on EmitConfig.Format. justification: | The IApiEmitter contract requires a single Emit entry point. DotNetEmitter reads the requested OutputFormat and forwards the call — along with the diff --git a/docs/reqstream/api-mark-dot-net/dot-net-generator.yaml b/docs/reqstream/api-mark-dot-net/dot-net-generator.yaml index 67b1e2e..eb88aa0 100644 --- a/docs/reqstream/api-mark-dot-net/dot-net-generator.yaml +++ b/docs/reqstream/api-mark-dot-net/dot-net-generator.yaml @@ -6,23 +6,25 @@ sections: - title: DotNetGenerator Requirements requirements: - id: ApiMarkDotNet-DotNetGenerator-AcceptAssemblyAndXmlInputs - title: DotNetGenerator shall accept an assembly path and an XML documentation path as generator inputs. + title: DotNetGenerator shall accept an assembly path and an XML documentation + path as generator inputs. justification: | The generator cannot produce complete .NET documentation unless it can locate both the compiled API surface and the compiler-produced XML documentation that describes it. - tests: - - DotNetGenerator_Constructor_AcceptsAssemblyAndXmlPaths + tests: [DotNetGenerator_Constructor_AcceptsAssemblyAndXmlPaths] - id: ApiMarkDotNet-DotNetGenerator-ReadAssemblyMetadataWithoutLoading - title: DotNetGenerator shall read type and member information from .NET assemblies without loading them into the current process. + title: DotNetGenerator shall read type and member information from .NET + assemblies without loading them into the current process. justification: | Assembly inspection must avoid loading the target library into the current process so documentation generation can run reliably against arbitrary build outputs and dependency graphs. - tests: - - DotNetGenerator_ReadAssembly_WithMonoCecil_ReturnsTypesAndMembers + tests: [DotNetGenerator_ReadAssembly_WithMonoCecil_ReturnsTypesAndMembers] - id: ApiMarkDotNet-DotNetGenerator-ReadXmlDocumentationComments - title: DotNetGenerator shall read XML documentation comments from the configured XML documentation file and include that content in generated markdown. + title: DotNetGenerator shall read XML documentation comments from the + configured XML documentation file and include that content in generated + markdown. justification: | Developer-authored summaries, remarks, parameter descriptions, returns, exceptions, examples, and example code blocks belong in the published API @@ -35,21 +37,23 @@ sections: - DotNetGenerator_Generate_ConstructorWithXmlParams_WritesParamDescriptionsToMemberPage - DotNetGenerator_Generate_MethodWithExample_EmitsCodeBlockOnMemberPage - id: ApiMarkDotNet-DotNetGenerator-FilterByVisibility - title: DotNetGenerator shall support ApiVisibility filtering for Public, PublicAndProtected, and All. + title: DotNetGenerator shall support ApiVisibility filtering for Public, + PublicAndProtected, and All. justification: | Different consumers need different views of the same assembly, ranging from a public API reference to broader internal documentation for development. tests: - DotNetGenerator_Visibility_PublicPublicAndProtectedAll_FilterExpectedApis - id: ApiMarkDotNet-DotNetGenerator-IncludeObsoleteApisWhenRequested - title: DotNetGenerator shall control obsolete API inclusion via the IncludeObsolete flag, including them when enabled and omitting them when disabled. + title: DotNetGenerator shall control obsolete API inclusion via the IncludeObsolete + flag, including them when enabled and omitting them when disabled. justification: | Teams sometimes need complete historical reference output and sometimes need only the actively supported API surface, so obsolete items must be controllable. - tests: - - DotNetGenerator_IncludeObsolete_Toggle_ControlsObsoleteOutput + tests: [DotNetGenerator_IncludeObsolete_Toggle_ControlsObsoleteOutput] - id: ApiMarkDotNet-DotNetGenerator-EmitDetailPageForEveryMember - title: DotNetGenerator shall emit a dedicated detail page for every visible member. + title: DotNetGenerator shall emit a dedicated detail page for every visible + member. justification: | All members always receive their own dedicated file so that navigation is fully deterministic. An AI or tool can always resolve @@ -57,10 +61,10 @@ sections: or shape. Exception: members whose sanitized names collide on a case-insensitive filesystem are combined onto a single shared page (see ApiMarkDotNet-DotNetGenerator-EmitCombinedMemberPageForCaseInsensitiveCollisions). - tests: - - DotNetGenerator_AllMembers_GetSeparateFiles + tests: [DotNetGenerator_AllMembers_GetSeparateFiles] - id: ApiMarkDotNet-DotNetGenerator-EmitCombinedMemberPageForCaseInsensitiveCollisions - title: DotNetGenerator shall emit a combined member page for case-insensitive filename collisions. + title: DotNetGenerator shall emit a combined member page for case-insensitive + filename collisions. justification: | On case-insensitive filesystems (Windows, macOS), two members whose sanitized names differ only in case (e.g. a field 'name' and a property 'Name') would @@ -73,27 +77,28 @@ sections: - DotNetGenerator_Generate_CaseCollisionClass_DoesNotCreateSeparateCasedPage - DotNetGenerator_Generate_CaseCollisionClass_CombinedPageContainsBothMembers - id: ApiMarkDotNet-DotNetGenerator-ProduceConsistentOutputFileStructure - title: DotNetGenerator shall produce output files following the established naming convention. + title: DotNetGenerator shall produce output files following the established + naming convention. justification: | Consistent file and folder naming allows navigation between the entrypoint, namespace summaries, type pages, and member detail pages without relying on a separate path-resolution helper. - tests: - - DotNetGenerator_OutputFiles_FollowNamingConvention + tests: [DotNetGenerator_OutputFiles_FollowNamingConvention] - id: ApiMarkDotNet-DotNetGenerator-ApiMdListsAllNamespacesWithTypeCount - title: DotNetGenerator shall list all namespaces in api.md with a direct type count column. + title: DotNetGenerator shall list all namespaces in api.md with a direct + type count column. justification: | Listing every namespace (root and child) in api.md gives AI agents a complete navigation map in a single read, avoiding an extra round-trip through parent namespace pages to discover children. The type count column provides scope signal so an AI can calibrate how deeply to explore each namespace without opening it first. - tests: - - DotNetGenerator_Generate_ApiMd_ListsAllNamespacesWithTypeCount + tests: [DotNetGenerator_Generate_ApiMd_ListsAllNamespacesWithTypeCount] - id: ApiMarkDotNet-DotNetGenerator-ShowDirectInheritanceInTypeSignature title: >- DotNetGenerator shall include the direct base class and directly declared - interfaces in the type signature, omitting well-known implicit bases such as + interfaces in the type signature, omitting well-known implicit bases + such as System.Object, System.ValueType, System.Enum, and System.MulticastDelegate. justification: | The direct inheritance list tells AI agents the contract a type satisfies and @@ -103,7 +108,9 @@ sections: - DotNetGenerator_Generate_SampleImplementation_TypeSignatureShowsInterface - DotNetGenerator_Generate_EnumTypeSignature_HasNoBaseClass - id: ApiMarkDotNet-DotNetGenerator-EmitIntraDocLinksInTableCells - title: DotNetGenerator shall emit Markdown links in type and parameter type table cells when the referenced type is documented in the same assembly. + title: DotNetGenerator shall emit Markdown links in type and parameter + type table cells when the referenced type is documented in the same + assembly. justification: | AI agents and human readers navigating API documentation benefit from clickable links that jump directly to the referenced type page rather @@ -113,7 +120,9 @@ sections: tests: - DotNetGenerator_Generate_IntraAssemblyReturnType_EmitsMarkdownLinkInReturnsCell - id: ApiMarkDotNet-DotNetGenerator-EmitExternalTypesSection - title: DotNetGenerator shall emit an "External Types" section at the bottom of each generated page that references at least one non-System external type. + title: DotNetGenerator shall emit an "External Types" section at the bottom + of each generated page that references at least one non-System external + type. justification: | Readers using an external library type documented on a page need to know which package or namespace to import. Collecting all external type @@ -123,7 +132,9 @@ sections: - DotNetGenerator_Generate_ExternalNonSystemParameterType_EmitsExternalTypesSection - id: ApiMarkDotNet-DotNetGenerator-DocumentOperatorOverloads title: >- - DotNetGenerator shall emit operator overload methods for a type on its dedicated operators.md page, using C# operator symbols as headings and including conversion operator documentation with summary and parameters. + DotNetGenerator shall emit operator overload methods for a type on its + dedicated operators.md page, using C# operator symbols as headings and + including conversion operator documentation with summary and parameters. justification: | C# types frequently expose arithmetic, comparison, and conversion operators as part of their public API. Grouping all operators for a type onto a single @@ -139,8 +150,10 @@ sections: - DotNetGenerator_Generate_ConversionOperatorReturningNestedType_OperatorsPageContainsSummary - id: ApiMarkDotNet-DotNetGenerator-DocumentNestedTypes title: >- - DotNetGenerator shall document public nested types within their containing type's page and - generate a dedicated page for each nested type under the containing type's folder. + DotNetGenerator shall document public nested types within their containing + type's page and + generate a dedicated page for each nested type under the containing + type's folder. justification: | C# types commonly nest supporting types (builders, enumerators, result types, configuration records) within their declaring type as part of the public API. Omitting nested types from @@ -152,7 +165,8 @@ sections: - DotNetGenerator_Generate_NestedClass_ListedOnOuterClassPage - DotNetGenerator_Generate_NestedClass_PageContainsSummary - id: ApiMarkDotNet-DotNetGenerator-EmitSingleFileOutput - title: DotNetGenerator shall emit a single api.md file when OutputFormat.SingleFile is selected. + title: DotNetGenerator shall emit a single api.md file when OutputFormat.SingleFile + is selected. justification: | Single-file output is required for consumers who want a compact, linear reference instead of the gradual-disclosure folder tree. diff --git a/docs/reqstream/api-mark-dot-net/type-link-resolver.yaml b/docs/reqstream/api-mark-dot-net/type-link-resolver.yaml index ec031b2..4135dee 100644 --- a/docs/reqstream/api-mark-dot-net/type-link-resolver.yaml +++ b/docs/reqstream/api-mark-dot-net/type-link-resolver.yaml @@ -6,7 +6,9 @@ sections: - title: TypeLinkResolver Requirements requirements: - id: ApiMarkDotNet-TypeLinkResolver-ResolveTypeReferencesToMarkdownLinks - title: TypeLinkResolver shall resolve Mono.Cecil type references to Markdown link text, emitting intra-assembly links or plain text for external and primitive types. + title: TypeLinkResolver shall resolve Mono.Cecil type references to Markdown + link text, emitting intra-assembly links or plain text for external + and primitive types. justification: | Intra-document cross-references improve navigability for both AI agents and human readers. TypeLinkResolver centralizes the logic for deciding diff --git a/docs/reqstream/api-mark-dot-net/type-name-simplifier.yaml b/docs/reqstream/api-mark-dot-net/type-name-simplifier.yaml index 3585c95..66b89fb 100644 --- a/docs/reqstream/api-mark-dot-net/type-name-simplifier.yaml +++ b/docs/reqstream/api-mark-dot-net/type-name-simplifier.yaml @@ -6,48 +6,47 @@ sections: - title: TypeNameSimplifier Requirements requirements: - id: ApiMarkDotNet-TypeNameSimplifier-SimplifyPrimitiveAliases - title: TypeNameSimplifier shall simplify C# system types to language aliases such as string, int, and bool. + title: TypeNameSimplifier shall simplify C# system types to language aliases + such as string, int, and bool. justification: | Readers expect C# signatures in documentation to use familiar language aliases instead of verbose CLR type names. - tests: - - TypeNameSimplifier_Primitives_RenderLanguageAliases + tests: [TypeNameSimplifier_Primitives_RenderLanguageAliases] - id: ApiMarkDotNet-TypeNameSimplifier-SimplifyArrayTypes title: TypeNameSimplifier shall render array types using C# bracket notation. justification: | Array types appear frequently in .NET APIs and must use the idiomatic T[] form rather than the CLR array type representation. - tests: - - TypeNameSimplifier_ArrayType_ReturnsBracketNotation + tests: [TypeNameSimplifier_ArrayType_ReturnsBracketNotation] - id: ApiMarkDotNet-TypeNameSimplifier-RenderNullableValueTypesWithQuestionMark title: TypeNameSimplifier shall render nullable value types in T? form. justification: | Documentation should present nullable value types using standard C# syntax rather than the more verbose Nullable representation. - tests: - - TypeNameSimplifier_NullableValueTypes_UseQuestionMarkForm + tests: [TypeNameSimplifier_NullableValueTypes_UseQuestionMarkForm] - id: ApiMarkDotNet-TypeNameSimplifier-SimplifyWellKnownNamespaces - title: TypeNameSimplifier shall use unqualified names for types in well-known namespaces. + title: TypeNameSimplifier shall use unqualified names for types in well-known + namespaces. justification: | Types from System.Collections.Generic and System.Threading.Tasks appear frequently in public APIs and are universally recognized without their namespace prefix, keeping signatures compact. - tests: - - TypeNameSimplifier_WellKnownNamespaceTypes_RenderWithoutNamespace + tests: [TypeNameSimplifier_WellKnownNamespaceTypes_RenderWithoutNamespace] - id: ApiMarkDotNet-TypeNameSimplifier-SimplifyContextNamespaceTypes - title: TypeNameSimplifier shall strip the context namespace prefix from types in the same or nested namespace. + title: TypeNameSimplifier shall strip the context namespace prefix from + types in the same or nested namespace. justification: | When documenting a type, cross-references to other types in the same namespace are easier to read without the repeated namespace prefix. tests: - TypeNameSimplifier_ContextNamespaceTypes_RenderWithoutSharedPrefix - id: ApiMarkDotNet-TypeNameSimplifier-SimplifyGenericArgumentsRecursively - title: TypeNameSimplifier shall apply simplification recursively to generic type arguments. + title: TypeNameSimplifier shall apply simplification recursively to generic + type arguments. justification: | Complex APIs frequently nest generic types, so simplification has to work at every level to prevent signatures from becoming unreadable. - tests: - - TypeNameSimplifier_GenericArguments_AreSimplifiedRecursively + tests: [TypeNameSimplifier_GenericArguments_AreSimplifiedRecursively] - id: ApiMarkDotNet-TypeNameSimplifier-AppendNullableReferenceSuffix title: TypeNameSimplifier shall append ? to nullable reference types. justification: | diff --git a/docs/reqstream/api-mark-dot-net/xml-doc-reader.yaml b/docs/reqstream/api-mark-dot-net/xml-doc-reader.yaml index 421894a..f2ec3ab 100644 --- a/docs/reqstream/api-mark-dot-net/xml-doc-reader.yaml +++ b/docs/reqstream/api-mark-dot-net/xml-doc-reader.yaml @@ -6,7 +6,9 @@ sections: - title: XmlDocReader Requirements requirements: - id: ApiMarkDotNet-XmlDocReader-ParseAndIndexXmlDocumentation - title: XmlDocReader shall parse a .NET XML documentation file and provide O(1) per-member lookups for summary, remarks, parameters, returns, exceptions, and example content. + title: XmlDocReader shall parse a .NET XML documentation file and provide + O(1) per-member lookups for summary, remarks, parameters, returns, exceptions, + and example content. justification: | Assembly documentation comes from compiler-produced XML files that can contain thousands of member entries. Indexing on construction ensures diff --git a/docs/reqstream/api-mark-msbuild.yaml b/docs/reqstream/api-mark-msbuild.yaml index 653e453..5ffa591 100644 --- a/docs/reqstream/api-mark-msbuild.yaml +++ b/docs/reqstream/api-mark-msbuild.yaml @@ -4,7 +4,8 @@ sections: - title: ApiMarkMsbuild Requirements requirements: - id: ApiMarkMsbuild-ApiMarkTask-IntegrateWithMsbuild - title: ApiMarkMsbuild shall integrate ApiMark documentation generation as an MSBuild task for both .csproj and .vcxproj builds. + title: ApiMarkMsbuild shall integrate ApiMark documentation generation as + an MSBuild task for both .csproj and .vcxproj builds. justification: | Teams using C# and C++ need documentation generation to run automatically during normal builds so the published API reference stays aligned with the @@ -32,7 +33,8 @@ sections: - ApiMarkMsbuild_NuGetPackage_DotNetProject_AutoDocumentsOnBuild - windows@ApiMarkMsbuild_NuGetPackage_CppVcxprojProject_AutoDocumentsOnBuild - id: ApiMarkMsbuild-IncludeDocsInNuGetPackage - title: ApiMarkMsbuild shall support an opt-in ApiMarkPackDocs property that, when set to true, includes generated documentation in the NuGet package. + title: ApiMarkMsbuild shall support an opt-in ApiMarkPackDocs property that, + when set to true, includes generated documentation in the NuGet package. justification: | Projects that distribute API documentation alongside their library need a single opt-in flag to bundle the generated markdown in the NuGet package so consumers diff --git a/docs/reqstream/api-mark-msbuild/api-mark-task.yaml b/docs/reqstream/api-mark-msbuild/api-mark-task.yaml index 5b4436e..cf36c06 100644 --- a/docs/reqstream/api-mark-msbuild/api-mark-task.yaml +++ b/docs/reqstream/api-mark-msbuild/api-mark-task.yaml @@ -6,7 +6,8 @@ sections: - title: ApiMarkTask Requirements requirements: - id: ApiMarkMsbuild-ApiMarkTask-InferLanguageFromProjectType - title: ApiMarkTask shall infer the documentation language from the project extension when ApiMarkLanguage is not explicitly set. + title: ApiMarkTask shall infer the documentation language from the project + extension when ApiMarkLanguage is not explicitly set. justification: | Most projects do not need to set ApiMarkLanguage explicitly; convention-based inference removes boilerplate and makes the package easy to adopt for both @@ -15,7 +16,8 @@ sections: - ApiMarkTask_Language_InferredAsCpp_ForVcxproj - ApiMarkTask_Language_InferredAsDotNet_ForCsproj - id: ApiMarkMsbuild-ApiMarkTask-SpawnToolForDotNet - title: ApiMarkTask shall spawn ApiMark.Tool with the dotnet subcommand and pass assembly and XML documentation paths for .NET builds. + title: ApiMarkTask shall spawn ApiMark.Tool with the dotnet subcommand + and pass assembly and XML documentation paths for .NET builds. justification: | Out-of-process generation allows ApiMark.Tool to use net8.0 libraries that do not support netstandard2.0, keeping the MSBuild task thin and broadly @@ -24,79 +26,80 @@ sections: - ApiMarkTask_DotNet_SpawnsToolWithCorrectAssemblyAndXmlDocArguments - ApiMarkTask_Execute_WithDotNetProject_GeneratesDocumentation - id: ApiMarkMsbuild-ApiMarkTask-SpawnToolForCpp - title: ApiMarkTask shall spawn ApiMark.Tool with the cpp subcommand and pass include paths for C++ builds. + title: ApiMarkTask shall spawn ApiMark.Tool with the cpp subcommand and + pass include paths for C++ builds. justification: | ApiMark.Cpp invokes system clang and targets net8.0+; the out-of-process model is the only viable integration strategy for vcxproj builds run under .NET Framework MSBuild inside Visual Studio. - tests: - - ApiMarkTask_Cpp_SpawnsToolWithCorrectIncludePathArguments + tests: [ApiMarkTask_Cpp_SpawnsToolWithCorrectIncludePathArguments] - id: ApiMarkMsbuild-ApiMarkTask-ForwardOutputDirectoryProperty - title: ApiMarkTask shall forward the ApiMarkOutputDir property to the tool as the --output argument. + title: ApiMarkTask shall forward the ApiMarkOutputDir property to the + tool as the --output argument. justification: | Build authors need to control where generated documentation is written so it fits their packaging, publishing, and CI artifact workflows. - tests: - - ApiMarkTask_OutputDir_ForwardedToToolAsOutputArgument + tests: [ApiMarkTask_OutputDir_ForwardedToToolAsOutputArgument] - id: ApiMarkMsbuild-ApiMarkTask-ForwardVisibilityProperty - title: ApiMarkTask shall forward the ApiMarkVisibility property to the tool as the --visibility argument. + title: ApiMarkTask shall forward the ApiMarkVisibility property to the + tool as the --visibility argument. justification: | MSBuild integration must expose the same public-surface filtering choices as the underlying generators so project files can select the intended audience. - tests: - - ApiMarkTask_Visibility_ForwardedToToolAsVisibilityArgument + tests: [ApiMarkTask_Visibility_ForwardedToToolAsVisibilityArgument] - id: ApiMarkMsbuild-ApiMarkTask-SupportDisableProperty - title: ApiMarkTask shall return success immediately without spawning the tool when DisableApiMark is true. + title: ApiMarkTask shall return success immediately without spawning the + tool when DisableApiMark is true. justification: | Projects must be able to suppress generation in specific configurations (e.g., debug builds, CI environments without the SDK) without removing the NuGet package reference or breaking the build. - tests: - - ApiMarkTask_DisableApiMark_True_SkipsToolInvocation + tests: [ApiMarkTask_DisableApiMark_True_SkipsToolInvocation] - id: ApiMarkMsbuild-ApiMarkTask-ForwardIncludeObsoleteFlag - title: ApiMarkTask shall forward the ApiMarkIncludeObsolete property to the tool as the --include-obsolete flag when true. + title: ApiMarkTask shall forward the ApiMarkIncludeObsolete property to + the tool as the --include-obsolete flag when true. justification: | Build authors need to opt in to including deprecated API surface in generated documentation without modifying the NuGet package reference or the build pipeline. - tests: - - ApiMarkTask_IncludeObsolete_True_ForwardsIncludeObsoleteFlag + tests: [ApiMarkTask_IncludeObsolete_True_ForwardsIncludeObsoleteFlag] - id: ApiMarkMsbuild-ApiMarkTask-ForwardCppLibraryName - title: ApiMarkTask shall forward the ApiMarkLibraryName property to the tool as the --library-name argument for C++ builds. + title: ApiMarkTask shall forward the ApiMarkLibraryName property to the + tool as the --library-name argument for C++ builds. justification: | C++ projects need to set a human-readable library name that appears as the top-level heading in the generated api.md, independent of the project file name. - tests: - - ApiMarkTask_Cpp_LibraryName_ForwardedToTool + tests: [ApiMarkTask_Cpp_LibraryName_ForwardedToTool] - id: ApiMarkMsbuild-ApiMarkTask-ForwardCppDefines title: >- - ApiMarkTask shall forward the ApiMarkDefines property to the tool as the --defines + ApiMarkTask shall forward the ApiMarkDefines property to the tool as + the --defines argument for C++ builds, converting semicolons to commas. justification: | C++ projects rely on preprocessor defines (e.g. export macros) for correct parsing. MSBuild uses semicolons as its list separator; the tool expects commas, so the conversion must happen in the task before spawning the child process. - tests: - - ApiMarkTask_Cpp_Defines_SemicolonsConvertedToCommas + tests: [ApiMarkTask_Cpp_Defines_SemicolonsConvertedToCommas] - id: ApiMarkMsbuild-ApiMarkTask-ForwardCppStandard - title: ApiMarkTask shall forward the ApiMarkCppStandard property to the tool as the --cpp-standard argument for C++ builds. + title: ApiMarkTask shall forward the ApiMarkCppStandard property to the + tool as the --cpp-standard argument for C++ builds. justification: | Different C++ projects target different language standards; the standard must be forwarded so the Clang parser interprets the headers under the same standard as the actual build. - tests: - - ApiMarkTask_Cpp_CppStandard_ForwardedToTool + tests: [ApiMarkTask_Cpp_CppStandard_ForwardedToTool] - id: ApiMarkMsbuild-ApiMarkTask-SkipWhenCppIncludePathsNotSet title: >- - ApiMarkTask shall return success immediately without spawning the tool when the + ApiMarkTask shall return success immediately without spawning the tool + when the language is cpp and ApiMarkIncludePaths is not set. justification: | C++ projects in a solution may not all be documentation targets. When ApiMarkIncludePaths is absent the task must skip gracefully rather than fail the build, parallel to the dotnet behavior when ApiMarkXmlDocPath is absent. - tests: - - ApiMarkTask_Cpp_EmptyIncludePaths_SkipsExecution + tests: [ApiMarkTask_Cpp_EmptyIncludePaths_SkipsExecution] - id: ApiMarkMsbuild-ApiMarkTask-ForwardLibraryDescription - title: ApiMarkTask shall forward the ApiMarkLibraryDescription property to the tool as the --library-description argument for C++ builds. + title: ApiMarkTask shall forward the ApiMarkLibraryDescription property + to the tool as the --library-description argument for C++ builds. justification: | C++ projects need to set a human-readable library description that appears in the generated api.md, independent of any project metadata. Forwarding the MSBuild @@ -105,13 +108,13 @@ sections: - ApiMarkTask_BuildArguments_LibraryDescriptionWithDoubleQuote_PassedVerbatim - ApiMarkTask_Cpp_LibraryDescription_ForwardedToTool - id: ApiMarkMsbuild-ApiMarkTask-ForwardClangPath - title: ApiMarkTask shall forward the ApiMarkClangPath property to the tool as the --clang-path argument for C++ builds when set. + title: ApiMarkTask shall forward the ApiMarkClangPath property to the + tool as the --clang-path argument for C++ builds when set. justification: | CI environments and multi-toolchain projects frequently have clang installed at a non-default path. Forwarding ApiMarkClangPath lets build authors specify the executable path without modifying system PATH, keeping the build reproducible. - tests: - - ApiMarkTask_Cpp_ClangPath_ForwardedToTool + tests: [ApiMarkTask_Cpp_ClangPath_ForwardedToTool] - id: ApiMarkMsbuild-ApiMarkTask-AutoPopulateIncludePaths title: >- ApiMarkTask shall automatically populate ApiMarkIncludePaths from the @@ -126,28 +129,29 @@ sections: - windows@ApiMarkMsbuild_NuGetPackage_CppVcxprojProject_AutoDocumentsOnBuild - id: ApiMarkMsbuild-ApiMarkTask-SkipWhenDotNetXmlDocPathNotSet title: >- - ApiMarkTask shall return success immediately without spawning the tool when the + ApiMarkTask shall return success immediately without spawning the tool + when the language is dotnet and ApiMarkXmlDocPath is not set. justification: | .NET projects in a solution may not all have XML documentation generation enabled. When ApiMarkXmlDocPath is absent the task must skip gracefully rather than fail the build, parallel to the C++ behavior when ApiMarkIncludePaths is absent. - tests: - - ApiMarkTask_DotNet_EmptyXmlDocPath_SkipsExecution + tests: [ApiMarkTask_DotNet_EmptyXmlDocPath_SkipsExecution] - id: ApiMarkMsbuild-ApiMarkTask-ForwardApiHeaders title: >- - ApiMarkTask shall forward each entry of ApiMarkApiHeaders to the tool as a separate + ApiMarkTask shall forward each entry of ApiMarkApiHeaders to the tool + as a separate --api-headers flag for C++ builds, preserving order and forwarding '!'-prefixed exclusion patterns verbatim. justification: | C++ projects need fine-grained, gitignore-style control over which headers contribute to the documented API surface. Forwarding each pattern as its own --api-headers flag preserves order and lets CppGenerator apply last-match-wins semantics correctly. - tests: - - ApiMarkTask_Cpp_ApiHeaders_ForwardedAsIndividualFlags + tests: [ApiMarkTask_Cpp_ApiHeaders_ForwardedAsIndividualFlags] - id: ApiMarkMsbuild-ApiMarkTask-ForwardFormatProperty - title: ApiMarkTask shall forward the ApiMarkFormat property to the tool as the --format argument. + title: ApiMarkTask shall forward the ApiMarkFormat property to the tool + as the --format argument. justification: | Build authors need to choose between gradual-disclosure output and single-file output without changing the command line in every project file. @@ -156,8 +160,10 @@ sections: - ApiMarkTask_Format_NotForwarded_WhenNotSet - id: ApiMarkMsbuild-ApiMarkTask-SupportOutputsItemGroup title: >- - ApiMarkTask shall generate documentation for each ApiMarkOutputs item using that - item's per-output metadata (OutputDir, Format, Visibility) to control where and how + ApiMarkTask shall generate documentation for each ApiMarkOutputs item + using that + item's per-output metadata (OutputDir, Format, Visibility) to control + where and how each output is written. justification: | Projects that need multiple output formats or visibility levels from a single build diff --git a/docs/reqstream/api-mark-tool.yaml b/docs/reqstream/api-mark-tool.yaml index 2eef058..26c40dc 100644 --- a/docs/reqstream/api-mark-tool.yaml +++ b/docs/reqstream/api-mark-tool.yaml @@ -4,7 +4,8 @@ sections: - title: ApiMarkTool Requirements requirements: - id: ApiMarkTool-ProvideMultiLanguageCli - title: ApiMarkTool shall provide a .NET executable that supports multiple documentation language subcommands. + title: ApiMarkTool shall provide a .NET executable that supports multiple + documentation language subcommands. justification: | A command-line executable gives ApiMarkTask and developers an automation-friendly way to run ApiMark for any supported language. Targeting net8.0 and later as a standalone @@ -14,6 +15,7 @@ sections: - ApiMarkTool-Program-DispatchToGenerator - ApiMarkTool-Program-SupportDotNetOptions - ApiMarkTool-Program-SupportCppOptions + - ApiMarkTool-Program-SupportVhdlOptions - ApiMarkTool-Program-SupportVersionOption - ApiMarkTool-Program-SupportHelpOption - ApiMarkTool-Program-SupportSilentAndLogOptions @@ -21,5 +23,4 @@ sections: - ApiMarkTool-Program-ReportInvalidArguments - ApiMarkTool-Cli-ProvideCliArgumentParsing - ApiMarkTool-SelfTest-RunSelfValidation - tests: - - Program_Main_DotNetCommand_GeneratesExpectedOutput + tests: [Program_Main_DotNetCommand_GeneratesExpectedOutput] diff --git a/docs/reqstream/api-mark-tool/cli.yaml b/docs/reqstream/api-mark-tool/cli.yaml index 68c38a0..ac50e83 100644 --- a/docs/reqstream/api-mark-tool/cli.yaml +++ b/docs/reqstream/api-mark-tool/cli.yaml @@ -6,7 +6,8 @@ sections: - title: Cli Requirements requirements: - id: ApiMarkTool-Cli-ProvideCliArgumentParsing - title: The Cli subsystem shall parse all command-line arguments into typed, queryable options and route program output to the appropriate channels. + title: The Cli subsystem shall parse all command-line arguments into typed, + queryable options and route program output to the appropriate channels. justification: | A dedicated subsystem for argument parsing keeps Program.cs free of parsing logic and enables isolated testing of the argument-parsing contract. @@ -23,5 +24,5 @@ sections: - ApiMarkTool-Cli-Context-TrackErrorsViaWriteError - ApiMarkTool-Cli-Context-ParseFormatOption - ApiMarkTool-Cli-Context-ParseClangPath - tests: - - Context_Cli_ParsesAllGlobalFlags + - ApiMarkTool-Cli-Context-ParseVhdlSourceOptions + tests: [Context_Cli_ParsesAllGlobalFlags] diff --git a/docs/reqstream/api-mark-tool/cli/context.yaml b/docs/reqstream/api-mark-tool/cli/context.yaml index 72ac330..5ee1d05 100644 --- a/docs/reqstream/api-mark-tool/cli/context.yaml +++ b/docs/reqstream/api-mark-tool/cli/context.yaml @@ -8,7 +8,8 @@ sections: - title: Context Requirements requirements: - id: ApiMarkTool-Cli-Context-ParseGlobalFlags - title: Context shall parse the global flags -v/--version, -?/-h/--help, --silent, and --validate. + title: Context shall parse the global flags -v/--version, -?/-h/--help, + --silent, and --validate. justification: | Global flags must be available regardless of the language subcommand so that users can check the version, get help, or request silent operation without @@ -21,15 +22,16 @@ sections: - Context_Create_WithSilentFlag_SetsSilentTrue - Context_Create_WithValidateFlag_SetsValidateTrue - id: ApiMarkTool-Cli-Context-ParseLanguageSubcommand - title: Context shall set the Language property to the first positional non-flag token in the argument list. + title: Context shall set the Language property to the first positional + non-flag token in the argument list. justification: | A positional subcommand allows users to specify the documentation language without a flag prefix, matching common CLI conventions and keeping the invocation concise. - tests: - - Context_Create_WithLanguageSubcommand_SetsLanguage + tests: [Context_Create_WithLanguageSubcommand_SetsLanguage] - id: ApiMarkTool-Cli-Context-ParseLanguageOptions - title: Context shall parse the language-specific options --assembly, --xml-doc, --output, --visibility, and --include-obsolete. + title: Context shall parse the language-specific options --assembly, + --xml-doc, --output, --visibility, and --include-obsolete. justification: | Language-specific options must be available to callers as typed properties so that generators can be configured without re-parsing the command line. @@ -40,7 +42,8 @@ sections: - Context_Create_WithVisibilityOption_SetsVisibility - Context_Create_WithIncludeObsoleteFlag_SetsIncludeObsoleteTrue - id: ApiMarkTool-Cli-Context-ParseIncludes - title: Context shall parse repeated --includes flags and accumulate each plain directory path into the Includes array in order. + title: Context shall parse repeated --includes flags and accumulate + each plain directory path into the Includes array in order. justification: | C++ projects pass one include root per --includes flag; the context must accumulate all supplied paths in order so CppGenerator receives the complete @@ -50,7 +53,9 @@ sections: - Context_Create_WithRepeatedIncludes_AccumulatesAllPaths - Context_Create_WithSingleInclude_SetsSinglePath - id: ApiMarkTool-Cli-Context-ParseApiHeaders - title: Context shall parse repeated --api-headers flags and accumulate each pattern into the ApiHeaders array in order, forwarding '!'-prefixed exclusion patterns verbatim. + title: Context shall parse repeated --api-headers flags and accumulate + each pattern into the ApiHeaders array in order, forwarding '!'-prefixed + exclusion patterns verbatim. justification: | C++ projects express gitignore-style header selection as an ordered sequence of include patterns and '!'-prefixed exclusion patterns. The context must accumulate all @@ -61,7 +66,9 @@ sections: - Context_Create_WithApiHeadersExclusionPattern_ForwardsVerbatim - Context_Create_WithNoArguments_HasEmptyApiHeaders - id: ApiMarkTool-Cli-Context-ParseCppNamedOptions - title: Context shall parse the C++-specific named options --library-name, --library-description, --defines, and --cpp-standard into the corresponding Context properties. + title: Context shall parse the C++-specific named options --library-name, + --library-description, --defines, and --cpp-standard into the corresponding + Context properties. justification: | C++ documentation generation requires library metadata and parser configuration that has no equivalent in the .NET path. Grouping these as a unit gives a single @@ -77,36 +84,39 @@ sections: - Context_Create_WithDefinesOption_SetsDefines - Context_Create_WithCppStandardOption_SetsCppStandard - id: ApiMarkTool-Cli-Context-ParseLibraryName - title: Context shall parse the --library-name option and store it in the LibraryName property. + title: Context shall parse the --library-name option and store it + in the LibraryName property. justification: | Program.CreateGenerator passes LibraryName to CppGeneratorOptions so the generated api.md uses the project-supplied display name rather than a filename. - tests: - - Context_Create_WithLibraryNameOption_SetsLibraryName + tests: [Context_Create_WithLibraryNameOption_SetsLibraryName] - id: ApiMarkTool-Cli-Context-ParseLibraryDescription - title: Context shall parse the --library-description option and store it in the LibraryDescription property. + title: Context shall parse the --library-description option and store + it in the LibraryDescription property. justification: | Program.CreateGenerator passes LibraryDescription to CppGeneratorOptions so the generated api.md can include a project-supplied description paragraph. tests: - Context_Create_WithLibraryDescriptionOption_SetsLibraryDescription - id: ApiMarkTool-Cli-Context-ParseDefines - title: Context shall parse the --defines option and store the comma-separated values in the Defines array. + title: Context shall parse the --defines option and store the comma-separated + values in the Defines array. justification: | C++ projects rely on preprocessor defines (e.g. export macros) for correct parsing. Context must split the comma-separated list and store each define so Program.CreateGenerator can pass them to CppGeneratorOptions. - tests: - - Context_Create_WithDefinesOption_SetsDefines + tests: [Context_Create_WithDefinesOption_SetsDefines] - id: ApiMarkTool-Cli-Context-ParseCppStandard - title: Context shall parse the --cpp-standard option and store it in the CppStandard property. + title: Context shall parse the --cpp-standard option and store it + in the CppStandard property. justification: | Different C++ projects target different language standards; CppGenerator must receive the same standard as the actual build to parse headers correctly. - tests: - - Context_Create_WithCppStandardOption_SetsCppStandard + tests: [Context_Create_WithCppStandardOption_SetsCppStandard] - id: ApiMarkTool-Cli-Context-ParseDepthOption - title: Context shall parse the --depth option and set HeadingDepth to the specified integer value in the range 1–6, defaulting to 1 when the option is absent. + title: Context shall parse the --depth option and set HeadingDepth + to the specified integer value in the range 1–6, defaulting to + 1 when the option is absent. justification: | The --depth option controls the Markdown heading level used in generated output, allowing ApiMark output to be embedded into an existing document at the correct @@ -116,30 +126,31 @@ sections: - Context_Create_WithDepthOption_SetsHeadingDepth - Context_Create_WithDepthOptionOutOfRange_ThrowsArgumentException - id: ApiMarkTool-Cli-Context-ParseResultsOption - title: Context shall parse the --results (alias --result) option and set ResultsFile to the specified path. + title: Context shall parse the --results (alias --result) option and + set ResultsFile to the specified path. justification: | ApiMarkTask passes a results file path so that self-test output can be written to a discoverable location for the build pipeline to collect test evidence. - tests: - - Context_Create_WithResultsOption_SetsResultsFile + tests: [Context_Create_WithResultsOption_SetsResultsFile] - id: ApiMarkTool-Cli-Context-OpenLogFileOnRequest - title: Context shall open the file specified by --log and mirror all subsequent output written through WriteLine to that file. + title: Context shall open the file specified by --log and mirror all + subsequent output written through WriteLine to that file. justification: | ApiMarkTask invokes ApiMarkTool out-of-process and captures output by redirecting it to a log file; --log provides a reliable capture path that works even when stdout is not redirected. - tests: - - Context_Create_WithLogFile_OpensAndWritesToLog + tests: [Context_Create_WithLogFile_OpensAndWritesToLog] - id: ApiMarkTool-Cli-Context-TrackErrorsViaWriteError - title: Context shall set ExitCode to 1 when WriteError is called at least once. + title: Context shall set ExitCode to 1 when WriteError is called at + least once. justification: | Callers must be able to detect that errors occurred without inspecting individual error messages; a non-zero exit code is the conventional failure signal for command-line tools. - tests: - - Context_WriteError_SetsExitCodeToOne + tests: [Context_WriteError_SetsExitCodeToOne] - id: ApiMarkTool-Cli-Context-ParseFormatOption - title: Context shall parse the --format option and store it in the Format property. + title: Context shall parse the --format option and store it in the + Format property. justification: | The output format controls whether ApiMark writes the gradual-disclosure tree or the single-file api.md variant, so the CLI must forward the user's choice into @@ -150,9 +161,21 @@ sections: - Context_Create_WithNoFormatOption_DefaultsToGradualDisclosure - Context_Create_WithInvalidFormat_ThrowsArgumentException - id: ApiMarkTool-Cli-Context-ParseClangPath - title: Context shall parse the --clang-path option and expose the value for use by the cpp subcommand. + title: Context shall parse the --clang-path option and expose + the value for use by the cpp subcommand. justification: | The cpp subcommand passes ClangPath to the CppGenerator to override the default clang binary location discovered via PATH, xcrun (macOS), or vswhere (Windows). - tests: - - Context_Create_WithClangPathOption_SetsClangPath + tests: [Context_Create_WithClangPathOption_SetsClangPath] + - id: ApiMarkTool-Cli-Context-ParseVhdlSourceOptions + title: Context shall parse repeated --source flags and accumulate them + into the Sources array in order, preserving any leading ! exclusion prefix. + justification: | + VHDL projects select source files using gitignore-style glob patterns supplied + via repeated --source flags. Patterns prefixed with ! are exclusion patterns. + All patterns must be accumulated in order so VhdlGenerator can apply last- + match-wins semantics correctly. + tests: + - Context_Create_WithSourceOption_SetsSources + - Context_Create_WithRepeatedSource_AccumulatesAllPaths + - Context_Create_WithSourceExclusionPattern_ForwardsVerbatim diff --git a/docs/reqstream/api-mark-tool/program.yaml b/docs/reqstream/api-mark-tool/program.yaml index ac9feea..0430daf 100644 --- a/docs/reqstream/api-mark-tool/program.yaml +++ b/docs/reqstream/api-mark-tool/program.yaml @@ -6,21 +6,22 @@ sections: - title: Program Requirements requirements: - id: ApiMarkTool-Program-AcceptLanguageArgument - title: Program shall accept the language name as the first positional argument. + title: Program shall accept the language name as the first positional + argument. justification: | The CLI needs a predictable routing key so one executable can expose the appropriate option set and generator behavior for each supported language. - tests: - - Program_Main_WithNoArguments_ReturnsNonZeroExitCode + tests: [Program_Main_WithNoArguments_ReturnsNonZeroExitCode] - id: ApiMarkTool-Program-DispatchToGenerator - title: Program shall dispatch to the appropriate IApiGenerator implementation for the selected language. + title: Program shall dispatch to the appropriate IApiGenerator implementation + for the selected language. justification: | The CLI must connect user input to the correct language module so generation behavior matches the requested documentation target. - tests: - - Program_Main_DotNetCommand_GeneratesExpectedOutput + tests: [Program_Main_DotNetCommand_GeneratesExpectedOutput] - id: ApiMarkTool-Program-SupportDotNetOptions - title: Program shall support the dotnet language with --assembly, --xml-doc, --output, --visibility, and --include-obsolete options. + title: Program shall support the dotnet language with --assembly, --xml-doc, + --output, --visibility, and --include-obsolete options. justification: | The .NET workflow requires explicit control over the compiled assembly, XML documentation file, output location, visible API surface, and whether @@ -30,7 +31,9 @@ sections: - Program_Main_WithInvalidVisibility_ReturnsNonZeroExitCode - Program_Main_WithMissingAssembly_PrintsErrorAndFails - id: ApiMarkTool-Program-SupportCppOptions - title: Program shall support the cpp language with --includes, --output, --visibility, --include-obsolete, --library-name, --library-description, --defines, --cpp-standard, --api-headers, and --clang-path options. + title: Program shall support the cpp language with --includes, --output, + --visibility, --include-obsolete, --library-name, --library-description, + --defines, --cpp-standard, --api-headers, and --clang-path options. justification: | C++ documentation generation requires at minimum the public include root(s) and output directory. The --includes option is required; the tool validates its @@ -44,8 +47,19 @@ sections: tests: - Program_Main_WithCppSubcommand_MissingIncludes_ReturnsNonZeroExitCode - Program_Main_CppWithApiHeadersFlag_FlagIsAccepted + - id: ApiMarkTool-Program-SupportVhdlOptions + title: Program shall support the vhdl language with --source, --output, + --library-name, --library-description, and --format options. + justification: | + VHDL documentation generation requires at least one --source glob pattern. + The tool validates that at least one --source is provided and returns a non-zero + exit code with a descriptive error message when none is present, ensuring users + receive actionable feedback before any generation is attempted. + tests: + - Program_Main_WithVhdlSubcommand_MissingSourceFiles_ReturnsNonZeroExitCode - id: ApiMarkTool-Program-SupportHelpOption - title: Program shall support -?, -h, and --help options that display usage information and exit zero. + title: Program shall support -?, -h, and --help options that display usage + information and exit zero. justification: | Users and CI pipelines need discoverable, in-tool documentation of the available commands and options without consulting external documentation. @@ -53,28 +67,29 @@ sections: - Program_Main_WithHelpFlag_PrintsHelpAndExitsZero - Program_Main_WithHelpAfterSubcommand_PrintsHelpAndExitsZero - id: ApiMarkTool-Program-SupportSilentAndLogOptions - title: Program shall support --silent to suppress console output and --log to capture all output. + title: Program shall support --silent to suppress console output and --log + to capture all output. justification: | ApiMarkTask invokes the tool out-of-process and must capture output to MSBuild log channels; --silent + --log enables clean capture without console noise. - tests: - - Program_Main_WithSilentAndLog_DotNetCommand_ExitsZero + tests: [Program_Main_WithSilentAndLog_DotNetCommand_ExitsZero] - id: ApiMarkTool-Program-SupportValidateOption - title: Program shall support --validate to run self-validation tests and optionally write results to a file. + title: Program shall support --validate to run self-validation tests and + optionally write results to a file. justification: | Self-validation confirms tool integrity in deployment environments without requiring external test infrastructure or the full source tree. - tests: - - Program_Main_WithValidateFlag_ExitsZero + tests: [Program_Main_WithValidateFlag_ExitsZero] - id: ApiMarkTool-Program-SupportVersionOption title: Program shall support a global --version option. justification: | Operators and CI pipelines need a simple way to confirm which ApiMark tool build is installed before generating documentation. - tests: - - Program_Main_WithVersionFlag_PrintsVersionAndExitsZero + tests: [Program_Main_WithVersionFlag_PrintsVersionAndExitsZero] - id: ApiMarkTool-Program-ReportInvalidArguments - title: Program shall return a non-zero exit code and write a descriptive error message when an invalid argument or missing required option is encountered. + title: Program shall return a non-zero exit code and write a descriptive + error message when an invalid argument or missing required option is + encountered. justification: | Users and CI pipelines must be able to detect argument errors through the standard exit-code mechanism; printing a clear message rather than diff --git a/docs/reqstream/api-mark-tool/self-test.yaml b/docs/reqstream/api-mark-tool/self-test.yaml index 83e2b81..457519f 100644 --- a/docs/reqstream/api-mark-tool/self-test.yaml +++ b/docs/reqstream/api-mark-tool/self-test.yaml @@ -6,7 +6,9 @@ sections: - title: SelfTest Requirements requirements: - id: ApiMarkTool-SelfTest-RunSelfValidation - title: The SelfTest subsystem shall run in-process self-validation tests when --validate is specified and report pass/fail results to its output (standard output and, when requested, a results file). + title: The SelfTest subsystem shall run in-process self-validation tests + when --validate is specified and report pass/fail results to its output + (standard output and, when requested, a results file). justification: | Self-validation confirms that the deployed tool binary is functional without requiring external infrastructure or the full source tree, giving operators @@ -17,5 +19,4 @@ sections: - ApiMarkTool-SelfTest-Validation-WriteResultsFileOnRequest - ApiMarkTool-SelfTest-Validation-SetExitCodeOnFailure - ApiMarkTool-SelfTest-Validation-RejectUnsupportedExtension - tests: - - Validation_Run_WithValidContext_ExitsZero + tests: [Validation_Run_WithValidContext_ExitsZero] diff --git a/docs/reqstream/api-mark-tool/self-test/validation.yaml b/docs/reqstream/api-mark-tool/self-test/validation.yaml index a1fb62e..d9c2632 100644 --- a/docs/reqstream/api-mark-tool/self-test/validation.yaml +++ b/docs/reqstream/api-mark-tool/self-test/validation.yaml @@ -8,7 +8,8 @@ sections: - title: Validation Requirements requirements: - id: ApiMarkTool-SelfTest-Validation-RunVersionDisplayTest - title: Validation shall invoke apimark --version and verify output contains the version string. + title: Validation shall invoke apimark --version and verify output + contains the version string. justification: | Version display is the simplest observable behavior of the tool and confirms that the executable is intact and able to run its own dispatch path. @@ -16,7 +17,8 @@ sections: - Validation_Run_WritesVersionAndHelpTestResults - Validation_Run_WithValidContext_ExitsZero - id: ApiMarkTool-SelfTest-Validation-RunHelpDisplayTest - title: Validation shall invoke apimark --help and verify output contains "Usage:" and "Options:". + title: Validation shall invoke apimark --help and verify output contains + "Usage:" and "Options:". justification: | Help display exercises a larger fraction of the dispatch path than --version and confirms that the tool's usage information is intact and readable. @@ -24,7 +26,8 @@ sections: - Validation_Run_WritesVersionAndHelpTestResults - Validation_Run_WithValidContext_ExitsZero - id: ApiMarkTool-SelfTest-Validation-WriteResultsFileOnRequest - title: Validation shall write test results to the file specified by --results when the extension is .trx or .xml. + title: Validation shall write test results to the file specified by + --results when the extension is .trx or .xml. justification: | CI systems need machine-readable test results for automated pass/fail reporting and traceability; .trx is the native Visual Studio format and @@ -39,13 +42,12 @@ sections: mechanism; routing all failures through WriteError ensures that both console and log-file consumers see the diagnostic and that the exit code reflects the failure. - tests: - - Validation_Run_WithUnsupportedResultsExtension_SetsExitCodeToOne + tests: [Validation_Run_WithUnsupportedResultsExtension_SetsExitCodeToOne] - id: ApiMarkTool-SelfTest-Validation-RejectUnsupportedExtension - title: Validation shall set ExitCode to 1 and write a diagnostic message when the results file extension is not .trx or .xml. + title: Validation shall set ExitCode to 1 and write a diagnostic message + when the results file extension is not .trx or .xml. justification: | An unsupported file extension indicates a misconfigured caller; rejecting it with a non-zero exit code and a clear message lets the caller detect and correct the configuration error without inspecting partial output. - tests: - - Validation_Run_WithUnsupportedResultsExtension_SetsExitCodeToOne + tests: [Validation_Run_WithUnsupportedResultsExtension_SetsExitCodeToOne] diff --git a/docs/reqstream/api-mark-vhdl.yaml b/docs/reqstream/api-mark-vhdl.yaml new file mode 100644 index 0000000..f8789a9 --- /dev/null +++ b/docs/reqstream/api-mark-vhdl.yaml @@ -0,0 +1,23 @@ +--- +# ApiMarkVhdl system-level requirements +sections: + - title: ApiMarkVhdl Requirements + requirements: + - id: ApiMarkVhdl-VhdlGenerator-GenerateDocumentationFromVhdlSources + title: ApiMarkVhdl shall generate API documentation from VHDL source files and their --! doc comments. + justification: | + ApiMark needs to document VHDL IP cores from .vhd source files so that AI agents + and developers can browse entity interfaces, generics, ports, and architectures + without opening the source files. The --! doc comment convention is the standard + VHDL Doxygen-compatible annotation format supported by HDL documentation toolchains. + children: + - ApiMarkVhdl-VhdlGenerator-AcceptSourceGlobPatterns + - ApiMarkVhdl-VhdlAstModel + - ApiMarkVhdl-VhdlAstParser-ParseEntity + - ApiMarkVhdl-VhdlAstParser-ParseArchitecture + - ApiMarkVhdl-VhdlAstParser-ParsePackage + - ApiMarkVhdl-VhdlEmitter + - ApiMarkVhdl-VhdlEmitterGradualDisclosure + - ApiMarkVhdl-VhdlEmitterSingleFile + tests: + - VhdlGenerator_Generate_FixtureFile_CreatesApiEntrypoint diff --git a/docs/reqstream/api-mark-vhdl/vhdl-ast-model.yaml b/docs/reqstream/api-mark-vhdl/vhdl-ast-model.yaml new file mode 100644 index 0000000..8bf9354 --- /dev/null +++ b/docs/reqstream/api-mark-vhdl/vhdl-ast-model.yaml @@ -0,0 +1,16 @@ +--- +# VhdlAstModel unit requirements +sections: + - title: ApiMarkVhdl Requirements + sections: + - title: VhdlAstModel Requirements + requirements: + - id: ApiMarkVhdl-VhdlAstModel + title: VhdlAstModel shall represent the data contract between the VHDL parser and emitters, including entity names, port lists, generics, architectures, packages (with types, constants, components, and subprograms), and associated doc comments. + justification: | + A stable data contract between VhdlAstParser and the emitters allows each + component to be developed and tested independently. + tests: + - VhdlAstParser_Parse_FixtureFile_ReturnsEntity + - VhdlAstParser_Parse_FixtureFile_EntityHasGenerics + - VhdlAstParser_Parse_FixtureFile_EntityHasPorts diff --git a/docs/reqstream/api-mark-vhdl/vhdl-ast-parser.yaml b/docs/reqstream/api-mark-vhdl/vhdl-ast-parser.yaml new file mode 100644 index 0000000..ad3325b --- /dev/null +++ b/docs/reqstream/api-mark-vhdl/vhdl-ast-parser.yaml @@ -0,0 +1,43 @@ +--- +# VhdlAstParser unit requirements +sections: + - title: ApiMarkVhdl Requirements + sections: + - title: VhdlAstParser Requirements + requirements: + - id: ApiMarkVhdl-VhdlAstParser-ParseEntity + title: VhdlAstParser shall parse entity declarations from a .vhd file. + justification: | + Entity declarations are the primary design unit in VHDL. + tests: + - VhdlAstParser_Parse_FixtureFile_ReturnsEntity + - VhdlAstParser_Parse_FixtureFile_EntityHasGenerics + - VhdlAstParser_Parse_FixtureFile_EntityHasPorts + - VhdlAstParser_Parse_FixtureFile_EntityDocCommentParsed + - VhdlAstParser_Parse_FixtureFile_PortsHaveInlineDocComments + - id: ApiMarkVhdl-VhdlAstParser-ParseArchitecture + title: VhdlAstParser shall parse architecture bodies from a .vhd file. + justification: | + A file may contain multiple architectures for the same entity. + tests: + - VhdlAstParser_Parse_MuxFixture_ParsesTwoArchitectures + - VhdlAstParser_Parse_MuxFixture_HasMuxEntity + - id: ApiMarkVhdl-VhdlAstParser-ParsePackage + title: VhdlAstParser shall parse package declarations including types, constants, components, and subprograms. + justification: | + Packages are the primary reuse mechanism in VHDL and may contain all four declaration kinds. + tests: + - VhdlAstParser_Parse_CommonTypesFixture_ReturnsPackage + - VhdlAstParser_Parse_CommonTypesFixture_PackageHasTwoTypes + - VhdlAstParser_Parse_CommonTypesFixture_PackageHasTwoConstants + - VhdlAstParser_Parse_CommonTypesFixture_ConstantsHaveDocComments + - VhdlAstParser_Parse_CommonTypesFixture_PackageHasOneComponent + - VhdlAstParser_Parse_CommonTypesFixture_PackageHasTwoSubprograms + - VhdlAstParser_Parse_CommonTypesFixture_ToNaturalIsFunction + - VhdlAstParser_Parse_CommonTypesFixture_ClearVectorIsProcedure + - VhdlAstParser_Parse_CommonTypesFixture_ToNaturalHasOneParameter + - VhdlAstParser_Parse_CommonTypesFixture_ToNaturalHasReturnTypeNatural + - VhdlAstParser_Parse_CommonTypesFixture_ClearVectorHasOneParameter + - VhdlAstParser_Parse_CommonTypesFixture_ClearVectorHasNullReturnType + - VhdlAstParser_Parse_CommonTypesFixture_ToNaturalDocHasParamEntry + - VhdlAstParser_Parse_CommonTypesFixture_ToNaturalDocHasReturnEntry diff --git a/docs/reqstream/api-mark-vhdl/vhdl-emitter-gradual-disclosure.yaml b/docs/reqstream/api-mark-vhdl/vhdl-emitter-gradual-disclosure.yaml new file mode 100644 index 0000000..9b7c784 --- /dev/null +++ b/docs/reqstream/api-mark-vhdl/vhdl-emitter-gradual-disclosure.yaml @@ -0,0 +1,15 @@ +--- +# VhdlEmitterGradualDisclosure unit requirements +sections: + - title: ApiMarkVhdl Requirements + sections: + - title: VhdlEmitterGradualDisclosure Requirements + requirements: + - id: ApiMarkVhdl-VhdlEmitterGradualDisclosure + title: VhdlEmitterGradualDisclosure shall write one file per entity/package plus an api index, with architectures rendered inline on entity detail pages. + justification: | + Separate files per declaration enable gradual disclosure navigation. + tests: + - VhdlEmitterGradualDisclosure_Emit_MinimalData_CreatesApiIndexPage + - VhdlEmitterGradualDisclosure_Emit_MinimalData_CreatesEntityPage + - VhdlEmitterGradualDisclosure_Emit_MinimalData_ApiIndexContainsLibraryNameHeading diff --git a/docs/reqstream/api-mark-vhdl/vhdl-emitter-single-file.yaml b/docs/reqstream/api-mark-vhdl/vhdl-emitter-single-file.yaml new file mode 100644 index 0000000..47f70f0 --- /dev/null +++ b/docs/reqstream/api-mark-vhdl/vhdl-emitter-single-file.yaml @@ -0,0 +1,14 @@ +--- +# VhdlEmitterSingleFile unit requirements +sections: + - title: ApiMarkVhdl Requirements + sections: + - title: VhdlEmitterSingleFile Requirements + requirements: + - id: ApiMarkVhdl-VhdlEmitterSingleFile + title: VhdlEmitterSingleFile shall write all VHDL documentation into a single api.md file. + justification: | + Single-file output is required for linear document consumers. + tests: + - VhdlEmitterSingleFile_Emit_MinimalData_CreatesExactlyOneWriter + - VhdlEmitterSingleFile_Emit_MinimalData_CreatesApiFileOnly diff --git a/docs/reqstream/api-mark-vhdl/vhdl-emitter.yaml b/docs/reqstream/api-mark-vhdl/vhdl-emitter.yaml new file mode 100644 index 0000000..cc8cf51 --- /dev/null +++ b/docs/reqstream/api-mark-vhdl/vhdl-emitter.yaml @@ -0,0 +1,13 @@ +--- +# VhdlEmitter unit requirements +sections: + - title: ApiMarkVhdl Requirements + sections: + - title: VhdlEmitter Requirements + requirements: + - id: ApiMarkVhdl-VhdlEmitter + title: VhdlEmitter shall implement IApiEmitter and dispatch to format-specific emitters. + justification: | + The dispatcher separates format selection from emission logic. + tests: + - VhdlEmitter_Emit_NullFactory_ThrowsArgumentNullException diff --git a/docs/reqstream/api-mark-vhdl/vhdl-generator.yaml b/docs/reqstream/api-mark-vhdl/vhdl-generator.yaml new file mode 100644 index 0000000..7c6ffbb --- /dev/null +++ b/docs/reqstream/api-mark-vhdl/vhdl-generator.yaml @@ -0,0 +1,18 @@ +--- +# VhdlGenerator unit requirements +sections: + - title: ApiMarkVhdl Requirements + sections: + - title: VhdlGenerator Requirements + requirements: + - id: ApiMarkVhdl-VhdlGenerator-AcceptSourceGlobPatterns + title: VhdlGenerator shall accept one or more glob patterns that select which .vhd source files to document. + justification: | + VHDL projects organize IP cores as individual files or as directories of .vhd + files. Glob patterns with gitignore-style last-match-wins semantics and ! prefix + exclusion allow callers to specify and refine the source file set without + requiring project reorganization. + tests: + - VhdlGenerator_Constructor_NullOptions_ThrowsArgumentNullException + - VhdlGenerator_Generate_FixtureFile_CreatesApiEntrypoint + - VhdlGenerator_Generate_FixtureFile_CreatesEntityPage diff --git a/docs/reqstream/ots/antlr4.yaml b/docs/reqstream/ots/antlr4.yaml new file mode 100644 index 0000000..8e76baf --- /dev/null +++ b/docs/reqstream/ots/antlr4.yaml @@ -0,0 +1,32 @@ +--- +# ANTLR4 OTS requirements +sections: + - title: OTS Software Requirements + sections: + - title: ANTLR4 Requirements + requirements: + - id: Antlr4-GeneratedParser-ParseVhdl2008Entities + title: The ANTLR4-generated vhdl2008 parser shall correctly parse entity + declarations, including generic parameters and port declarations, from + VHDL-2008 source files. + justification: | + ApiMark documents VHDL entity declarations. Correct parsing of entities, + their generics, and their ports is a prerequisite for any useful VHDL + output. A defect in the generated parser code would silently produce + empty or incorrect documentation. + tests: + - VhdlAstParser_Parse_FixtureFile_ReturnsEntity + - VhdlAstParser_Parse_FixtureFile_EntityHasGenerics + - VhdlAstParser_Parse_FixtureFile_EntityHasPorts + - id: Antlr4-GeneratedParser-ExtractDocComments + title: The ANTLR4-generated vhdl2008 parser shall correctly identify the + token positions needed for VhdlAstParser to extract associated + doc comments from VHDL source files. + justification: | + ApiMark's doc-comment extraction maps source line numbers from the + parser token stream to pre-extracted comment lines. If the parser + produces incorrect token positions, doc comments will be silently + lost or misattributed. + tests: + - VhdlAstParser_Parse_FixtureFile_EntityDocCommentParsed + - VhdlAstParser_Parse_FixtureFile_PortsHaveInlineDocComments diff --git a/docs/reqstream/ots/clang.yaml b/docs/reqstream/ots/clang.yaml index 92637f2..f215710 100644 --- a/docs/reqstream/ots/clang.yaml +++ b/docs/reqstream/ots/clang.yaml @@ -7,8 +7,10 @@ sections: requirements: - id: Clang-Executable-Discoverable title: >- - Clang shall be discoverable on the host system via the APIMARK_CLANG_PATH environment - variable, PATH search, xcrun on macOS, vswhere on Windows, or the default LLVM install + Clang shall be discoverable on the host system via the APIMARK_CLANG_PATH + environment + variable, PATH search, xcrun on macOS, vswhere on Windows, or the default + LLVM install path on Windows without requiring an explicit path configuration. justification: | ApiMark must run in standard CI environments where clang is installed but its path is @@ -17,8 +19,7 @@ sections: discovery via PATH, xcrun, and vswhere covers common installation layouts on all supported platforms. Falling back to `C:\Program Files\LLVM\bin\clang.exe` on Windows handles the default LLVM installer location when vswhere does not locate a bundled clang. - tests: - - CppGenerator_Generate_ValidHeaders_CreatesApiEntrypoint + tests: [CppGenerator_Generate_ValidHeaders_CreatesApiEntrypoint] - id: Clang-AstDump-ProducesParseableJson title: >- Clang shall produce a parseable JSON AST when invoked with -Xclang -ast-dump=json @@ -32,28 +33,31 @@ sections: - CppGenerator_Generate_ValidHeaders_CreatesTypePageForSampleClass - id: Clang-AstDump-ExposesDeclarationProvenance title: >- - Clang shall include the source file path of every declaration in the JSON AST so - ClangAstParser can determine which declarations belong to the documented public API. + Clang shall include the source file path of every declaration in the + JSON AST so + ClangAstParser can determine which declarations belong to the documented + public API. justification: | The ownership filter in CppGenerator is the primary mechanism for excluding system and third-party declarations from the documented surface. Without per-declaration source file information this filter cannot be implemented correctly. - tests: - - CppGenerator_Generate_ValidHeaders_CreatesTypePageForSampleClass + tests: [CppGenerator_Generate_ValidHeaders_CreatesTypePageForSampleClass] - id: Clang-AstDump-ExposesDocComments title: >- - Clang shall include structured Doxygen documentation comment nodes in the JSON AST + Clang shall include structured Doxygen documentation comment nodes in + the JSON AST when invoked with -fparse-all-comments. justification: | Doxygen @brief, @param, and @return comments are the primary source of developer-authored descriptions in C++ code. Clang must expose these so ClangAstParser can render them as human-readable paragraphs in the markdown output. - tests: - - CppGenerator_Generate_TypeWithDocComment_WritesSummaryToParagraph + tests: [CppGenerator_Generate_TypeWithDocComment_WritesSummaryToParagraph] - id: Clang-AstDump-ExposesTypesAndMembers title: >- - Clang shall expose classes, enums, functions, and their members with enough metadata - (name, type, parameters, access specifier, template parameters) for ClangAstParser to + Clang shall expose classes, enums, functions, and their members with + enough metadata + (name, type, parameters, access specifier, template parameters) for + ClangAstParser to produce accurate API documentation. justification: | Complete type and member metadata is required so that generated type pages, member diff --git a/docs/reqstream/ots/cpp-ast-net.yaml b/docs/reqstream/ots/cpp-ast-net.yaml index 363d32e..62f8bf8 100644 --- a/docs/reqstream/ots/cpp-ast-net.yaml +++ b/docs/reqstream/ots/cpp-ast-net.yaml @@ -1,5 +1,3 @@ -# Archived: ApiMark.Cpp no longer uses CppAst.Net. These requirements are retained for -# historical reference. See docs/reqstream/ots/clang.yaml for current OTS requirements. --- # CppAst.Net OTS requirements sections: @@ -9,28 +7,31 @@ sections: requirements: - id: CppAstNet-Headers-ParseWithoutBuild title: >- - CppAst.Net shall parse C++ header files and return a complete AST without requiring - a C++ compiler installation or build step beyond the bundled libclang binary. + CppAst.Net shall parse C++ header files and return a complete AST without + requiring + a C++ compiler installation or build step beyond the bundled libclang + binary. justification: | ApiMark must run in CI environments where a full C++ toolchain is not installed. CppAst.Net ships with a bundled libclang binary so parsing is available wherever the .NET runtime is present, removing the toolchain installation requirement. - tests: - - CppGenerator_Generate_ValidHeaders_CreatesApiEntrypoint + tests: [CppGenerator_Generate_ValidHeaders_CreatesApiEntrypoint] - id: CppAstNet-Headers-ExposeDeclarationProvenance title: >- - CppAst.Net shall expose the source file path of every declaration so CppGenerator + CppAst.Net shall expose the source file path of every declaration so + CppGenerator can determine which declarations belong to the documented public API. justification: | The ownership filter in CppGenerator is the primary mechanism for excluding system and third-party declarations from the documented surface. Without per-declaration source file information this filter cannot be implemented correctly. - tests: - - CppGenerator_Generate_ValidHeaders_CreatesTypePageForSampleClass + tests: [CppGenerator_Generate_ValidHeaders_CreatesTypePageForSampleClass] - id: CppAstNet-Headers-ExposeTypesAndMembers title: >- - CppAst.Net shall expose classes, enums, functions, and their members with enough - metadata (name, type, parameters, visibility, template parameters) for CppGenerator + CppAst.Net shall expose classes, enums, functions, and their members + with enough + metadata (name, type, parameters, visibility, template parameters) for + CppGenerator to produce accurate API documentation. justification: | Complete type and member metadata is required so that generated type pages, member @@ -42,14 +43,14 @@ sections: - CppGenerator_Generate_TemplateClass_CreatesTypePage - id: CppAstNet-Headers-ExposeDocComments title: >- - CppAst.Net shall expose structured Doxygen documentation comment trees for + CppAst.Net shall expose structured Doxygen documentation comment trees + for declarations that have them. justification: | Doxygen @brief, @param, and @return comments are the primary source of developer-authored descriptions in C++ code. CppAst.Net must expose these so CppGenerator can render them as human-readable paragraphs in the markdown output. - tests: - - CppGenerator_Generate_TypeWithDocComment_WritesSummaryToParagraph + tests: [CppGenerator_Generate_TypeWithDocComment_WritesSummaryToParagraph] - id: CppAstNet-Headers-AcceptParseOptions title: >- CppAst.Net shall accept system include paths, additional include paths, @@ -58,5 +59,4 @@ sections: Real-world C++ libraries depend on platform SDK headers, third-party libraries, and export macros. CppAst.Net must accept these as parse-time configuration so CppGenerator can document headers that include them without incurring parse errors. - tests: - - CppGenerator_Generate_ValidHeaders_CreatesApiEntrypoint + tests: [CppGenerator_Generate_ValidHeaders_CreatesApiEntrypoint] diff --git a/docs/reqstream/ots/dema-consulting-test-results.yaml b/docs/reqstream/ots/dema-consulting-test-results.yaml index 196d9ba..5388dde 100644 --- a/docs/reqstream/ots/dema-consulting-test-results.yaml +++ b/docs/reqstream/ots/dema-consulting-test-results.yaml @@ -7,36 +7,39 @@ sections: requirements: - id: DemaConsultingTestResults-Results-RecordTestOutcomes title: >- - DemaConsulting.TestResults shall provide a TestResults container and TestResult record - that captures the name, outcome, error message, and duration for each self-validation + DemaConsulting.TestResults shall provide a TestResults container and + TestResult record + that captures the name, outcome, error message, and duration for each + self-validation test case. justification: | The SelfTest subsystem must collect pass/fail evidence for each self-validation scenario and report totals to the user. DemaConsulting.TestResults provides the structured container that aggregates individual test outcomes into a reportable collection. - tests: - - Validation_Run_WritesVersionAndHelpTestResults + tests: [Validation_Run_WritesVersionAndHelpTestResults] - id: DemaConsultingTestResults-Results-SerializeToTrx title: >- - DemaConsulting.TestResults shall serialize a TestResults collection to TRX format - via TrxSerializer so that self-validation results can be consumed by CI test + DemaConsulting.TestResults shall serialize a TestResults collection + to TRX format + via TrxSerializer so that self-validation results can be consumed by + CI test reporting tools. justification: | CI pipelines and test dashboards commonly consume TRX format for result aggregation and reporting. The SelfTest subsystem writes a .trx file when the caller supplies a results file path with a .trx extension, enabling downstream CI integration. - tests: - - Validation_Run_WithResultsTrxFile_CreatesTrxFile + tests: [Validation_Run_WithResultsTrxFile_CreatesTrxFile] - id: DemaConsultingTestResults-Results-SerializeToJUnit title: >- - DemaConsulting.TestResults shall serialize a TestResults collection to JUnit XML - format via JUnitSerializer so that self-validation results can be consumed by + DemaConsulting.TestResults shall serialize a TestResults collection + to JUnit XML + format via JUnitSerializer so that self-validation results can be consumed + by non-Microsoft CI tools. justification: | JUnit XML is the de-facto standard for test result interchange in many CI systems (Jenkins, GitLab CI, CircleCI). The SelfTest subsystem writes a .xml file when the caller supplies a results file path with a .xml extension, enabling cross-platform CI reporting. - tests: - - Validation_Run_WithResultsXmlFile_CreatesXmlFile + tests: [Validation_Run_WithResultsXmlFile_CreatesXmlFile] diff --git a/docs/reqstream/ots/file-system-globbing.yaml b/docs/reqstream/ots/file-system-globbing.yaml new file mode 100644 index 0000000..6351ed2 --- /dev/null +++ b/docs/reqstream/ots/file-system-globbing.yaml @@ -0,0 +1,35 @@ +--- +# Microsoft.Extensions.FileSystemGlobbing OTS requirements +sections: + - title: OTS Software Requirements + sections: + - title: FileSystemGlobbing Requirements + requirements: + - id: FileSystemGlobbing-Matcher-MatchIncludePatterns + title: Microsoft.Extensions.FileSystemGlobbing shall match files against + gitignore-style glob include patterns rooted at a given directory. + justification: | + GlobFileCollector depends on Matcher to enumerate files matching + caller-supplied glob patterns. Any defect in pattern evaluation would + cause incorrect file sets to be passed to the language generators. + tests: + - GlobFileCollector_Collect_RelativeVhdPattern_FindsVhdFiles + - GlobFileCollector_Collect_AbsolutePattern_FindsFiles + - id: FileSystemGlobbing-Matcher-ExcludePatterns + title: Microsoft.Extensions.FileSystemGlobbing shall support exclusion + patterns that remove previously matched files from the result set. + justification: | + GlobFileCollector uses exclusion patterns (! prefix) to let callers + narrow the file set after broad inclusions. The Matcher must honor these + correctly so that excluded files never appear in documentation output. + tests: + - GlobFileCollector_Collect_ExclusionPattern_RemovesMatchedFiles + - id: FileSystemGlobbing-Matcher-NonExistentRoot + title: Microsoft.Extensions.FileSystemGlobbing shall return an empty result + without throwing when the pattern root directory does not exist. + justification: | + GlobFileCollector silently skips missing roots. This behavior relies on + Matcher not throwing for absent directories, avoiding spurious build + failures when optional source roots are absent in CI. + tests: + - GlobFileCollector_Collect_NonExistentRoot_ReturnsEmptyWithoutThrowing diff --git a/docs/reqstream/ots/mono-cecil.yaml b/docs/reqstream/ots/mono-cecil.yaml index 77aa795..b17381c 100644 --- a/docs/reqstream/ots/mono-cecil.yaml +++ b/docs/reqstream/ots/mono-cecil.yaml @@ -6,16 +6,17 @@ sections: - title: MonoCecil Requirements requirements: - id: MonoCecil-Assembly-ReadWithoutLoading - title: Mono.Cecil shall read a compiled assembly's type metadata and member information without loading the assembly into the current process. + title: Mono.Cecil shall read a compiled assembly's type metadata and member + information without loading the assembly into the current process. justification: | Loading assemblies into the current process creates binding conflicts and requires all transitive dependencies to be resolvable at runtime. Mono.Cecil's reflection-free model allows ApiMark to inspect any assembly independently of its dependency graph. - tests: - - DotNetGenerator_ReadAssembly_WithMonoCecil_ReturnsTypesAndMembers + tests: [DotNetGenerator_ReadAssembly_WithMonoCecil_ReturnsTypesAndMembers] - id: MonoCecil-Assembly-ExposeTypeMetadata - title: Mono.Cecil shall expose the fully qualified name, base type, implemented interfaces, and custom attributes of every type defined in a read assembly. + title: Mono.Cecil shall expose the fully qualified name, base type, implemented + interfaces, and custom attributes of every type defined in a read assembly. justification: | ApiMark requires complete type-level information to generate accurate type pages, inheritance summaries, and attribute annotations in the markdown output. @@ -24,8 +25,10 @@ sections: - DotNetGenerator_Generate_ValidAssembly_CreatesTypePageForSampleClass - id: MonoCecil-Assembly-ExposeMemberSignatures title: >- - Mono.Cecil shall expose member signature metadata scoped per kind: methods and properties - expose name, parameter types, return type, and generic parameters; fields expose name + Mono.Cecil shall expose member signature metadata scoped per kind: methods + and properties + expose name, parameter types, return type, and generic parameters; fields + expose name and type; events expose name and handler type. justification: | Member-level detail is needed to generate accurate API signatures in the @@ -35,7 +38,8 @@ sections: - TypeNameSimplifier_GenericArguments_AreSimplifiedRecursively - DotNetGenerator_Generate_MethodWithParameters_CreatesMemberPage - id: MonoCecil-Assembly-ExposeAccessibilityModifiers - title: Mono.Cecil shall expose the accessibility modifier for every type and member so that ApiMark can apply visibility filtering. + title: Mono.Cecil shall expose the accessibility modifier for every type + and member so that ApiMark can apply visibility filtering. justification: | Correct visibility filtering requires the actual CLR accessibility of each item. Mono.Cecil exposes this without compiling or loading the assembly, diff --git a/docs/user_guide/cli-reference.md b/docs/user_guide/cli-reference.md deleted file mode 100644 index 17e31d2..0000000 --- a/docs/user_guide/cli-reference.md +++ /dev/null @@ -1,149 +0,0 @@ -# CLI Reference - -## Synopsis - -```text -Usage: apimark [options] [language [language-options]] -``` - -## Global Options - -| Option | Description | -| --- | --- | -| `-v`, `--version` | Display version information | -| `-?`, `-h`, `--help` | Display the help message | -| `--silent` | Suppress console output | -| `--validate` | Run self-validation tests | -| `--results ` | Write validation results to file (`.trx` or `.xml`) | -| `--depth <#>` | Set the top-level heading depth for generated Markdown output (default: `1`) | -| `--log ` | Write all output to log file | - -## Languages - -### `dotnet` — Generate API Documentation from a .NET Assembly - -```text -apimark dotnet [options] -``` - -| Option | Description | -| --- | --- | -| `--assembly ` | Path to the .NET assembly (required) | -| `--xml-doc ` | Path to the XML documentation file | -| `--output ` | Output directory for Markdown files (required) | -| `--format ` | Output format: `gradual` (file-per-type) or `single-file` (single `api.md`) (default: `gradual`) | -| `--visibility ` | Visibility filter: `Public`, `PublicAndProtected`, `All` (default: `Public`) | -| `--include-obsolete` | Include obsolete members in generated output | - -### `cpp` — Generate API Documentation from C++ Headers - -```text -apimark cpp [options] -``` - -| Option | Description | -| --- | --- | -| `--includes ` | Include directory for clang `-I` (repeatable, required) | -| `--api-headers ` | Glob pattern for documented headers; supports `!` exclusions (repeatable, ordered) | -| `--output ` | Output directory for Markdown files (required) | -| `--format ` | Output format: `gradual` (file-per-type) or `single-file` (single `api.md`) (default: `gradual`) | -| `--library-name ` | Library name used as the top-level heading (default: output directory name) | -| `--library-description ` | Optional description for the library `api.md` introduction | -| `--defines ` | Comma-separated preprocessor definitions (e.g. `MYLIB_API=,NDEBUG`) | -| `--cpp-standard ` | C++ language standard passed to Clang (default: `c++17`) | -| `--clang-path ` | Path to clang executable (default: auto-discovered via `APIMARK_CLANG_PATH`, PATH / xcrun / vswhere) | -| `--visibility ` | Visibility filter: `Public`, `PublicAndProtected`, `All` (default: `Public`) | -| `--include-obsolete` | Include deprecated members in generated output | - -#### `--includes` and `--api-headers` - -`--includes ` is repeatable — provide it once per include directory. All directories -are passed to Clang as `-I` paths. When `--api-headers` is not specified, all recognized -header files under every `--includes` directory are documented automatically. - -`--api-headers ` controls which headers appear in the generated documentation. -It is repeatable and ordered — patterns are evaluated in order with gitignore-style -last-match-wins semantics. Entries starting with `!` are exclusion patterns. - -When `--api-headers` is not specified, all headers under the `--includes` directories -with recognized C++ header extensions (`.h`, `.hpp`, `.hxx`, `.h++`) are documented. - -Patterns are evaluated as relative paths. When include roots lie within the current -working directory (the typical project layout), patterns are relative to the CWD — -so `include/**` targets exactly one root tree even when multiple `--includes` roots -are configured. When an include root is an absolute path outside the CWD (e.g. -`/usr/local/include`), patterns are matched against the path relative to that root -instead; filename-wildcard patterns such as `**/foo.h` work correctly in both cases. - -Example — document all headers except a `detail/` subtree, then re-include one header: - -```text ---includes include/ \ ---api-headers "include/**" \ ---api-headers "!include/detail/**" \ ---api-headers "include/detail/public_api.h" -``` - -This is equivalent to the gitignore rule sequence: - -| Pattern | Effect | -| --- | --- | -| `include/**` | Include all headers under `include/` | -| `!include/detail/**` | Exclude all headers under `include/detail/` | -| `include/detail/public_api.h` | Re-include `include/detail/public_api.h` specifically | - -#### Clang executable discovery - -ApiMark locates the clang executable using the following priority order: - -1. `--clang-path ` — explicit path, used as-is (must exist on disk). -2. `APIMARK_CLANG_PATH` environment variable — set this in CI or shell profiles - to configure clang project-wide without repeating the path on every invocation. -3. `clang` on the system `PATH`. -4. `xcrun clang` — macOS only, selects the active Xcode SDK automatically. -5. vswhere-located LLVM clang / `C:\Program Files\LLVM\bin\clang.exe` — Windows only. - -## Platform Support - -| Platform | `dotnet` | `cpp` | -| --- | --- | --- | -| Windows x64 | ✅ | ✅ | -| Linux x64 | ✅ | ✅ | -| macOS | ✅ | ✅ | - -## Output Structure - -ApiMark supports two output formats selectable via `--format`. - -### Gradual Disclosure (default: `--format gradual`) - -A four-tier hierarchy of Markdown files designed for incremental context loading: - -| File | Description | -| --- | --- | -| `api.md` | Root index — lists all namespaces with type counts and one-line summaries | -| `{namespace}.md` | Namespace summary — lists all types, enums, type aliases, and functions with one-line summaries | -| `{namespace}/{type}.md` | Type page — members grouped by kind with signatures and doc comment details | -| `{namespace}/{alias}.md` | Type alias page — `using` declaration, underlying type, and doc comment | -| `{namespace}/{type}/{member}.md` | Member detail page — full signature, parameters, return value, remarks, example | -| `{namespace}/{type}/{nested-type}.md` | Nested type page — same structure as a top-level type page | -| `{namespace}/{type}/{alias}.md` | Class-scoped type alias page — alias declared inside a class body | - -An AI agent can read the root index first, drill into the relevant namespace -summary, and then load a specific type or member page — consuming only as much -context as the task requires. - -### Single File (`--format single-file`) - -All content is written to a single `api.md` file using a flat heading hierarchy: - -| Level | Content | -| --- | --- | -| H1 | Assembly or library name | -| H2 | Namespace | -| H3 | Type (with prototype code block and member bullet list) | -| H4 | Individual member (signature, parameters, return value, example) | - -Single-file output is best suited for contexts where a complete, linear reference -is preferred over a navigable multi-file tree, such as attaching documentation to -a chat context window. diff --git a/docs/user_guide/cli.md b/docs/user_guide/cli.md new file mode 100644 index 0000000..538be64 --- /dev/null +++ b/docs/user_guide/cli.md @@ -0,0 +1,58 @@ +# CLI Reference + +## Synopsis + +```text +Usage: apimark [options] [language [language-options]] +``` + +## Global Options + +| Option | Description | +| --- | --- | +| `-v`, `--version` | Display version information | +| `-?`, `-h`, `--help` | Display the help message | +| `--silent` | Suppress console output | +| `--validate` | Run self-validation tests | +| `--results ` | Write validation results to file (`.trx` or `.xml`) | +| `--depth <#>` | Set the top-level heading depth for generated Markdown output (default: `1`); restricted to `1`–`3` when `--format single-file` is used | +| `--log ` | Write all output to log file | + +## Languages + +| Subcommand | Description | +| --- | --- | +| `dotnet` | Generate API documentation from a .NET assembly | +| `cpp` | Generate API documentation from C++ headers using Clang | +| `vhdl` | Generate API documentation from VHDL source files | + +See the *.NET Documentation*, *C++ Documentation*, and *VHDL Documentation* sections for +the full option reference and usage details for each language subcommand. + +## Self-Validation + +The `--validate` flag runs ApiMark's built-in self-validation suite without generating +any API documentation. Use this in CI to verify that the installed tool is functioning +correctly. + +```bash +apimark --validate +``` + +Combine with `--results` to write a structured results file for CI test reporters: + +```bash +apimark --validate --results results/apimark.trx +``` + +The `--results` option accepts either a `.trx` file path (Visual Studio Test Results +format) or an `.xml` file path (JUnit-compatible XML). The exit code is non-zero if +any validation test fails. + +## Platform Support + +| Platform | `dotnet` | `cpp` | `vhdl` | +| --- | --- | --- | --- | +| Windows x64 | ✅ | ✅ | ✅ | +| Linux x64 | ✅ | ✅ | ✅ | +| macOS | ✅ | ✅ | ✅ | diff --git a/docs/user_guide/cpp.md b/docs/user_guide/cpp.md new file mode 100644 index 0000000..f9c1428 --- /dev/null +++ b/docs/user_guide/cpp.md @@ -0,0 +1,240 @@ +# C++ Documentation + + + +## Prerequisites + +C++ documentation generation requires `clang` to be installed. + +- **Windows**: Install [LLVM](https://releases.llvm.org/) or add "C++ Clang tools for Windows" + via the Visual Studio Installer. +- **macOS**: Install Xcode Command Line Tools: `xcode-select --install` +- **Linux**: Install via your package manager, e.g. `sudo apt install clang` or + `sudo dnf install clang`. + +### Clang Executable Discovery + +ApiMark locates the clang executable using the following priority order: + +1. `--clang-path ` — explicit path, used as-is (must exist on disk). +2. `APIMARK_CLANG_PATH` environment variable — set this in CI or shell profiles + to configure clang project-wide without repeating the path on every invocation. +3. `clang` on the system `PATH`. +4. `xcrun clang` — macOS only, selects the active Xcode SDK automatically. +5. vswhere-located LLVM clang / `C:\Program Files\LLVM\bin\clang.exe` — Windows only. + +## CLI Options + +```text +apimark cpp [options] +``` + +| Option | Description | +| --- | --- | +| `--includes ` | Include directory for clang `-I` (repeatable, required) | +| `--api-headers ` | Glob pattern for documented headers; supports `!` exclusions (repeatable, ordered) | +| `--output ` | Output directory for Markdown files (required) | +| `--format ` | Output format: `gradual` (file-per-type) or `single-file` (single `api.md`) (default: `gradual`) | +| `--library-name ` | Library name used as the top-level heading (default: output directory name) | +| `--library-description ` | Optional description for the library `api.md` introduction | +| `--defines ` | Comma-separated preprocessor definitions (e.g. `MYLIB_API=,NDEBUG`) | +| `--cpp-standard ` | C++ language standard passed to Clang (default: `c++17`) | +| `--clang-path ` | Path to clang executable (default: auto-discovered, see *Prerequisites*) | +| `--visibility ` | Visibility filter: `Public`, `PublicAndProtected`, `All` (default: `Public`) | +| `--include-obsolete` | Include deprecated members in generated output | + +## File Discovery + +Two options work together to control which headers are passed to Clang and which appear +in the generated documentation. + +### `--includes ` (repeatable) + +Passed to Clang as `-I` paths so `#include` statements in headers can be resolved. +Also serves as the default search root when `--api-headers` is not specified. Accepts +absolute or relative directory paths. At least one `--includes` is required. + +### `--api-headers ` (repeatable, optional) + +Glob patterns that determine which header files appear in the generated documentation. + +- Patterns may be **absolute** (e.g. `/usr/local/include/**/*.h`, `C:\SDK\include\**\*`) + or **relative** (resolved from the current working directory). +- Patterns ending with a bare `*` (no extension) automatically select recognized C++ header + extensions: `.h`, `.hpp`, `.hxx`, `.h++`. +- Patterns ending with a specific extension (e.g. `**/*.h`) select only that extension. +- Prefix a pattern with `!` to exclude matching files. All include patterns are applied + first to build the file set; exclusion patterns then remove files from the result. +- When `--api-headers` is not specified, all recognized header files under every + `--includes` directory are documented. + +### Examples + +```text +# Document all headers under include/ +apimark cpp --includes include/ --output docs/api + +# Document only public API headers, excluding detail/ subtree +apimark cpp \ + --includes include/ \ + --api-headers "include/**" \ + --api-headers "!include/detail/**" \ + --output docs/api + +# Use an absolute SDK path alongside local headers +apimark cpp \ + --includes include/ \ + --includes /opt/sdk/include \ + --api-headers "include/**" \ + --api-headers "/opt/sdk/include/mylib/**" \ + --output docs/api +``` + +| Pattern | Effect | +| --- | --- | +| `include/**` | Include all headers under `include/` | +| `!include/detail/**` | Exclude all headers under `include/detail/` | + +## Documented Constructs + +ApiMark parses header files using Clang and produces documentation for the following +constructs. + +- **Namespaces** — all public namespaces containing at least one documented declaration +- **Classes and structs** — with base classes, template parameters, and `final` specifier +- **Functions** — free functions and member functions; variadic, deleted, and + const-qualified signatures are all represented +- **Type aliases** — `using` declarations +- **Enumerations** — scoped (`enum class`) and unscoped (`enum`) enumerations + +Constructs are filtered by the `--api-headers` patterns — only declarations from +matched headers appear in the output. + +## Doc Comments + +ApiMark reads Doxygen-style doc comments placed immediately before a declaration. + +Single-line form: + +```cpp +/// @brief Opens a file for reading. +``` + +Block form: + +```cpp +/** + * @brief Opens a file for reading. + * @param path Absolute or relative path to the file. + * @return A file handle on success, or nullptr on failure. + * @throws std::runtime_error if the path is inaccessible. + */ +``` + +| Tag | Purpose | +| --- | --- | +| `@brief` | One-line description shown in index tables and at the top of detail pages | +| `@param ` | Description for a function parameter | +| `@return` | Description for the return value | +| `@throws ` | Documents an exception the function may throw | + +Missing `@brief` tags render as *No description provided.* in the output. + +## Output Structure + +ApiMark supports two output formats selectable via `--format`. + +### Gradual Disclosure (default: `--format gradual`) + +A hierarchy of Markdown files designed for incremental context loading. + +| File | Description | +| --- | --- | +| `api.md` | Root index — lists all namespaces with type counts and one-line summaries | +| `{namespace}.md` | Namespace summary — lists all types, enums, aliases, and functions with one-line summaries | +| `{namespace}/{type}.md` | Type page — members grouped by kind with signatures and doc comment details | +| `{namespace}/{alias}.md` | Type alias page — `using` declaration, underlying type, and doc comment | +| `{namespace}/{type}/{member}.md` | Member detail page — full signature, parameters, return value, remarks, example | +| `{namespace}/{type}/{nested-type}.md` | Nested type page — same structure as a top-level type page | +| `{namespace}/{type}/{alias}.md` | Class-scoped type alias page — alias declared inside a class body | + +An AI agent can read the root index first, drill into the relevant namespace or type +page, and then read the member detail — consuming only as much context as the task +requires. + +### Single File (`--format single-file`) + +All content is written to a single `api.md` file using a flat heading hierarchy: + +| Level | Content | +| --- | --- | +| H1 | Library name | +| H2 | Namespace | +| H3 | Type (with prototype code block and member bullet list) | +| H4 | Individual member (signature, parameters, return value, example) | + +Single-file output is best suited for contexts where a complete, linear reference is +preferred over a navigable multi-file tree, such as attaching documentation to a chat +context window. + +## MSBuild Integration + +Add the `DemaConsulting.ApiMark.MSBuild` NuGet package to your `.vcxproj`: + +```xml + + + +``` + +ApiMark discovers include paths from `AdditionalIncludeDirectories` automatically for +projects where that property is set in the conventional way. For projects with unusual +include structures, generated headers, or complex NuGet arrangements, use the +`apimark cpp` CLI command directly for full control. + +### C++-Specific MSBuild Properties + +| Property | Default | Description | +| --- | --- | --- | +| `ApiMarkIncludePaths` | *(auto-detected)* | Semicolon-separated include directory paths passed to Clang as `-I` paths. Defaults to the resolved `AdditionalIncludeDirectories` from all `ClCompile` items (including NuGet-injected paths). Set explicitly to override auto-detection. When `ApiMarkApiHeaders` is not set, all headers with recognized C++ extensions under these paths are documented. | +| `ApiMarkApiHeaders` | *(unset)* | Semicolon-separated, order-preserved list of glob and exclusion pattern strings. Entries with `!` are exclusion patterns; gitignore-style last-match-wins semantics apply. When unset, all headers with recognized C++ extensions under `ApiMarkIncludePaths` are documented. | +| `ApiMarkLibraryName` | `$(MSBuildProjectName)` | Library name used as the top-level heading in `api.md` | +| `ApiMarkLibraryDescription` | *(unset)* | Optional description for the `api.md` introduction paragraph | +| `ApiMarkDefines` | *(unset)* | Semicolon-separated preprocessor definitions (e.g. `MYLIB_API=;NDEBUG`) | +| `ApiMarkCppStandard` | `c++17` | C++ language standard passed to Clang | +| `ApiMarkClangPath` | *(auto-discovered)* | Path to clang executable; overrides PATH / xcrun / vswhere discovery | +| `ApiMarkVisibility` | `Public` | Visibility filter: `Public`, `PublicAndProtected`, `All` | +| `ApiMarkIncludeObsolete` | `false` | Include deprecated members in generated output | + +See the *MSBuild Integration* section for common properties (`ApiMarkOutputDir`, +`ApiMarkFormat`, `DisableApiMark`) that apply to all project types. + +### Configuration Example + +```xml + + + $(MSBuildProjectDirectory)\docs\api + + + MyLibrary + + + A fast, portable geometry library. + + + c++20 + + + + + + + + + + + + + +``` diff --git a/docs/user_guide/definition.yaml b/docs/user_guide/definition.yaml index 49d5f6e..13e8049 100644 --- a/docs/user_guide/definition.yaml +++ b/docs/user_guide/definition.yaml @@ -4,8 +4,11 @@ input-files: - docs/user_guide/title.txt - docs/user_guide/introduction.md - docs/user_guide/installation.md - - docs/user_guide/cli-reference.md - - docs/user_guide/msbuild-integration.md + - docs/user_guide/cli.md + - docs/user_guide/msbuild.md + - docs/user_guide/dotnet.md + - docs/user_guide/cpp.md + - docs/user_guide/vhdl.md - docs/user_guide/faq.md template: template.html table-of-contents: true diff --git a/docs/user_guide/dotnet.md b/docs/user_guide/dotnet.md new file mode 100644 index 0000000..48db3f0 --- /dev/null +++ b/docs/user_guide/dotnet.md @@ -0,0 +1,177 @@ +# .NET Documentation + +## Prerequisites + +The ApiMark CLI tool requires the .NET SDK 8.0 or later. See the *Installation* section +for CLI tool and MSBuild package installation steps. + +To enable XML documentation generation so ApiMark can read doc comments, add the +following to your `.csproj`: + +```xml + + true + +``` + +Without this setting, the compiler does not emit the XML doc file and ApiMark has no +documentation to read. The assembly is still documented structurally (types, signatures) +but all doc-comment content will be absent. + +## CLI Options + +```text +apimark dotnet [options] +``` + +| Option | Description | +| --- | --- | +| `--assembly ` | Path to the .NET assembly (required) | +| `--xml-doc ` | Path to the XML documentation file | +| `--output ` | Output directory for Markdown files (required) | +| `--format ` | Output format: `gradual` (file-per-type) or `single-file` (single `api.md`) (default: `gradual`) | +| `--visibility ` | Visibility filter: `Public`, `PublicAndProtected`, `All` (default: `Public`) | +| `--include-obsolete` | Include obsolete members in generated output | + +## Documented Constructs + +ApiMark reflects over a .NET assembly and produces documentation for the following +constructs. + +### Namespaces + +Each namespace that contains at least one documented type gets a namespace summary page. +To provide a description for the namespace itself, add a `NamespaceDoc` carrier class in +that namespace with a `/// ` XML doc comment. The class is excluded from the +output — only its summary is used. + +### Types + +Public classes, interfaces, structs, enums, and delegates are documented. The set of +visible types is controlled by `--visibility`: + +- `Public` — public types only (default) +- `PublicAndProtected` — public and protected types +- `All` — all types including internal + +### Members + +Methods, properties, fields, events, and constructors are documented on the type page. +Operator overloads are grouped together on a dedicated `operators.md` page within the +type folder. + +### Nested Types + +Nested types get their own page in the gradual-disclosure tree and also appear in a +*Nested Types* section on the parent type page. + +### Obsolete Members + +Members annotated with `[Obsolete]` are excluded from the output by default. Pass +`--include-obsolete` to include them. + +## Doc Comments + +ApiMark reads standard C# XML doc comments (`///`). + +| Tag | Purpose | +| --- | --- | +| `` | One-line description shown in index tables and at the top of detail pages | +| `` | Extended description rendered below the summary | +| `` | Description for a method or constructor parameter | +| `` | Description for the return value | +| `` | Documents an exception the method may throw | +| `` | Code example rendered in a fenced code block | + +Missing `` tags render as *No description provided.* in the output. Missing +`` descriptions render as *No description provided.* in parameter tables. + +## Output Structure + +ApiMark supports two output formats selectable via `--format`. + +### Gradual Disclosure (default: `--format gradual`) + +A hierarchy of Markdown files designed for incremental context loading. + +| File | Description | +| --- | --- | +| `api.md` | Root index — lists all namespaces with type counts and one-line summaries | +| `{namespace}.md` | Namespace summary — lists all types, enums, aliases, and functions with one-line summaries | +| `{namespace}/{type}.md` | Type page — members grouped by kind with signatures and doc comment details | +| `{namespace}/{alias}.md` | Type alias page — `using` declaration, underlying type, and doc comment | +| `{namespace}/{type}/{member}.md` | Member detail page — full signature, parameters, return value, remarks, example | +| `{namespace}/{type}/{nested-type}.md` | Nested type page — same structure as a top-level type page | +| `{namespace}/{type}/{alias}.md` | Class-scoped type alias page — alias declared inside a class body | + +An AI agent can read the root index first, drill into the relevant namespace or type +page, and then read the member detail — consuming only as much context as the task +requires. + +### Single File (`--format single-file`) + +All content is written to a single `api.md` file using a flat heading hierarchy: + +| Level | Content | +| --- | --- | +| H1 | Assembly name | +| H2 | Namespace | +| H3 | Type (with prototype code block and member bullet list) | +| H4 | Individual member (signature, parameters, return value, example) | + +Single-file output is best suited for contexts where a complete, linear reference is +preferred over a navigable multi-file tree, such as attaching documentation to a chat +context window. + +## MSBuild Integration + +Add the `DemaConsulting.ApiMark.MSBuild` NuGet package to your `.csproj`: + +```xml + + + +``` + +Enable XML documentation generation so ApiMark can read your doc comments: + +```xml + + true + +``` + +After the next `dotnet build`, documentation is written to `$(MSBuildProjectDirectory)\api`. + +### C#-Specific MSBuild Properties + +| Property | Default | Description | +| --- | --- | --- | +| `ApiMarkAssemblyPath` | `$(TargetPath)` | Path to the compiled assembly | +| `ApiMarkXmlDocPath` | `$(DocumentationFile)` | Path to the XML documentation file | +| `ApiMarkVisibility` | `Public` | Visibility filter: `Public`, `PublicAndProtected`, `All` | +| `ApiMarkIncludeObsolete` | `false` | Include `[Obsolete]` members in generated output | + +See the *MSBuild Integration* section for common properties (`ApiMarkOutputDir`, +`ApiMarkFormat`, `DisableApiMark`, `ApiMarkPackDocs`) that apply to all project types. + +### Configuration Example + +```xml + + + true + + + $(MSBuildProjectDirectory)\docs\api + + + PublicAndProtected + + + true + + + true + +``` diff --git a/docs/user_guide/faq.md b/docs/user_guide/faq.md index 7aba750..9de3768 100644 --- a/docs/user_guide/faq.md +++ b/docs/user_guide/faq.md @@ -144,3 +144,48 @@ Set `DisableApiMark=true` on projects where documentation is not needed (test projects, benchmarks). For C++ projects with many headers, use `--api-headers` patterns to limit which files are parsed by clang — undocumented headers still contribute to compilation but are not analyzed for documentation. + +--- + +## VHDL + +### How do I specify which .vhd files to document? + +Use `--source` with a glob pattern: + +```bash +apimark vhdl --source "src/**/*.vhd" --output docs/api +``` + +Multiple `--source` patterns are evaluated in order using gitignore-style +last-match-wins semantics. A pattern prefixed with `!` excludes matching files. + +### How do I exclude testbenches or simulation-only files? + +Use an exclusion pattern after the inclusion pattern: + +```bash +apimark vhdl \ + --source "src/**/*.vhd" \ + --source "!src/tb/**/*.vhd" \ + --output docs/api +``` + +Files matching the exclusion pattern (`!src/tb/**/*.vhd`) are removed from +the set even if they matched an earlier inclusion pattern. + +### What VHDL constructs are documented? + +ApiMark documents the following VHDL constructs when they carry `--!` doc comments: + +- **Entities** — entity name, generic parameters, port declarations +- **Architectures** — architecture name and doc comment (listed inline on the entity page) +- **Packages** — package name, types, constants, components, and subprograms + +`--!` doc comments are single-line comments prefixed with `--!` placed +immediately before the construct they describe. + +### Does VHDL support require any additional tools? + +No. VHDL parsing is done in-process using the ANTLR4 vhdl2008 grammar — +no external tools or runtimes are required beyond the .NET SDK. diff --git a/docs/user_guide/installation.md b/docs/user_guide/installation.md index 65a3a57..20f5f51 100644 --- a/docs/user_guide/installation.md +++ b/docs/user_guide/installation.md @@ -4,17 +4,12 @@ The ApiMark CLI tool and MSBuild package require the .NET SDK (version 8.0 or later). -C++ documentation generation additionally requires `clang` to be installed: +C++ documentation generation additionally requires `clang` to be installed. See the +*C++ Documentation* section for platform-specific installation instructions and clang +executable discovery details. -- **Windows**: Install [LLVM](https://releases.llvm.org/) or add "C++ Clang tools for Windows" - via the Visual Studio Installer. -- **macOS**: Install Xcode Command Line Tools: `xcode-select --install` -- **Linux**: Install via your package manager, e.g. `sudo apt install clang` or - `sudo dnf install clang`. - -If `clang` is not on your PATH, set the `APIMARK_CLANG_PATH` environment variable, -use the `--clang-path` CLI option, or set the `ApiMarkClangPath` MSBuild property -to specify the full path to the clang executable. +VHDL documentation generation has no additional prerequisites — parsing is done +in-process using the ANTLR4 vhdl2008 grammar. ## CLI Tool @@ -32,12 +27,8 @@ apimark --version ## MSBuild Package -Add the `DemaConsulting.ApiMark.MSBuild` NuGet package to any project to -automatically generate API documentation after every build. - -### C# Projects - -In your `.csproj`: +Add the `DemaConsulting.ApiMark.MSBuild` NuGet package to any supported project to +automatically generate API documentation after every build: ```xml @@ -45,31 +36,5 @@ In your `.csproj`: ``` -Enable XML documentation generation so ApiMark can read your doc comments: - -```xml - - true - -``` - -After the next `dotnet build`, documentation is written to `$(MSBuildProjectDirectory)\api`. - -### C++ Projects - -In your `.vcxproj`: - -```xml - - - -``` - -ApiMark discovers include paths from `AdditionalIncludeDirectories` automatically -for projects where that property is set in the conventional way. For projects with -unusual include structures, generated headers, or complex NuGet arrangements, -use the `apimark cpp` CLI command directly for full control. - -See the *MSBuild Integration* section of the User Guide for the full list of -C++-specific properties such as `ApiMarkApiHeaders`, `ApiMarkDefines`, and -`ApiMarkCppStandard`. +See the *.NET Documentation* section for C#-specific setup steps and the +*C++ Documentation* section for C++-specific setup steps. diff --git a/docs/user_guide/introduction.md b/docs/user_guide/introduction.md index 18d0ab9..c24d492 100644 --- a/docs/user_guide/introduction.md +++ b/docs/user_guide/introduction.md @@ -11,9 +11,12 @@ comments, header files, docstrings, etc.). ## Scope -Covers the apimark CLI tool and MSBuild package integration. Excludes internal -architecture and design details. This guide includes installation instructions, -a CLI reference, and usage examples. +Covers the `apimark` CLI tool and the `DemaConsulting.ApiMark.MSBuild` NuGet package +integration. Excludes internal architecture and design details. This guide includes +installation instructions, a global CLI reference, MSBuild integration concepts, and +dedicated language sections for .NET, C++, and VHDL — each covering CLI options, file +discovery, documented constructs, doc comment format, output structure, and +language-specific MSBuild configuration. ## References diff --git a/docs/user_guide/msbuild-integration.md b/docs/user_guide/msbuild-integration.md deleted file mode 100644 index 0b30df6..0000000 --- a/docs/user_guide/msbuild-integration.md +++ /dev/null @@ -1,142 +0,0 @@ -# MSBuild Integration - -The `DemaConsulting.ApiMark.MSBuild` NuGet package adds an MSBuild task that -runs automatically after every build, generating API reference documentation -in Markdown alongside the compiled output. It supports both `.csproj` (C#) -and `.vcxproj` (C++) projects — the language is detected automatically from -the project file extension. - -## Platform Support - -| Platform | C# | C++ | -| --- | --- | --- | -| Windows x64 | ✅ | ✅ | -| Linux x64 | ✅ | ✅ | -| macOS (Apple Silicon) | ✅ | ✅ | - -## MSBuild Properties - -### Common Properties - -| Property | Default | Description | -| --- | --- | --- | -| `ApiMarkOutputDir` | `$(MSBuildProjectDirectory)\api` | Output directory for generated Markdown | -| `ApiMarkVisibility` | `Public` | Visibility filter: `Public`, `PublicAndProtected`, `All` | -| `ApiMarkIncludeObsolete` | `false` | Include `[Obsolete]` / deprecated members | -| `ApiMarkFormat` | _(unset, defaults to `gradual`)_ | Output format: `gradual` (file-per-type) or `single-file` (single `api.md`) | -| `ApiMarkPackDocs` | `false` | Include the `api/` folder in the NuGet package (C# only) | -| `DisableApiMark` | _(unset)_ | Set to `true` to disable generation entirely | -| `ApiMarkLanguage` | _(inferred)_ | Override language: `dotnet` or `cpp` | - -### C#-Specific Properties - -| Property | Default | Description | -| --- | --- | --- | -| `ApiMarkAssemblyPath` | `$(TargetPath)` | Path to the compiled assembly | -| `ApiMarkXmlDocPath` | `$(DocumentationFile)` | Path to the XML documentation file | - -### C++-Specific Properties - -> **Note**: C++ MSBuild integration works well for projects where -> `AdditionalIncludeDirectories` is set in the conventional way. For projects with -> unusual include structures, generated headers, or complex NuGet arrangements, -> use the `apimark cpp` CLI command directly — it gives full control over every -> argument passed to clang. - -| Property | Default | Description | -| --- | --- | --- | -| `ApiMarkIncludePaths` | _(auto-detected)_ | Semicolon-separated list of include directory paths passed to Clang as `-I` paths. Defaults to the resolved `AdditionalIncludeDirectories` from all `ClCompile` items (including NuGet-injected paths). Set explicitly to override auto-detection. When `ApiMarkApiHeaders` is not set, all headers with recognized C++ extensions under these paths are documented. | -| `ApiMarkApiHeaders` | _(unset)_ | Semicolon-separated, order-preserved list of glob and exclusion pattern strings. Entries with `!` are exclusion patterns; gitignore-style last-match-wins semantics apply. When unset, all headers with recognized C++ extensions under `ApiMarkIncludePaths` are documented. | -| `ApiMarkLibraryName` | `$(MSBuildProjectName)` | Library name used as the top-level heading in `api.md` | -| `ApiMarkLibraryDescription` | _(unset)_ | Optional description for the `api.md` introduction paragraph | -| `ApiMarkDefines` | _(unset)_ | Semicolon-separated preprocessor definitions (e.g. `MYLIB_API=;NDEBUG`) | -| `ApiMarkCppStandard` | `c++17` | C++ language standard passed to Clang | -| `ApiMarkClangPath` | _(auto-discovered)_ | Path to clang executable; overrides PATH / xcrun / vswhere discovery | - -## Multiple Output Formats - -Use `ApiMarkFormat` to select the output format for a build: - -```xml - - - single-file - -``` - -To generate both formats in one build, use the `ApiMarkOutput` item group. -Each item specifies an `OutputDir`, an optional `Visibility`, and an optional -`Format`. When `ApiMarkOutput` items are present they replace the scalar -`ApiMarkOutputDir`, `ApiMarkVisibility`, and `ApiMarkFormat` properties: - -```xml - - - - - - - -``` - -## Configuration Examples - -### C# Project - -```xml - - - true - - - $(MSBuildProjectDirectory)\docs\api - - - PublicAndProtected - - - true - - - true - -``` - -### C++ Project - -```xml - - - $(MSBuildProjectDirectory)\docs\api - - - MyLibrary - - - A fast, portable geometry library. - - - c++20 - - - - - - - - - - - - - -``` - -## Including Docs in the NuGet Package - -When `ApiMarkPackDocs` is set to `true`, the generated `api/` folder is -included in the NuGet package at `api/`. This allows consumers to access -the documentation directly from the `.nupkg`. - -The feature works with both `dotnet pack` and `dotnet pack --no-build` — the -docs are included if they already exist on disk at pack time. diff --git a/docs/user_guide/msbuild.md b/docs/user_guide/msbuild.md new file mode 100644 index 0000000..7613f29 --- /dev/null +++ b/docs/user_guide/msbuild.md @@ -0,0 +1,61 @@ +# MSBuild Integration + +The `DemaConsulting.ApiMark.MSBuild` NuGet package adds an MSBuild task that runs +automatically after every build, generating API reference documentation in Markdown +alongside the compiled output. + +## Overview + +The `ApiMarkTask` runs the `apimark` CLI tool out-of-process immediately after a +successful build. The language is inferred from the project file extension: + +- `.vcxproj` → `cpp` +- All other project types → `dotnet` + +Set `ApiMarkLanguage` explicitly to override automatic detection. + +## Common Properties + +| Property | Default | Description | +| --- | --- | --- | +| `ApiMarkOutputDir` | `$(MSBuildProjectDirectory)\api` | Output directory for generated Markdown | +| `ApiMarkFormat` | _(unset, defaults to `gradual`)_ | Output format: `gradual` or `single-file` | +| `ApiMarkLanguage` | _(inferred)_ | Override language detection: `dotnet` or `cpp` | +| `ApiMarkPackDocs` | `false` | Include the `api/` folder in the NuGet package (C# only) | +| `DisableApiMark` | _(unset)_ | Set to `true` to disable generation entirely | + +## Multiple Output Trees + +To generate both gradual-disclosure and single-file output in the same build, use the +`ApiMarkOutput` item group. Each item specifies an `OutputDir`, an optional `Visibility`, +and an optional `Format`. When `ApiMarkOutput` items are present they replace the scalar +`ApiMarkOutputDir`, `ApiMarkVisibility`, and `ApiMarkFormat` properties: + +```xml + + + + + + + +``` + +## Including Docs in the NuGet Package + +When `ApiMarkPackDocs` is set to `true`, the generated `api/` folder is included in the +NuGet package at `api/`. This allows consumers to access the documentation directly from +the `.nupkg`. + +The feature works with both `dotnet pack` and `dotnet pack --no-build` — the docs are +included if they already exist on disk at pack time. + +## See Also + +See the _.NET Documentation_ section for C#-specific MSBuild properties such as +`ApiMarkAssemblyPath`, `ApiMarkXmlDocPath`, `ApiMarkVisibility`, and +`ApiMarkIncludeObsolete`. + +See the _C++ Documentation_ section for C++-specific MSBuild properties such as +`ApiMarkIncludePaths`, `ApiMarkApiHeaders`, `ApiMarkDefines`, `ApiMarkCppStandard`, +and `ApiMarkClangPath`. diff --git a/docs/user_guide/vhdl.md b/docs/user_guide/vhdl.md new file mode 100644 index 0000000..6c4a7c5 --- /dev/null +++ b/docs/user_guide/vhdl.md @@ -0,0 +1,163 @@ +# VHDL Documentation + + + +## Prerequisites + +VHDL documentation generation has no additional prerequisites beyond the .NET SDK. +Parsing is done in-process using the ANTLR4 vhdl2008 grammar — no external tools or +runtimes are required. There is no MSBuild integration for VHDL projects; use the +`apimark vhdl` CLI command directly. + +## CLI Options + +```text +apimark vhdl [options] +``` + +| Option | Description | +| --- | --- | +| `--source ` | Source glob pattern — repeatable, prefix with `!` to exclude (required) | +| `--output ` | Output directory for Markdown files (required) | +| `--format ` | Output format: `gradual` (file-per-entity) or `single-file` (single `api.md`) (default: `gradual`) | +| `--library-name ` | Library name used as the top-level heading (default: output directory name) | +| `--library-description ` | Optional description for the library `api.md` introduction | + +## File Discovery + +### `--source ` (repeatable, at least one required) + +Glob patterns that select which VHDL source files are documented. + +- Patterns may be **absolute** (e.g. `/data/hdl/**/*.vhd`, `C:\projects\hdl\**\*`) + or **relative** (resolved from the current working directory). +- Patterns ending with a bare `*` (no extension) automatically select both `.vhd` and + `.vhdl` files. +- Patterns ending with a specific extension (e.g. `**/*.vhd`) select only that extension. +- Prefix a pattern with `!` to exclude matching files. All include patterns are applied + first to build the file set; exclusion patterns then remove files from the result. + +### Examples + +```text +# Include all .vhd and .vhdl files under src/ +apimark vhdl --source "src/**/*" --output docs/api + +# Include .vhd files only, exclude testbenches +apimark vhdl \ + --source "src/**/*.vhd" \ + --source "!src/tb/**" \ + --output docs/api + +# Absolute path +apimark vhdl \ + --source "C:\projects\hdl\src\**\*" \ + --output docs/api +``` + +If the evaluated patterns match no `.vhd` or `.vhdl` files, ApiMark writes a diagnostic +error to standard error and produces no output files. + +## Documented Constructs + +ApiMark parses VHDL source files and produces documentation for the following +constructs when they carry `--!` doc comments. + +### Entities + +Each entity gets its own page containing: + +- A generics table (name, type, default value, description) +- A ports table (name, direction, type, description) +- An inline list of all architectures declared for that entity + +### Packages + +Each package gets its own page. The following member kinds are documented: + +- Type declarations +- Constant declarations +- Component declarations +- Subprograms (procedures and functions) — subprograms get their own detail pages in + gradual-disclosure format + +## Doc Comments + +ApiMark reads `--!` prefix block comments placed immediately before the construct they +describe. Trailing inline `--!` comments are also supported for ports, generics, and +component ports. + +| Tag | Purpose | +| --- | --- | +| `@brief` | One-line description shown in index tables and at the top of detail pages | +| `@param ` | Description for a subprogram parameter, port, or generic | +| `@return` | Description for a function return value | + +If `@brief` is absent, the first non-empty line of the doc comment block becomes the +summary. Missing descriptions render as *No description provided.* in the output. + +For subprogram parameters, object-class keywords (`SIGNAL`, `VARIABLE`, `CONSTANT`, +`FILE`) are stripped from display and direction keywords (`IN`, `OUT`, `INOUT`, +`BUFFER`) are prepended to the type name in the parameters table. Entity ports are +shown with separate Direction and Type columns. + +### Entity Example + +```vhdl +--! @brief Synchronous binary counter entity. +--! +--! Note that changes to maxcount_in should only be performed +--! when the counter is cleared. +ENTITY counter IS + GENERIC ( + width : natural := 1 --! Width of the counter + ); + PORT ( + clk_in : IN std_logic; --! Module clock + rst_in : IN std_logic --! Asynchronous reset + ); +END ENTITY counter; +``` + +### Subprogram Example + +```vhdl +--! @brief Convert a std_logic_vector to natural. +--! @param v The vector to convert. +--! @return The natural value. +FUNCTION to_natural(v : IN STD_LOGIC_VECTOR) RETURN natural; +``` + +## Output Structure + +ApiMark supports two output formats selectable via `--format`. + +### Gradual Disclosure (default: `--format gradual`) + +A hierarchy of Markdown files designed for incremental context loading. + +| File | Description | +| --- | --- | +| `api.md` | Root index — lists all entities and packages with one-line summaries | +| `{entity-name}.md` | Entity page — generics table, ports table, and inline architecture list | +| `{package-name}.md` | Package page — types, constants, components, and subprogram index | +| `{package-name}/{subprogram-name}.md` | Subprogram detail page — parameters table, optional returns, and signature | + +An AI agent can read the root index first, drill into the relevant entity or package +page, and then read the subprogram detail — consuming only as much context as the task +requires. + +### Single File (`--format single-file`) + +All content is written to a single `api.md` file using a flat heading hierarchy: + +| Level | Content | +| --- | --- | +| H1 | Library name | +| H2 | Entity or package name | +| H3 | Member (subprogram, type, constant, component) with signature and description | +| H4 | Individual parameter (name, type, description) | + +Single-file output is best suited for contexts where a complete, linear reference is +preferred over a navigable multi-file tree, such as attaching documentation to a chat +context window. diff --git a/docs/verification/api-mark-core.md b/docs/verification/api-mark-core.md index 0e87d34..dcd8fdd 100644 --- a/docs/verification/api-mark-core.md +++ b/docs/verification/api-mark-core.md @@ -28,6 +28,10 @@ unit tests. links) are forwarded with the correct values and sequence. - `PathHelpers` combines valid relative paths and rejects traversal, rooted, and null path input. +- `GlobFileCollector` collects files matching glob patterns: empty patterns return + empty; bare-star segments apply language-extension filtering; absolute patterns work + independently of working directory; exclusions remove files; non-existent roots + return empty without throwing; results are sorted and deduplicated. ## Test Scenarios @@ -60,3 +64,10 @@ structure. This scenario is tested by relative segments while rejecting traversal attempts, rooted paths, and null input. This scenario is tested by the `PathHelpers_SafePathCombine_*` test cases in `PathHelpersTests`. + +**GlobFileCollector discovers files via glob patterns**: Verifies that GlobFileCollector +correctly collects files matching inclusion patterns, applies language-extension filtering +for bare-star segments, supports absolute path patterns, removes files matched by +exclusion patterns, returns empty results for non-existent roots without throwing, and +returns a sorted, deduplicated list. These scenarios are tested by the +`GlobFileCollector_Collect_*` test cases in `GlobFileCollectorTests`. diff --git a/docs/verification/api-mark-core/glob-file-collector.md b/docs/verification/api-mark-core/glob-file-collector.md new file mode 100644 index 0000000..de78d59 --- /dev/null +++ b/docs/verification/api-mark-core/glob-file-collector.md @@ -0,0 +1,66 @@ +## GlobFileCollector + +### Verification Approach + +`GlobFileCollector` is verified through direct unit tests that create isolated +temporary directories, populate them with files, invoke `Collect` with various +pattern configurations, and assert on the returned file list. Temporary +directories are created in `Path.GetTempPath()` with random names and are +deleted in `finally` blocks to prevent test pollution. + +### Test Environment + +N/A — standard .NET test runner is sufficient. No external tools or environment +variables are required. Tests use isolated temporary directories so they are +safe to run in parallel. + +### Acceptance Criteria + +- All `GlobFileCollector` test cases pass with zero failures. +- Empty pattern list returns an empty result. +- Relative patterns are resolved against the supplied working directory. +- Bare-star patterns (`**/*`) apply language-extension filtering. +- Explicit-extension patterns (`**/*.vhd`) select only that extension. +- Absolute patterns are supported and ignore the working directory. +- `!`-prefixed exclusion patterns remove matching files from the result. +- Non-existent pattern roots return an empty result without throwing. +- Overlapping patterns produce a deduplicated, sorted result. + +### Test Scenarios + +**Empty patterns return empty list**: Verifies that invoking `Collect` with an +empty pattern list returns an empty result without accessing the filesystem. +Tested by `GlobFileCollector_Collect_EmptyPatterns_ReturnsEmptyList`. + +**Relative `**/*.vhd` pattern finds `.vhd` files**: Verifies that a relative +explicit-extension pattern locates `.vhd` files under the working directory +and excludes files with other extensions. Tested by +`GlobFileCollector_Collect_RelativeVhdPattern_FindsVhdFiles`. + +**Bare-star pattern with VHDL extensions selects `.vhd` and `.vhdl` only**: +Verifies that a `**/*` pattern triggers language-extension inference and +returns both `.vhd` and `.vhdl` files while excluding files with other +extensions (e.g. `.txt`). Tested by +`GlobFileCollector_Collect_BareStarWithVhdlExtensions_FiltersToVhdlOnly`. + +**Absolute pattern finds files outside the working directory**: Verifies that +an absolute path pattern (e.g. `{tempDir}/**/*.vhd`) locates files correctly +regardless of the supplied working directory. Tested by +`GlobFileCollector_Collect_AbsolutePattern_FindsFiles`. + +**Exclusion pattern removes matched files**: Verifies that a `!`-prefixed +pattern removes matching files from the accumulated inclusion result, so that +`["**/*.vhd", "!test/**/*.vhd"]` returns only files outside the `test/` +subtree. Tested by +`GlobFileCollector_Collect_ExclusionPattern_RemovesMatchedFiles`. + +**Non-existent root returns empty without throwing**: Verifies that a pattern +whose root directory does not exist is silently skipped and contributes no +files, with no exception raised. Tested by +`GlobFileCollector_Collect_NonExistentRoot_ReturnsEmptyWithoutThrowing`. + +**Overlapping patterns produce sorted, deduplicated result**: Verifies that +supplying two identical patterns that both match the same files returns each +file exactly once, and that the returned list is in ascending ordinal order. +Tested by +`GlobFileCollector_Collect_OverlappingPatterns_ReturnsSortedDeduplicated`. diff --git a/docs/verification/api-mark-cpp/cpp-emitter.md b/docs/verification/api-mark-cpp/cpp-emitter.md index 1501cb2..026aa00 100644 --- a/docs/verification/api-mark-cpp/cpp-emitter.md +++ b/docs/verification/api-mark-cpp/cpp-emitter.md @@ -43,11 +43,6 @@ This scenario is tested by `CppEmitter_Emit_GradualDisclosureFormat_ProducesMult dispatch to `CppEmitterSingleFile`. This scenario is tested by `CppEmitter_Emit_SingleFileFormat_ProducesSingleApiFile`. -**SanitizeFileName replaces invalid chars in operator names**: Verifies that -`SanitizeFileName("operator*")` produces a string that does not contain `*`, -because asterisk is invalid in Windows file names. -This scenario is tested by `CppEmitter_SanitizeFileName_OperatorName_ReplacesInvalidChars`. - **SanitizeFileName leaves regular names unchanged**: Verifies that `SanitizeFileName("MyClass")` returns `"MyClass"` unchanged when the input contains no invalid file-name characters. diff --git a/docs/verification/api-mark-cpp/cpp-generator.md b/docs/verification/api-mark-cpp/cpp-generator.md index 7341b0b..e8d7bf0 100644 --- a/docs/verification/api-mark-cpp/cpp-generator.md +++ b/docs/verification/api-mark-cpp/cpp-generator.md @@ -464,12 +464,6 @@ by `CppEmitter_Emit_GradualDisclosureFormat_ProducesMultipleFiles`. confirming that the dispatch path routes to the single-file emitter. This scenario is tested by `CppEmitter_Emit_SingleFileFormat_ProducesSingleApiFile`. -**CppEmitter SanitizeFileName replaces invalid characters in operator names**: Verifies that -`CppEmitter.SanitizeFileName` replaces file-system-invalid characters such as `*` when applied to -C++ operator names, confirming that the sanitized name is safe for use as a file-system path -component. This scenario is tested by -`CppEmitter_SanitizeFileName_OperatorName_ReplacesInvalidChars`. - **CppEmitter SanitizeFileName leaves regular names unchanged**: Verifies that `CppEmitter.SanitizeFileName` returns the original name unchanged when it contains no file-system-invalid characters, confirming that the sanitizer does not corrupt well-formed diff --git a/docs/verification/api-mark-dot-net/dot-net-generator.md b/docs/verification/api-mark-dot-net/dot-net-generator.md index fca3798..9e583a4 100644 --- a/docs/verification/api-mark-dot-net/dot-net-generator.md +++ b/docs/verification/api-mark-dot-net/dot-net-generator.md @@ -73,11 +73,10 @@ nullable forms, generic arguments, and common collection types are simplified in C#-friendly display text. This scenario is tested by `ApiMarkDotNet_TypeNames_CommonSignatures_RenderReadably`. -**All members receive dedicated detail pages**: Verifies that every visible member — -regardless of parameters or documentation content — is emitted as a separate file and linked -from its parent type page, making all navigation paths deterministic without requiring callers -to know member content or shape. This scenario is tested by -`DotNetGenerator_AllMembers_GetSeparateFiles`. +**All members receive dedicated detail pages**: Verifies that every visible member +is emitted as a separate file and linked from its parent type page, making all +navigation paths deterministic without requiring callers to know member content or +shape. This scenario is tested by `DotNetGenerator_AllMembers_GetSeparateFiles`. **Markdown generation writes expected files and content**: Verifies that generator output includes expected headings, signatures, and file names for a representative assembly so downstream tools can diff --git a/docs/verification/api-mark-dot-net/type-name-simplifier.md b/docs/verification/api-mark-dot-net/type-name-simplifier.md index ce838db..e1193c1 100644 --- a/docs/verification/api-mark-dot-net/type-name-simplifier.md +++ b/docs/verification/api-mark-dot-net/type-name-simplifier.md @@ -10,9 +10,10 @@ rules do not produce unexpected output. No dependencies are injected; no mocking ### Test Environment -N/A — standard test environment using the .NET test runner is sufficient for TypeNameSimplifier -unit tests. Tests exercise pure string-transformation logic with no file system, network, or process -dependencies. +The compiled fixture assembly (`ApiMark.DotNet.Fixtures.dll`) must be present at +test execution time. Tests are invoked via `dotnet test` in the standard .NET +test environment. No network or process dependencies are required beyond file +access to the fixture DLL. ### Acceptance Criteria diff --git a/docs/verification/api-mark-tool.md b/docs/verification/api-mark-tool.md index 708dd24..f032ac9 100644 --- a/docs/verification/api-mark-tool.md +++ b/docs/verification/api-mark-tool.md @@ -23,11 +23,14 @@ required. - Visibility option values are forwarded to the generator; invalid values are rejected with a non-zero exit code and an actionable error message. - The `apimark dotnet` subcommand generates the expected Markdown tree for a sample assembly. +- The `vhdl` subcommand is verified at the Program unit level; see the *ApiMarkTool Program* section. ## Test Scenarios **cpp subcommand dispatch is verified at the unit level via `ApiMarkTool-Program-SupportCppOptions` tests.** +**vhdl subcommand validation is verified at the Program unit level via `ApiMarkTool-Program` tests.** + **DotNet command generates documentation successfully**: Verifies that invoking `apimark dotnet` with valid assembly, XML documentation, and output arguments produces the expected Markdown tree for a sample assembly, confirming that CLI argument parsing, generator dispatch, and file emission diff --git a/docs/verification/api-mark-tool/cli/context.md b/docs/verification/api-mark-tool/cli/context.md index 52ff1c3..dae1ee9 100644 --- a/docs/verification/api-mark-tool/cli/context.md +++ b/docs/verification/api-mark-tool/cli/context.md @@ -25,6 +25,7 @@ up after itself. No other external files, services, or configuration are require - `--results`/`--result` sets `ResultsFile` to the supplied path. - `--includes` accepts one directory path per flag; repeated flags accumulate paths into `Includes`. - `--api-headers` patterns are accumulated in order; `!`-prefixed exclusion patterns are forwarded verbatim. +- `--source` patterns are accumulated in order; `!`-prefixed exclusion patterns are forwarded verbatim. - C++ named options (`--library-name`, `--library-description`, `--defines`, `--cpp-standard`) set their corresponding properties. - `--clang-path` sets `ClangPath` to the supplied path. @@ -66,8 +67,8 @@ up after itself. No other external files, services, or configuration are require **`Context_Create_WithIncludesOption_SetsIncludes`**: `--includes path/a` → `Includes = ["path/a"]` (one path per flag; no comma splitting). -**`Context_Create_WithRepeatedIncludesFlags_AccumulatesAllPathsInOrder`**: -`--includes path/a --includes path/b` → `Includes = ["path/a", "path/b"]`. +**`Context_Create_WithRepeatedIncludes_AccumulatesAllPaths`**: +`--includes /usr/include --includes /opt/include` → `Includes = ["/usr/include", "/opt/include"]`. **`Context_Create_WithDepthOption_SetsHeadingDepth`**: `--depth 3` → `HeadingDepth = 3`. @@ -132,3 +133,14 @@ corresponding properties set simultaneously. **`Context_Create_WithClangPathOption_SetsClangPath`**: `--clang-path /usr/bin/clang` → `ClangPath = "/usr/bin/clang"`. + +**`Context_Create_WithSourceOption_SetsSources`**: `--source "src/**/*.vhd"` → +`Sources = ["src/**/*.vhd"]`. + +**`Context_Create_WithRepeatedSource_AccumulatesAllPaths`**: +`--source "src/**/*.vhd" --source "src/**/*.vhdl"` → `Sources = ["src/**/*.vhd", "src/**/*.vhdl"]`. + +**`Context_Create_WithSourceExclusionPattern_ForwardsVerbatim`**: +`--source "src/**/*.vhd" --source "!src/tb/**/*.vhd"` → +`Sources = ["src/**/*.vhd", "!src/tb/**/*.vhd"]` +(the `!` prefix is preserved verbatim so `VhdlGenerator` can apply gitignore semantics). diff --git a/docs/verification/api-mark-tool/program.md b/docs/verification/api-mark-tool/program.md index eed0af5..4aeffa0 100644 --- a/docs/verification/api-mark-tool/program.md +++ b/docs/verification/api-mark-tool/program.md @@ -25,6 +25,7 @@ output directory. No external service, privileged configuration, or network acce - `--help` before and after a subcommand both display usage information and return exit code zero. - `--silent` suppresses console output; `--log ` captures output to a file. - `--validate` runs self-validation tests and returns exit code zero when all pass. +- The `vhdl` subcommand rejects invocations without at least one non-exclusion `--source` pattern. ### Test Scenarios @@ -75,7 +76,16 @@ descriptive error message, confirming that required option validation is enforce language. This scenario is tested by `Program_Main_WithCppSubcommand_MissingIncludes_ReturnsNonZeroExitCode`. -**cpp subcommand with --api-headers flag is accepted**: Verifies that invoking the `cpp` subcommand -with `--includes path/a --api-headers MyApi.h --output out/` exits with code 0, confirming that -the `--api-headers` flag is recognized and forwarded to the generator without error. This scenario -is tested by `Program_Main_CppWithApiHeadersFlag_FlagIsAccepted`. +**cpp subcommand with --api-headers flag is accepted**: Verifies that the `cpp` +subcommand accepts `--api-headers` without raising an unknown-flag error. The test +invokes `cpp --api-headers **/*.h --output out/` without `--includes`, expects a +non-zero exit code due to the missing `--includes` requirement, and confirms the +error message references `--includes` (not an unknown-flag error), proving the flag +was parsed successfully. This scenario is tested by +`Program_Main_CppWithApiHeadersFlag_FlagIsAccepted`. + +**vhdl subcommand without --source returns non-zero exit code**: Verifies that invoking the `vhdl` +subcommand without any `--source` arguments returns a non-zero exit code and a descriptive error +message, confirming that the subcommand enforces the requirement for at least one non-exclusion +source pattern before attempting generation. This scenario is tested by +`Program_Main_WithVhdlSubcommand_MissingSourceFiles_ReturnsNonZeroExitCode`. diff --git a/docs/verification/api-mark-vhdl.md b/docs/verification/api-mark-vhdl.md new file mode 100644 index 0000000..e960112 --- /dev/null +++ b/docs/verification/api-mark-vhdl.md @@ -0,0 +1,78 @@ +# ApiMarkVhdl + +## Verification Approach + +ApiMarkVhdl is verified with unit tests in `test/ApiMark.Vhdl.Tests/` that exercise +the VHDL generation pipeline using a synthetic VHDL fixture file with --! doc comments +located in `test/ApiMark.Vhdl.Tests/Fixtures/`. The ANTLR4 vhdl2008 parser is used +as-is so verification proves the interaction between VHDL parsing, doc comment +extraction, and Markdown emission. Emitter unit tests use in-memory data (no file +I/O) to verify output structure without invoking the parser. Fixture files are +located in the source tree via `[CallerFilePath]` resolution in `FixturePaths`. + +## Test Environment + +Tests require a .NET runtime capable of running the `ApiMark.Vhdl` library. No +additional toolchain dependency is required — the ANTLR4 runtime is a NuGet package. + +## Acceptance Criteria + +- All ApiMarkVhdl tests pass with zero failures. +- The parser correctly extracts entity names, generics, and ports from the fixture file. +- Preceding --! block comments are associated with entity declarations. +- Inline --! trailing comments are associated with port and generic declarations. +- The gradual-disclosure emitter creates an api index page and at least one entity page. +- The single-file emitter creates exactly one file. + +## Test Scenarios + +**Parser returns entity from fixture file**: Verifies that `VhdlAstParser.Parse` returns +a non-empty entities list from the counter fixture file. Tested by +`VhdlAstParser_Parse_FixtureFile_ReturnsEntity`. + +**Entity has generics**: Verifies that the counter entity has at least one generic parsed +correctly. Tested by `VhdlAstParser_Parse_FixtureFile_EntityHasGenerics`. + +**Entity has ports**: Verifies that the counter entity has at least one port parsed +correctly. Tested by `VhdlAstParser_Parse_FixtureFile_EntityHasPorts`. + +**Entity doc comment is parsed**: Verifies that the preceding --! block comment on the +counter entity is extracted and the Summary field is populated. Tested by +`VhdlAstParser_Parse_FixtureFile_EntityDocCommentParsed`. + +**Ports have inline doc comments**: Verifies that at least one port has an inline --! +trailing comment parsed into a VhdlDocComment. Tested by +`VhdlAstParser_Parse_FixtureFile_PortsHaveInlineDocComments`. + +**Constructor null options throws**: Verifies that `VhdlGenerator(null)` throws +`ArgumentNullException`. Tested by +`VhdlGenerator_Constructor_NullOptions_ThrowsArgumentNullException`. + +**Generator creates api entrypoint**: Verifies that the full pipeline produces an +`api.md` file. Tested by `VhdlGenerator_Generate_FixtureFile_CreatesApiEntrypoint`. + +**Generator creates entity page**: Verifies that the full pipeline produces an entity +detail page. Tested by `VhdlGenerator_Generate_FixtureFile_CreatesEntityPage`. + +**Emitter null factory throws**: Verifies that `VhdlEmitter.Emit(null!, ...)` throws +`ArgumentNullException`. Tested by `VhdlEmitter_Emit_NullFactory_ThrowsArgumentNullException`. + +**Gradual emitter creates api index page**: Verifies that the gradual disclosure emitter +creates the api index page. Tested by +`VhdlEmitterGradualDisclosure_Emit_MinimalData_CreatesApiIndexPage`. + +**Gradual emitter creates entity page**: Verifies that the gradual disclosure emitter +creates an entity detail page. Tested by +`VhdlEmitterGradualDisclosure_Emit_MinimalData_CreatesEntityPage`. + +**Gradual emitter api index contains library heading**: Verifies that the api index page +heading contains the library name. Tested by +`VhdlEmitterGradualDisclosure_Emit_MinimalData_ApiIndexContainsLibraryNameHeading`. + +**Single-file emitter creates exactly one writer**: Verifies that the single-file emitter +creates exactly one Markdown file. Tested by +`VhdlEmitterSingleFile_Emit_MinimalData_CreatesExactlyOneWriter`. + +**Single-file emitter creates api file only**: Verifies that the single-file emitter +creates only the api.md file. Tested by +`VhdlEmitterSingleFile_Emit_MinimalData_CreatesApiFileOnly`. diff --git a/docs/verification/api-mark-vhdl/vhdl-ast-model.md b/docs/verification/api-mark-vhdl/vhdl-ast-model.md new file mode 100644 index 0000000..bec1b84 --- /dev/null +++ b/docs/verification/api-mark-vhdl/vhdl-ast-model.md @@ -0,0 +1,26 @@ +## VhdlAstModel + +### Verification Approach + +`VhdlAstModel` records are verified implicitly through `VhdlAstParser` and emitter tests +that construct and consume these records. No dedicated unit tests target the model records +directly because they are plain data types with no behavioral logic of their own. + +### Test Environment + +Standard .NET test runner (`dotnet test`). No external tools, services, or privileged +configuration are required. + +### Acceptance Criteria + +- All record fields populated by `VhdlAstParser` are readable and correctly typed, as + demonstrated indirectly by the parser and emitter tests that assert on those fields. +- No `ArgumentNullException` or invalid-cast exception is raised when model records are + constructed and accessed by the surrounding pipeline. + +### Test Scenarios + +N/A - `VhdlAstModel` is validated indirectly by all tests that exercise `VhdlAstParser` +and the VHDL emitters, since those tests construct and assert on record fields. The five +`VhdlAstParser_Parse_FixtureFile_*` tests and all `VhdlEmitter*` tests serve as the +implicit verification evidence for this unit. diff --git a/docs/verification/api-mark-vhdl/vhdl-ast-parser.md b/docs/verification/api-mark-vhdl/vhdl-ast-parser.md new file mode 100644 index 0000000..69c130a --- /dev/null +++ b/docs/verification/api-mark-vhdl/vhdl-ast-parser.md @@ -0,0 +1,112 @@ +## VhdlAstParser + +### Verification Approach + +`VhdlAstParser` is verified with unit tests in `test/ApiMark.Vhdl.Tests/VhdlAstParserTests.cs` +that parse three fixture files (`counter.vhd`, `mux.vhd`, `common_types.vhd`) and assert on +the resulting `VhdlFileModel`. The ANTLR4 vhdl2008 grammar is exercised as a real dependency; +no mocking or stubbing is applied at the parser level. + +### Test Environment + +Standard .NET test runner (`dotnet test`). No external tools, services, or privileged +configuration are required. + +### Acceptance Criteria + +- `VhdlAstParser.Parse` returns a non-empty entities list from the counter fixture file. +- The counter entity has at least one generic declared and parsed correctly. +- The counter entity has at least one port declared and parsed correctly. +- The preceding `--!` block comment on the counter entity is extracted and the Summary field + is populated. +- At least one port has an inline `--!` trailing comment parsed into a `VhdlDocComment`. +- A file with two architecture bodies returns two `VhdlArchitectureDecl` records. +- A package declaration returns a `VhdlPackageDecl` with populated Types, Constants, + Components, and Subprograms collections. + +### Test Scenarios + +**Parser returns entity from fixture file**: Verifies that `VhdlAstParser.Parse` applied to +the `counter.vhd` fixture returns a `VhdlFileModel` with a non-empty entities list. +This scenario is tested by `VhdlAstParser_Parse_FixtureFile_ReturnsEntity`. + +**Entity has generics**: Verifies that the counter entity in the parsed model has at least +one generic, confirming that generic declarations are extracted from the ANTLR4 parse tree. +This scenario is tested by `VhdlAstParser_Parse_FixtureFile_EntityHasGenerics`. + +**Entity has ports**: Verifies that the counter entity in the parsed model has at least one +port, confirming that port declarations are extracted from the ANTLR4 parse tree. +This scenario is tested by `VhdlAstParser_Parse_FixtureFile_EntityHasPorts`. + +**Entity doc comment is parsed**: Verifies that the preceding `--!` block comment on the +counter entity is extracted and associated with the entity's Summary field in the model. +This scenario is tested by `VhdlAstParser_Parse_FixtureFile_EntityDocCommentParsed`. + +**Ports have inline doc comments**: Verifies that at least one port has an inline `--!` +trailing comment that is parsed into a `VhdlDocComment` and associated with the port. +This scenario is tested by `VhdlAstParser_Parse_FixtureFile_PortsHaveInlineDocComments`. + +**Multiple architectures parsed**: Verifies that parsing `mux.vhd`, which contains two +architecture bodies, returns a `VhdlFileModel` with exactly two `VhdlArchitectureDecl` +records. +This scenario is tested by `VhdlAstParser_Parse_MuxFixture_ParsesTwoArchitectures`. + +**Architecture links to entity**: Verifies that parsing `mux.vhd` also returns a mux entity +declaration, confirming that entity and architecture bodies in the same file are both +captured. +This scenario is tested by `VhdlAstParser_Parse_MuxFixture_HasMuxEntity`. + +**Package is returned**: Verifies that `VhdlAstParser.Parse` applied to `common_types.vhd` +returns a `VhdlFileModel` with at least one package declaration. +This scenario is tested by `VhdlAstParser_Parse_CommonTypesFixture_ReturnsPackage`. + +**Package has type declarations**: Verifies that the parsed package contains exactly two +type declarations, confirming that `full_type_declaration` items are extracted. +This scenario is tested by `VhdlAstParser_Parse_CommonTypesFixture_PackageHasTwoTypes`. + +**Package has constant declarations**: Verifies that the parsed package contains exactly two +constant declarations. +This scenario is tested by `VhdlAstParser_Parse_CommonTypesFixture_PackageHasTwoConstants`. + +**Constants have doc comments**: Verifies that at least one constant has a preceding `--!` +doc comment extracted into its `Doc` field. +This scenario is tested by `VhdlAstParser_Parse_CommonTypesFixture_ConstantsHaveDocComments`. + +**Package has component declaration**: Verifies that the parsed package contains exactly one +component declaration. +This scenario is tested by `VhdlAstParser_Parse_CommonTypesFixture_PackageHasOneComponent`. + +**Package has two subprograms**: Verifies that the parsed package contains exactly two +subprogram declarations. +This scenario is tested by `VhdlAstParser_Parse_CommonTypesFixture_PackageHasTwoSubprograms`. + +**Function identified by kind**: Verifies that the `to_natural` subprogram has +`VhdlSubprogramKind.Function` as its kind. +This scenario is tested by `VhdlAstParser_Parse_CommonTypesFixture_ToNaturalIsFunction`. + +**Procedure identified by kind**: Verifies that the `clear_vector` subprogram has +`VhdlSubprogramKind.Procedure` as its kind. +This scenario is tested by `VhdlAstParser_Parse_CommonTypesFixture_ClearVectorIsProcedure`. + +**Function has one parameter**: Verifies that `to_natural` has exactly one formal parameter. +This scenario is tested by `VhdlAstParser_Parse_CommonTypesFixture_ToNaturalHasOneParameter`. + +**Function return type extracted**: Verifies that `to_natural` has `ReturnType` equal to +`"NATURAL"`. +This scenario is tested by `VhdlAstParser_Parse_CommonTypesFixture_ToNaturalHasReturnTypeNatural`. + +**Procedure has one parameter**: Verifies that `clear_vector` has exactly one formal +parameter. +This scenario is tested by `VhdlAstParser_Parse_CommonTypesFixture_ClearVectorHasOneParameter`. + +**Procedure return type is null**: Verifies that `clear_vector` has a null `ReturnType`, +confirming that procedures do not carry a return type. +This scenario is tested by `VhdlAstParser_Parse_CommonTypesFixture_ClearVectorHasNullReturnType`. + +**Doc @param entry extracted**: Verifies that the doc comment on `to_natural` contains a +`VhdlParamDoc` entry matching the `@param` tag in the source. +This scenario is tested by `VhdlAstParser_Parse_CommonTypesFixture_ToNaturalDocHasParamEntry`. + +**Doc @return entry extracted**: Verifies that the doc comment on `to_natural` has a +non-null `Returns` field matching the `@return` tag in the source. +This scenario is tested by `VhdlAstParser_Parse_CommonTypesFixture_ToNaturalDocHasReturnEntry`. diff --git a/docs/verification/api-mark-vhdl/vhdl-emitter-gradual-disclosure.md b/docs/verification/api-mark-vhdl/vhdl-emitter-gradual-disclosure.md new file mode 100644 index 0000000..999ec85 --- /dev/null +++ b/docs/verification/api-mark-vhdl/vhdl-emitter-gradual-disclosure.md @@ -0,0 +1,39 @@ +## VhdlEmitterGradualDisclosure + +### Verification Approach + +`VhdlEmitterGradualDisclosure` is verified with unit tests in +`test/ApiMark.Vhdl.Tests/VhdlEmitterGradualDisclosureTests.cs` using in-memory test doubles. +A minimal `VhdlFileModel` is constructed directly without invoking the parser, and an +`InMemoryMarkdownWriterFactory` captures emitted output. Tests confirm that the correct files +are created and that the api index page contains expected content. + +### Test Environment + +Standard .NET test runner (`dotnet test`). No external tools, services, or privileged +configuration are required. + +### Acceptance Criteria + +- `VhdlEmitterGradualDisclosure.Emit` produces an api index page in the writer factory output. +- `VhdlEmitterGradualDisclosure.Emit` produces at least one entity detail page in addition to + the api index page. +- The api index page content includes the library name as a heading. + +### Test Scenarios + +**Creates api index page**: Verifies that emitting minimal VHDL model data results in an api +index page being created by the writer factory. +This scenario is tested by +`VhdlEmitterGradualDisclosure_Emit_MinimalData_CreatesApiIndexPage`. + +**Creates entity page**: Verifies that emitting minimal VHDL model data results in at least +one entity detail page being created by the writer factory, confirming per-entity emission. +This scenario is tested by +`VhdlEmitterGradualDisclosure_Emit_MinimalData_CreatesEntityPage`. + +**Api index contains library name heading**: Verifies that the api index page produced by the +emitter contains the library name as a heading, confirming that library metadata is rendered +correctly. +This scenario is tested by +`VhdlEmitterGradualDisclosure_Emit_MinimalData_ApiIndexContainsLibraryNameHeading`. diff --git a/docs/verification/api-mark-vhdl/vhdl-emitter-single-file.md b/docs/verification/api-mark-vhdl/vhdl-emitter-single-file.md new file mode 100644 index 0000000..4aa4c21 --- /dev/null +++ b/docs/verification/api-mark-vhdl/vhdl-emitter-single-file.md @@ -0,0 +1,31 @@ +## VhdlEmitterSingleFile + +### Verification Approach + +`VhdlEmitterSingleFile` is verified with unit tests in +`test/ApiMark.Vhdl.Tests/VhdlEmitterSingleFileTests.cs` using in-memory test doubles. +A minimal `VhdlFileModel` is constructed directly without invoking the parser, and an +`InMemoryMarkdownWriterFactory` captures emitted output. Tests confirm that output is +consolidated into a single file and that the file is keyed correctly. + +### Test Environment + +Standard .NET test runner (`dotnet test`). No external tools, services, or privileged +configuration are required. + +### Acceptance Criteria + +- `VhdlEmitterSingleFile.Emit` creates exactly one writer in the writer factory output, + confirming that all content is consolidated into a single Markdown file. +- The single output file is keyed as `"api"`, confirming it is the expected api file. + +### Test Scenarios + +**Creates exactly one writer**: Verifies that emitting minimal VHDL model data results in +exactly one writer being created by the factory, confirming that the single-file emitter does +not produce per-entity files. +This scenario is tested by `VhdlEmitterSingleFile_Emit_MinimalData_CreatesExactlyOneWriter`. + +**Creates api file only**: Verifies that the single writer created is keyed as `"api"`, +confirming that the output file name matches the expected api entrypoint. +This scenario is tested by `VhdlEmitterSingleFile_Emit_MinimalData_CreatesApiFileOnly`. diff --git a/docs/verification/api-mark-vhdl/vhdl-emitter.md b/docs/verification/api-mark-vhdl/vhdl-emitter.md new file mode 100644 index 0000000..98e6194 --- /dev/null +++ b/docs/verification/api-mark-vhdl/vhdl-emitter.md @@ -0,0 +1,25 @@ +## VhdlEmitter + +### Verification Approach + +`VhdlEmitter` is verified with unit tests in `test/ApiMark.Vhdl.Tests/VhdlEmitterTests.cs`. +The test confirms that the emitter validates its arguments before delegating to the format-specific +implementation, and that passing a null factory produces a clear exception rather than a +deferred null-reference failure. + +### Test Environment + +Standard .NET test runner (`dotnet test`). No external tools, services, or privileged +configuration are required. + +### Acceptance Criteria + +- `VhdlEmitter.Emit` with a null factory argument throws `ArgumentNullException` immediately, + before any writer or pipeline logic is invoked. + +### Test Scenarios + +**Null factory throws ArgumentNullException**: Verifies that passing `null` as the factory +argument to `VhdlEmitter.Emit` throws `ArgumentNullException`, providing a clear error rather +than a null-reference failure during writer creation. +This scenario is tested by `VhdlEmitter_Emit_NullFactory_ThrowsArgumentNullException`. diff --git a/docs/verification/api-mark-vhdl/vhdl-generator.md b/docs/verification/api-mark-vhdl/vhdl-generator.md new file mode 100644 index 0000000..73e8b5d --- /dev/null +++ b/docs/verification/api-mark-vhdl/vhdl-generator.md @@ -0,0 +1,36 @@ +## VhdlGenerator + +### Verification Approach + +`VhdlGenerator` is verified with unit tests in `test/ApiMark.Vhdl.Tests/VhdlGeneratorTests.cs`. +Tests exercise the full VHDL generation pipeline using the `counter.vhd` fixture file and an +`InMemoryMarkdownWriterFactory` test double that captures emitted output without performing +file-system I/O. + +### Test Environment + +Standard .NET test runner (`dotnet test`). No external tools, services, or privileged +configuration are required. + +### Acceptance Criteria + +- `VhdlGenerator(null)` throws `ArgumentNullException` immediately, before any pipeline + processing begins. +- Running `Generate` against the counter fixture file produces an `api.md` entrypoint file. +- Running `Generate` against the counter fixture file produces at least one entity detail page. + +### Test Scenarios + +**Constructor rejects null options**: Verifies that constructing `VhdlGenerator` with a +`null` options argument throws `ArgumentNullException`, providing a clear error rather than +a deferred null-reference failure. +This scenario is tested by `VhdlGenerator_Constructor_NullOptions_ThrowsArgumentNullException`. + +**Generate fixture file creates api entrypoint**: Verifies that the full pipeline, when run +against the counter fixture file, produces an `api.md` output file via the writer factory. +This scenario is tested by `VhdlGenerator_Generate_FixtureFile_CreatesApiEntrypoint`. + +**Generate fixture file creates entity page**: Verifies that the full pipeline produces at +least one entity detail page in addition to the api index, confirming that per-entity Markdown +is emitted. +This scenario is tested by `VhdlGenerator_Generate_FixtureFile_CreatesEntityPage`. diff --git a/docs/verification/introduction.md b/docs/verification/introduction.md index 9f6ae9a..a5eb98d 100644 --- a/docs/verification/introduction.md +++ b/docs/verification/introduction.md @@ -18,11 +18,18 @@ Local items: - **ApiMarkCore**: system-level verification of the core output-contract interfaces. - **IApiGenerator**: unit verification of the language-generator contract interface. - **IMarkdownWriterFactory**: unit verification of the Markdown writer factory interface. +- **FileMarkdownWriterFactory**: unit verification that the file-backed factory creates + writer instances rooted at the configured output directory and rejects path traversal. - **IMarkdownWriter**: unit verification of the Markdown output interface. +- **FileMarkdownWriter**: unit verification that the file-backed writer produces correct + Markdown syntax for all write operations. - **IContext**: unit verification of the output-channel contract interface. - **PathHelpers**: unit verification of the safe path-combination utility. - **IApiEmitter**: unit verification of the language-emitter contract interface. - **EmitConfig**: unit verification of the emit-configuration value object and output-format enum. +- **GlobFileCollector**: unit verification of glob-based file discovery — inclusion and exclusion + patterns, absolute and relative path support, bare-star extension inference, non-existent root + tolerance, and sorted deduplicated output. - **ApiMarkCpp**: system-level verification of the C++ documentation generation pipeline. - **CppGenerator**: unit verification of header discovery, visibility filtering, Doxygen comment rendering, and Markdown output generation. @@ -52,6 +59,18 @@ Local items: - **XmlDocReader**: unit verification that XML documentation files produced by the C# compiler are parsed and indexed correctly for use during emission. - **TypeNameSimplifier**: unit verification of the seven-rule CLR type-name simplification logic. +- **ApiMarkVhdl**: system-level verification of the VHDL documentation generation pipeline. +- **VhdlGenerator**: unit verification of source-file discovery via glob patterns, `--!` doc-comment + extraction, and Markdown output generation. +- **VhdlAstModel**: unit verification of the data types that represent parsed VHDL entity, + architecture, and package declarations. +- **VhdlAstParser**: unit verification that ANTLR4 vhdl2008 grammar parsing and `--!` doc-comment + extraction produce the expected structured AST. +- **VhdlEmitter**: unit verification of the dispatch logic that routes to the format-specific + VHDL emitter. +- **VhdlEmitterGradualDisclosure**: unit verification of multi-file gradual-disclosure VHDL output + generation across entities, architectures, and packages. +- **VhdlEmitterSingleFile**: unit verification of combined single-file VHDL API reference output. - **ApiMarkMsbuild**: system-level verification of the MSBuild task that spawns the ApiMark.Tool process for documentation generation. - **ApiMarkTask**: unit verification of MSBuild property forwarding and task invocation. @@ -70,6 +89,9 @@ OTS items: and produces AST output that ApiMark can parse correctly. - **DemaConsulting.TestResults**: integration verification that the test-result recording and serialization APIs used by the SelfTest subsystem produce correct TRX and JUnit XML output. +- **Antlr4.Runtime.Standard / ANTLR4 vhdl2008 grammar**: integration verification + that the committed generated parser code correctly parses VHDL-2008 source files, + verified indirectly through the VhdlAstParser test suite. - **cpp-ast-net** (archived): retained for historical reference; see clang verification for the current approach. @@ -85,6 +107,7 @@ Local items have parallel artifacts in: `docs/reqstream/api-mark-core/i-markdown-writer-factory.yaml`, `docs/reqstream/api-mark-core/i-markdown-writer.yaml`, `docs/reqstream/api-mark-core/path-helpers.yaml`, + `docs/reqstream/api-mark-core/glob-file-collector.yaml`, `docs/reqstream/api-mark-cpp.yaml`, `docs/reqstream/api-mark-cpp/cpp-generator.yaml`, `docs/reqstream/api-mark-cpp/cpp-ast-model.yaml`, @@ -102,6 +125,13 @@ Local items have parallel artifacts in: `docs/reqstream/api-mark-dot-net/dot-net-emitter-single-file.yaml`, `docs/reqstream/api-mark-dot-net/type-link-resolver.yaml`, `docs/reqstream/api-mark-dot-net/xml-doc-reader.yaml`, + `docs/reqstream/api-mark-vhdl.yaml`, + `docs/reqstream/api-mark-vhdl/vhdl-generator.yaml`, + `docs/reqstream/api-mark-vhdl/vhdl-ast-model.yaml`, + `docs/reqstream/api-mark-vhdl/vhdl-ast-parser.yaml`, + `docs/reqstream/api-mark-vhdl/vhdl-emitter.yaml`, + `docs/reqstream/api-mark-vhdl/vhdl-emitter-gradual-disclosure.yaml`, + `docs/reqstream/api-mark-vhdl/vhdl-emitter-single-file.yaml`, `docs/reqstream/api-mark-msbuild.yaml`, `docs/reqstream/api-mark-msbuild/api-mark-task.yaml`, `docs/reqstream/api-mark-tool.yaml`, @@ -117,6 +147,7 @@ Local items have parallel artifacts in: `docs/design/api-mark-core/i-markdown-writer-factory.md`, `docs/design/api-mark-core/i-markdown-writer.md`, `docs/design/api-mark-core/path-helpers.md`, + `docs/design/api-mark-core/glob-file-collector.md`, `docs/design/api-mark-cpp.md`, `docs/design/api-mark-cpp/cpp-generator.md`, `docs/design/api-mark-cpp/cpp-ast-model.md`, `docs/design/api-mark-cpp/clang-ast-parser.md`, @@ -132,6 +163,13 @@ Local items have parallel artifacts in: `docs/design/api-mark-dot-net/dot-net-emitter-single-file.md`, `docs/design/api-mark-dot-net/type-link-resolver.md`, `docs/design/api-mark-dot-net/xml-doc-reader.md`, + `docs/design/api-mark-vhdl.md`, + `docs/design/api-mark-vhdl/vhdl-generator.md`, + `docs/design/api-mark-vhdl/vhdl-ast-model.md`, + `docs/design/api-mark-vhdl/vhdl-ast-parser.md`, + `docs/design/api-mark-vhdl/vhdl-emitter.md`, + `docs/design/api-mark-vhdl/vhdl-emitter-gradual-disclosure.md`, + `docs/design/api-mark-vhdl/vhdl-emitter-single-file.md`, `docs/design/api-mark-msbuild.md`, `docs/design/api-mark-msbuild/api-mark-task.md`, `docs/design/api-mark-tool.md`, `docs/design/api-mark-tool/program.md`, @@ -145,6 +183,7 @@ Local items have parallel artifacts in: `docs/verification/api-mark-core/i-markdown-writer-factory.md`, `docs/verification/api-mark-core/i-markdown-writer.md`, `docs/verification/api-mark-core/path-helpers.md`, + `docs/verification/api-mark-core/glob-file-collector.md`, `docs/verification/api-mark-cpp.md`, `docs/verification/api-mark-cpp/cpp-generator.md`, `docs/verification/api-mark-cpp/cpp-ast-model.md`, @@ -162,6 +201,13 @@ Local items have parallel artifacts in: `docs/verification/api-mark-dot-net/dot-net-emitter-single-file.md`, `docs/verification/api-mark-dot-net/type-link-resolver.md`, `docs/verification/api-mark-dot-net/xml-doc-reader.md`, + `docs/verification/api-mark-vhdl.md`, + `docs/verification/api-mark-vhdl/vhdl-generator.md`, + `docs/verification/api-mark-vhdl/vhdl-ast-model.md`, + `docs/verification/api-mark-vhdl/vhdl-ast-parser.md`, + `docs/verification/api-mark-vhdl/vhdl-emitter.md`, + `docs/verification/api-mark-vhdl/vhdl-emitter-gradual-disclosure.md`, + `docs/verification/api-mark-vhdl/vhdl-emitter-single-file.md`, `docs/verification/api-mark-msbuild.md`, `docs/verification/api-mark-msbuild/api-mark-task.md`, `docs/verification/api-mark-tool.md`, `docs/verification/api-mark-tool/program.md`, @@ -169,19 +215,22 @@ Local items have parallel artifacts in: `docs/verification/api-mark-tool/self-test.md`, `docs/verification/api-mark-tool/self-test/validation.md` - Source: `src/ApiMark.Core/`, `src/ApiMark.Cpp/`, `src/ApiMark.DotNet/`, - `src/ApiMark.MSBuild/`, `src/ApiMark.Tool/` + `src/ApiMark.Vhdl/`, `src/ApiMark.MSBuild/`, `src/ApiMark.Tool/` - Tests: `test/ApiMark.Core.Tests/`, `test/ApiMark.Cpp.Fixtures/`, - `test/ApiMark.Cpp.Tests/`, `test/ApiMark.DotNet.Tests/`, `test/ApiMark.MSBuild.Tests/`, - `test/ApiMark.Tool.Tests/` + `test/ApiMark.Cpp.Tests/`, `test/ApiMark.DotNet.Tests/`, `test/ApiMark.Vhdl.Tests/`, + `test/ApiMark.MSBuild.Tests/`, `test/ApiMark.Tool.Tests/` OTS items have integration and usage artifacts parallel to the system folders: - Requirements: `docs/reqstream/ots/clang.yaml`, `docs/reqstream/ots/mono-cecil.yaml`, - `docs/reqstream/ots/dema-consulting-test-results.yaml`, `docs/reqstream/ots/cpp-ast-net.yaml` + `docs/reqstream/ots/dema-consulting-test-results.yaml`, `docs/reqstream/ots/antlr4.yaml`, + `docs/reqstream/ots/cpp-ast-net.yaml` - Design: `docs/design/ots/clang.md`, `docs/design/ots/mono-cecil.md`, - `docs/design/ots/dema-consulting-test-results.md`, `docs/design/ots/cpp-ast-net.md` + `docs/design/ots/dema-consulting-test-results.md`, `docs/design/ots/antlr4.md`, + `docs/design/ots/cpp-ast-net.md` - Verification: `docs/verification/ots/clang.md`, `docs/verification/ots/mono-cecil.md`, - `docs/verification/ots/dema-consulting-test-results.md`, `docs/verification/ots/cpp-ast-net.md` + `docs/verification/ots/dema-consulting-test-results.md`, `docs/verification/ots/antlr4.md`, + `docs/verification/ots/cpp-ast-net.md` Review-sets are defined in `.reviewmark.yaml`. diff --git a/docs/verification/ots.md b/docs/verification/ots.md index 4f4267d..cdec872 100644 --- a/docs/verification/ots.md +++ b/docs/verification/ots.md @@ -5,9 +5,12 @@ ApiMark verifies OTS software items by testing the exact externally supplied behavior that the repository depends on rather than attempting to re-validate the full third-party product. For the current scope, Mono.Cecil is exercised through ApiMark.DotNet integration tests that open fixture -assemblies, enumerate metadata, and feed that metadata into Markdown generation. This local evidence -is preferred because ApiMark depends on a specific subset of Mono.Cecil features that must remain -stable across package upgrades. +assemblies, enumerate metadata, and feed that metadata into Markdown generation. +`Microsoft.Extensions.FileSystemGlobbing` is exercised through `GlobFileCollector` unit tests +that match patterns against real temporary directories. The ANTLR4 runtime +(`Antlr4.Runtime.Standard`) is exercised indirectly by every `VhdlAstParser` test. +Local evidence is preferred because ApiMark depends on a specific subset of each OTS library's +features that must remain stable across package upgrades. ## Qualification Evidence @@ -43,3 +46,18 @@ Whenever the minimum supported clang version changes, the repository re-runs all integration tests against the same fixture headers used for baseline qualification. Any change in discovered types, rendered signatures, doc comment availability, or generated file layout is treated as a regression candidate and must be reviewed before the version change is accepted. + +## ANTLR4 + +The ANTLR4 runtime (`Antlr4.Runtime.Standard`) is verified indirectly through `VhdlAstParser` unit +tests in `test/ApiMark.Vhdl.Tests/`. Because ANTLR4 was used once to generate committed C# source +files, there is no ongoing tool dependency to verify. The runtime is exercised by every test that +invokes the parser. See `docs/verification/ots/antlr4.md` for detailed test scenarios. + +## Microsoft.Extensions.FileSystemGlobbing + +`Microsoft.Extensions.FileSystemGlobbing` is verified through `GlobFileCollector` unit tests in +`test/ApiMark.Core.Tests/GlobFileCollectorTests.cs`. These tests operate against real temporary +directories and confirm that the `Matcher` API correctly handles include patterns, exclude patterns, +and non-existent roots. See `docs/verification/ots/file-system-globbing.md` for detailed test +scenarios. diff --git a/docs/verification/ots/antlr4.md b/docs/verification/ots/antlr4.md new file mode 100644 index 0000000..74ae6d7 --- /dev/null +++ b/docs/verification/ots/antlr4.md @@ -0,0 +1,35 @@ +## ANTLR4 + +### Verification Approach + +ANTLR4 is verified in ApiMark indirectly through the `VhdlAstParser` unit tests +in `test/ApiMark.Vhdl.Tests/`. Because ANTLR4 was used once to generate +committed C# source files, there is no ongoing tool dependency to verify. The +`Antlr4.Runtime.Standard` runtime library is exercised by every test that +invokes the parser. + +Any defect in the generated parser code — whether introduced at generation time +or by a manual edit — would cause one or more of the VhdlAstParser tests to +fail, making the test suite the effective acceptance gate for the generated +output. + +### Test Scenarios + +**Entity declarations are parsed from VHDL-2008 source**: Verifies that the +generated lexer and parser can process a representative VHDL-2008 fixture file +and produce at least one entity declaration in the resulting model. This +scenario is tested by `VhdlAstParser_Parse_FixtureFile_ReturnsEntity`. + +**Generic and port declarations are extracted correctly**: Verifies that the +parser correctly identifies generic parameters and port declarations within an +entity, confirming that the grammar's structural rules are correctly represented +in the generated code. This scenario is tested by +`VhdlAstParser_Parse_FixtureFile_EntityHasGenerics` and +`VhdlAstParser_Parse_FixtureFile_EntityHasPorts`. + +**Token positions support doc-comment extraction**: Verifies that the token +stream produced by the generated lexer contains the line-number information +needed for `VhdlAstParser` to associate `--!` doc comments with the correct +declarations. This scenario is tested by +`VhdlAstParser_Parse_FixtureFile_EntityDocCommentParsed` and +`VhdlAstParser_Parse_FixtureFile_PortsHaveInlineDocComments`. diff --git a/docs/verification/ots/dema-consulting-test-results.md b/docs/verification/ots/dema-consulting-test-results.md index 8aec309..d4ee640 100644 --- a/docs/verification/ots/dema-consulting-test-results.md +++ b/docs/verification/ots/dema-consulting-test-results.md @@ -12,22 +12,17 @@ the expected file content and outcome counts. ### Test Scenarios -**Version-display test records a Passed outcome**: Verifies that when the `--version` child -invocation succeeds and returns a semantic version string, `Validation.Run` creates a `TestResult` -with `Outcome = TestOutcome.Passed` and adds it to the `TestResults` collection. This scenario is -tested by `Validation_Run_VersionDisplayPasses_WritesPassedResult`. - -**Help-display test records a Passed outcome**: Verifies that when the `--help` child invocation -succeeds and returns text containing "Usage:" and "Options:", `Validation.Run` creates a -`TestResult` with `Outcome = TestOutcome.Passed` and adds it to the `TestResults` collection. -This scenario is tested by `Validation_Run_HelpDisplayPasses_WritesPassedResult`. +**Version and help self-tests record Passed outcomes**: Verifies that when the `--version` +and `--help` child invocations succeed, `Validation.Run` creates `TestResult` entries with +`Outcome = TestOutcome.Passed` and adds them to the `TestResults` collection. This scenario +is tested by `Validation_Run_WritesVersionAndHelpTestResults`. **Results collection serializes to TRX when requested**: Verifies that when `context.ResultsFile` has a `.trx` extension, `WriteResultsFile` calls `TrxSerializer.Serialize` and writes the result to the specified path. This scenario is tested by -`Validation_Run_WithResultsFileTrx_WritesResultsFile`. +`Validation_Run_WithResultsTrxFile_CreatesTrxFile`. **Results collection serializes to JUnit XML when requested**: Verifies that when `context.ResultsFile` has a `.xml` extension, `WriteResultsFile` calls `JUnitSerializer.Serialize` and writes the result to the specified path. This scenario is tested by -`Validation_Run_WithResultsFileXml_WritesResultsFile`. +`Validation_Run_WithResultsXmlFile_CreatesXmlFile`. diff --git a/docs/verification/ots/file-system-globbing.md b/docs/verification/ots/file-system-globbing.md new file mode 100644 index 0000000..f65caeb --- /dev/null +++ b/docs/verification/ots/file-system-globbing.md @@ -0,0 +1,33 @@ +## Microsoft.Extensions.FileSystemGlobbing + +### Verification Approach + +`Microsoft.Extensions.FileSystemGlobbing` is verified in ApiMark through unit tests in +`test/ApiMark.Core.Tests/GlobFileCollectorTests.cs` that exercise `GlobFileCollector`, +the sole consumer of the library. The tests operate against temporary real directories +on disk, confirming that the `Matcher` API behaves as expected for the subset of +features ApiMark uses: include patterns, exclude patterns, and non-existent roots. + +### Test Scenarios + +**Relative glob pattern matches VHDL files**: Verifies that a relative `*.vhd` pattern +resolved against a working directory returns only the `.vhd` files present in that +directory. This scenario is tested by +`GlobFileCollector_Collect_RelativeVhdPattern_FindsVhdFiles`. + +**Absolute glob pattern matches files**: Verifies that an absolute glob pattern whose +root is derived from the longest non-glob prefix finds the expected files without +requiring a separate working directory. This scenario is tested by +`GlobFileCollector_Collect_AbsolutePattern_FindsFiles`. + +**Exclusion pattern removes matched files**: Verifies that a `!`-prefixed exclusion +pattern correctly removes files that would otherwise be matched by a preceding include +pattern. `GlobFileCollector` runs `GetResultsInFullPath` for the exclusion pattern and +calls `collected.Remove()` for each result, ensuring that excluded files never appear +in the output. This scenario is tested by +`GlobFileCollector_Collect_ExclusionPattern_RemovesMatchedFiles`. + +**Non-existent root returns empty without throwing**: Verifies that a pattern whose +root directory does not exist produces an empty result rather than throwing an +exception. This scenario is tested by +`GlobFileCollector_Collect_NonExistentRoot_ReturnsEmptyWithoutThrowing`. diff --git a/requirements.yaml b/requirements.yaml index 862e7c1..2c17b6c 100644 --- a/requirements.yaml +++ b/requirements.yaml @@ -9,6 +9,7 @@ includes: - docs/reqstream/api-mark-core/i-markdown-writer-factory.yaml - docs/reqstream/api-mark-core/i-markdown-writer.yaml - docs/reqstream/api-mark-core/path-helpers.yaml + - docs/reqstream/api-mark-core/glob-file-collector.yaml - docs/reqstream/api-mark-dot-net.yaml - docs/reqstream/api-mark-dot-net/dot-net-generator.yaml - docs/reqstream/api-mark-dot-net/type-name-simplifier.yaml @@ -35,6 +36,15 @@ includes: - docs/reqstream/api-mark-cpp/cpp-emitter-gradual-disclosure.yaml - docs/reqstream/api-mark-cpp/cpp-emitter-single-file.yaml - docs/reqstream/api-mark-cpp/cpp-type-link-resolver.yaml + - docs/reqstream/api-mark-vhdl.yaml + - docs/reqstream/api-mark-vhdl/vhdl-generator.yaml + - docs/reqstream/api-mark-vhdl/vhdl-ast-model.yaml + - docs/reqstream/api-mark-vhdl/vhdl-ast-parser.yaml + - docs/reqstream/api-mark-vhdl/vhdl-emitter.yaml + - docs/reqstream/api-mark-vhdl/vhdl-emitter-gradual-disclosure.yaml + - docs/reqstream/api-mark-vhdl/vhdl-emitter-single-file.yaml - docs/reqstream/ots/clang.yaml + - docs/reqstream/ots/antlr4.yaml - docs/reqstream/ots/cpp-ast-net.yaml - docs/reqstream/ots/dema-consulting-test-results.yaml + - docs/reqstream/ots/file-system-globbing.yaml diff --git a/src/ApiMark.Core/ApiMark.Core.csproj b/src/ApiMark.Core/ApiMark.Core.csproj index 7600d7e..d2b2785 100644 --- a/src/ApiMark.Core/ApiMark.Core.csproj +++ b/src/ApiMark.Core/ApiMark.Core.csproj @@ -14,6 +14,9 @@ + + + all diff --git a/src/ApiMark.Core/GlobFileCollector.cs b/src/ApiMark.Core/GlobFileCollector.cs new file mode 100644 index 0000000..68f8085 --- /dev/null +++ b/src/ApiMark.Core/GlobFileCollector.cs @@ -0,0 +1,243 @@ +// cspell:ignore Metacharacters metacharacter metacharacters +using Microsoft.Extensions.FileSystemGlobbing; + +namespace ApiMark.Core; + +/// Collects files from the filesystem using gitignore-style glob patterns. +/// +/// Supports absolute and relative patterns, exclusions via ! prefixes, and +/// automatic extension filtering when a pattern's final segment is a bare *. +/// This utility is shared across all ApiMark language generators that require +/// flexible, filesystem-based file discovery. All members are stateless and thread-safe. +/// +public static class GlobFileCollector +{ + private static readonly char[] GlobMetacharacters = ['*', '?', '[', '{']; + + /// + /// Collects files from the filesystem matching the specified glob patterns, + /// filtered to files with extensions in . + /// + /// + /// + /// Each pattern is evaluated directly against the filesystem. Patterns prefixed + /// with ! are exclusion patterns — they remove matching files from the + /// accumulated result set. All other patterns are inclusion patterns that add + /// matching files to the result set. Patterns are processed in order: inclusions + /// build the set, then exclusions subtract from it. + /// + /// + /// Relative patterns are resolved against . + /// Absolute patterns determine their own filesystem root from the longest + /// non-glob path prefix; the remainder becomes the glob tail passed to + /// . + /// + /// + /// When the final path segment of the glob tail is exactly * (a bare + /// wildcard with no extension), results are filtered to files whose extension + /// (case-insensitive) appears in . When the + /// final segment specifies an explicit extension (e.g. *.vhd, + /// **/*.h), all results are taken as-is without additional filtering. + /// + /// + /// Non-existent pattern roots are silently skipped and contribute no files. + /// The method never throws for missing directories. + /// + /// + /// + /// Ordered list of glob patterns. Entries prefixed with ! are exclusion patterns. + /// Relative patterns are resolved against . + /// + /// + /// File extensions — including the leading dot (e.g. .vhd, .h) — used + /// to filter results when a pattern's final segment is a bare *. + /// + /// + /// Absolute path used as the root for relative patterns. Must be an absolute path. + /// + /// + /// Sorted, deduplicated list of absolute file paths that match the accumulated + /// inclusion patterns and are not removed by any exclusion pattern. + /// + public static IReadOnlyList Collect( + IEnumerable patterns, + IEnumerable languageExtensions, + string workingDirectory) + { + var extensions = new HashSet(languageExtensions, StringComparer.OrdinalIgnoreCase); + var collected = new HashSet(StringComparer.OrdinalIgnoreCase); + + foreach (var pattern in patterns) + { + // Parse the exclusion prefix and trim the pattern body + var isExclusion = pattern.StartsWith('!'); + var patternBody = isExclusion ? pattern.Substring(1).Trim() : pattern.Trim(); + + if (patternBody.Length == 0) + { + continue; + } + + // Determine the filesystem root and the glob tail for this pattern + var (root, globTail) = ParsePattern(patternBody, workingDirectory); + + if (globTail.Length == 0 || !Directory.Exists(root)) + { + // No glob portion, or the root directory does not exist — skip silently + continue; + } + + // Determine whether extension inference is needed (bare-star final segment) + var needsExtensionFilter = HasBareStarFinalSegment(globTail); + + // Run the glob matcher against the resolved filesystem root + var matcher = new Matcher(StringComparison.OrdinalIgnoreCase); + matcher.AddInclude(globTail.Replace('\\', '/')); + var results = matcher.GetResultsInFullPath(root); + + // Apply language-extension filter when the final segment is a bare wildcard + if (needsExtensionFilter) + { + results = results.Where(f => extensions.Contains(Path.GetExtension(f))); + } + + // Accumulate: include patterns add files; exclusion patterns remove them + AccumulateResults(collected, results, isExclusion); + } + + return collected.OrderBy(f => f, StringComparer.Ordinal).ToList(); + } + + /// + /// Adds or removes the fully-qualified paths from in + /// depending on whether the originating pattern was + /// an exclusion. + /// + /// The mutable set of collected file paths to update in-place. + /// Glob result paths to incorporate or remove. + /// + /// When , each matching file is removed from + /// ; when , it is added. + /// + private static void AccumulateResults(HashSet collected, IEnumerable results, bool isExclusion) + { + if (isExclusion) + { + foreach (var file in results) + { + collected.Remove(Path.GetFullPath(file)); + } + } + else + { + foreach (var file in results) + { + collected.Add(Path.GetFullPath(file)); + } + } + } + + /// + /// Returns when the final path segment of the glob tail + /// is exactly *, indicating that language-extension filtering should apply. + /// + /// + /// The final segment is determined by splitting the glob tail on both forward and + /// backward slashes. A segment of ** or *.ext does not trigger + /// extension inference; only the bare single-star * does. + /// + /// The glob tail string to inspect (may use any directory separator). + /// when the final path segment is exactly *. + private static bool HasBareStarFinalSegment(string globTail) + { + // Split on both separators to find the final path segment + var lastSeparator = globTail.LastIndexOfAny(['/', '\\']); + var lastSegment = lastSeparator >= 0 + ? globTail.Substring(lastSeparator + 1) + : globTail; + return lastSegment == "*"; + } + + /// + /// Splits a pattern body into a filesystem root and a glob tail to pass to + /// . + /// + /// + /// For absolute patterns the root is the longest non-glob path prefix — segments + /// are included until the first one containing a glob metacharacter (*, + /// ?, [, {). The remainder from the last directory separator + /// before the first glob metacharacter to the end is the glob tail. + /// For relative patterns the root is and the + /// entire pattern body is the glob tail. + /// + /// The pattern with any leading ! prefix already stripped. + /// Absolute path used as the root for relative patterns. + /// + /// A tuple of (root, globTail) where root is an absolute filesystem path and + /// globTail is the pattern string to pass to . + /// + private static (string Root, string GlobTail) ParsePattern(string patternBody, string workingDirectory) + { + if (Path.IsPathRooted(patternBody)) + { + // Normalize backslashes to forward slashes for uniform metacharacter scanning + return SplitAbsolutePattern(patternBody.Replace('\\', '/')); + } + + // Relative pattern — root is the configured working directory; tail is the full pattern body + return (workingDirectory, patternBody); + } + + /// + /// Splits a normalized (forward-slash) absolute pattern into a static root prefix + /// and a glob tail by locating the first glob metacharacter. + /// + /// + /// The root is everything up to (but not including) the last / before the + /// first glob metacharacter. The tail is everything after that separator. When + /// there is no / before the first glob, the root is empty and the tail is + /// the entire pattern. A leading / at position zero is preserved as the + /// root for Unix absolute paths such as /opt/sdk/include/**/*.h. The + /// trailing slash of a Windows drive root (C:/) is likewise preserved so + /// that C:/*.vhd resolves to the drive root rather than the + /// drive-relative path C:. + /// + /// + /// Absolute pattern with all backslashes replaced by forward slashes. + /// + /// + /// A (root, globTail) tuple where root is the longest static directory prefix and + /// globTail is the portion to pass to . + /// + private static (string Root, string GlobTail) SplitAbsolutePattern(string normalizedPattern) + { + // Find the index of the first glob metacharacter in the pattern + var firstGlob = normalizedPattern.IndexOfAny(GlobMetacharacters); + + if (firstGlob < 0) + { + // No glob metacharacters — the entire pattern is a static path; nothing to glob + return (normalizedPattern, string.Empty); + } + + // Locate the last '/' strictly before the first glob metacharacter + var prefix = normalizedPattern.Substring(0, firstGlob); + var lastSlash = prefix.LastIndexOf('/'); + + if (lastSlash < 0) + { + // No separator precedes the first glob — cannot derive a static root + return (string.Empty, normalizedPattern); + } + + // Preserve the trailing slash when the slash is a filesystem root boundary: + // lastSlash == 0 → Unix absolute root '/' (e.g. "/*.vhd" → root "/") + // lastSlash == 2 && [1] == ':' → Windows drive root 'C:/' (e.g. "C:/*.vhd" → root "C:/") + // Without the slash the result would be "" or "C:" — both are drive-relative, not absolute. + var isRootBoundary = lastSlash == 0 || (lastSlash == 2 && normalizedPattern[1] == ':'); + var root = isRootBoundary ? normalizedPattern.Substring(0, lastSlash + 1) : normalizedPattern.Substring(0, lastSlash); + var tail = normalizedPattern.Substring(lastSlash + 1); + + return (root, tail); + } +} diff --git a/src/ApiMark.Core/IMarkdownWriter.cs b/src/ApiMark.Core/IMarkdownWriter.cs index 9c1814d..1726259 100644 --- a/src/ApiMark.Core/IMarkdownWriter.cs +++ b/src/ApiMark.Core/IMarkdownWriter.cs @@ -16,9 +16,9 @@ public interface IMarkdownWriter : IDisposable /// Writes a Markdown heading at the specified depth. /// /// - /// Heading depth. Valid values are 1–4 (corresponding to # through ####). - /// Callers must pass a value in this range; behavior for out-of-range - /// values is implementation-defined. + /// Heading depth. Valid values are 1–6 (corresponding to # through ######). + /// Callers must pass a value in this range; implementations throw + /// for out-of-range values. /// /// /// Heading text. Must not be null or empty. Inline Markdown within the diff --git a/src/ApiMark.Cpp/ApiMark.Cpp.csproj b/src/ApiMark.Cpp/ApiMark.Cpp.csproj index 328d824..4f9ff2d 100644 --- a/src/ApiMark.Cpp/ApiMark.Cpp.csproj +++ b/src/ApiMark.Cpp/ApiMark.Cpp.csproj @@ -12,9 +12,6 @@ DEMA Consulting DEMA Consulting - - - <_Parameter1>ApiMark.Cpp.Tests diff --git a/src/ApiMark.Cpp/CppEmitter.cs b/src/ApiMark.Cpp/CppEmitter.cs index 440608a..9f78150 100644 --- a/src/ApiMark.Cpp/CppEmitter.cs +++ b/src/ApiMark.Cpp/CppEmitter.cs @@ -111,10 +111,15 @@ public void Emit(IMarkdownWriterFactory factory, EmitConfig config, IContext con /// characters that are invalid in file names on Windows or Unix with an underscore. /// /// - /// C++ operator names (e.g. operator*, operator<<) and conversion - /// operators can contain characters such as *, <, >, and - /// : that are forbidden in Windows file names. Replacing them with _ produces - /// a stable, platform-safe file name while retaining human readability for non-operator names. + /// Non-operator C++ declaration names — class names, type aliases, free function names, + /// and field names — may contain characters such as <, >, and : + /// (from template specializations or qualified names) that are forbidden in Windows file + /// names. Operator names (e.g. operator*, operator<<) are + /// never passed to this method — they are partitioned upstream and written to a + /// shared operators.md page, so file-name collisions between operators never arise. + /// Note: is OS-dependent; on Linux it returns + /// only \0 and /, so this method has no effect on most characters on that + /// platform. /// /// The C++ declaration name to sanitize. Must not be null. /// diff --git a/src/ApiMark.Cpp/CppEmitterGradualDisclosure.cs b/src/ApiMark.Cpp/CppEmitterGradualDisclosure.cs index 201f169..94fb950 100644 --- a/src/ApiMark.Cpp/CppEmitterGradualDisclosure.cs +++ b/src/ApiMark.Cpp/CppEmitterGradualDisclosure.cs @@ -716,7 +716,7 @@ private void WriteFreeFunctionContent( // Linkify parameter type cells; resolver tracks external types encountered var paramRows = fn.Parameters.Select(p => - new[] { p.Name, cppResolver.Linkify(CppEmitter.SimplifyTypeName(p.TypeName), currentFolder, externalTypes), CppEmitter.GetParamDescription(fn.Doc, p.Name) ?? string.Empty }); + new[] { p.Name, cppResolver.Linkify(CppEmitter.SimplifyTypeName(p.TypeName), currentFolder, externalTypes), CppEmitter.GetParamDescription(fn.Doc, p.Name) ?? CppEmitter.NoDescriptionPlaceholder }); writer.WriteTable(paramHeaders, paramRows); } diff --git a/src/ApiMark.Cpp/CppEmitterSingleFile.cs b/src/ApiMark.Cpp/CppEmitterSingleFile.cs index c2b9324..25ba427 100644 --- a/src/ApiMark.Cpp/CppEmitterSingleFile.cs +++ b/src/ApiMark.Cpp/CppEmitterSingleFile.cs @@ -362,7 +362,7 @@ private static void WriteSingleFileParametersTable(IMarkdownWriter writer, CppFu var paramHeaders = new[] { "Parameter", "Type", CppEmitter.DescriptionColumnHeader }; var paramRows = fn.Parameters.Select(p => { - var paramSummary = CppEmitter.GetParamDescription(fn.Doc, p.Name) ?? string.Empty; + var paramSummary = CppEmitter.GetParamDescription(fn.Doc, p.Name) ?? CppEmitter.NoDescriptionPlaceholder; return new[] { p.Name, CppEmitter.SimplifyTypeName(p.TypeName), paramSummary }; }); writer.WriteTable(paramHeaders, paramRows); diff --git a/src/ApiMark.Cpp/CppGenerator.cs b/src/ApiMark.Cpp/CppGenerator.cs index e46c2ed..0ed09aa 100644 --- a/src/ApiMark.Cpp/CppGenerator.cs +++ b/src/ApiMark.Cpp/CppGenerator.cs @@ -1,6 +1,5 @@ using ApiMark.Core; using ApiMark.Cpp.CppAst; -using Microsoft.Extensions.FileSystemGlobbing; namespace ApiMark.Cpp; @@ -74,7 +73,8 @@ public CppGenerator(CppGeneratorOptions options) /// messages from clang are emitted here via . /// /// - /// Thrown when a path in does not exist on disk. + /// Thrown when is empty and a + /// path in does not exist on disk. /// /// /// Thrown when clang cannot be located or exits with an error and produces no JSON output. @@ -131,204 +131,111 @@ public IApiEmitter Parse(IContext context) // ========================================================================= /// - /// Enumerates candidate header files under each configured public include root, - /// applying with gitignore-style - /// semantics to determine which headers appear in the generated documentation. + /// Enumerates candidate header files using and returns + /// a sorted, deduplicated list ready for clang processing. /// /// - /// A list of absolute header file paths with recognized C++ header extensions - /// (.h, .hpp, .hxx, .h++) that are selected for - /// documentation by the configured pattern list. + /// A sorted, deduplicated list of absolute header file paths with recognized C++ + /// header extensions (.h, .hpp, .hxx, .h++) selected + /// by the configured pattern list. /// /// /// - /// When is empty, pattern - /// matching is bypassed and all files with recognized C++ header extensions - /// under each root are included. + /// When is empty, each + /// entry is validated to + /// exist and a /**/* pattern is synthesized for it. The bare-star final + /// segment triggers extension inference in , + /// which restricts results to files with recognized C++ header extensions. /// /// - /// Gitignore-style evaluation: for each candidate file, start with - /// included = false and walk the pattern list in order. If a pattern - /// starts with !, strip the prefix and if the file matches set - /// included = false; otherwise if the file matches set - /// included = true. The final value of included determines - /// whether the header is forwarded to clang. This allows include/exclude/re-include - /// sequences that are not possible with separate include and exclude lists. - /// - /// - /// All patterns (both caller-supplied and the per-root defaults) are evaluated - /// relative to the current working directory so that paths like - /// "src/include/**" are unambiguous across multiple --includes - /// roots. Pattern compilation is delegated to ; - /// per-root file enumeration and matching is delegated to . + /// When patterns are provided, absolute patterns are forwarded to + /// unchanged. Relative patterns are expanded + /// against each entry so + /// that callers can write root-agnostic patterns such as **/MyHeader.h + /// and have them resolved under every configured include root. /// /// /// - /// Thrown when a configured public include root does not exist on disk. + /// Thrown when is empty and a + /// configured public include root does not exist on disk. /// private List CollectHeaderFiles() { - var headerExtensions = new HashSet(StringComparer.OrdinalIgnoreCase) - { - ".h", ".hpp", ".hxx", ".h++", - }; + var headerExtensions = new[] { ".h", ".hpp", ".hxx", ".h++" }; + var cwd = Path.GetFullPath(Directory.GetCurrentDirectory()); - var cwdAbsolute = Path.GetFullPath(Directory.GetCurrentDirectory()); - var compiledPatterns = CompileHeaderPatterns(); + List patterns; - var headers = new List(); - foreach (var root in _options.PublicIncludeRoots) + if (_options.ApiHeaderPatterns.Count == 0) { - headers.AddRange(CollectMatchingFiles(root, headerExtensions, compiledPatterns, cwdAbsolute)); - } - - // De-duplicate and sort to produce a stable, deterministic header list. - // Overlapping PublicIncludeRoots can otherwise produce duplicate entries that - // cause declarations to appear multiple times in the generated output. - return headers - .Select(Path.GetFullPath) - .Distinct(CppEmitter.FileSystemPathComparer) - .OrderBy(h => h, StringComparer.Ordinal) - .ToList(); - } - - /// - /// Compiles the configured API header patterns into a list of - /// (isExclusion, compiledMatcher) pairs that can be reused for every file evaluation. - /// - /// - /// Empty exclusion globs (those whose pattern body is whitespace after stripping the - /// leading !) are dropped because they would match nothing and only add overhead. - /// Matchers are precompiled here so the per-file evaluation loop does not construct - /// short-lived objects on every (file × pattern) pair. - /// - /// - /// An ordered list of (IsExclusion, Matcher) pairs in the same order as - /// ; exclusion entries have - /// IsExclusion = true. - /// - private List<(bool IsExclusion, Matcher Matcher)> CompileHeaderPatterns() - { - var compiledPatterns = new List<(bool IsExclusion, Matcher Matcher)>(); - foreach (var pattern in _options.ApiHeaderPatterns) - { - if (pattern.StartsWith('!')) + // Default mode: validate each root exists, then synthesize per-root wildcard patterns. + // The bare-star final segment causes GlobFileCollector to filter by language extensions. + var missingRoot = _options.PublicIncludeRoots.FirstOrDefault(r => !Directory.Exists(r)); + if (missingRoot is not null) { - var exclusionGlob = pattern.Substring(1).Trim(); - if (exclusionGlob.Length > 0) - { - var m = new Matcher(); - m.AddInclude(exclusionGlob); - compiledPatterns.Add((true, m)); - } - } - else - { - var m = new Matcher(); - m.AddInclude(pattern); - compiledPatterns.Add((false, m)); + throw new DirectoryNotFoundException( + $"Public include root not found: '{missingRoot}'"); } + + patterns = _options.PublicIncludeRoots + .Select(r => Path.GetFullPath(r) + "/**/*") + .ToList(); + } + else + { + // Explicit patterns: forward absolute patterns unchanged; expand relative patterns + // against each include root so root-agnostic globs like "**/MyHeader.h" resolve + // correctly under every configured root without requiring callers to know the roots. + patterns = ExpandExplicitPatterns(); } - return compiledPatterns; + return GlobFileCollector.Collect(patterns, headerExtensions, cwd).ToList(); } /// - /// Enumerates all recognized header files under and applies - /// the precompiled pattern list to select files that match at least one include - /// pattern and are not subsequently overridden by an exclusion pattern. + /// Expands the explicit into absolute + /// glob patterns ready for . /// /// - /// When is empty every recognized header file - /// under is included (default behavior). Pattern evaluation - /// uses gitignore semantics: the last matching rule wins, and files start as excluded. - /// Paths are CWD-relative when the file is under the working directory; otherwise - /// root-relative paths are used to support absolute include roots and test environments. + /// Absolute patterns are forwarded unchanged. Relative patterns are resolved against + /// every entry in so that + /// root-agnostic globs such as **/MyHeader.h match under all configured roots + /// without requiring callers to hard-code root paths. Exclusion prefixes (!) + /// are preserved on the expanded output entries. /// - /// The public include root directory to enumerate. - /// The set of recognized header file extensions. - /// Precompiled inclusion and exclusion patterns. - /// The normalized absolute path of the current working directory. /// - /// A list of absolute file paths that passed pattern matching; may be empty when no - /// files under satisfy the configured patterns. + /// An ordered list of absolute-path glob patterns with exclusion prefixes preserved, + /// ready to pass directly to . /// - /// - /// Thrown when does not exist on disk. - /// - private static List CollectMatchingFiles( - string root, - HashSet headerExtensions, - List<(bool IsExclusion, Matcher Matcher)> compiledPatterns, - string cwdAbsolute) + private List ExpandExplicitPatterns() { - if (!Directory.Exists(root)) - { - throw new DirectoryNotFoundException( - $"Public include root not found: '{root}'"); - } - - var rootAbsolute = Path.GetFullPath(root); - - var allFiles = Directory.GetFiles(root, "*", SearchOption.AllDirectories) - .Where(f => headerExtensions.Contains(Path.GetExtension(f))) - .Select(Path.GetFullPath) - .ToList(); - - if (compiledPatterns.Count == 0) - { - return allFiles; - } - - var result = new List(); - foreach (var absoluteFile in allFiles) + var patterns = new List(); + foreach (var pattern in _options.ApiHeaderPatterns) { - var relFromCwd = Path.GetRelativePath(cwdAbsolute, absoluteFile).Replace('\\', '/'); + var isExclusion = pattern.StartsWith('!'); + var body = isExclusion ? pattern.Substring(1).Trim() : pattern.Trim(); - var relPath = IsOutsideCwd(relFromCwd) - ? Path.GetRelativePath(rootAbsolute, absoluteFile).Replace('\\', '/') - : relFromCwd; - - var included = false; - - foreach (var (isExclusion, matcher) in compiledPatterns) + if (Path.IsPathRooted(body)) { - if (matcher.Match(relPath).HasMatches) - { - included = !isExclusion; - } + // Absolute pattern — pass through unchanged + patterns.Add(pattern); } - - if (included) + else { - result.Add(absoluteFile); + // Relative pattern — expand against each include root so callers can write + // root-agnostic patterns without knowing the configured include paths + patterns.AddRange( + _options.PublicIncludeRoots.Select(root => + { + var expanded = Path.Join(Path.GetFullPath(root), body); + return isExclusion ? "!" + expanded : expanded; + })); } } - return result; + return patterns; } - /// - /// Returns when the path returned by - /// indicates the file lies outside the base directory. - /// - /// - /// returns ".." or a "../"-prefixed - /// path when the file is above the base, and returns the original absolute path unchanged - /// when the base and the file are on different drives (Windows). Both cases mean the file - /// is outside the base directory. Checking for the exact two-dot segment avoids - /// misclassifying filenames that legitimately start with two dots (e.g. ..hidden.h). - /// - /// The forward-slash-normalized relative path to test. - /// - /// when indicates the file is - /// outside the base directory. - /// - private static bool IsOutsideCwd(string relativeFromBase) => - relativeFromBase == ".." - || relativeFromBase.StartsWith("../", StringComparison.Ordinal) - || Path.IsPathRooted(relativeFromBase); - // ========================================================================= // Error checking // ========================================================================= diff --git a/src/ApiMark.Cpp/CppGeneratorOptions.cs b/src/ApiMark.Cpp/CppGeneratorOptions.cs index 5f71460..8d5dd28 100644 --- a/src/ApiMark.Cpp/CppGeneratorOptions.cs +++ b/src/ApiMark.Cpp/CppGeneratorOptions.cs @@ -40,20 +40,30 @@ public sealed class CppGeneratorOptions /// /// /// - /// Gitignore-style semantics apply: patterns are evaluated in order; the last - /// matching pattern wins. Entries without a ! prefix are include patterns; - /// entries with a ! prefix are exclusion patterns (the ! is stripped - /// before glob matching). + /// Both absolute and relative glob patterns are supported. Relative patterns are + /// expanded against each entry so that callers + /// can write root-agnostic patterns such as **/MyHeader.h and have them + /// resolved under every configured include root. Absolute patterns determine their + /// own root from the non-glob path prefix, allowing headers outside any include + /// root or on other drives to be included directly. /// /// - /// When this list is empty, all headers under with - /// recognized C++ header extensions (.h, .hpp, .hxx, .h++) - /// are included — equivalent to specifying - /// ["**/*.h", "**/*.hpp", "**/*.hxx", "**/*.h++"]. + /// Patterns whose final segment is a bare * (e.g. include/**/*, + /// C:\sdk\include\**\*) automatically discover recognized C++ header + /// extensions (.h, .hpp, .hxx, .h++). + /// Patterns with an explicit extension (e.g. **/*.hpp) select only files + /// matching that extension. + /// + /// + /// Entries prefixed with ! are exclusion patterns (the ! is stripped + /// before glob matching). Inclusion patterns build the result set; exclusion patterns + /// subtract from it. Example — include all headers except a detail subtree with a + /// re-include: ["**/*", "!**/detail/**/*", "**/detail/public.h"]. /// /// - /// Example — document all headers except a detail/ subtree with re-include: - /// ["**/*", "!**/detail/**", "**/detail/public.h"]. + /// When this list is empty, all headers under with + /// recognized C++ header extensions are included — equivalent to specifying a + /// /**/* pattern for each configured root. /// /// public IList ApiHeaderPatterns { get; set; } = new List(); diff --git a/src/ApiMark.DotNet/DotNetEmitter.cs b/src/ApiMark.DotNet/DotNetEmitter.cs index 5e1c69b..87347cd 100644 --- a/src/ApiMark.DotNet/DotNetEmitter.cs +++ b/src/ApiMark.DotNet/DotNetEmitter.cs @@ -18,7 +18,7 @@ internal sealed class DotNetEmitter : IApiEmitter /// Placeholder emitted in description cells and paragraphs when no XML doc summary is available. internal const string NoDescriptionPlaceholder = "*No description provided.*"; - /// The .NET metadata method name used for all instance and static constructors. + /// The .NET metadata method name used for all instance constructors. internal const string ConstructorMethodName = ".ctor"; /// Gets the pre-parsed assembly data used during emit. @@ -223,10 +223,18 @@ internal bool IsMemberVisible(IMemberDefinition member) MethodDefinition m => m.IsPublic || m.IsFamily || m.IsFamilyOrAssembly, PropertyDefinition p => IsPropertyPublicOrProtected(p), FieldDefinition f => f.IsPublic || f.IsFamily || f.IsFamilyOrAssembly, - EventDefinition e => (e.AddMethod?.IsPublic ?? false) || (e.AddMethod?.IsFamily ?? false) || (e.AddMethod?.IsFamilyOrAssembly ?? false), + EventDefinition e => IsEventAddMethodPublicOrProtected(e), _ => false, }; + /// Returns true when 's add-accessor is public or protected. + /// The event to inspect. + /// true when the add-accessor is public, family, or family-or-assembly accessible. + private static bool IsEventAddMethodPublicOrProtected(EventDefinition e) => + (e.AddMethod?.IsPublic ?? false) || + (e.AddMethod?.IsFamily ?? false) || + (e.AddMethod?.IsFamilyOrAssembly ?? false); + /// Returns true when has a public or protected getter or setter. /// The property to inspect. /// true when at least one accessor is publicly or protected-family accessible. diff --git a/src/ApiMark.DotNet/DotNetEmitterGradualDisclosure.cs b/src/ApiMark.DotNet/DotNetEmitterGradualDisclosure.cs index 4db472a..80d8d88 100644 --- a/src/ApiMark.DotNet/DotNetEmitterGradualDisclosure.cs +++ b/src/ApiMark.DotNet/DotNetEmitterGradualDisclosure.cs @@ -956,7 +956,7 @@ private static void WriteMethodDocumentation( // Linkify parameter types — resolver tracks external types and emits links for intra-assembly types var paramRows = method.Parameters.Select(p => { - var desc = paramDocs.FirstOrDefault(pd => pd.Name == p.Name).Description ?? string.Empty; + var desc = paramDocs.FirstOrDefault(pd => pd.Name == p.Name).Description ?? NoDescriptionPlaceholder; var typeName = ctx.Resolver.Linkify(p.ParameterType, ctx.CurrentFolder, ctx.NamespaceName, ctx.ExternalTypes); return new[] { p.Name, typeName, desc }; }); diff --git a/src/ApiMark.DotNet/DotNetEmitterSingleFile.cs b/src/ApiMark.DotNet/DotNetEmitterSingleFile.cs index 6b46c20..d84ea8e 100644 --- a/src/ApiMark.DotNet/DotNetEmitterSingleFile.cs +++ b/src/ApiMark.DotNet/DotNetEmitterSingleFile.cs @@ -244,7 +244,7 @@ private static void WriteSingleFileMemberSection( var externalTypes = new SortedSet(); var paramRows = method.Parameters.Select(p => { - var desc = paramDocs.FirstOrDefault(pd => pd.Name == p.Name).Description ?? string.Empty; + var desc = paramDocs.FirstOrDefault(pd => pd.Name == p.Name).Description ?? NoDescriptionPlaceholder; var typeName = resolver.Linkify(p.ParameterType, namespaceFolderPath, namespaceName, externalTypes); return new[] { p.Name, typeName, desc }; }); diff --git a/src/ApiMark.MSBuild/ApiMarkTask.cs b/src/ApiMark.MSBuild/ApiMarkTask.cs index b85aec9..ec7718c 100644 --- a/src/ApiMark.MSBuild/ApiMarkTask.cs +++ b/src/ApiMark.MSBuild/ApiMarkTask.cs @@ -22,6 +22,8 @@ public sealed class ApiMarkTask : Task { /// Language identifier for .NET documentation generation. private const string DotNetLanguage = "dotnet"; + /// Language identifier for C++ documentation generation. + private const string CppLanguage = "cpp"; /// /// Gets or sets a value indicating whether documentation generation is suppressed. /// @@ -227,7 +229,8 @@ internal string ResolveLanguage() /// and the current property values. /// /// - /// The resolved language; either "dotnet" or "cpp". Must not be null or empty. + /// The resolved language; "dotnet" or "cpp". Must not be null or empty. + /// Throws for any other value. /// /// /// An ordered list of individual arguments to pass to dotnet ApiMark.Tool.dll, @@ -243,10 +246,14 @@ internal IReadOnlyList BuildArguments(string language) { AppendDotNetArguments(args); } - else + else if (language == CppLanguage) { AppendCppArguments(args); } + else + { + throw new InvalidOperationException($"Unsupported language: '{language}'."); + } AppendCommonArguments(args); @@ -461,7 +468,7 @@ public override bool Execute() } // For C++ projects, skip gracefully when no include paths are configured - if (language == "cpp" && string.IsNullOrWhiteSpace(ApiMarkIncludePaths)) + if (language == CppLanguage && string.IsNullOrWhiteSpace(ApiMarkIncludePaths)) { Log.LogMessage(MessageImportance.Normal, "Skipping ApiMark: no include paths resolved for C++ documentation generation. " + @@ -470,6 +477,16 @@ public override bool Execute() return true; } + // Reject unrecognized language values early to prevent silent argument mis-routing + if (language != DotNetLanguage && language != CppLanguage) + { + Log.LogError( + $"ApiMark: language '{language}' is not supported by the MSBuild task. " + + "Supported values are 'dotnet' and 'cpp'. " + + "Use the ApiMark.Tool CLI directly for other languages."); + return false; + } + // Verify the bundled tool DLL exists before attempting to spawn it if (!File.Exists(ToolDllPath)) { @@ -491,23 +508,40 @@ public override bool Execute() // When ApiMarkOutputs is populated, spawn one child process per output item if (ApiMarkOutputs != null && ApiMarkOutputs.Length > 0) { - var allSucceeded = true; - foreach (var outputItem in ApiMarkOutputs) - { - var itemArgs = BuildArgumentsForOutput(language, outputItem); - if (!RunToolProcess(dotnetExe, itemArgs)) - { - allSucceeded = false; - } - } - - return allSucceeded; + return ExecuteAllOutputs(dotnetExe, language); } // Single-invocation path: use scalar properties as before return RunToolProcess(dotnetExe, BuildArguments(language)); } + /// + /// Spawns one ApiMark.Tool child process per configured output item and returns whether + /// all invocations succeeded. + /// + /// + /// Each item may override the scalar , + /// , and properties for its + /// own invocation via item metadata. When any child process fails, the method continues + /// processing the remaining items so that all failures are reported in a single build + /// rather than stopping at the first error. + /// + /// Full path to the dotnet executable used to spawn each tool process. + /// Resolved language string ("dotnet" or "cpp"). + /// + /// true when every child process exits with code zero; false if any + /// invocation fails, causing MSBuild to mark the build as failed. + /// + private bool ExecuteAllOutputs(string dotnetExe, string language) + { + // ToList forces all child processes to run before any result is inspected, + // ensuring failures in one output do not suppress execution of the others. + var results = ApiMarkOutputs! + .Select(o => RunToolProcess(dotnetExe, BuildArgumentsForOutput(language, o))) + .ToList(); + return results.All(r => r); + } + /// /// Spawns an ApiMark.Tool child process with the given argument list and pipes /// its output to the MSBuild build log. diff --git a/src/ApiMark.Tool/ApiMark.Tool.csproj b/src/ApiMark.Tool/ApiMark.Tool.csproj index e268ed4..aa07e76 100644 --- a/src/ApiMark.Tool/ApiMark.Tool.csproj +++ b/src/ApiMark.Tool/ApiMark.Tool.csproj @@ -40,6 +40,7 @@ + diff --git a/src/ApiMark.Tool/Cli/Context.cs b/src/ApiMark.Tool/Cli/Context.cs index 211f9ee..aed23f7 100644 --- a/src/ApiMark.Tool/Cli/Context.cs +++ b/src/ApiMark.Tool/Cli/Context.cs @@ -132,6 +132,14 @@ internal sealed class Context : IContext, IDisposable /// public string? ClangPath { get; private init; } + /// + /// Gets the ordered list of glob and exclusion pattern strings for the VHDL language subcommand. + /// Collected from repeated --source invocations; entries with a ! + /// prefix are exclusion patterns. Order is significant — gitignore semantics apply + /// (last matching pattern wins). + /// + public string[] Sources { get; private init; } = []; + /// /// Gets the proposed exit code for the application (0 for success, 1 for errors). /// @@ -181,6 +189,7 @@ public static Context Create(string[] args) Defines = parser.Defines, CppStandard = parser.CppStandard, ClangPath = parser.ClangPath, + Sources = [.. parser.Sources], }; // Open log file if specified @@ -392,6 +401,11 @@ private sealed class ArgumentParser /// public string? ClangPath { get; private set; } + /// + /// Gets the VHDL source glob patterns from repeated --source flags. + /// + public List Sources { get; } = new List(); + /// /// Parses command-line arguments using a single-pass strategy. /// @@ -545,6 +559,13 @@ private int ParseArgument(string arg, string[] args, int index) ClangPath = GetRequiredStringArgument(arg, args, index, "a clang executable path argument"); return index + 1; + case "--source": + { + var pattern = GetRequiredStringArgument(arg, args, index, "a glob pattern argument"); + Sources.Add(pattern); + return index + 1; + } + default: // First positional non-flag token is the language subcommand if (!arg.StartsWith('-') && Language == null) diff --git a/src/ApiMark.Tool/Program.cs b/src/ApiMark.Tool/Program.cs index e76e3c5..17d8c26 100644 --- a/src/ApiMark.Tool/Program.cs +++ b/src/ApiMark.Tool/Program.cs @@ -4,6 +4,7 @@ using ApiMark.DotNet; using ApiMark.Tool.Cli; using ApiMark.Tool.SelfTest; +using ApiMark.Vhdl; using CppApiVisibility = ApiMark.Cpp.ApiVisibility; using DotNetApiVisibility = ApiMark.DotNet.ApiVisibility; @@ -173,6 +174,16 @@ private static void RunToolLogic(Context context) return; } + // Validate vhdl-specific required options: at least one non-empty, non-exclusion --source + // pattern must be provided so the generator has something to scan. + if (context.Language == "vhdl" && + !context.Sources.Any(s => !s.StartsWith('!') && !string.IsNullOrWhiteSpace(s))) + { + context.WriteError("Error: at least one non-exclusion --source pattern is required for the vhdl subcommand."); + PrintHelp(context); + return; + } + try { // Construct the generator, parse symbols, then emit using the configured format @@ -259,6 +270,14 @@ private static IApiGenerator CreateGenerator(Context context) ClangPath = context.ClangPath, }), + // Construct a VhdlGenerator from the vhdl-specific options + "vhdl" => new VhdlGenerator(new VhdlGeneratorOptions + { + LibraryName = !string.IsNullOrEmpty(context.LibraryName) ? context.LibraryName : defaultLibraryName, + Description = context.LibraryDescription ?? string.Empty, + Sources = new List(context.Sources), + }), + // Any other token is an unrecognized subcommand _ => throw new NotSupportedException( $"Unrecognized language subcommand '{context.Language}'."), @@ -297,6 +316,7 @@ private static void PrintHelp(Context context) context.WriteLine("Languages:"); context.WriteLine(" dotnet Generate API documentation from a .NET assembly"); context.WriteLine(" cpp Generate API documentation from C++ headers"); + context.WriteLine(" vhdl Generate API documentation from VHDL source files"); context.WriteLine(""); context.WriteLine("dotnet options:"); context.WriteLine(" --assembly Path to the .NET assembly (required)"); @@ -316,6 +336,12 @@ private static void PrintHelp(Context context) context.WriteLine(" --clang-path Path to clang executable (default: auto-discovered via PATH / xcrun / vswhere)"); context.WriteLine(" --visibility Visibility filter: Public, PublicAndProtected, All (default: Public)"); context.WriteLine(" --include-obsolete Include deprecated members in generated output"); + context.WriteLine(""); + context.WriteLine("vhdl options:"); + context.WriteLine(" --source VHDL source glob pattern (repeatable; prefix with ! to exclude)"); + context.WriteLine(" --output Output directory for Markdown files (required)"); + context.WriteLine(" --library-name Library name used as the top-level heading (default: output directory name)"); + context.WriteLine(" --library-description Optional description for the library api.md introduction"); } } diff --git a/src/ApiMark.Vhdl/ApiMark.Vhdl.csproj b/src/ApiMark.Vhdl/ApiMark.Vhdl.csproj new file mode 100644 index 0000000..23f9136 --- /dev/null +++ b/src/ApiMark.Vhdl/ApiMark.Vhdl.csproj @@ -0,0 +1,53 @@ + + + net8.0 + enable + enable + true + true + ApiMark.Vhdl + ApiMark.Vhdl + false + Generates API documentation from VHDL source files. + DEMA Consulting + DEMA Consulting + + + + CS1041;CS1584;CS1658;CS3021 + + + + + + + + CS1041;CS1584;CS1658;CS3021 + + + + + + + + <_Parameter1>ApiMark.Vhdl.Tests + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + diff --git a/src/ApiMark.Vhdl/VhdlAst/Antlr/.editorconfig b/src/ApiMark.Vhdl/VhdlAst/Antlr/.editorconfig new file mode 100644 index 0000000..f3dcf9b --- /dev/null +++ b/src/ApiMark.Vhdl/VhdlAst/Antlr/.editorconfig @@ -0,0 +1,9 @@ +# This folder contains ANTLR4 auto-generated C# source files. +# They are committed to the repository so that Java is not required to build. +# Do not hand-edit these files; regenerate them from vhdl2008.g4 instead. +# See README.md for regeneration instructions. + +root = false + +[*.cs] +generated_code = true diff --git a/src/ApiMark.Vhdl/VhdlAst/Antlr/README.md b/src/ApiMark.Vhdl/VhdlAst/Antlr/README.md new file mode 100644 index 0000000..f96ac9f --- /dev/null +++ b/src/ApiMark.Vhdl/VhdlAst/Antlr/README.md @@ -0,0 +1,60 @@ +# ANTLR4 Generated Files + +This folder contains C# source files generated by ANTLR4 from the +`vhdl2008.g4` grammar. They are committed to the repository so that +Java is **not** required to build or test ApiMark. + +Do **not** hand-edit any `.cs`, `.interp`, or `.tokens` file in this +folder. Regenerate them from `vhdl2008.g4` if the grammar changes. + +## Source Grammar + +- **Grammar**: `vhdl2008.g4` +- **Origin**: [antlr/grammars-v4](https://github.com/antlr/grammars-v4/tree/master/vhdl/vhdl2008) + (commit pinned at time of generation — check for updates before regenerating) +- **VHDL standard**: VHDL-2008 + +## Generated Files + +| File | Description | +| --- | --- | +| `vhdl2008Lexer.cs` | ANTLR4-generated lexer | +| `vhdl2008Parser.cs` | ANTLR4-generated parser | +| `vhdl2008Visitor.cs` | Visitor interface (one method per grammar rule) | +| `vhdl2008BaseVisitor.cs` | Default visitor base class (no-op implementations) | +| `vhdl2008.interp` | Lexer serialized ATN (runtime data) | +| `vhdl2008.tokens` | Token type map | +| `vhdl2008Lexer.interp` | Lexer ATN data | +| `vhdl2008Lexer.tokens` | Lexer token map | + +## Regeneration Instructions + +Prerequisites (developer machine only — not required to build): + +- Java 11 or later (e.g. Microsoft JDK, Eclipse Temurin) +- ANTLR4 tool jar 4.13.1 — download from + +Run from this directory: + +```sh +java -jar antlr-4.13.1-complete.jar \ + -Dlanguage=CSharp \ + -package "ApiMark.Vhdl.VhdlAst.Antlr" \ + -no-listener \ + -visitor \ + vhdl2008.g4 +``` + +After regeneration, commit all changed `.cs`, `.interp`, and `.tokens` files. +The `.g4` file itself should also be updated if the grammar source has changed. + +## Known Compiler Suppressions + +The `ApiMark.Vhdl.csproj` suppresses the following warnings project-wide due to +the generated code — they do not affect hand-written files: + +| Code | Reason | +| --- | --- | +| `CS1041` / `CS1658` | The VHDL grammar has a rule named `base`, which conflicts with the C# `base` keyword in generated method signatures | +| `CS1584` | XML doc `cref` attributes reference the same `base` rule | +| `CS3021` | Generated classes carry `[CLSCompliant]` attributes; the assembly has no assembly-level CLSCompliant declaration | diff --git a/src/ApiMark.Vhdl/VhdlAst/Antlr/vhdl2008.g4 b/src/ApiMark.Vhdl/VhdlAst/Antlr/vhdl2008.g4 new file mode 100644 index 0000000..bfccfa7 --- /dev/null +++ b/src/ApiMark.Vhdl/VhdlAst/Antlr/vhdl2008.g4 @@ -0,0 +1,2451 @@ +// +// Copyright (C) 2025 ANTLR Grammars +// +// 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 may have received a copy of the GNU General Public License +// along with this program. If not, see . +// + +// Author : Lucas Moss <48305572+LucasMoss@users.noreply.github.com> +// +// This grammar is based on the VHDL grammar by Denis Gavrish in the +// ANTLR Grammars v4 repository : +// +// In addition to the minimal test files in the `examples` folder, this +// grammar has been tested on all VHDL in: +// surf +// open-logic +// +// This grammar has been updated to support parts of the VHDL-2008 specification. +// It does not support PSL or VUnit features. +// +// Supports the following VHDL-2008 features: +// block comments +// process(all) +// else generate, elsif generate, for generate +// 'subtype in signal declaration +// AND, OR, XOR, NAND, XNOR unary reduction functions +// generic types in package instances, subprograms and entities + +// $antlr-format alignTrailingComments true, columnLimit 150, minEmptyLines 1, maxEmptyLinesToKeep 1, reflowComments false, useTab false +// $antlr-format allowShortRulesOnASingleLine false, allowShortBlocksOnASingleLine true, alignSemicolons hanging, alignColons hanging + +grammar vhdl2008; + +options { + caseInsensitive = true; +} + +ABS + : 'ABS' + ; + +ACCESS + : 'ACCESS' + ; + +ACROSS + : 'ACROSS' + ; + +AFTER + : 'AFTER' + ; + +ALIAS + : 'ALIAS' + ; + +ALL + : 'ALL' + ; + +AND + : 'AND' + ; + +ARCHITECTURE + : 'ARCHITECTURE' + ; + +ARRAY + : 'ARRAY' + ; + +ASSERT + : 'ASSERT' + ; + +ATTRIBUTE + : 'ATTRIBUTE' + ; + +BEGIN + : 'BEGIN' + ; + +BLOCK + : 'BLOCK' + ; + +BODY + : 'BODY' + ; + +BREAK + : 'BREAK' + ; + +BUFFER + : 'BUFFER' + ; + +BUS + : 'BUS' + ; + +CASE + : 'CASE' + ; + +COMPONENT + : 'COMPONENT' + ; + +CONFIGURATION + : 'CONFIGURATION' + ; + +CONSTANT + : 'CONSTANT' + ; + +CONTEXT + : 'CONTEXT' + ; + +DEFAULT + : 'DEFAULT' + ; + +DISCONNECT + : 'DISCONNECT' + ; + +DOWNTO + : 'DOWNTO' + ; + +END + : 'END' + ; + +ENTITY + : 'ENTITY' + ; + +ELSE + : 'ELSE' + ; + +ELSIF + : 'ELSIF' + ; + +EXIT + : 'EXIT' + ; + +FILE + : 'FILE' + ; + +FOR + : 'FOR' + ; + +FORCE + : 'FORCE' + ; + +FUNCTION + : 'FUNCTION' + ; + +GENERATE + : 'GENERATE' + ; + +GENERIC + : 'GENERIC' + ; + +GROUP + : 'GROUP' + ; + +GUARDED + : 'GUARDED' + ; + +IF + : 'IF' + ; + +IMPURE + : 'IMPURE' + ; + +IN + : 'IN' + ; + +INERTIAL + : 'INERTIAL' + ; + +INOUT + : 'INOUT' + ; + +IS + : 'IS' + ; + +LABEL + : 'LABEL' + ; + +LIBRARY + : 'LIBRARY' + ; + +LIMIT + : 'LIMIT' + ; + +LINKAGE + : 'LINKAGE' + ; + +LITERAL + : 'LITERAL' + ; + +LOOP + : 'LOOP' + ; + +MAP + : 'MAP' + ; + +MOD + : 'MOD' + ; + +NAND + : 'NAND' + ; + +NATURE + : 'NATURE' + ; + +NEW + : 'NEW' + ; + +NEXT + : 'NEXT' + ; + +NOISE + : 'NOISE' + ; + +NOR + : 'NOR' + ; + +NOT + : 'NOT' + ; + +NULL_ + : 'NULL' + ; + +OF + : 'OF' + ; + +ON + : 'ON' + ; + +OPEN + : 'OPEN' + ; + +OR + : 'OR' + ; + +OTHERS + : 'OTHERS' + ; + +OUT + : 'OUT' + ; + +PACKAGE + : 'PACKAGE' + ; + +PARAMETER + : 'PARAMETER' + ; + +PORT + : 'PORT' + ; + +POSTPONED + : 'POSTPONED' + ; + +PROCESS + : 'PROCESS' + ; + +PROCEDURE + : 'PROCEDURE' + ; + +PROCEDURAL + : 'PROCEDURAL' + ; + +PROTECTED + : 'PROTECTED' + ; + +PURE + : 'PURE' + ; + +QUANTITY + : 'QUANTITY' + ; + +RANGE + : 'RANGE' + ; + +RELEASE + : 'RELEASE' + ; + +REVERSE_RANGE + : 'REVERSE_RANGE' + ; + +REJECT + : 'REJECT' + ; + +REM + : 'REM' + ; + +RECORD + : 'RECORD' + ; + +REFERENCE + : 'REFERENCE' + ; + +REGISTER + : 'REGISTER' + ; + +REPORT + : 'REPORT' + ; + +RETURN + : 'RETURN' + ; + +ROL + : 'ROL' + ; + +ROR + : 'ROR' + ; + +SELECT + : 'SELECT' + ; + +SEVERITY + : 'SEVERITY' + ; + +SHARED + : 'SHARED' + ; + +SIGNAL + : 'SIGNAL' + ; + +SLA + : 'SLA' + ; + +SLL + : 'SLL' + ; + +SPECTRUM + : 'SPECTRUM' + ; + +SRA + : 'SRA' + ; + +SRL + : 'SRL' + ; + +SUBNATURE + : 'SUBNATURE' + ; + +SUBTYPE + : 'SUBTYPE' + ; + +TERMINAL + : 'TERMINAL' + ; + +THEN + : 'THEN' + ; + +THROUGH + : 'THROUGH' + ; + +TO + : 'TO' + ; + +TOLERANCE + : 'TOLERANCE' + ; + +TRANSPORT + : 'TRANSPORT' + ; + +TYPE + : 'TYPE' + ; + +UNAFFECTED + : 'UNAFFECTED' + ; + +UNITS + : 'UNITS' + ; + +UNTIL + : 'UNTIL' + ; + +USE + : 'USE' + ; + +VARIABLE + : 'VARIABLE' + ; + +WAIT + : 'WAIT' + ; + +WITH + : 'WITH' + ; + +WHEN + : 'WHEN' + ; + +WHILE + : 'WHILE' + ; + +XNOR + : 'XNOR' + ; + +XOR + : 'XOR' + ; + +//------------------------------------------Parser---------------------------------------- + +abstract_literal + : DECIMAL_LITERAL + | BASED_LITERAL + ; + +access_type_definition + : ACCESS subtype_indication + ; + +actual_designator + : (INERTIAL)? expression + | name + | subtype_indication + | OPEN + ; + +actual_parameter_part + : association_list + ; + +actual_part + : actual_designator + | name LPAREN actual_designator RPAREN + //| type_mark LPAREN actual_designator RPAREN // Equivalent to name + ; + +adding_operator + : PLUS + | MINUS + | AMPERSAND + ; + +aggregate + : LPAREN element_association (COMMA element_association)* RPAREN + ; + +alias_declaration + : ALIAS alias_designator (COLON subtype_indication)? IS name (signature)? SEMI + ; + +alias_designator + : identifier + | CHARACTER_LITERAL + //| operator_symbol + | STRING_LITERAL // Equivalent to operator_symbol + ; + +allocator + : NEW subtype_indication + | NEW qualified_expression + ; + +architecture_body + : ARCHITECTURE identifier OF name IS architecture_declarative_part BEGIN architecture_statement_part END ( + ARCHITECTURE + )? (identifier)? SEMI + ; + +architecture_declarative_part + : (block_declarative_item)* + ; + +architecture_statement_part + : (concurrent_statement)* + ; + +array_constraint + : index_constraint (array_element_constraint)? + | OPEN (array_element_constraint) + ; + +array_element_constraint + : element_constraint + ; + +array_element_resolution + : resolution_indication + ; + +array_type_definition + : unbounded_array_definition + | constrained_array_definition + ; + +assertion + : ASSERT condition (REPORT expression)? (SEVERITY expression)? + ; + +assertion_statement + : (label_colon)? assertion SEMI + ; + +association_element + : (formal_part ARROW)? actual_part + ; + +association_list + : association_element (COMMA association_element)* + ; + +attribute_declaration + : ATTRIBUTE label_colon name SEMI + ; + +// Need to add tokens here since they will be consumed by the Lexer +attribute_designator + : identifier + | RANGE + | REVERSE_RANGE + | ACROSS + | THROUGH + | REFERENCE + | TOLERANCE + | SUBTYPE + ; + +attribute_name + // : prefix (signature)? APOSTROPHE attribute_designator (LPAREN expression RPAREN)? + : prefix APOSTROPHE attribute_designator (LPAREN expression RPAREN)? + ; + +attribute_specification + : ATTRIBUTE attribute_designator OF entity_specification IS expression SEMI + ; + +base + : INTEGER + ; + +// Lexer : basic_identifier + +binding_indication + : (USE entity_aspect)? (generic_map_aspect)? (port_map_aspect)? + ; + +// Lexer : bit_string_literal + +// bit_value + +block_configuration + : FOR block_specification (use_clause)* (configuration_item)* END FOR SEMI + ; + +block_declarative_item + : subprogram_declaration + | subprogram_body + | subprogram_instantiation_declaration + | package_declaration + | package_body + | package_instantiation_declaration + | type_declaration + | subtype_declaration + | constant_declaration + | signal_declaration + | variable_declaration + | file_declaration + | alias_declaration + | component_declaration + | attribute_declaration + | attribute_specification + | configuration_specification + | disconnection_specification + | use_clause + | group_template_declaration + | group_declaration + ; + +block_declarative_part + : (block_declarative_item)* + ; + +block_header + : (generic_clause ( generic_map_aspect SEMI)?)? (port_clause ( port_map_aspect SEMI)?)? + ; + +block_specification + : name + //| label (LPAREN generate_specification RPAREN)? + identifier (LPAREN generate_specification RPAREN)? + ; + +block_statement + : label_colon BLOCK (LPAREN expression RPAREN)? (IS)? block_header block_declarative_part BEGIN block_statement_part END BLOCK ( + identifier + )? SEMI + ; + +block_statement_part + : (concurrent_statement)* + ; + +case_generate_alternative + : WHEN (label_colon)? choices ARROW generate_statement_body + ; + +case_generate_statement + : CASE expression GENERATE case_generate_alternative (case_generate_alternative)* + ; + +case_statement + : (label_colon)? CASE (QUESTION)? expression IS (case_statement_alternative)+ END CASE ( + QUESTION + )? (identifier)? SEMI + ; + +case_statement_alternative + : WHEN choices ARROW sequence_of_statements + ; + +choice + : simple_expression + | discrete_range + | identifier + | OTHERS + ; + +choices + : choice (BAR choice)* + ; + +component_configuration + : FOR component_specification (binding_indication SEMI)? (block_configuration)? END FOR SEMI + ; + +component_declaration + : COMPONENT identifier (IS)? (generic_clause)? (port_clause)? END COMPONENT (identifier)? SEMI + ; + +component_instantiation_statement + : label_colon instantiated_unit (generic_map_aspect)? (port_map_aspect)? SEMI + ; + +component_specification + : instantiation_list COLON name + ; + +composite_type_definition + : array_type_definition + | record_type_definition + ; + +concurrent_assertion_statement + : (label_colon)? (POSTPONED)? assertion SEMI + ; + +concurrent_conditional_signal_assignment + : target LEQ (GUARDED)? (delay_mechanism)? conditional_waveforms SEMI + ; + +concurrent_procedure_call_statement + : (label_colon)? (POSTPONED)? procedure_call SEMI + ; + +concurrent_selected_signal_assignment + : WITH expression SELECT (QUESTION)? target LEQ (GUARDED)? (delay_mechanism)? selected_waveforms SEMI + ; + +concurrent_signal_assignment_statement + : (label_colon)? (POSTPONED)? ( + conditional_signal_assignment + | selected_signal_assignment + | concurrent_selected_signal_assignment + ) + ; + +concurrent_simple_signal_assignment + : target LEQ (GUARDED)? (delay_mechanism)? waveform SEMI + ; + +concurrent_statement + : block_statement + | process_statement + | concurrent_procedure_call_statement + | concurrent_assertion_statement + | concurrent_signal_assignment_statement + | component_instantiation_statement + | generate_statement + ; + +condition + : expression + ; + +condition_clause + : UNTIL condition + ; + +// Lexer : condition_operator + +conditional_expression + : expression WHEN condition (ELSE expression WHEN condition)* (ELSE expression)? + ; + +conditional_force_assignment + : target LEQ FORCE (force_mode)? conditional_expression SEMI + ; + +conditional_signal_assignment + : conditional_waveform_assignment + | conditional_force_assignment + ; + +conditional_variable_assignment + : target WALRUS conditional_expression + ; + +conditional_waveform_assignment + : target LEQ (delay_mechanism)? conditional_waveforms SEMI + ; + +conditional_waveforms + //: waveform WHEN condition (ELSE waveform WHEN condition)* (ELSE waveform) + : waveform (WHEN condition (ELSE conditional_waveforms)?)? + ; + +configuration_declaration + : CONFIGURATION identifier OF name IS configuration_declarative_part block_configuration END ( + CONFIGURATION + )? (identifier)? SEMI + ; + +configuration_declarative_item + : use_clause + | attribute_specification + | group_declaration + ; + +configuration_declarative_part + : (configuration_declarative_item)* + ; + +configuration_item + : block_configuration + | component_configuration + ; + +configuration_specification + : FOR component_specification binding_indication SEMI // Equivalent to simple_configuration_specification + // | compound_configuration_specification // Only used for vunit + ; + +constant_declaration + : CONSTANT identifier_list COLON subtype_indication (WALRUS expression)? SEMI + ; + +constrained_array_definition + : ARRAY index_constraint OF subtype_indication + ; + +constraint + : range_constraint + | index_constraint + | record_constraint + ; + +context_clause + : (context_item)* + ; + +context_declaration + // : CONTEXT identifier IS context_clause END (CONTEXT)? (simple_name)? SEMI + : CONTEXT identifier IS context_clause END (CONTEXT)? (identifier)? SEMI + ; + +context_item + : library_clause + | use_clause + | context_reference + ; + +context_reference + : CONTEXT selected_name (COMMA selected_name)* SEMI + ; + +DECIMAL_LITERAL + : INTEGER (DOT INTEGER)? (EXPONENT)? + ; + +delay_mechanism + : TRANSPORT + | ( REJECT expression)? INERTIAL + ; + +design_file + : (design_unit)+ EOF + ; + +design_unit + : context_clause library_unit + ; + +designator + : identifier + // | operator_symbol + | STRING_LITERAL // Equivalent to operator_symbol + ; + +direction + : TO + | DOWNTO + ; + +disconnection_specification + : DISCONNECT guarded_signal_specification AFTER expression SEMI + ; + +discrete_range + : subtype_indication + | range_decl + ; + +element_association + : (choices ARROW)? expression + ; + +element_constraint + : array_constraint + | record_constraint + ; + +element_declaration + : identifier_list COLON element_subtype_definition SEMI + ; + +element_resolution + : array_element_resolution + | record_resolution + ; + +element_subtype_definition + : subtype_indication + ; + +entity_aspect + : ENTITY name (LPAREN identifier RPAREN)? + | CONFIGURATION name + | OPEN + ; + +entity_class + : ENTITY + | ARCHITECTURE + | CONFIGURATION + | PROCEDURE + | FUNCTION + | PACKAGE + | TYPE + | SUBTYPE + | CONSTANT + | SIGNAL + | VARIABLE + | COMPONENT + | LABEL + | LITERAL + | UNITS + | GROUP + | FILE + // | PROPERTY + // | SEQUENCE + ; + +entity_class_entry + : entity_class (BOX)? + ; + +entity_class_entry_list + : entity_class_entry (COMMA entity_class_entry)* + ; + +entity_declaration + : ENTITY identifier IS entity_header entity_declarative_part (BEGIN entity_statement_part)? END ( + ENTITY + )? (identifier)? SEMI + ; + +entity_declarative_item + : subprogram_declaration + | subprogram_body + | subprogram_instantiation_declaration + | package_declaration + | package_body + | package_instantiation_declaration + | type_declaration + | subtype_declaration + | constant_declaration + | signal_declaration + | variable_declaration + | file_declaration + | alias_declaration + | attribute_declaration + | attribute_specification + | disconnection_specification + | use_clause + | group_template_declaration + | group_declaration + ; + +entity_declarative_part + : (entity_declarative_item)* + ; + +entity_designator + // : entity_tag (signature)? + : entity_tag + ; + +entity_header + : (generic_clause)? (port_clause)? + ; + +entity_name_list + : entity_designator (COMMA entity_designator)* + | OTHERS + | ALL + ; + +entity_specification + : entity_name_list COLON entity_class + ; + +entity_statement + : concurrent_assertion_statement + | process_statement + | concurrent_procedure_call_statement + ; + +entity_statement_part + : (entity_statement)* + ; + +entity_tag + : identifier + | CHARACTER_LITERAL + | STRING_LITERAL + ; + +enumeration_literal + : identifier + | CHARACTER_LITERAL + ; + +enumeration_type_definition + : LPAREN enumeration_literal (COMMA enumeration_literal)* RPAREN + ; + +exit_statement + // : (label_colon)? EXIT (label)? (WHEN condition)? SEMI + : (label_colon)? EXIT (identifier)? (WHEN condition)? SEMI + ; + +// Lexer : exponent + +expression + : (CONDITION_OPERATOR primary) + // | logical_expression + | (relation (logical_operator relation)*) // Optimised logical_expression + ; + +// Lexer : extended_digit + +// Lexer : extended_identifier + +// external_name +// : external_constant_name +// | external_signal_name +// | external_variable_name +// ; + +// external_constant_name +// : LSHIFT external_pathname COLON subtype_indication RSHIFT +// ; + +// external_signal_name +// : LSHIFT external_pathname COLON subtype_indication RSHIFT +// ; + +// external_variable_name +// : LSHIFT external_pathname COLON subtype_indication RSHIFT +// ; + +// external_pathname +// : package_pathname +// | absolute_pathname +// | relative_pathname +// ; + +factor + : primary (DOUBLESTAR primary)? + | ABS primary + | NOT primary + | logical_operator primary + ; + +file_declaration + : FILE identifier_list COLON subtype_indication (file_open_information)? SEMI + ; + +file_logical_name + : expression + ; + +file_open_information + : (OPEN expression)? IS file_logical_name + ; + +file_type_definition + : FILE OF subtype_indication + ; + +floating_type_definition + : range_constraint + ; + +for_generate_statement + : FOR parameter_specification GENERATE generate_statement_body + ; + +force_mode + : IN + | OUT + ; + +// formal_designator +// : name +// ; + +formal_parameter_list + : interface_list + ; + +formal_part + // : formal_designator + // | name LPAREN formal_designator RPAREN + // | type_mark LPAREN formal_designator RPAREN + : name (LPAREN name RPAREN)? // Equivalent to all above statements + ; + +full_type_declaration + : TYPE identifier IS type_definition SEMI + ; + +function_call + : name (LPAREN actual_parameter_part RPAREN)? + ; + +function_specification + : (PURE | IMPURE)? FUNCTION designator subprogram_header ( + LPAREN (PARAMETER)? formal_parameter_list RPAREN + )? + // RETURN type_mark + RETURN name + ; + +generate_specification + : discrete_range + | expression + // | label + | identifier + ; + +generate_statement + : label_colon? (for_generate_statement | if_generate_statement | case_generate_statement) END GENERATE ( + identifier + )? SEMI + ; + +generate_statement_body + : (block_declarative_part BEGIN)? concurrent_statement* + ; + +generic_clause + : GENERIC LPAREN generic_list RPAREN SEMI + ; + +generic_list + : interface_list + ; + +generic_map_aspect + : GENERIC MAP LPAREN association_list RPAREN + ; + +graphic_character + : (EXTENDED_IDENTIFIER) + ; + +group_constituent + : name + | CHARACTER_LITERAL + ; + +group_constituent_list + : group_constituent (COMMA group_constituent)* + ; + +group_declaration + : GROUP label_colon name LPAREN group_constituent_list RPAREN SEMI + ; + +group_template_declaration + : GROUP identifier IS LPAREN entity_class_entry_list RPAREN SEMI + ; + +guarded_signal_specification + //: signal_list COLON type_mark + : signal_list COLON name + ; + +identifier + : BASIC_IDENTIFIER + | EXTENDED_IDENTIFIER + ; + +identifier_list + : identifier (COMMA identifier)* + ; + +if_generate_statement + : IF condition GENERATE generate_statement_body ( + ELSIF condition GENERATE generate_statement_body + )* (ELSE GENERATE generate_statement_body)? + ; + +if_statement + : (label_colon)? IF condition THEN sequence_of_statements ( + ELSIF condition THEN sequence_of_statements + )* (ELSE sequence_of_statements)? END IF + // (label)? + (identifier)? SEMI + ; + +incomplete_type_declaration + : TYPE identifier + ; + +index_constraint + : LPAREN discrete_range (COMMA discrete_range)* RPAREN + ; + +index_subtype_definition + //: type_mark RANGE BOX + : name RANGE BOX + ; + +indexed_name + : prefix LPAREN expression (COMMA expression)* RPAREN + ; + +instantiated_unit + : (COMPONENT)? name + | ENTITY name (LPAREN identifier RPAREN)? + | CONFIGURATION name + ; + +instantiation_list + : identifier (COMMA identifier)* + | OTHERS + | ALL + ; + +// Lexer : integer + +// integer_type_definition +// : range_constraint +// ; + +interface_constant_declaration + : (CONSTANT)? identifier_list COLON (IN)? subtype_indication (WALRUS expression)? + ; + +interface_declaration + : interface_object_declaration + | interface_type_declaration + | interface_subprogram_declaration + | interface_package_declaration + ; + +// interface_element +// : interface_declaration +// ; + +interface_file_declaration + : FILE identifier_list COLON subtype_indication + ; + +interface_function_specification + : (PURE | IMPURE)? FUNCTION designator ((PARAMETER)? LPAREN formal_parameter_list RPAREN)? + // RETURN type_mark + RETURN name + ; + +interface_incomplete_type_declaration + : TYPE identifier + ; + +interface_list + // : interface_element (SEMI interface_element)* + : interface_declaration (SEMI interface_declaration)* + ; + +interface_object_declaration + : interface_constant_declaration + | interface_signal_declaration + | interface_variable_declaration + | interface_file_declaration + ; + +interface_package_declaration + : PACKAGE identifier IS NEW name interface_package_generic_map_aspect + ; + +interface_package_generic_map_aspect + : generic_map_aspect + | GENERIC MAP LPAREN (BOX | DEFAULT) RPAREN + ; + +interface_procedure_specification + : PROCEDURE designator (((PARAMETER)? LPAREN formal_parameter_list RPAREN))? + ; + +interface_signal_declaration + : (SIGNAL)? identifier_list COLON (mode_rule)? subtype_indication (BUS)? (WALRUS expression)? + ; + +interface_subprogram_declaration + : interface_subprogram_specification (IS interface_subprogram_default) + ; + +interface_subprogram_default + : name + | BOX + ; + +interface_subprogram_specification + : interface_procedure_specification + | interface_function_specification + ; + +interface_type_declaration + : interface_incomplete_type_declaration + ; + +interface_variable_declaration + : (VARIABLE)? identifier_list COLON (mode_rule)? subtype_indication (WALRUS expression)? + ; + +iteration_scheme + : WHILE condition + | FOR parameter_specification + ; + +// label +// : identifier +// ; +// ANTLR optimisation : combine label and COLON rules +label_colon + : identifier COLON + ; + +// Lexer : letter + +// Lexer : letter_or_digit + +library_clause + // : LIBRARY logical_name_list SEMI + : LIBRARY identifier_list SEMI // Equivalent to logical_name_list + ; + +library_unit + : primary_unit + | secondary_unit + ; + +literal + : numeric_literal + | enumeration_literal + | STRING_LITERAL + | BIT_STRING_LITERAL + | NULL_ + ; + +// logical_expression +// : relation (AND relation)* +// | relation (OR relation)* +// | relation (XOR relation)* +// | relation (NAND relation)* +// | relation (NOR relation)* +// | relation (XNOR relation)* +// ; + +// logical_name +// : identifier +// ; + +// logical_name_list // Equivalent to identifier_list +// : logical_name (COMMA logical_name)* +// ; + +logical_operator + : AND + | OR + | NAND + | NOR + | XOR + | XNOR + ; + +loop_statement + : (label_colon)? (iteration_scheme)? LOOP sequence_of_statements END LOOP + // (label)? + (identifier)? SEMI + ; + +// miscellaneous_operator // Rule not used for anything +// : DOUBLESTAR +// | ABS +// | NOT +// ; + +mode_rule + : IN + | OUT + | INOUT + | BUFFER + | LINKAGE + ; + +multiplying_operator + : MUL + | DIV + | MOD + | REM + ; + +name + : ( + identifier // simple_name + | STRING_LITERAL // operator_symbol + | CHARACTER_LITERAL + ) (name_part)* + ; + +name_part + : (DOT suffix)+ // selected_name + | LPAREN actual_parameter_part RPAREN // indexed_name + | LPAREN discrete_range RPAREN // slice_name + | APOSTROPHE attribute_designator (LPAREN expression RPAREN)? // attribute_name + ; + +next_statement + // : (label COLON)? NEXT (label)? (WHEN condition)? SEMI + : (label_colon)? NEXT (identifier)? (WHEN condition)? SEMI + ; + +null_statement + // (label COLON)> NULL_ SEMI + : (label_colon)? NULL_ SEMI + ; + +numeric_literal + : abstract_literal + | physical_literal + ; + +object_declaration + : constant_declaration + | signal_declaration + | variable_declaration + | file_declaration + ; + +// operator_symbol +// : STRING_LITERAL +// ; + +package_body + //: PACKAGE BODY identifier IS package_body_declarative_part END (PACKAGE BODY)? (simple_name)? SEMI + : PACKAGE BODY identifier IS package_body_declarative_part END (PACKAGE BODY)? (identifier)? SEMI + ; + +package_body_declarative_item + : subprogram_declaration + | subprogram_body + | subprogram_instantiation_declaration + | package_declaration + | package_body + | package_instantiation_declaration + | type_declaration + | subtype_declaration + | constant_declaration + | variable_declaration + | file_declaration + | alias_declaration + | attribute_declaration + | attribute_specification + | use_clause + | group_template_declaration + | group_declaration + ; + +package_body_declarative_part + : (package_body_declarative_item)* + ; + +package_declaration + // : PACKAGE identifier IS package_header package_declarative_part END (PACKAGE)? (simple_name)? SEMI + : PACKAGE identifier IS package_header package_declarative_part END (PACKAGE)? (identifier)? SEMI + ; + +package_declarative_item + : subprogram_declaration + | subprogram_instantiation_declaration + | package_declaration + | package_instantiation_declaration + | type_declaration + | subtype_declaration + | constant_declaration + | signal_declaration + | variable_declaration + | file_declaration + | alias_declaration + | component_declaration + | attribute_declaration + | attribute_specification + | disconnection_specification + | use_clause + | group_template_declaration + | group_declaration + ; + +package_declarative_part + : (package_declarative_item)* + ; + +package_header + : (generic_clause (generic_map_aspect SEMI)?)? + ; + +package_instantiation_declaration + : PACKAGE identifier IS NEW name (LPAREN generic_map_aspect RPAREN) SEMI + ; + +// package_pathname +// : AT name DOT (identifier DOT)* identifier +// ; + +parameter_specification + : identifier IN discrete_range + ; + +// partial_pathname +// : (pathname_element DOT)* identifier +// ; + +// pathname_element +// : identifier (LPAREN expression RPAREN)? +// ; + +physical_literal + : abstract_literal (: identifier) + ; + +physical_type_definition + : range_constraint UNITS primary_unit_declaration (secondary_unit_declaration)* END UNITS ( + // simple_name + identifier + )? + ; + +port_clause + : PORT LPAREN port_list RPAREN SEMI + ; + +port_list + : interface_list + ; + +port_map_aspect + : PORT MAP LPAREN association_list RPAREN + ; + +prefix + : name + | function_call + ; + +primary + : name + | literal + | aggregate + | function_call + | qualified_expression + | type_conversion + | allocator + | LPAREN expression RPAREN + ; + +primary_unit + : entity_declaration + | configuration_declaration + | package_declaration + | package_instantiation_declaration + | context_declaration + ; + +primary_unit_declaration + : identifier SEMI + ; + +procedure_call + : name (LPAREN actual_parameter_part RPAREN)? + ; + +procedure_call_statement + //: (label COLON)? procedure_call SEMI + : (label_colon)? procedure_call SEMI + ; + +procedure_specification + : PROCEDURE designator subprogram_header ((PARAMETER)? LPAREN formal_parameter_list RPAREN)? + ; + +procedural_declarative_item + : subprogram_declaration + | subprogram_body + | subprogram_instantiation_declaration + | package_declaration + | package_body + | package_instantiation_declaration + | type_declaration + | subtype_declaration + | constant_declaration + | variable_declaration + | file_declaration + | alias_declaration + | attribute_declaration + | attribute_specification + | use_clause + | group_template_declaration + | group_declaration + ; + +procedural_statement_part + : (sequential_statement)* + ; + +process_declarative_item + : subprogram_declaration + | subprogram_body + | type_declaration + | subtype_declaration + | constant_declaration + | variable_declaration + | file_declaration + | alias_declaration + | attribute_declaration + | attribute_specification + | use_clause + | group_template_declaration + | group_declaration + ; + +process_declarative_part + : (process_declarative_item)* + ; + +process_sensitivity_list + : ALL + | sensitivity_list + ; + +process_statement + : (label_colon)? (POSTPONED)? PROCESS (LPAREN process_sensitivity_list RPAREN)? (IS)? process_declarative_part BEGIN process_statement_part END ( + POSTPONED + )? PROCESS (identifier)? SEMI + ; + +process_statement_part + : (sequential_statement)* + ; + +protected_type_body + // : PROTECTED BODY protected_type_body_declarative_part END PROTECTED BODY (simple_name)? + : PROTECTED BODY protected_type_body_declarative_part END PROTECTED BODY (identifier)? + ; + +protected_type_body_declarative_item + : subprogram_declaration + | subprogram_body + | subprogram_instantiation_declaration + | package_declaration + | package_body + | package_instantiation_declaration + | type_declaration + | subtype_declaration + | constant_declaration + | variable_declaration + | file_declaration + | alias_declaration + | attribute_declaration + | attribute_specification + | use_clause + | group_template_declaration + | group_declaration + ; + +protected_type_body_declarative_part + : (protected_type_body_declarative_item)? + ; + +protected_type_declaration + //: PROTECTED protected_type_declarative_part END PROTECTED (simple_name)? + : PROTECTED protected_type_declarative_part END PROTECTED (identifier)? + ; + +protected_type_declarative_item + : subprogram_declaration + | subprogram_instantiation_declaration + | attribute_specification + | use_clause + ; + +protected_type_declarative_part + : (protected_type_declarative_item)? + ; + +protected_type_definition + : protected_type_declaration + | protected_type_body + ; + +qualified_expression + : name APOSTROPHE (aggregate | LPAREN expression RPAREN) + ; + +range_decl + : attribute_name + | (simple_expression direction simple_expression) + ; + +range_constraint + : RANGE range_decl + ; + +record_constraint + : LPAREN record_element_constraint (COMMA record_element_constraint)* RPAREN + ; + +record_element_constraint + //: simple_name element_constraint + : identifier element_constraint + ; + +record_element_resolution + //: simple_name resolution_indication + : identifier resolution_indication + ; + +record_resolution + : record_element_resolution (COMMA record_element_resolution)* + ; + +record_type_definition + : RECORD (element_declaration)+ END RECORD (identifier)? + ; + +relation + : shift_expression (relational_operator shift_expression)? + ; + +relational_operator + : EQ + | NEQ + | LESSTHAN + | LEQ + | GREATERTHAN + | GEQ + | CONDITION_EQ + | CONDITION_NEQ + | CONDITION_LESSTHAN + | CONDITION_LEQ + | CONDITION_GREATERTHAN + | CONDITION_GEQ + ; + +report_statement + : (label_colon)? REPORT expression (SEVERITY expression)? SEMI + ; + +resolution_indication + : name + | (LPAREN element_resolution RPAREN) + ; + +return_statement + : (label_colon)? RETURN (expression)? SEMI + ; + +scalar_type_definition + : enumeration_type_definition + // | integer_type_definition + // | floating_type_definition + | range_constraint // Equivalent to both integer_type_definition and floating_type_definition + | physical_type_definition + ; + +secondary_unit + : architecture_body + | package_body + ; + +secondary_unit_declaration + : identifier EQ physical_literal SEMI + ; + +selected_expressions + : (expression WHEN choices COMMA)* expression WHEN choices + ; + +selected_force_assignment + : WITH expression SELECT (QUESTION)? target LEQ FORCE (force_mode)? selected_expressions SEMI + ; + +selected_name + : prefix DOT suffix + ; + +selected_signal_assignment + : selected_waveform_assignment + | selected_force_assignment + ; + +selected_variable_assignment + : WITH expression SELECT (QUESTION)? target WALRUS selected_expressions SEMI + ; + +selected_waveform_assignment + : WITH expression SELECT (QUESTION)? target LEQ (delay_mechanism)? selected_waveforms SEMI + ; + +selected_waveforms + //: (waveform WHEN choices COMMA)* waveform WHEN choices + : waveform WHEN choices (COMMA waveform WHEN choices)* + ; + +sensitivity_clause + : ON sensitivity_list + ; + +sensitivity_list + : name (COMMA name)* + ; + +sequence_of_statements + : (sequential_statement)* + ; + +sequential_statement + : wait_statement + | assertion_statement + | report_statement + | signal_assignment_statement + | variable_assignment_statement + | procedure_call_statement + | if_statement + | case_statement + | loop_statement + | next_statement + | exit_statement + | return_statement + | null_statement + ; + +shift_expression + : simple_expression (: shift_operator simple_expression)? + ; + +shift_operator + : SLL + | SRL + | SLA + | SRA + | ROL + | ROR + ; + +// sign // Only used in one other rule +// : PLUS | MINUS +// ; + +signal_assignment_statement + : (label_colon)? ( + simple_signal_assignment + | conditional_signal_assignment + | selected_signal_assignment + ) + ; + +signal_declaration + : SIGNAL identifier_list COLON (subtype_indication) (signal_kind)? (WALRUS expression)? SEMI + ; + +signal_kind + : REGISTER + | BUS + ; + +signal_list + : name (COMMA name)* + | OTHERS + | ALL + ; + +signature + : LBRACKET (name (COMMA name)?) (RETURN name)? RBRACKET + ; + +// simple_configuration_specification // Only used in one other rule +// : FOR component_specification binding_indication SEMI (END FOR SEMI)? +// ; + +simple_expression + // : (sign)? term (adding_operator term)* + : (PLUS | MINUS)? term (adding_operator term)* + ; + +simple_force_assignment + // : target LEQ FORCE (force_mode)? expression SEMI + : (force_mode)? expression + ; + +// simple_name +// : identifier +// ; + +simple_release_assignment + // : target LEQ RELEASE (force_mode)? SEMI + : (force_mode)? + ; + +simple_signal_assignment + // : simple_waveform_assignment + // | simple_force_assignment + // | simple_release_assignment + : target LEQ (simple_waveform_assignment | simple_force_assignment | simple_release_assignment) SEMI + ; + +simple_waveform_assignment + // : target LEQ (delay_mechanism)? waveform SEMI + : (delay_mechanism)? waveform + ; + +simple_variable_assignment + : target WALRUS expression SEMI + ; + +slice_name + : prefix LPAREN discrete_range RPAREN + ; + +subprogram_body + : subprogram_specification IS subprogram_declarative_part BEGIN subprogram_statement_part END ( + subprogram_kind + )? (designator)? SEMI + ; + +subprogram_declaration + : subprogram_specification SEMI + ; + +subprogram_declarative_item + : subprogram_declaration + | subprogram_body + | subprogram_instantiation_declaration + | package_declaration + | package_body + | package_instantiation_declaration + | type_declaration + | subtype_declaration + | constant_declaration + | variable_declaration + | file_declaration + | alias_declaration + | attribute_declaration + | attribute_specification + | use_clause + | group_template_declaration + | group_declaration + ; + +subprogram_declarative_part + : (subprogram_declarative_item)* + ; + +subprogram_header + : (GENERIC LPAREN generic_list RPAREN (generic_map_aspect))? + ; + +subprogram_instantiation_declaration + // : subprogram_kind identifier IS NEW name (signature)? (generic_map_aspect) SEMI + : subprogram_kind identifier IS NEW name (generic_map_aspect) SEMI + ; + +subprogram_kind + : PROCEDURE + | FUNCTION + ; + +subprogram_specification + : procedure_specification + | function_specification + ; + +subprogram_statement_part + : (sequential_statement)* + ; + +subtype_declaration + : SUBTYPE identifier IS subtype_indication SEMI + ; + +subtype_indication + // : (resolution_indication)? type_mark (constraint)? + : (resolution_indication)? name (constraint)? + ; + +suffix + : identifier + | CHARACTER_LITERAL + // | operator_symbol + | STRING_LITERAL // Equivalent to operator_symbol + | ALL + ; + +target + : name + | aggregate + ; + +term + : factor (multiplying_operator factor)* + ; + +timeout_clause + : FOR expression + ; + +tool_directive + : BACKTICK identifier (graphic_character)* + ; + +type_conversion + // : type_mark LPAREN expression RPAREN + : name LPAREN expression RPAREN + ; + +type_declaration + : full_type_declaration + | incomplete_type_declaration + ; + +type_definition + : scalar_type_definition + | composite_type_definition + | access_type_definition + | file_type_definition + | protected_type_definition + ; + +// type_mark +// : name +// ; + +unbounded_array_definition + : ARRAY LPAREN index_subtype_definition (COMMA index_subtype_definition)* RPAREN OF subtype_indication + ; + +use_clause + : USE selected_name (COMMA selected_name)* SEMI + ; + +variable_assignment_statement + : (label_colon)? ( + simple_variable_assignment + | conditional_variable_assignment + | selected_variable_assignment + ) + ; + +variable_declaration + : (SHARED)? VARIABLE identifier_list COLON subtype_indication (WALRUS expression)? SEMI + ; + +wait_statement + : (label_colon)? WAIT (sensitivity_clause)? (condition_clause)? (timeout_clause)? SEMI + ; + +waveform + : waveform_element (COMMA waveform_element)* + | UNAFFECTED + ; + +waveform_element + : expression (AFTER expression)? + | NULL_ (AFTER expression)? + ; + +//------------------------------------------Lexer----------------------------------------- + +STRING_LITERAL + : '"' (~('"' | '\n' | '\r') | '\'' | '""')* '"' + ; + +BASED_LITERAL + : INTEGER HASH BASED_INTEGER (DOT BASED_INTEGER)? HASH (EXPONENT)? + ; + +BIT_STRING_LITERAL + : BIT_STRING_LITERAL_BINARY + | BIT_STRING_LITERAL_OCTAL + | BIT_STRING_LITERAL_HEX + ; + +BIT_STRING_LITERAL_BINARY + : 'B"' ('1' | '0' | '_')+ '"' + ; + +BIT_STRING_LITERAL_OCTAL + : 'O"' ('7' | '6' | '5' | '4' | '3' | '2' | '1' | '0' | '_')+ '"' + ; + +BIT_STRING_LITERAL_HEX + : 'X"' ( + 'F' + | 'E' + | 'D' + | 'C' + | 'B' + | 'A' + | '9' + | '8' + | '7' + | '6' + | '5' + | '4' + | '3' + | '2' + | '1' + | '0' + | '_' + )+ '"' + ; + +BASIC_IDENTIFIER + : LETTER ('_' ( LETTER | DIGIT) | LETTER | DIGIT)* + ; + +EXTENDED_IDENTIFIER + : '\\' ( + LETTER + | '0' ..'9' + | '&' + | '(' + | ')' + | '+' + | ',' + | '-' + | '.' + | '/' + | ':' + | ';' + | '<' + | '=' + | '>' + | '|' + | ' ' + | OTHER_SPECIAL_CHARACTER + | '\\' + | '#' + | '[' + | ']' + | '_' + )+ '\\' + ; + +LETTER + : 'A' ..'Z' + ; + +BLOCK_COMMENT + : '/*' .*? '*/' -> skip + ; + +COMMENT + : '--' (~'\n')* -> skip + ; + +TAB + : ('\t')+ -> skip + ; + +SPACE + : (' ')+ -> skip + ; + +NEWLINE + : '\n' -> skip + ; + +CR + : '\r' -> skip + ; + +CHARACTER_LITERAL + : APOSTROPHE . APOSTROPHE + ; + +OTHER_SPECIAL_CHARACTER + : '!' + | '$' + | '%' + | '@' + | '?' + | '^' + | '`' + | '{' + | '}' + | '~' + | ' ' + | '\u00A4' + | '\u00A6' + | '\u00A7' + | '\u00A9' + | '\u00AB' + | '\u00AC' + | '\u00AD' + | '\u00AE' + | '\u00B0' + | '\u00B1' + | '\u00B5' + | '\u00B6' + | '\u00B7' + | '\u2116' + | '\u00BB' + | '\u0400' ..'\u045E' + ; + +DOUBLESTAR + : '**' + ; + +CONDITION_OPERATOR + : '??' + ; + +CONDITION_EQ + : '?=' + ; + +CONDITION_NEQ + : '?/E' + ; + +CONDITION_LEQ + : '?<=' + ; + +CONDITION_LESSTHAN + : '?<' + ; + +CONDITION_GEQ + : '?>=' + ; + +CONDITION_GREATERTHAN + : '?>' + ; + +ASSIGN + : '==' + ; + +AT + : '@' + ; + +LEQ + : '<=' + ; + +GEQ + : '>=' + ; + +ARROW + : '=>' + ; + +HASH + : '#' + ; + +NEQ + : '/=' + ; + +WALRUS + : ':=' + ; + +BOX + : '<>' + ; + +DBLQUOTE + : '"' + ; + +SEMI + : ';' + ; + +COMMA + : ',' + ; + +AMPERSAND + : '&' + ; + +LPAREN + : '(' + ; + +RPAREN + : ')' + ; + +LBRACKET + : '[' + ; + +RBRACKET + : ']' + ; + +COLON + : ':' + ; + +MUL + : '*' + ; + +DIV + : '/' + ; + +PLUS + : '+' + ; + +MINUS + : '-' + ; + +// LSHIFT +// : '<<' +// ; + +LESSTHAN + : '<' + ; + +// RSHIFT +// : '>>' +// ; + +GREATERTHAN + : '>' + ; + +EQ + : '=' + ; + +BAR + : '|' + ; + +DOT + : '.' + ; + +BACKSLASH + : '\\' + ; + +BACKTICK + : '`' + ; + +EXPONENT + : 'E' ('+' | '-')? INTEGER (DOT INTEGER)? + ; + +HEXDIGIT + : 'A' ..'F' + ; + +INTEGER + : DIGIT ('_' | DIGIT)* + ; + +DIGIT + : '0' ..'9' + ; + +BASED_INTEGER + : EXTENDED_DIGIT ('_' | EXTENDED_DIGIT)* + ; + +EXTENDED_DIGIT + : (DIGIT | LETTER) + ; + +APOSTROPHE + : '\'' + ; + +QUESTION + : '?' + ; \ No newline at end of file diff --git a/src/ApiMark.Vhdl/VhdlAst/Antlr/vhdl2008.interp b/src/ApiMark.Vhdl/VhdlAst/Antlr/vhdl2008.interp new file mode 100644 index 0000000..bed5ef8 --- /dev/null +++ b/src/ApiMark.Vhdl/VhdlAst/Antlr/vhdl2008.interp @@ -0,0 +1,641 @@ +token literal names: +null +'ABS' +'ACCESS' +'ACROSS' +'AFTER' +'ALIAS' +'ALL' +'AND' +'ARCHITECTURE' +'ARRAY' +'ASSERT' +'ATTRIBUTE' +'BEGIN' +'BLOCK' +'BODY' +'BREAK' +'BUFFER' +'BUS' +'CASE' +'COMPONENT' +'CONFIGURATION' +'CONSTANT' +'CONTEXT' +'DEFAULT' +'DISCONNECT' +'DOWNTO' +'END' +'ENTITY' +'ELSE' +'ELSIF' +'EXIT' +'FILE' +'FOR' +'FORCE' +'FUNCTION' +'GENERATE' +'GENERIC' +'GROUP' +'GUARDED' +'IF' +'IMPURE' +'IN' +'INERTIAL' +'INOUT' +'IS' +'LABEL' +'LIBRARY' +'LIMIT' +'LINKAGE' +'LITERAL' +'LOOP' +'MAP' +'MOD' +'NAND' +'NATURE' +'NEW' +'NEXT' +'NOISE' +'NOR' +'NOT' +'NULL' +'OF' +'ON' +'OPEN' +'OR' +'OTHERS' +'OUT' +'PACKAGE' +'PARAMETER' +'PORT' +'POSTPONED' +'PROCESS' +'PROCEDURE' +'PROCEDURAL' +'PROTECTED' +'PURE' +'QUANTITY' +'RANGE' +'RELEASE' +'REVERSE_RANGE' +'REJECT' +'REM' +'RECORD' +'REFERENCE' +'REGISTER' +'REPORT' +'RETURN' +'ROL' +'ROR' +'SELECT' +'SEVERITY' +'SHARED' +'SIGNAL' +'SLA' +'SLL' +'SPECTRUM' +'SRA' +'SRL' +'SUBNATURE' +'SUBTYPE' +'TERMINAL' +'THEN' +'THROUGH' +'TO' +'TOLERANCE' +'TRANSPORT' +'TYPE' +'UNAFFECTED' +'UNITS' +'UNTIL' +'USE' +'VARIABLE' +'WAIT' +'WITH' +'WHEN' +'WHILE' +'XNOR' +'XOR' +null +null +null +null +null +null +null +null +null +null +null +null +null +null +'\n' +'\r' +null +null +'**' +'??' +'?=' +'?/E' +'?<=' +'?<' +'?>=' +'?>' +'==' +'@' +'<=' +'>=' +'=>' +'#' +'/=' +':=' +'<>' +'"' +';' +',' +'&' +'(' +')' +'[' +']' +':' +'*' +'/' +'+' +'-' +'<' +'>' +'=' +'|' +'.' +'\\' +'`' +null +null +null +null +null +null +'\'' +'?' + +token symbolic names: +null +ABS +ACCESS +ACROSS +AFTER +ALIAS +ALL +AND +ARCHITECTURE +ARRAY +ASSERT +ATTRIBUTE +BEGIN +BLOCK +BODY +BREAK +BUFFER +BUS +CASE +COMPONENT +CONFIGURATION +CONSTANT +CONTEXT +DEFAULT +DISCONNECT +DOWNTO +END +ENTITY +ELSE +ELSIF +EXIT +FILE +FOR +FORCE +FUNCTION +GENERATE +GENERIC +GROUP +GUARDED +IF +IMPURE +IN +INERTIAL +INOUT +IS +LABEL +LIBRARY +LIMIT +LINKAGE +LITERAL +LOOP +MAP +MOD +NAND +NATURE +NEW +NEXT +NOISE +NOR +NOT +NULL_ +OF +ON +OPEN +OR +OTHERS +OUT +PACKAGE +PARAMETER +PORT +POSTPONED +PROCESS +PROCEDURE +PROCEDURAL +PROTECTED +PURE +QUANTITY +RANGE +RELEASE +REVERSE_RANGE +REJECT +REM +RECORD +REFERENCE +REGISTER +REPORT +RETURN +ROL +ROR +SELECT +SEVERITY +SHARED +SIGNAL +SLA +SLL +SPECTRUM +SRA +SRL +SUBNATURE +SUBTYPE +TERMINAL +THEN +THROUGH +TO +TOLERANCE +TRANSPORT +TYPE +UNAFFECTED +UNITS +UNTIL +USE +VARIABLE +WAIT +WITH +WHEN +WHILE +XNOR +XOR +DECIMAL_LITERAL +STRING_LITERAL +BASED_LITERAL +BIT_STRING_LITERAL +BIT_STRING_LITERAL_BINARY +BIT_STRING_LITERAL_OCTAL +BIT_STRING_LITERAL_HEX +BASIC_IDENTIFIER +EXTENDED_IDENTIFIER +LETTER +BLOCK_COMMENT +COMMENT +TAB +SPACE +NEWLINE +CR +CHARACTER_LITERAL +OTHER_SPECIAL_CHARACTER +DOUBLESTAR +CONDITION_OPERATOR +CONDITION_EQ +CONDITION_NEQ +CONDITION_LEQ +CONDITION_LESSTHAN +CONDITION_GEQ +CONDITION_GREATERTHAN +ASSIGN +AT +LEQ +GEQ +ARROW +HASH +NEQ +WALRUS +BOX +DBLQUOTE +SEMI +COMMA +AMPERSAND +LPAREN +RPAREN +LBRACKET +RBRACKET +COLON +MUL +DIV +PLUS +MINUS +LESSTHAN +GREATERTHAN +EQ +BAR +DOT +BACKSLASH +BACKTICK +EXPONENT +HEXDIGIT +INTEGER +DIGIT +BASED_INTEGER +EXTENDED_DIGIT +APOSTROPHE +QUESTION + +rule names: +abstract_literal +access_type_definition +actual_designator +actual_parameter_part +actual_part +adding_operator +aggregate +alias_declaration +alias_designator +allocator +architecture_body +architecture_declarative_part +architecture_statement_part +array_constraint +array_element_constraint +array_element_resolution +array_type_definition +assertion +assertion_statement +association_element +association_list +attribute_declaration +attribute_designator +attribute_name +attribute_specification +base +binding_indication +block_configuration +block_declarative_item +block_declarative_part +block_header +block_specification +block_statement +block_statement_part +case_generate_alternative +case_generate_statement +case_statement +case_statement_alternative +choice +choices +component_configuration +component_declaration +component_instantiation_statement +component_specification +composite_type_definition +concurrent_assertion_statement +concurrent_conditional_signal_assignment +concurrent_procedure_call_statement +concurrent_selected_signal_assignment +concurrent_signal_assignment_statement +concurrent_simple_signal_assignment +concurrent_statement +condition +condition_clause +conditional_expression +conditional_force_assignment +conditional_signal_assignment +conditional_variable_assignment +conditional_waveform_assignment +conditional_waveforms +configuration_declaration +configuration_declarative_item +configuration_declarative_part +configuration_item +configuration_specification +constant_declaration +constrained_array_definition +constraint +context_clause +context_declaration +context_item +context_reference +delay_mechanism +design_file +design_unit +designator +direction +disconnection_specification +discrete_range +element_association +element_constraint +element_declaration +element_resolution +element_subtype_definition +entity_aspect +entity_class +entity_class_entry +entity_class_entry_list +entity_declaration +entity_declarative_item +entity_declarative_part +entity_designator +entity_header +entity_name_list +entity_specification +entity_statement +entity_statement_part +entity_tag +enumeration_literal +enumeration_type_definition +exit_statement +expression +factor +file_declaration +file_logical_name +file_open_information +file_type_definition +floating_type_definition +for_generate_statement +force_mode +formal_parameter_list +formal_part +full_type_declaration +function_call +function_specification +generate_specification +generate_statement +generate_statement_body +generic_clause +generic_list +generic_map_aspect +graphic_character +group_constituent +group_constituent_list +group_declaration +group_template_declaration +guarded_signal_specification +identifier +identifier_list +if_generate_statement +if_statement +incomplete_type_declaration +index_constraint +index_subtype_definition +indexed_name +instantiated_unit +instantiation_list +interface_constant_declaration +interface_declaration +interface_file_declaration +interface_function_specification +interface_incomplete_type_declaration +interface_list +interface_object_declaration +interface_package_declaration +interface_package_generic_map_aspect +interface_procedure_specification +interface_signal_declaration +interface_subprogram_declaration +interface_subprogram_default +interface_subprogram_specification +interface_type_declaration +interface_variable_declaration +iteration_scheme +label_colon +library_clause +library_unit +literal +logical_operator +loop_statement +mode_rule +multiplying_operator +name +name_part +next_statement +null_statement +numeric_literal +object_declaration +package_body +package_body_declarative_item +package_body_declarative_part +package_declaration +package_declarative_item +package_declarative_part +package_header +package_instantiation_declaration +parameter_specification +physical_literal +physical_type_definition +port_clause +port_list +port_map_aspect +prefix +primary +primary_unit +primary_unit_declaration +procedure_call +procedure_call_statement +procedure_specification +procedural_declarative_item +procedural_statement_part +process_declarative_item +process_declarative_part +process_sensitivity_list +process_statement +process_statement_part +protected_type_body +protected_type_body_declarative_item +protected_type_body_declarative_part +protected_type_declaration +protected_type_declarative_item +protected_type_declarative_part +protected_type_definition +qualified_expression +range_decl +range_constraint +record_constraint +record_element_constraint +record_element_resolution +record_resolution +record_type_definition +relation +relational_operator +report_statement +resolution_indication +return_statement +scalar_type_definition +secondary_unit +secondary_unit_declaration +selected_expressions +selected_force_assignment +selected_name +selected_signal_assignment +selected_variable_assignment +selected_waveform_assignment +selected_waveforms +sensitivity_clause +sensitivity_list +sequence_of_statements +sequential_statement +shift_expression +shift_operator +signal_assignment_statement +signal_declaration +signal_kind +signal_list +signature +simple_expression +simple_force_assignment +simple_release_assignment +simple_signal_assignment +simple_waveform_assignment +simple_variable_assignment +slice_name +subprogram_body +subprogram_declaration +subprogram_declarative_item +subprogram_declarative_part +subprogram_header +subprogram_instantiation_declaration +subprogram_kind +subprogram_specification +subprogram_statement_part +subtype_declaration +subtype_indication +suffix +target +term +timeout_clause +tool_directive +type_conversion +type_declaration +type_definition +unbounded_array_definition +use_clause +variable_assignment_statement +variable_declaration +wait_statement +waveform +waveform_element + + +atn: +[4, 1, 180, 2725, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, 88, 2, 89, 7, 89, 2, 90, 7, 90, 2, 91, 7, 91, 2, 92, 7, 92, 2, 93, 7, 93, 2, 94, 7, 94, 2, 95, 7, 95, 2, 96, 7, 96, 2, 97, 7, 97, 2, 98, 7, 98, 2, 99, 7, 99, 2, 100, 7, 100, 2, 101, 7, 101, 2, 102, 7, 102, 2, 103, 7, 103, 2, 104, 7, 104, 2, 105, 7, 105, 2, 106, 7, 106, 2, 107, 7, 107, 2, 108, 7, 108, 2, 109, 7, 109, 2, 110, 7, 110, 2, 111, 7, 111, 2, 112, 7, 112, 2, 113, 7, 113, 2, 114, 7, 114, 2, 115, 7, 115, 2, 116, 7, 116, 2, 117, 7, 117, 2, 118, 7, 118, 2, 119, 7, 119, 2, 120, 7, 120, 2, 121, 7, 121, 2, 122, 7, 122, 2, 123, 7, 123, 2, 124, 7, 124, 2, 125, 7, 125, 2, 126, 7, 126, 2, 127, 7, 127, 2, 128, 7, 128, 2, 129, 7, 129, 2, 130, 7, 130, 2, 131, 7, 131, 2, 132, 7, 132, 2, 133, 7, 133, 2, 134, 7, 134, 2, 135, 7, 135, 2, 136, 7, 136, 2, 137, 7, 137, 2, 138, 7, 138, 2, 139, 7, 139, 2, 140, 7, 140, 2, 141, 7, 141, 2, 142, 7, 142, 2, 143, 7, 143, 2, 144, 7, 144, 2, 145, 7, 145, 2, 146, 7, 146, 2, 147, 7, 147, 2, 148, 7, 148, 2, 149, 7, 149, 2, 150, 7, 150, 2, 151, 7, 151, 2, 152, 7, 152, 2, 153, 7, 153, 2, 154, 7, 154, 2, 155, 7, 155, 2, 156, 7, 156, 2, 157, 7, 157, 2, 158, 7, 158, 2, 159, 7, 159, 2, 160, 7, 160, 2, 161, 7, 161, 2, 162, 7, 162, 2, 163, 7, 163, 2, 164, 7, 164, 2, 165, 7, 165, 2, 166, 7, 166, 2, 167, 7, 167, 2, 168, 7, 168, 2, 169, 7, 169, 2, 170, 7, 170, 2, 171, 7, 171, 2, 172, 7, 172, 2, 173, 7, 173, 2, 174, 7, 174, 2, 175, 7, 175, 2, 176, 7, 176, 2, 177, 7, 177, 2, 178, 7, 178, 2, 179, 7, 179, 2, 180, 7, 180, 2, 181, 7, 181, 2, 182, 7, 182, 2, 183, 7, 183, 2, 184, 7, 184, 2, 185, 7, 185, 2, 186, 7, 186, 2, 187, 7, 187, 2, 188, 7, 188, 2, 189, 7, 189, 2, 190, 7, 190, 2, 191, 7, 191, 2, 192, 7, 192, 2, 193, 7, 193, 2, 194, 7, 194, 2, 195, 7, 195, 2, 196, 7, 196, 2, 197, 7, 197, 2, 198, 7, 198, 2, 199, 7, 199, 2, 200, 7, 200, 2, 201, 7, 201, 2, 202, 7, 202, 2, 203, 7, 203, 2, 204, 7, 204, 2, 205, 7, 205, 2, 206, 7, 206, 2, 207, 7, 207, 2, 208, 7, 208, 2, 209, 7, 209, 2, 210, 7, 210, 2, 211, 7, 211, 2, 212, 7, 212, 2, 213, 7, 213, 2, 214, 7, 214, 2, 215, 7, 215, 2, 216, 7, 216, 2, 217, 7, 217, 2, 218, 7, 218, 2, 219, 7, 219, 2, 220, 7, 220, 2, 221, 7, 221, 2, 222, 7, 222, 2, 223, 7, 223, 2, 224, 7, 224, 2, 225, 7, 225, 2, 226, 7, 226, 2, 227, 7, 227, 2, 228, 7, 228, 2, 229, 7, 229, 2, 230, 7, 230, 2, 231, 7, 231, 2, 232, 7, 232, 2, 233, 7, 233, 2, 234, 7, 234, 2, 235, 7, 235, 2, 236, 7, 236, 2, 237, 7, 237, 2, 238, 7, 238, 2, 239, 7, 239, 2, 240, 7, 240, 2, 241, 7, 241, 2, 242, 7, 242, 2, 243, 7, 243, 2, 244, 7, 244, 2, 245, 7, 245, 2, 246, 7, 246, 2, 247, 7, 247, 2, 248, 7, 248, 2, 249, 7, 249, 2, 250, 7, 250, 2, 251, 7, 251, 2, 252, 7, 252, 2, 253, 7, 253, 2, 254, 7, 254, 2, 255, 7, 255, 2, 256, 7, 256, 2, 257, 7, 257, 2, 258, 7, 258, 2, 259, 7, 259, 2, 260, 7, 260, 2, 261, 7, 261, 2, 262, 7, 262, 2, 263, 7, 263, 2, 264, 7, 264, 2, 265, 7, 265, 2, 266, 7, 266, 2, 267, 7, 267, 2, 268, 7, 268, 2, 269, 7, 269, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 2, 3, 2, 547, 8, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 553, 8, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 563, 8, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 5, 6, 571, 8, 6, 10, 6, 12, 6, 574, 9, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 582, 8, 7, 1, 7, 1, 7, 1, 7, 3, 7, 587, 8, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 3, 8, 594, 8, 8, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 600, 8, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 612, 8, 10, 1, 10, 3, 10, 615, 8, 10, 1, 10, 1, 10, 1, 11, 5, 11, 620, 8, 11, 10, 11, 12, 11, 623, 9, 11, 1, 12, 5, 12, 626, 8, 12, 10, 12, 12, 12, 629, 9, 12, 1, 13, 1, 13, 3, 13, 633, 8, 13, 1, 13, 1, 13, 3, 13, 637, 8, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 3, 16, 645, 8, 16, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 651, 8, 17, 1, 17, 1, 17, 3, 17, 655, 8, 17, 1, 18, 3, 18, 658, 8, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 3, 19, 666, 8, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 5, 20, 673, 8, 20, 10, 20, 12, 20, 676, 9, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22, 691, 8, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 3, 23, 700, 8, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 26, 1, 26, 3, 26, 714, 8, 26, 1, 26, 3, 26, 717, 8, 26, 1, 26, 3, 26, 720, 8, 26, 1, 27, 1, 27, 1, 27, 5, 27, 725, 8, 27, 10, 27, 12, 27, 728, 9, 27, 1, 27, 5, 27, 731, 8, 27, 10, 27, 12, 27, 734, 9, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 3, 28, 761, 8, 28, 1, 29, 5, 29, 764, 8, 29, 10, 29, 12, 29, 767, 9, 29, 1, 30, 1, 30, 1, 30, 1, 30, 3, 30, 773, 8, 30, 3, 30, 775, 8, 30, 1, 30, 1, 30, 1, 30, 1, 30, 3, 30, 781, 8, 30, 3, 30, 783, 8, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 3, 31, 791, 8, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 3, 32, 799, 8, 32, 1, 32, 3, 32, 802, 8, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 3, 32, 811, 8, 32, 1, 32, 1, 32, 1, 33, 5, 33, 816, 8, 33, 10, 33, 12, 33, 819, 9, 33, 1, 34, 1, 34, 3, 34, 823, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 5, 35, 834, 8, 35, 10, 35, 12, 35, 837, 9, 35, 1, 36, 3, 36, 840, 8, 36, 1, 36, 1, 36, 3, 36, 844, 8, 36, 1, 36, 1, 36, 1, 36, 4, 36, 849, 8, 36, 11, 36, 12, 36, 850, 1, 36, 1, 36, 1, 36, 3, 36, 856, 8, 36, 1, 36, 3, 36, 859, 8, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 3, 38, 872, 8, 38, 1, 39, 1, 39, 1, 39, 5, 39, 877, 8, 39, 10, 39, 12, 39, 880, 9, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 3, 40, 887, 8, 40, 1, 40, 3, 40, 890, 8, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 3, 41, 899, 8, 41, 1, 41, 3, 41, 902, 8, 41, 1, 41, 3, 41, 905, 8, 41, 1, 41, 1, 41, 1, 41, 3, 41, 910, 8, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 3, 42, 917, 8, 42, 1, 42, 3, 42, 920, 8, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 3, 44, 930, 8, 44, 1, 45, 3, 45, 933, 8, 45, 1, 45, 3, 45, 936, 8, 45, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 3, 46, 944, 8, 46, 1, 46, 3, 46, 947, 8, 46, 1, 46, 1, 46, 1, 46, 1, 47, 3, 47, 953, 8, 47, 1, 47, 3, 47, 956, 8, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 965, 8, 48, 1, 48, 1, 48, 1, 48, 3, 48, 970, 8, 48, 1, 48, 3, 48, 973, 8, 48, 1, 48, 1, 48, 1, 48, 1, 49, 3, 49, 979, 8, 49, 1, 49, 3, 49, 982, 8, 49, 1, 49, 1, 49, 1, 49, 3, 49, 987, 8, 49, 1, 50, 1, 50, 1, 50, 3, 50, 992, 8, 50, 1, 50, 3, 50, 995, 8, 50, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 3, 51, 1007, 8, 51, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 5, 54, 1022, 8, 54, 10, 54, 12, 54, 1025, 9, 54, 1, 54, 1, 54, 3, 54, 1029, 8, 54, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 1035, 8, 55, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 3, 56, 1042, 8, 56, 1, 57, 1, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 3, 58, 1051, 8, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 3, 59, 1061, 8, 59, 3, 59, 1063, 8, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 3, 60, 1074, 8, 60, 1, 60, 3, 60, 1077, 8, 60, 1, 60, 1, 60, 1, 61, 1, 61, 1, 61, 3, 61, 1084, 8, 61, 1, 62, 5, 62, 1087, 8, 62, 10, 62, 12, 62, 1090, 9, 62, 1, 63, 1, 63, 3, 63, 1094, 8, 63, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 3, 65, 1107, 8, 65, 1, 65, 1, 65, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 67, 1, 67, 1, 67, 3, 67, 1119, 8, 67, 1, 68, 5, 68, 1122, 8, 68, 10, 68, 12, 68, 1125, 9, 68, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 3, 69, 1133, 8, 69, 1, 69, 3, 69, 1136, 8, 69, 1, 69, 1, 69, 1, 70, 1, 70, 1, 70, 3, 70, 1143, 8, 70, 1, 71, 1, 71, 1, 71, 1, 71, 5, 71, 1149, 8, 71, 10, 71, 12, 71, 1152, 9, 71, 1, 71, 1, 71, 1, 72, 1, 72, 1, 72, 3, 72, 1159, 8, 72, 1, 72, 3, 72, 1162, 8, 72, 1, 73, 4, 73, 1165, 8, 73, 11, 73, 12, 73, 1166, 1, 73, 1, 73, 1, 74, 1, 74, 1, 74, 1, 75, 1, 75, 3, 75, 1176, 8, 75, 1, 76, 1, 76, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 78, 1, 78, 3, 78, 1188, 8, 78, 1, 79, 1, 79, 1, 79, 3, 79, 1193, 8, 79, 1, 79, 1, 79, 1, 80, 1, 80, 3, 80, 1199, 8, 80, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 82, 1, 82, 3, 82, 1208, 8, 82, 1, 83, 1, 83, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 3, 84, 1218, 8, 84, 1, 84, 1, 84, 1, 84, 3, 84, 1223, 8, 84, 1, 85, 1, 85, 1, 86, 1, 86, 3, 86, 1229, 8, 86, 1, 87, 1, 87, 1, 87, 5, 87, 1234, 8, 87, 10, 87, 12, 87, 1237, 9, 87, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 3, 88, 1246, 8, 88, 1, 88, 1, 88, 3, 88, 1250, 8, 88, 1, 88, 3, 88, 1253, 8, 88, 1, 88, 1, 88, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 3, 89, 1276, 8, 89, 1, 90, 5, 90, 1279, 8, 90, 10, 90, 12, 90, 1282, 9, 90, 1, 91, 1, 91, 1, 92, 3, 92, 1287, 8, 92, 1, 92, 3, 92, 1290, 8, 92, 1, 93, 1, 93, 1, 93, 5, 93, 1295, 8, 93, 10, 93, 12, 93, 1298, 9, 93, 1, 93, 1, 93, 3, 93, 1302, 8, 93, 1, 94, 1, 94, 1, 94, 1, 94, 1, 95, 1, 95, 1, 95, 3, 95, 1311, 8, 95, 1, 96, 5, 96, 1314, 8, 96, 10, 96, 12, 96, 1317, 9, 96, 1, 97, 1, 97, 1, 97, 3, 97, 1322, 8, 97, 1, 98, 1, 98, 3, 98, 1326, 8, 98, 1, 99, 1, 99, 1, 99, 1, 99, 5, 99, 1332, 8, 99, 10, 99, 12, 99, 1335, 9, 99, 1, 99, 1, 99, 1, 100, 3, 100, 1340, 8, 100, 1, 100, 1, 100, 3, 100, 1344, 8, 100, 1, 100, 1, 100, 3, 100, 1348, 8, 100, 1, 100, 1, 100, 1, 101, 1, 101, 1, 101, 1, 101, 1, 101, 1, 101, 5, 101, 1358, 8, 101, 10, 101, 12, 101, 1361, 9, 101, 3, 101, 1363, 8, 101, 1, 102, 1, 102, 1, 102, 3, 102, 1368, 8, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 3, 102, 1377, 8, 102, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 3, 103, 1384, 8, 103, 1, 103, 1, 103, 1, 104, 1, 104, 1, 105, 1, 105, 3, 105, 1392, 8, 105, 1, 105, 1, 105, 1, 105, 1, 106, 1, 106, 1, 106, 1, 106, 1, 107, 1, 107, 1, 108, 1, 108, 1, 108, 1, 108, 1, 108, 1, 109, 1, 109, 1, 110, 1, 110, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 3, 111, 1417, 8, 111, 1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 3, 113, 1430, 8, 113, 1, 114, 3, 114, 1433, 8, 114, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 3, 114, 1440, 8, 114, 1, 114, 1, 114, 1, 114, 3, 114, 1445, 8, 114, 1, 114, 1, 114, 1, 114, 1, 115, 1, 115, 1, 115, 3, 115, 1453, 8, 115, 1, 116, 3, 116, 1456, 8, 116, 1, 116, 1, 116, 1, 116, 3, 116, 1461, 8, 116, 1, 116, 1, 116, 1, 116, 3, 116, 1466, 8, 116, 1, 116, 1, 116, 1, 117, 1, 117, 1, 117, 3, 117, 1473, 8, 117, 1, 117, 5, 117, 1476, 8, 117, 10, 117, 12, 117, 1479, 9, 117, 1, 118, 1, 118, 1, 118, 1, 118, 1, 118, 1, 118, 1, 119, 1, 119, 1, 120, 1, 120, 1, 120, 1, 120, 1, 120, 1, 120, 1, 121, 1, 121, 1, 122, 1, 122, 3, 122, 1499, 8, 122, 1, 123, 1, 123, 1, 123, 5, 123, 1504, 8, 123, 10, 123, 12, 123, 1507, 9, 123, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 126, 1, 126, 1, 126, 1, 126, 1, 127, 1, 127, 1, 128, 1, 128, 1, 128, 5, 128, 1534, 8, 128, 10, 128, 12, 128, 1537, 9, 128, 1, 129, 1, 129, 1, 129, 1, 129, 1, 129, 1, 129, 1, 129, 1, 129, 1, 129, 5, 129, 1548, 8, 129, 10, 129, 12, 129, 1551, 9, 129, 1, 129, 1, 129, 1, 129, 3, 129, 1556, 8, 129, 1, 130, 3, 130, 1559, 8, 130, 1, 130, 1, 130, 1, 130, 1, 130, 1, 130, 1, 130, 1, 130, 1, 130, 1, 130, 5, 130, 1570, 8, 130, 10, 130, 12, 130, 1573, 9, 130, 1, 130, 1, 130, 3, 130, 1577, 8, 130, 1, 130, 1, 130, 1, 130, 3, 130, 1582, 8, 130, 1, 130, 1, 130, 1, 131, 1, 131, 1, 131, 1, 132, 1, 132, 1, 132, 1, 132, 5, 132, 1593, 8, 132, 10, 132, 12, 132, 1596, 9, 132, 1, 132, 1, 132, 1, 133, 1, 133, 1, 133, 1, 133, 1, 134, 1, 134, 1, 134, 1, 134, 1, 134, 5, 134, 1609, 8, 134, 10, 134, 12, 134, 1612, 9, 134, 1, 134, 1, 134, 1, 135, 3, 135, 1617, 8, 135, 1, 135, 1, 135, 1, 135, 1, 135, 1, 135, 1, 135, 1, 135, 3, 135, 1626, 8, 135, 1, 135, 1, 135, 3, 135, 1630, 8, 135, 1, 136, 1, 136, 1, 136, 5, 136, 1635, 8, 136, 10, 136, 12, 136, 1638, 9, 136, 1, 136, 1, 136, 3, 136, 1642, 8, 136, 1, 137, 3, 137, 1645, 8, 137, 1, 137, 1, 137, 1, 137, 3, 137, 1650, 8, 137, 1, 137, 1, 137, 1, 137, 3, 137, 1655, 8, 137, 1, 138, 1, 138, 1, 138, 1, 138, 3, 138, 1661, 8, 138, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 140, 3, 140, 1669, 8, 140, 1, 140, 1, 140, 1, 140, 3, 140, 1674, 8, 140, 1, 140, 1, 140, 1, 140, 1, 140, 3, 140, 1680, 8, 140, 1, 140, 1, 140, 1, 140, 1, 141, 1, 141, 1, 141, 1, 142, 1, 142, 1, 142, 5, 142, 1691, 8, 142, 10, 142, 12, 142, 1694, 9, 142, 1, 143, 1, 143, 1, 143, 1, 143, 3, 143, 1700, 8, 143, 1, 144, 1, 144, 1, 144, 1, 144, 1, 144, 1, 144, 1, 144, 1, 145, 1, 145, 1, 145, 1, 145, 1, 145, 1, 145, 3, 145, 1715, 8, 145, 1, 146, 1, 146, 1, 146, 3, 146, 1720, 8, 146, 1, 146, 1, 146, 1, 146, 1, 146, 3, 146, 1726, 8, 146, 1, 147, 3, 147, 1729, 8, 147, 1, 147, 1, 147, 1, 147, 3, 147, 1734, 8, 147, 1, 147, 1, 147, 3, 147, 1738, 8, 147, 1, 147, 1, 147, 3, 147, 1742, 8, 147, 1, 148, 1, 148, 1, 148, 1, 148, 1, 149, 1, 149, 3, 149, 1750, 8, 149, 1, 150, 1, 150, 3, 150, 1754, 8, 150, 1, 151, 1, 151, 1, 152, 3, 152, 1759, 8, 152, 1, 152, 1, 152, 1, 152, 3, 152, 1764, 8, 152, 1, 152, 1, 152, 1, 152, 3, 152, 1769, 8, 152, 1, 153, 1, 153, 1, 153, 1, 153, 3, 153, 1775, 8, 153, 1, 154, 1, 154, 1, 154, 1, 155, 1, 155, 1, 155, 1, 155, 1, 156, 1, 156, 3, 156, 1786, 8, 156, 1, 157, 1, 157, 1, 157, 1, 157, 1, 157, 3, 157, 1793, 8, 157, 1, 158, 1, 158, 1, 159, 3, 159, 1798, 8, 159, 1, 159, 3, 159, 1801, 8, 159, 1, 159, 1, 159, 1, 159, 1, 159, 1, 159, 3, 159, 1808, 8, 159, 1, 159, 1, 159, 1, 160, 1, 160, 1, 161, 1, 161, 1, 162, 1, 162, 1, 162, 3, 162, 1819, 8, 162, 1, 162, 5, 162, 1822, 8, 162, 10, 162, 12, 162, 1825, 9, 162, 1, 163, 1, 163, 4, 163, 1829, 8, 163, 11, 163, 12, 163, 1830, 1, 163, 1, 163, 1, 163, 1, 163, 1, 163, 1, 163, 1, 163, 1, 163, 1, 163, 1, 163, 1, 163, 1, 163, 1, 163, 1, 163, 3, 163, 1847, 8, 163, 3, 163, 1849, 8, 163, 1, 164, 3, 164, 1852, 8, 164, 1, 164, 1, 164, 3, 164, 1856, 8, 164, 1, 164, 1, 164, 3, 164, 1860, 8, 164, 1, 164, 1, 164, 1, 165, 3, 165, 1865, 8, 165, 1, 165, 1, 165, 1, 165, 1, 166, 1, 166, 3, 166, 1872, 8, 166, 1, 167, 1, 167, 1, 167, 1, 167, 3, 167, 1878, 8, 167, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 3, 168, 1888, 8, 168, 1, 168, 3, 168, 1891, 8, 168, 1, 168, 1, 168, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 3, 169, 1912, 8, 169, 1, 170, 5, 170, 1915, 8, 170, 10, 170, 12, 170, 1918, 9, 170, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 3, 171, 1927, 8, 171, 1, 171, 3, 171, 1930, 8, 171, 1, 171, 1, 171, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 3, 172, 1952, 8, 172, 1, 173, 5, 173, 1955, 8, 173, 10, 173, 12, 173, 1958, 9, 173, 1, 174, 1, 174, 1, 174, 1, 174, 3, 174, 1964, 8, 174, 3, 174, 1966, 8, 174, 1, 175, 1, 175, 1, 175, 1, 175, 1, 175, 1, 175, 1, 175, 1, 175, 1, 175, 1, 175, 1, 175, 1, 176, 1, 176, 1, 176, 1, 176, 1, 177, 1, 177, 1, 177, 1, 178, 1, 178, 1, 178, 1, 178, 5, 178, 1990, 8, 178, 10, 178, 12, 178, 1993, 9, 178, 1, 178, 1, 178, 1, 178, 3, 178, 1998, 8, 178, 1, 179, 1, 179, 1, 179, 1, 179, 1, 179, 1, 179, 1, 180, 1, 180, 1, 181, 1, 181, 1, 181, 1, 181, 1, 181, 1, 181, 1, 182, 1, 182, 3, 182, 2016, 8, 182, 1, 183, 1, 183, 1, 183, 1, 183, 1, 183, 1, 183, 1, 183, 1, 183, 1, 183, 1, 183, 1, 183, 3, 183, 2029, 8, 183, 1, 184, 1, 184, 1, 184, 1, 184, 1, 184, 3, 184, 2036, 8, 184, 1, 185, 1, 185, 1, 185, 1, 186, 1, 186, 1, 186, 1, 186, 1, 186, 3, 186, 2046, 8, 186, 1, 187, 3, 187, 2049, 8, 187, 1, 187, 1, 187, 1, 187, 1, 188, 1, 188, 1, 188, 1, 188, 3, 188, 2058, 8, 188, 1, 188, 1, 188, 1, 188, 1, 188, 3, 188, 2064, 8, 188, 1, 189, 1, 189, 1, 189, 1, 189, 1, 189, 1, 189, 1, 189, 1, 189, 1, 189, 1, 189, 1, 189, 1, 189, 1, 189, 1, 189, 1, 189, 1, 189, 1, 189, 3, 189, 2083, 8, 189, 1, 190, 5, 190, 2086, 8, 190, 10, 190, 12, 190, 2089, 9, 190, 1, 191, 1, 191, 1, 191, 1, 191, 1, 191, 1, 191, 1, 191, 1, 191, 1, 191, 1, 191, 1, 191, 1, 191, 1, 191, 3, 191, 2104, 8, 191, 1, 192, 5, 192, 2107, 8, 192, 10, 192, 12, 192, 2110, 9, 192, 1, 193, 1, 193, 3, 193, 2114, 8, 193, 1, 194, 3, 194, 2117, 8, 194, 1, 194, 3, 194, 2120, 8, 194, 1, 194, 1, 194, 1, 194, 1, 194, 1, 194, 3, 194, 2127, 8, 194, 1, 194, 3, 194, 2130, 8, 194, 1, 194, 1, 194, 1, 194, 1, 194, 1, 194, 3, 194, 2137, 8, 194, 1, 194, 1, 194, 3, 194, 2141, 8, 194, 1, 194, 1, 194, 1, 195, 5, 195, 2146, 8, 195, 10, 195, 12, 195, 2149, 9, 195, 1, 196, 1, 196, 1, 196, 1, 196, 1, 196, 1, 196, 1, 196, 3, 196, 2158, 8, 196, 1, 197, 1, 197, 1, 197, 1, 197, 1, 197, 1, 197, 1, 197, 1, 197, 1, 197, 1, 197, 1, 197, 1, 197, 1, 197, 1, 197, 1, 197, 1, 197, 1, 197, 3, 197, 2177, 8, 197, 1, 198, 3, 198, 2180, 8, 198, 1, 199, 1, 199, 1, 199, 1, 199, 1, 199, 3, 199, 2187, 8, 199, 1, 200, 1, 200, 1, 200, 1, 200, 3, 200, 2193, 8, 200, 1, 201, 3, 201, 2196, 8, 201, 1, 202, 1, 202, 3, 202, 2200, 8, 202, 1, 203, 1, 203, 1, 203, 1, 203, 1, 203, 1, 203, 1, 203, 3, 203, 2209, 8, 203, 1, 204, 1, 204, 1, 204, 1, 204, 1, 204, 3, 204, 2216, 8, 204, 1, 205, 1, 205, 1, 205, 1, 206, 1, 206, 1, 206, 1, 206, 5, 206, 2225, 8, 206, 10, 206, 12, 206, 2228, 9, 206, 1, 206, 1, 206, 1, 207, 1, 207, 1, 207, 1, 208, 1, 208, 1, 208, 1, 209, 1, 209, 1, 209, 5, 209, 2241, 8, 209, 10, 209, 12, 209, 2244, 9, 209, 1, 210, 1, 210, 4, 210, 2248, 8, 210, 11, 210, 12, 210, 2249, 1, 210, 1, 210, 1, 210, 3, 210, 2255, 8, 210, 1, 211, 1, 211, 1, 211, 1, 211, 3, 211, 2261, 8, 211, 1, 212, 1, 212, 1, 213, 3, 213, 2266, 8, 213, 1, 213, 1, 213, 1, 213, 1, 213, 3, 213, 2272, 8, 213, 1, 213, 1, 213, 1, 214, 1, 214, 1, 214, 1, 214, 1, 214, 3, 214, 2281, 8, 214, 1, 215, 3, 215, 2284, 8, 215, 1, 215, 1, 215, 3, 215, 2288, 8, 215, 1, 215, 1, 215, 1, 216, 1, 216, 1, 216, 3, 216, 2295, 8, 216, 1, 217, 1, 217, 3, 217, 2299, 8, 217, 1, 218, 1, 218, 1, 218, 1, 218, 1, 218, 1, 219, 1, 219, 1, 219, 1, 219, 1, 219, 5, 219, 2311, 8, 219, 10, 219, 12, 219, 2314, 9, 219, 1, 219, 1, 219, 1, 219, 1, 219, 1, 220, 1, 220, 1, 220, 1, 220, 3, 220, 2324, 8, 220, 1, 220, 1, 220, 1, 220, 1, 220, 3, 220, 2330, 8, 220, 1, 220, 1, 220, 1, 220, 1, 221, 1, 221, 1, 221, 1, 221, 1, 222, 1, 222, 3, 222, 2341, 8, 222, 1, 223, 1, 223, 1, 223, 1, 223, 3, 223, 2347, 8, 223, 1, 223, 1, 223, 1, 223, 1, 223, 1, 223, 1, 224, 1, 224, 1, 224, 1, 224, 3, 224, 2358, 8, 224, 1, 224, 1, 224, 1, 224, 3, 224, 2363, 8, 224, 1, 224, 1, 224, 1, 224, 1, 225, 1, 225, 1, 225, 1, 225, 1, 225, 1, 225, 1, 225, 1, 225, 5, 225, 2376, 8, 225, 10, 225, 12, 225, 2379, 9, 225, 1, 226, 1, 226, 1, 226, 1, 227, 1, 227, 1, 227, 5, 227, 2387, 8, 227, 10, 227, 12, 227, 2390, 9, 227, 1, 228, 5, 228, 2393, 8, 228, 10, 228, 12, 228, 2396, 9, 228, 1, 229, 1, 229, 1, 229, 1, 229, 1, 229, 1, 229, 1, 229, 1, 229, 1, 229, 1, 229, 1, 229, 1, 229, 1, 229, 3, 229, 2411, 8, 229, 1, 230, 1, 230, 1, 230, 1, 230, 3, 230, 2417, 8, 230, 1, 231, 1, 231, 1, 232, 3, 232, 2422, 8, 232, 1, 232, 1, 232, 1, 232, 3, 232, 2427, 8, 232, 1, 233, 1, 233, 1, 233, 1, 233, 1, 233, 3, 233, 2434, 8, 233, 1, 233, 1, 233, 3, 233, 2438, 8, 233, 1, 233, 1, 233, 1, 234, 1, 234, 1, 235, 1, 235, 1, 235, 5, 235, 2447, 8, 235, 10, 235, 12, 235, 2450, 9, 235, 1, 235, 1, 235, 3, 235, 2454, 8, 235, 1, 236, 1, 236, 1, 236, 1, 236, 3, 236, 2460, 8, 236, 1, 236, 1, 236, 3, 236, 2464, 8, 236, 1, 236, 1, 236, 1, 237, 3, 237, 2469, 8, 237, 1, 237, 1, 237, 1, 237, 1, 237, 5, 237, 2475, 8, 237, 10, 237, 12, 237, 2478, 9, 237, 1, 238, 3, 238, 2481, 8, 238, 1, 238, 1, 238, 1, 239, 3, 239, 2486, 8, 239, 1, 240, 1, 240, 1, 240, 1, 240, 1, 240, 3, 240, 2493, 8, 240, 1, 240, 1, 240, 1, 241, 3, 241, 2498, 8, 241, 1, 241, 1, 241, 1, 242, 1, 242, 1, 242, 1, 242, 1, 242, 1, 243, 1, 243, 1, 243, 1, 243, 1, 243, 1, 244, 1, 244, 1, 244, 1, 244, 1, 244, 1, 244, 1, 244, 3, 244, 2519, 8, 244, 1, 244, 3, 244, 2522, 8, 244, 1, 244, 1, 244, 1, 245, 1, 245, 1, 245, 1, 246, 1, 246, 1, 246, 1, 246, 1, 246, 1, 246, 1, 246, 1, 246, 1, 246, 1, 246, 1, 246, 1, 246, 1, 246, 1, 246, 1, 246, 1, 246, 1, 246, 3, 246, 2546, 8, 246, 1, 247, 5, 247, 2549, 8, 247, 10, 247, 12, 247, 2552, 9, 247, 1, 248, 1, 248, 1, 248, 1, 248, 1, 248, 1, 248, 3, 248, 2560, 8, 248, 1, 249, 1, 249, 1, 249, 1, 249, 1, 249, 1, 249, 1, 249, 1, 249, 1, 250, 1, 250, 1, 251, 1, 251, 3, 251, 2574, 8, 251, 1, 252, 5, 252, 2577, 8, 252, 10, 252, 12, 252, 2580, 9, 252, 1, 253, 1, 253, 1, 253, 1, 253, 1, 253, 1, 253, 1, 254, 3, 254, 2589, 8, 254, 1, 254, 1, 254, 3, 254, 2593, 8, 254, 1, 255, 1, 255, 1, 255, 1, 255, 3, 255, 2599, 8, 255, 1, 256, 1, 256, 3, 256, 2603, 8, 256, 1, 257, 1, 257, 1, 257, 1, 257, 5, 257, 2609, 8, 257, 10, 257, 12, 257, 2612, 9, 257, 1, 258, 1, 258, 1, 258, 1, 259, 1, 259, 1, 259, 5, 259, 2620, 8, 259, 10, 259, 12, 259, 2623, 9, 259, 1, 260, 1, 260, 1, 260, 1, 260, 1, 260, 1, 261, 1, 261, 3, 261, 2632, 8, 261, 1, 262, 1, 262, 1, 262, 1, 262, 1, 262, 3, 262, 2639, 8, 262, 1, 263, 1, 263, 1, 263, 1, 263, 1, 263, 5, 263, 2646, 8, 263, 10, 263, 12, 263, 2649, 9, 263, 1, 263, 1, 263, 1, 263, 1, 263, 1, 264, 1, 264, 1, 264, 1, 264, 5, 264, 2659, 8, 264, 10, 264, 12, 264, 2662, 9, 264, 1, 264, 1, 264, 1, 265, 3, 265, 2667, 8, 265, 1, 265, 1, 265, 1, 265, 3, 265, 2672, 8, 265, 1, 266, 3, 266, 2675, 8, 266, 1, 266, 1, 266, 1, 266, 1, 266, 1, 266, 1, 266, 3, 266, 2683, 8, 266, 1, 266, 1, 266, 1, 267, 3, 267, 2688, 8, 267, 1, 267, 1, 267, 3, 267, 2692, 8, 267, 1, 267, 3, 267, 2695, 8, 267, 1, 267, 3, 267, 2698, 8, 267, 1, 267, 1, 267, 1, 268, 1, 268, 1, 268, 5, 268, 2705, 8, 268, 10, 268, 12, 268, 2708, 9, 268, 1, 268, 3, 268, 2711, 8, 268, 1, 269, 1, 269, 1, 269, 3, 269, 2716, 8, 269, 1, 269, 1, 269, 1, 269, 3, 269, 2721, 8, 269, 3, 269, 2723, 8, 269, 1, 269, 0, 0, 270, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, 224, 226, 228, 230, 232, 234, 236, 238, 240, 242, 244, 246, 248, 250, 252, 254, 256, 258, 260, 262, 264, 266, 268, 270, 272, 274, 276, 278, 280, 282, 284, 286, 288, 290, 292, 294, 296, 298, 300, 302, 304, 306, 308, 310, 312, 314, 316, 318, 320, 322, 324, 326, 328, 330, 332, 334, 336, 338, 340, 342, 344, 346, 348, 350, 352, 354, 356, 358, 360, 362, 364, 366, 368, 370, 372, 374, 376, 378, 380, 382, 384, 386, 388, 390, 392, 394, 396, 398, 400, 402, 404, 406, 408, 410, 412, 414, 416, 418, 420, 422, 424, 426, 428, 430, 432, 434, 436, 438, 440, 442, 444, 446, 448, 450, 452, 454, 456, 458, 460, 462, 464, 466, 468, 470, 472, 474, 476, 478, 480, 482, 484, 486, 488, 490, 492, 494, 496, 498, 500, 502, 504, 506, 508, 510, 512, 514, 516, 518, 520, 522, 524, 526, 528, 530, 532, 534, 536, 538, 0, 16, 2, 0, 118, 118, 120, 120, 2, 0, 156, 156, 164, 165, 2, 0, 25, 25, 103, 103, 15, 0, 8, 8, 19, 21, 27, 27, 31, 31, 34, 34, 37, 37, 45, 45, 49, 49, 67, 67, 72, 72, 92, 92, 99, 99, 106, 106, 108, 108, 111, 111, 2, 0, 41, 41, 66, 66, 2, 0, 40, 40, 75, 75, 1, 0, 125, 126, 2, 0, 23, 23, 152, 152, 5, 0, 7, 7, 53, 53, 58, 58, 64, 64, 116, 117, 5, 0, 16, 16, 41, 41, 43, 43, 48, 48, 66, 66, 3, 0, 52, 52, 81, 81, 162, 163, 4, 0, 138, 143, 146, 147, 150, 150, 166, 168, 3, 0, 87, 88, 93, 94, 96, 97, 2, 0, 17, 17, 84, 84, 1, 0, 164, 165, 2, 0, 34, 34, 72, 72, 2949, 0, 540, 1, 0, 0, 0, 2, 542, 1, 0, 0, 0, 4, 552, 1, 0, 0, 0, 6, 554, 1, 0, 0, 0, 8, 562, 1, 0, 0, 0, 10, 564, 1, 0, 0, 0, 12, 566, 1, 0, 0, 0, 14, 577, 1, 0, 0, 0, 16, 593, 1, 0, 0, 0, 18, 599, 1, 0, 0, 0, 20, 601, 1, 0, 0, 0, 22, 621, 1, 0, 0, 0, 24, 627, 1, 0, 0, 0, 26, 636, 1, 0, 0, 0, 28, 638, 1, 0, 0, 0, 30, 640, 1, 0, 0, 0, 32, 644, 1, 0, 0, 0, 34, 646, 1, 0, 0, 0, 36, 657, 1, 0, 0, 0, 38, 665, 1, 0, 0, 0, 40, 669, 1, 0, 0, 0, 42, 677, 1, 0, 0, 0, 44, 690, 1, 0, 0, 0, 46, 692, 1, 0, 0, 0, 48, 701, 1, 0, 0, 0, 50, 709, 1, 0, 0, 0, 52, 713, 1, 0, 0, 0, 54, 721, 1, 0, 0, 0, 56, 760, 1, 0, 0, 0, 58, 765, 1, 0, 0, 0, 60, 774, 1, 0, 0, 0, 62, 784, 1, 0, 0, 0, 64, 792, 1, 0, 0, 0, 66, 817, 1, 0, 0, 0, 68, 820, 1, 0, 0, 0, 70, 828, 1, 0, 0, 0, 72, 839, 1, 0, 0, 0, 74, 862, 1, 0, 0, 0, 76, 871, 1, 0, 0, 0, 78, 873, 1, 0, 0, 0, 80, 881, 1, 0, 0, 0, 82, 895, 1, 0, 0, 0, 84, 913, 1, 0, 0, 0, 86, 923, 1, 0, 0, 0, 88, 929, 1, 0, 0, 0, 90, 932, 1, 0, 0, 0, 92, 940, 1, 0, 0, 0, 94, 952, 1, 0, 0, 0, 96, 960, 1, 0, 0, 0, 98, 978, 1, 0, 0, 0, 100, 988, 1, 0, 0, 0, 102, 1006, 1, 0, 0, 0, 104, 1008, 1, 0, 0, 0, 106, 1010, 1, 0, 0, 0, 108, 1013, 1, 0, 0, 0, 110, 1030, 1, 0, 0, 0, 112, 1041, 1, 0, 0, 0, 114, 1043, 1, 0, 0, 0, 116, 1047, 1, 0, 0, 0, 118, 1055, 1, 0, 0, 0, 120, 1064, 1, 0, 0, 0, 122, 1083, 1, 0, 0, 0, 124, 1088, 1, 0, 0, 0, 126, 1093, 1, 0, 0, 0, 128, 1095, 1, 0, 0, 0, 130, 1100, 1, 0, 0, 0, 132, 1110, 1, 0, 0, 0, 134, 1118, 1, 0, 0, 0, 136, 1123, 1, 0, 0, 0, 138, 1126, 1, 0, 0, 0, 140, 1142, 1, 0, 0, 0, 142, 1144, 1, 0, 0, 0, 144, 1161, 1, 0, 0, 0, 146, 1164, 1, 0, 0, 0, 148, 1170, 1, 0, 0, 0, 150, 1175, 1, 0, 0, 0, 152, 1177, 1, 0, 0, 0, 154, 1179, 1, 0, 0, 0, 156, 1187, 1, 0, 0, 0, 158, 1192, 1, 0, 0, 0, 160, 1198, 1, 0, 0, 0, 162, 1200, 1, 0, 0, 0, 164, 1207, 1, 0, 0, 0, 166, 1209, 1, 0, 0, 0, 168, 1222, 1, 0, 0, 0, 170, 1224, 1, 0, 0, 0, 172, 1226, 1, 0, 0, 0, 174, 1230, 1, 0, 0, 0, 176, 1238, 1, 0, 0, 0, 178, 1275, 1, 0, 0, 0, 180, 1280, 1, 0, 0, 0, 182, 1283, 1, 0, 0, 0, 184, 1286, 1, 0, 0, 0, 186, 1301, 1, 0, 0, 0, 188, 1303, 1, 0, 0, 0, 190, 1310, 1, 0, 0, 0, 192, 1315, 1, 0, 0, 0, 194, 1321, 1, 0, 0, 0, 196, 1325, 1, 0, 0, 0, 198, 1327, 1, 0, 0, 0, 200, 1339, 1, 0, 0, 0, 202, 1362, 1, 0, 0, 0, 204, 1376, 1, 0, 0, 0, 206, 1378, 1, 0, 0, 0, 208, 1387, 1, 0, 0, 0, 210, 1391, 1, 0, 0, 0, 212, 1396, 1, 0, 0, 0, 214, 1400, 1, 0, 0, 0, 216, 1402, 1, 0, 0, 0, 218, 1407, 1, 0, 0, 0, 220, 1409, 1, 0, 0, 0, 222, 1411, 1, 0, 0, 0, 224, 1418, 1, 0, 0, 0, 226, 1424, 1, 0, 0, 0, 228, 1432, 1, 0, 0, 0, 230, 1452, 1, 0, 0, 0, 232, 1455, 1, 0, 0, 0, 234, 1472, 1, 0, 0, 0, 236, 1480, 1, 0, 0, 0, 238, 1486, 1, 0, 0, 0, 240, 1488, 1, 0, 0, 0, 242, 1494, 1, 0, 0, 0, 244, 1498, 1, 0, 0, 0, 246, 1500, 1, 0, 0, 0, 248, 1508, 1, 0, 0, 0, 250, 1516, 1, 0, 0, 0, 252, 1524, 1, 0, 0, 0, 254, 1528, 1, 0, 0, 0, 256, 1530, 1, 0, 0, 0, 258, 1538, 1, 0, 0, 0, 260, 1558, 1, 0, 0, 0, 262, 1585, 1, 0, 0, 0, 264, 1588, 1, 0, 0, 0, 266, 1599, 1, 0, 0, 0, 268, 1603, 1, 0, 0, 0, 270, 1629, 1, 0, 0, 0, 272, 1641, 1, 0, 0, 0, 274, 1644, 1, 0, 0, 0, 276, 1660, 1, 0, 0, 0, 278, 1662, 1, 0, 0, 0, 280, 1668, 1, 0, 0, 0, 282, 1684, 1, 0, 0, 0, 284, 1687, 1, 0, 0, 0, 286, 1699, 1, 0, 0, 0, 288, 1701, 1, 0, 0, 0, 290, 1714, 1, 0, 0, 0, 292, 1716, 1, 0, 0, 0, 294, 1728, 1, 0, 0, 0, 296, 1743, 1, 0, 0, 0, 298, 1749, 1, 0, 0, 0, 300, 1753, 1, 0, 0, 0, 302, 1755, 1, 0, 0, 0, 304, 1758, 1, 0, 0, 0, 306, 1774, 1, 0, 0, 0, 308, 1776, 1, 0, 0, 0, 310, 1779, 1, 0, 0, 0, 312, 1785, 1, 0, 0, 0, 314, 1792, 1, 0, 0, 0, 316, 1794, 1, 0, 0, 0, 318, 1797, 1, 0, 0, 0, 320, 1811, 1, 0, 0, 0, 322, 1813, 1, 0, 0, 0, 324, 1818, 1, 0, 0, 0, 326, 1848, 1, 0, 0, 0, 328, 1851, 1, 0, 0, 0, 330, 1864, 1, 0, 0, 0, 332, 1871, 1, 0, 0, 0, 334, 1877, 1, 0, 0, 0, 336, 1879, 1, 0, 0, 0, 338, 1911, 1, 0, 0, 0, 340, 1916, 1, 0, 0, 0, 342, 1919, 1, 0, 0, 0, 344, 1951, 1, 0, 0, 0, 346, 1956, 1, 0, 0, 0, 348, 1965, 1, 0, 0, 0, 350, 1967, 1, 0, 0, 0, 352, 1978, 1, 0, 0, 0, 354, 1982, 1, 0, 0, 0, 356, 1985, 1, 0, 0, 0, 358, 1999, 1, 0, 0, 0, 360, 2005, 1, 0, 0, 0, 362, 2007, 1, 0, 0, 0, 364, 2015, 1, 0, 0, 0, 366, 2028, 1, 0, 0, 0, 368, 2035, 1, 0, 0, 0, 370, 2037, 1, 0, 0, 0, 372, 2040, 1, 0, 0, 0, 374, 2048, 1, 0, 0, 0, 376, 2053, 1, 0, 0, 0, 378, 2082, 1, 0, 0, 0, 380, 2087, 1, 0, 0, 0, 382, 2103, 1, 0, 0, 0, 384, 2108, 1, 0, 0, 0, 386, 2113, 1, 0, 0, 0, 388, 2116, 1, 0, 0, 0, 390, 2147, 1, 0, 0, 0, 392, 2150, 1, 0, 0, 0, 394, 2176, 1, 0, 0, 0, 396, 2179, 1, 0, 0, 0, 398, 2181, 1, 0, 0, 0, 400, 2192, 1, 0, 0, 0, 402, 2195, 1, 0, 0, 0, 404, 2199, 1, 0, 0, 0, 406, 2201, 1, 0, 0, 0, 408, 2215, 1, 0, 0, 0, 410, 2217, 1, 0, 0, 0, 412, 2220, 1, 0, 0, 0, 414, 2231, 1, 0, 0, 0, 416, 2234, 1, 0, 0, 0, 418, 2237, 1, 0, 0, 0, 420, 2245, 1, 0, 0, 0, 422, 2256, 1, 0, 0, 0, 424, 2262, 1, 0, 0, 0, 426, 2265, 1, 0, 0, 0, 428, 2280, 1, 0, 0, 0, 430, 2283, 1, 0, 0, 0, 432, 2294, 1, 0, 0, 0, 434, 2298, 1, 0, 0, 0, 436, 2300, 1, 0, 0, 0, 438, 2312, 1, 0, 0, 0, 440, 2319, 1, 0, 0, 0, 442, 2334, 1, 0, 0, 0, 444, 2340, 1, 0, 0, 0, 446, 2342, 1, 0, 0, 0, 448, 2353, 1, 0, 0, 0, 450, 2367, 1, 0, 0, 0, 452, 2380, 1, 0, 0, 0, 454, 2383, 1, 0, 0, 0, 456, 2394, 1, 0, 0, 0, 458, 2410, 1, 0, 0, 0, 460, 2412, 1, 0, 0, 0, 462, 2418, 1, 0, 0, 0, 464, 2421, 1, 0, 0, 0, 466, 2428, 1, 0, 0, 0, 468, 2441, 1, 0, 0, 0, 470, 2453, 1, 0, 0, 0, 472, 2455, 1, 0, 0, 0, 474, 2468, 1, 0, 0, 0, 476, 2480, 1, 0, 0, 0, 478, 2485, 1, 0, 0, 0, 480, 2487, 1, 0, 0, 0, 482, 2497, 1, 0, 0, 0, 484, 2501, 1, 0, 0, 0, 486, 2506, 1, 0, 0, 0, 488, 2511, 1, 0, 0, 0, 490, 2525, 1, 0, 0, 0, 492, 2545, 1, 0, 0, 0, 494, 2550, 1, 0, 0, 0, 496, 2559, 1, 0, 0, 0, 498, 2561, 1, 0, 0, 0, 500, 2569, 1, 0, 0, 0, 502, 2573, 1, 0, 0, 0, 504, 2578, 1, 0, 0, 0, 506, 2581, 1, 0, 0, 0, 508, 2588, 1, 0, 0, 0, 510, 2598, 1, 0, 0, 0, 512, 2602, 1, 0, 0, 0, 514, 2604, 1, 0, 0, 0, 516, 2613, 1, 0, 0, 0, 518, 2616, 1, 0, 0, 0, 520, 2624, 1, 0, 0, 0, 522, 2631, 1, 0, 0, 0, 524, 2638, 1, 0, 0, 0, 526, 2640, 1, 0, 0, 0, 528, 2654, 1, 0, 0, 0, 530, 2666, 1, 0, 0, 0, 532, 2674, 1, 0, 0, 0, 534, 2687, 1, 0, 0, 0, 536, 2710, 1, 0, 0, 0, 538, 2722, 1, 0, 0, 0, 540, 541, 7, 0, 0, 0, 541, 1, 1, 0, 0, 0, 542, 543, 5, 2, 0, 0, 543, 544, 3, 508, 254, 0, 544, 3, 1, 0, 0, 0, 545, 547, 5, 42, 0, 0, 546, 545, 1, 0, 0, 0, 546, 547, 1, 0, 0, 0, 547, 548, 1, 0, 0, 0, 548, 553, 3, 202, 101, 0, 549, 553, 3, 324, 162, 0, 550, 553, 3, 508, 254, 0, 551, 553, 5, 63, 0, 0, 552, 546, 1, 0, 0, 0, 552, 549, 1, 0, 0, 0, 552, 550, 1, 0, 0, 0, 552, 551, 1, 0, 0, 0, 553, 5, 1, 0, 0, 0, 554, 555, 3, 40, 20, 0, 555, 7, 1, 0, 0, 0, 556, 563, 3, 4, 2, 0, 557, 558, 3, 324, 162, 0, 558, 559, 5, 157, 0, 0, 559, 560, 3, 4, 2, 0, 560, 561, 5, 158, 0, 0, 561, 563, 1, 0, 0, 0, 562, 556, 1, 0, 0, 0, 562, 557, 1, 0, 0, 0, 563, 9, 1, 0, 0, 0, 564, 565, 7, 1, 0, 0, 565, 11, 1, 0, 0, 0, 566, 567, 5, 157, 0, 0, 567, 572, 3, 158, 79, 0, 568, 569, 5, 155, 0, 0, 569, 571, 3, 158, 79, 0, 570, 568, 1, 0, 0, 0, 571, 574, 1, 0, 0, 0, 572, 570, 1, 0, 0, 0, 572, 573, 1, 0, 0, 0, 573, 575, 1, 0, 0, 0, 574, 572, 1, 0, 0, 0, 575, 576, 5, 158, 0, 0, 576, 13, 1, 0, 0, 0, 577, 578, 5, 5, 0, 0, 578, 581, 3, 16, 8, 0, 579, 580, 5, 161, 0, 0, 580, 582, 3, 508, 254, 0, 581, 579, 1, 0, 0, 0, 581, 582, 1, 0, 0, 0, 582, 583, 1, 0, 0, 0, 583, 584, 5, 44, 0, 0, 584, 586, 3, 324, 162, 0, 585, 587, 3, 472, 236, 0, 586, 585, 1, 0, 0, 0, 586, 587, 1, 0, 0, 0, 587, 588, 1, 0, 0, 0, 588, 589, 5, 154, 0, 0, 589, 15, 1, 0, 0, 0, 590, 594, 3, 254, 127, 0, 591, 594, 5, 134, 0, 0, 592, 594, 5, 119, 0, 0, 593, 590, 1, 0, 0, 0, 593, 591, 1, 0, 0, 0, 593, 592, 1, 0, 0, 0, 594, 17, 1, 0, 0, 0, 595, 596, 5, 55, 0, 0, 596, 600, 3, 508, 254, 0, 597, 598, 5, 55, 0, 0, 598, 600, 3, 406, 203, 0, 599, 595, 1, 0, 0, 0, 599, 597, 1, 0, 0, 0, 600, 19, 1, 0, 0, 0, 601, 602, 5, 8, 0, 0, 602, 603, 3, 254, 127, 0, 603, 604, 5, 61, 0, 0, 604, 605, 3, 324, 162, 0, 605, 606, 5, 44, 0, 0, 606, 607, 3, 22, 11, 0, 607, 608, 5, 12, 0, 0, 608, 609, 3, 24, 12, 0, 609, 611, 5, 26, 0, 0, 610, 612, 5, 8, 0, 0, 611, 610, 1, 0, 0, 0, 611, 612, 1, 0, 0, 0, 612, 614, 1, 0, 0, 0, 613, 615, 3, 254, 127, 0, 614, 613, 1, 0, 0, 0, 614, 615, 1, 0, 0, 0, 615, 616, 1, 0, 0, 0, 616, 617, 5, 154, 0, 0, 617, 21, 1, 0, 0, 0, 618, 620, 3, 56, 28, 0, 619, 618, 1, 0, 0, 0, 620, 623, 1, 0, 0, 0, 621, 619, 1, 0, 0, 0, 621, 622, 1, 0, 0, 0, 622, 23, 1, 0, 0, 0, 623, 621, 1, 0, 0, 0, 624, 626, 3, 102, 51, 0, 625, 624, 1, 0, 0, 0, 626, 629, 1, 0, 0, 0, 627, 625, 1, 0, 0, 0, 627, 628, 1, 0, 0, 0, 628, 25, 1, 0, 0, 0, 629, 627, 1, 0, 0, 0, 630, 632, 3, 264, 132, 0, 631, 633, 3, 28, 14, 0, 632, 631, 1, 0, 0, 0, 632, 633, 1, 0, 0, 0, 633, 637, 1, 0, 0, 0, 634, 635, 5, 63, 0, 0, 635, 637, 3, 28, 14, 0, 636, 630, 1, 0, 0, 0, 636, 634, 1, 0, 0, 0, 637, 27, 1, 0, 0, 0, 638, 639, 3, 160, 80, 0, 639, 29, 1, 0, 0, 0, 640, 641, 3, 428, 214, 0, 641, 31, 1, 0, 0, 0, 642, 645, 3, 526, 263, 0, 643, 645, 3, 132, 66, 0, 644, 642, 1, 0, 0, 0, 644, 643, 1, 0, 0, 0, 645, 33, 1, 0, 0, 0, 646, 647, 5, 10, 0, 0, 647, 650, 3, 104, 52, 0, 648, 649, 5, 85, 0, 0, 649, 651, 3, 202, 101, 0, 650, 648, 1, 0, 0, 0, 650, 651, 1, 0, 0, 0, 651, 654, 1, 0, 0, 0, 652, 653, 5, 90, 0, 0, 653, 655, 3, 202, 101, 0, 654, 652, 1, 0, 0, 0, 654, 655, 1, 0, 0, 0, 655, 35, 1, 0, 0, 0, 656, 658, 3, 308, 154, 0, 657, 656, 1, 0, 0, 0, 657, 658, 1, 0, 0, 0, 658, 659, 1, 0, 0, 0, 659, 660, 3, 34, 17, 0, 660, 661, 5, 154, 0, 0, 661, 37, 1, 0, 0, 0, 662, 663, 3, 222, 111, 0, 663, 664, 5, 148, 0, 0, 664, 666, 1, 0, 0, 0, 665, 662, 1, 0, 0, 0, 665, 666, 1, 0, 0, 0, 666, 667, 1, 0, 0, 0, 667, 668, 3, 8, 4, 0, 668, 39, 1, 0, 0, 0, 669, 674, 3, 38, 19, 0, 670, 671, 5, 155, 0, 0, 671, 673, 3, 38, 19, 0, 672, 670, 1, 0, 0, 0, 673, 676, 1, 0, 0, 0, 674, 672, 1, 0, 0, 0, 674, 675, 1, 0, 0, 0, 675, 41, 1, 0, 0, 0, 676, 674, 1, 0, 0, 0, 677, 678, 5, 11, 0, 0, 678, 679, 3, 308, 154, 0, 679, 680, 3, 324, 162, 0, 680, 681, 5, 154, 0, 0, 681, 43, 1, 0, 0, 0, 682, 691, 3, 254, 127, 0, 683, 691, 5, 77, 0, 0, 684, 691, 5, 79, 0, 0, 685, 691, 5, 3, 0, 0, 686, 691, 5, 102, 0, 0, 687, 691, 5, 83, 0, 0, 688, 691, 5, 104, 0, 0, 689, 691, 5, 99, 0, 0, 690, 682, 1, 0, 0, 0, 690, 683, 1, 0, 0, 0, 690, 684, 1, 0, 0, 0, 690, 685, 1, 0, 0, 0, 690, 686, 1, 0, 0, 0, 690, 687, 1, 0, 0, 0, 690, 688, 1, 0, 0, 0, 690, 689, 1, 0, 0, 0, 691, 45, 1, 0, 0, 0, 692, 693, 3, 364, 182, 0, 693, 694, 5, 179, 0, 0, 694, 699, 3, 44, 22, 0, 695, 696, 5, 157, 0, 0, 696, 697, 3, 202, 101, 0, 697, 698, 5, 158, 0, 0, 698, 700, 1, 0, 0, 0, 699, 695, 1, 0, 0, 0, 699, 700, 1, 0, 0, 0, 700, 47, 1, 0, 0, 0, 701, 702, 5, 11, 0, 0, 702, 703, 3, 44, 22, 0, 703, 704, 5, 61, 0, 0, 704, 705, 3, 188, 94, 0, 705, 706, 5, 44, 0, 0, 706, 707, 3, 202, 101, 0, 707, 708, 5, 154, 0, 0, 708, 49, 1, 0, 0, 0, 709, 710, 5, 175, 0, 0, 710, 51, 1, 0, 0, 0, 711, 712, 5, 110, 0, 0, 712, 714, 3, 168, 84, 0, 713, 711, 1, 0, 0, 0, 713, 714, 1, 0, 0, 0, 714, 716, 1, 0, 0, 0, 715, 717, 3, 240, 120, 0, 716, 715, 1, 0, 0, 0, 716, 717, 1, 0, 0, 0, 717, 719, 1, 0, 0, 0, 718, 720, 3, 362, 181, 0, 719, 718, 1, 0, 0, 0, 719, 720, 1, 0, 0, 0, 720, 53, 1, 0, 0, 0, 721, 722, 5, 32, 0, 0, 722, 726, 3, 62, 31, 0, 723, 725, 3, 528, 264, 0, 724, 723, 1, 0, 0, 0, 725, 728, 1, 0, 0, 0, 726, 724, 1, 0, 0, 0, 726, 727, 1, 0, 0, 0, 727, 732, 1, 0, 0, 0, 728, 726, 1, 0, 0, 0, 729, 731, 3, 126, 63, 0, 730, 729, 1, 0, 0, 0, 731, 734, 1, 0, 0, 0, 732, 730, 1, 0, 0, 0, 732, 733, 1, 0, 0, 0, 733, 735, 1, 0, 0, 0, 734, 732, 1, 0, 0, 0, 735, 736, 5, 26, 0, 0, 736, 737, 5, 32, 0, 0, 737, 738, 5, 154, 0, 0, 738, 55, 1, 0, 0, 0, 739, 761, 3, 490, 245, 0, 740, 761, 3, 488, 244, 0, 741, 761, 3, 498, 249, 0, 742, 761, 3, 342, 171, 0, 743, 761, 3, 336, 168, 0, 744, 761, 3, 350, 175, 0, 745, 761, 3, 522, 261, 0, 746, 761, 3, 506, 253, 0, 747, 761, 3, 130, 65, 0, 748, 761, 3, 466, 233, 0, 749, 761, 3, 532, 266, 0, 750, 761, 3, 206, 103, 0, 751, 761, 3, 14, 7, 0, 752, 761, 3, 82, 41, 0, 753, 761, 3, 42, 21, 0, 754, 761, 3, 48, 24, 0, 755, 761, 3, 128, 64, 0, 756, 761, 3, 154, 77, 0, 757, 761, 3, 528, 264, 0, 758, 761, 3, 250, 125, 0, 759, 761, 3, 248, 124, 0, 760, 739, 1, 0, 0, 0, 760, 740, 1, 0, 0, 0, 760, 741, 1, 0, 0, 0, 760, 742, 1, 0, 0, 0, 760, 743, 1, 0, 0, 0, 760, 744, 1, 0, 0, 0, 760, 745, 1, 0, 0, 0, 760, 746, 1, 0, 0, 0, 760, 747, 1, 0, 0, 0, 760, 748, 1, 0, 0, 0, 760, 749, 1, 0, 0, 0, 760, 750, 1, 0, 0, 0, 760, 751, 1, 0, 0, 0, 760, 752, 1, 0, 0, 0, 760, 753, 1, 0, 0, 0, 760, 754, 1, 0, 0, 0, 760, 755, 1, 0, 0, 0, 760, 756, 1, 0, 0, 0, 760, 757, 1, 0, 0, 0, 760, 758, 1, 0, 0, 0, 760, 759, 1, 0, 0, 0, 761, 57, 1, 0, 0, 0, 762, 764, 3, 56, 28, 0, 763, 762, 1, 0, 0, 0, 764, 767, 1, 0, 0, 0, 765, 763, 1, 0, 0, 0, 765, 766, 1, 0, 0, 0, 766, 59, 1, 0, 0, 0, 767, 765, 1, 0, 0, 0, 768, 772, 3, 236, 118, 0, 769, 770, 3, 240, 120, 0, 770, 771, 5, 154, 0, 0, 771, 773, 1, 0, 0, 0, 772, 769, 1, 0, 0, 0, 772, 773, 1, 0, 0, 0, 773, 775, 1, 0, 0, 0, 774, 768, 1, 0, 0, 0, 774, 775, 1, 0, 0, 0, 775, 782, 1, 0, 0, 0, 776, 780, 3, 358, 179, 0, 777, 778, 3, 362, 181, 0, 778, 779, 5, 154, 0, 0, 779, 781, 1, 0, 0, 0, 780, 777, 1, 0, 0, 0, 780, 781, 1, 0, 0, 0, 781, 783, 1, 0, 0, 0, 782, 776, 1, 0, 0, 0, 782, 783, 1, 0, 0, 0, 783, 61, 1, 0, 0, 0, 784, 785, 3, 324, 162, 0, 785, 790, 3, 254, 127, 0, 786, 787, 5, 157, 0, 0, 787, 788, 3, 230, 115, 0, 788, 789, 5, 158, 0, 0, 789, 791, 1, 0, 0, 0, 790, 786, 1, 0, 0, 0, 790, 791, 1, 0, 0, 0, 791, 63, 1, 0, 0, 0, 792, 793, 3, 308, 154, 0, 793, 798, 5, 13, 0, 0, 794, 795, 5, 157, 0, 0, 795, 796, 3, 202, 101, 0, 796, 797, 5, 158, 0, 0, 797, 799, 1, 0, 0, 0, 798, 794, 1, 0, 0, 0, 798, 799, 1, 0, 0, 0, 799, 801, 1, 0, 0, 0, 800, 802, 5, 44, 0, 0, 801, 800, 1, 0, 0, 0, 801, 802, 1, 0, 0, 0, 802, 803, 1, 0, 0, 0, 803, 804, 3, 60, 30, 0, 804, 805, 3, 58, 29, 0, 805, 806, 5, 12, 0, 0, 806, 807, 3, 66, 33, 0, 807, 808, 5, 26, 0, 0, 808, 810, 5, 13, 0, 0, 809, 811, 3, 254, 127, 0, 810, 809, 1, 0, 0, 0, 810, 811, 1, 0, 0, 0, 811, 812, 1, 0, 0, 0, 812, 813, 5, 154, 0, 0, 813, 65, 1, 0, 0, 0, 814, 816, 3, 102, 51, 0, 815, 814, 1, 0, 0, 0, 816, 819, 1, 0, 0, 0, 817, 815, 1, 0, 0, 0, 817, 818, 1, 0, 0, 0, 818, 67, 1, 0, 0, 0, 819, 817, 1, 0, 0, 0, 820, 822, 5, 114, 0, 0, 821, 823, 3, 308, 154, 0, 822, 821, 1, 0, 0, 0, 822, 823, 1, 0, 0, 0, 823, 824, 1, 0, 0, 0, 824, 825, 3, 78, 39, 0, 825, 826, 5, 148, 0, 0, 826, 827, 3, 234, 117, 0, 827, 69, 1, 0, 0, 0, 828, 829, 5, 18, 0, 0, 829, 830, 3, 202, 101, 0, 830, 831, 5, 35, 0, 0, 831, 835, 3, 68, 34, 0, 832, 834, 3, 68, 34, 0, 833, 832, 1, 0, 0, 0, 834, 837, 1, 0, 0, 0, 835, 833, 1, 0, 0, 0, 835, 836, 1, 0, 0, 0, 836, 71, 1, 0, 0, 0, 837, 835, 1, 0, 0, 0, 838, 840, 3, 308, 154, 0, 839, 838, 1, 0, 0, 0, 839, 840, 1, 0, 0, 0, 840, 841, 1, 0, 0, 0, 841, 843, 5, 18, 0, 0, 842, 844, 5, 180, 0, 0, 843, 842, 1, 0, 0, 0, 843, 844, 1, 0, 0, 0, 844, 845, 1, 0, 0, 0, 845, 846, 3, 202, 101, 0, 846, 848, 5, 44, 0, 0, 847, 849, 3, 74, 37, 0, 848, 847, 1, 0, 0, 0, 849, 850, 1, 0, 0, 0, 850, 848, 1, 0, 0, 0, 850, 851, 1, 0, 0, 0, 851, 852, 1, 0, 0, 0, 852, 853, 5, 26, 0, 0, 853, 855, 5, 18, 0, 0, 854, 856, 5, 180, 0, 0, 855, 854, 1, 0, 0, 0, 855, 856, 1, 0, 0, 0, 856, 858, 1, 0, 0, 0, 857, 859, 3, 254, 127, 0, 858, 857, 1, 0, 0, 0, 858, 859, 1, 0, 0, 0, 859, 860, 1, 0, 0, 0, 860, 861, 5, 154, 0, 0, 861, 73, 1, 0, 0, 0, 862, 863, 5, 114, 0, 0, 863, 864, 3, 78, 39, 0, 864, 865, 5, 148, 0, 0, 865, 866, 3, 456, 228, 0, 866, 75, 1, 0, 0, 0, 867, 872, 3, 474, 237, 0, 868, 872, 3, 156, 78, 0, 869, 872, 3, 254, 127, 0, 870, 872, 5, 65, 0, 0, 871, 867, 1, 0, 0, 0, 871, 868, 1, 0, 0, 0, 871, 869, 1, 0, 0, 0, 871, 870, 1, 0, 0, 0, 872, 77, 1, 0, 0, 0, 873, 878, 3, 76, 38, 0, 874, 875, 5, 169, 0, 0, 875, 877, 3, 76, 38, 0, 876, 874, 1, 0, 0, 0, 877, 880, 1, 0, 0, 0, 878, 876, 1, 0, 0, 0, 878, 879, 1, 0, 0, 0, 879, 79, 1, 0, 0, 0, 880, 878, 1, 0, 0, 0, 881, 882, 5, 32, 0, 0, 882, 886, 3, 86, 43, 0, 883, 884, 3, 52, 26, 0, 884, 885, 5, 154, 0, 0, 885, 887, 1, 0, 0, 0, 886, 883, 1, 0, 0, 0, 886, 887, 1, 0, 0, 0, 887, 889, 1, 0, 0, 0, 888, 890, 3, 54, 27, 0, 889, 888, 1, 0, 0, 0, 889, 890, 1, 0, 0, 0, 890, 891, 1, 0, 0, 0, 891, 892, 5, 26, 0, 0, 892, 893, 5, 32, 0, 0, 893, 894, 5, 154, 0, 0, 894, 81, 1, 0, 0, 0, 895, 896, 5, 19, 0, 0, 896, 898, 3, 254, 127, 0, 897, 899, 5, 44, 0, 0, 898, 897, 1, 0, 0, 0, 898, 899, 1, 0, 0, 0, 899, 901, 1, 0, 0, 0, 900, 902, 3, 236, 118, 0, 901, 900, 1, 0, 0, 0, 901, 902, 1, 0, 0, 0, 902, 904, 1, 0, 0, 0, 903, 905, 3, 358, 179, 0, 904, 903, 1, 0, 0, 0, 904, 905, 1, 0, 0, 0, 905, 906, 1, 0, 0, 0, 906, 907, 5, 26, 0, 0, 907, 909, 5, 19, 0, 0, 908, 910, 3, 254, 127, 0, 909, 908, 1, 0, 0, 0, 909, 910, 1, 0, 0, 0, 910, 911, 1, 0, 0, 0, 911, 912, 5, 154, 0, 0, 912, 83, 1, 0, 0, 0, 913, 914, 3, 308, 154, 0, 914, 916, 3, 270, 135, 0, 915, 917, 3, 240, 120, 0, 916, 915, 1, 0, 0, 0, 916, 917, 1, 0, 0, 0, 917, 919, 1, 0, 0, 0, 918, 920, 3, 362, 181, 0, 919, 918, 1, 0, 0, 0, 919, 920, 1, 0, 0, 0, 920, 921, 1, 0, 0, 0, 921, 922, 5, 154, 0, 0, 922, 85, 1, 0, 0, 0, 923, 924, 3, 272, 136, 0, 924, 925, 5, 161, 0, 0, 925, 926, 3, 324, 162, 0, 926, 87, 1, 0, 0, 0, 927, 930, 3, 32, 16, 0, 928, 930, 3, 420, 210, 0, 929, 927, 1, 0, 0, 0, 929, 928, 1, 0, 0, 0, 930, 89, 1, 0, 0, 0, 931, 933, 3, 308, 154, 0, 932, 931, 1, 0, 0, 0, 932, 933, 1, 0, 0, 0, 933, 935, 1, 0, 0, 0, 934, 936, 5, 70, 0, 0, 935, 934, 1, 0, 0, 0, 935, 936, 1, 0, 0, 0, 936, 937, 1, 0, 0, 0, 937, 938, 3, 34, 17, 0, 938, 939, 5, 154, 0, 0, 939, 91, 1, 0, 0, 0, 940, 941, 3, 512, 256, 0, 941, 943, 5, 146, 0, 0, 942, 944, 5, 38, 0, 0, 943, 942, 1, 0, 0, 0, 943, 944, 1, 0, 0, 0, 944, 946, 1, 0, 0, 0, 945, 947, 3, 144, 72, 0, 946, 945, 1, 0, 0, 0, 946, 947, 1, 0, 0, 0, 947, 948, 1, 0, 0, 0, 948, 949, 3, 118, 59, 0, 949, 950, 5, 154, 0, 0, 950, 93, 1, 0, 0, 0, 951, 953, 3, 308, 154, 0, 952, 951, 1, 0, 0, 0, 952, 953, 1, 0, 0, 0, 953, 955, 1, 0, 0, 0, 954, 956, 5, 70, 0, 0, 955, 954, 1, 0, 0, 0, 955, 956, 1, 0, 0, 0, 956, 957, 1, 0, 0, 0, 957, 958, 3, 372, 186, 0, 958, 959, 5, 154, 0, 0, 959, 95, 1, 0, 0, 0, 960, 961, 5, 113, 0, 0, 961, 962, 3, 202, 101, 0, 962, 964, 5, 89, 0, 0, 963, 965, 5, 180, 0, 0, 964, 963, 1, 0, 0, 0, 964, 965, 1, 0, 0, 0, 965, 966, 1, 0, 0, 0, 966, 967, 3, 512, 256, 0, 967, 969, 5, 146, 0, 0, 968, 970, 5, 38, 0, 0, 969, 968, 1, 0, 0, 0, 969, 970, 1, 0, 0, 0, 970, 972, 1, 0, 0, 0, 971, 973, 3, 144, 72, 0, 972, 971, 1, 0, 0, 0, 972, 973, 1, 0, 0, 0, 973, 974, 1, 0, 0, 0, 974, 975, 3, 450, 225, 0, 975, 976, 5, 154, 0, 0, 976, 97, 1, 0, 0, 0, 977, 979, 3, 308, 154, 0, 978, 977, 1, 0, 0, 0, 978, 979, 1, 0, 0, 0, 979, 981, 1, 0, 0, 0, 980, 982, 5, 70, 0, 0, 981, 980, 1, 0, 0, 0, 981, 982, 1, 0, 0, 0, 982, 986, 1, 0, 0, 0, 983, 987, 3, 112, 56, 0, 984, 987, 3, 444, 222, 0, 985, 987, 3, 96, 48, 0, 986, 983, 1, 0, 0, 0, 986, 984, 1, 0, 0, 0, 986, 985, 1, 0, 0, 0, 987, 99, 1, 0, 0, 0, 988, 989, 3, 512, 256, 0, 989, 991, 5, 146, 0, 0, 990, 992, 5, 38, 0, 0, 991, 990, 1, 0, 0, 0, 991, 992, 1, 0, 0, 0, 992, 994, 1, 0, 0, 0, 993, 995, 3, 144, 72, 0, 994, 993, 1, 0, 0, 0, 994, 995, 1, 0, 0, 0, 995, 996, 1, 0, 0, 0, 996, 997, 3, 536, 268, 0, 997, 998, 5, 154, 0, 0, 998, 101, 1, 0, 0, 0, 999, 1007, 3, 64, 32, 0, 1000, 1007, 3, 388, 194, 0, 1001, 1007, 3, 94, 47, 0, 1002, 1007, 3, 90, 45, 0, 1003, 1007, 3, 98, 49, 0, 1004, 1007, 3, 84, 42, 0, 1005, 1007, 3, 232, 116, 0, 1006, 999, 1, 0, 0, 0, 1006, 1000, 1, 0, 0, 0, 1006, 1001, 1, 0, 0, 0, 1006, 1002, 1, 0, 0, 0, 1006, 1003, 1, 0, 0, 0, 1006, 1004, 1, 0, 0, 0, 1006, 1005, 1, 0, 0, 0, 1007, 103, 1, 0, 0, 0, 1008, 1009, 3, 202, 101, 0, 1009, 105, 1, 0, 0, 0, 1010, 1011, 5, 109, 0, 0, 1011, 1012, 3, 104, 52, 0, 1012, 107, 1, 0, 0, 0, 1013, 1014, 3, 202, 101, 0, 1014, 1015, 5, 114, 0, 0, 1015, 1023, 3, 104, 52, 0, 1016, 1017, 5, 28, 0, 0, 1017, 1018, 3, 202, 101, 0, 1018, 1019, 5, 114, 0, 0, 1019, 1020, 3, 104, 52, 0, 1020, 1022, 1, 0, 0, 0, 1021, 1016, 1, 0, 0, 0, 1022, 1025, 1, 0, 0, 0, 1023, 1021, 1, 0, 0, 0, 1023, 1024, 1, 0, 0, 0, 1024, 1028, 1, 0, 0, 0, 1025, 1023, 1, 0, 0, 0, 1026, 1027, 5, 28, 0, 0, 1027, 1029, 3, 202, 101, 0, 1028, 1026, 1, 0, 0, 0, 1028, 1029, 1, 0, 0, 0, 1029, 109, 1, 0, 0, 0, 1030, 1031, 3, 512, 256, 0, 1031, 1032, 5, 146, 0, 0, 1032, 1034, 5, 33, 0, 0, 1033, 1035, 3, 218, 109, 0, 1034, 1033, 1, 0, 0, 0, 1034, 1035, 1, 0, 0, 0, 1035, 1036, 1, 0, 0, 0, 1036, 1037, 3, 108, 54, 0, 1037, 1038, 5, 154, 0, 0, 1038, 111, 1, 0, 0, 0, 1039, 1042, 3, 116, 58, 0, 1040, 1042, 3, 110, 55, 0, 1041, 1039, 1, 0, 0, 0, 1041, 1040, 1, 0, 0, 0, 1042, 113, 1, 0, 0, 0, 1043, 1044, 3, 512, 256, 0, 1044, 1045, 5, 151, 0, 0, 1045, 1046, 3, 108, 54, 0, 1046, 115, 1, 0, 0, 0, 1047, 1048, 3, 512, 256, 0, 1048, 1050, 5, 146, 0, 0, 1049, 1051, 3, 144, 72, 0, 1050, 1049, 1, 0, 0, 0, 1050, 1051, 1, 0, 0, 0, 1051, 1052, 1, 0, 0, 0, 1052, 1053, 3, 118, 59, 0, 1053, 1054, 5, 154, 0, 0, 1054, 117, 1, 0, 0, 0, 1055, 1062, 3, 536, 268, 0, 1056, 1057, 5, 114, 0, 0, 1057, 1060, 3, 104, 52, 0, 1058, 1059, 5, 28, 0, 0, 1059, 1061, 3, 118, 59, 0, 1060, 1058, 1, 0, 0, 0, 1060, 1061, 1, 0, 0, 0, 1061, 1063, 1, 0, 0, 0, 1062, 1056, 1, 0, 0, 0, 1062, 1063, 1, 0, 0, 0, 1063, 119, 1, 0, 0, 0, 1064, 1065, 5, 20, 0, 0, 1065, 1066, 3, 254, 127, 0, 1066, 1067, 5, 61, 0, 0, 1067, 1068, 3, 324, 162, 0, 1068, 1069, 5, 44, 0, 0, 1069, 1070, 3, 124, 62, 0, 1070, 1071, 3, 54, 27, 0, 1071, 1073, 5, 26, 0, 0, 1072, 1074, 5, 20, 0, 0, 1073, 1072, 1, 0, 0, 0, 1073, 1074, 1, 0, 0, 0, 1074, 1076, 1, 0, 0, 0, 1075, 1077, 3, 254, 127, 0, 1076, 1075, 1, 0, 0, 0, 1076, 1077, 1, 0, 0, 0, 1077, 1078, 1, 0, 0, 0, 1078, 1079, 5, 154, 0, 0, 1079, 121, 1, 0, 0, 0, 1080, 1084, 3, 528, 264, 0, 1081, 1084, 3, 48, 24, 0, 1082, 1084, 3, 248, 124, 0, 1083, 1080, 1, 0, 0, 0, 1083, 1081, 1, 0, 0, 0, 1083, 1082, 1, 0, 0, 0, 1084, 123, 1, 0, 0, 0, 1085, 1087, 3, 122, 61, 0, 1086, 1085, 1, 0, 0, 0, 1087, 1090, 1, 0, 0, 0, 1088, 1086, 1, 0, 0, 0, 1088, 1089, 1, 0, 0, 0, 1089, 125, 1, 0, 0, 0, 1090, 1088, 1, 0, 0, 0, 1091, 1094, 3, 54, 27, 0, 1092, 1094, 3, 80, 40, 0, 1093, 1091, 1, 0, 0, 0, 1093, 1092, 1, 0, 0, 0, 1094, 127, 1, 0, 0, 0, 1095, 1096, 5, 32, 0, 0, 1096, 1097, 3, 86, 43, 0, 1097, 1098, 3, 52, 26, 0, 1098, 1099, 5, 154, 0, 0, 1099, 129, 1, 0, 0, 0, 1100, 1101, 5, 21, 0, 0, 1101, 1102, 3, 256, 128, 0, 1102, 1103, 5, 161, 0, 0, 1103, 1106, 3, 508, 254, 0, 1104, 1105, 5, 151, 0, 0, 1105, 1107, 3, 202, 101, 0, 1106, 1104, 1, 0, 0, 0, 1106, 1107, 1, 0, 0, 0, 1107, 1108, 1, 0, 0, 0, 1108, 1109, 5, 154, 0, 0, 1109, 131, 1, 0, 0, 0, 1110, 1111, 5, 9, 0, 0, 1111, 1112, 3, 264, 132, 0, 1112, 1113, 5, 61, 0, 0, 1113, 1114, 3, 508, 254, 0, 1114, 133, 1, 0, 0, 0, 1115, 1119, 3, 410, 205, 0, 1116, 1119, 3, 264, 132, 0, 1117, 1119, 3, 412, 206, 0, 1118, 1115, 1, 0, 0, 0, 1118, 1116, 1, 0, 0, 0, 1118, 1117, 1, 0, 0, 0, 1119, 135, 1, 0, 0, 0, 1120, 1122, 3, 140, 70, 0, 1121, 1120, 1, 0, 0, 0, 1122, 1125, 1, 0, 0, 0, 1123, 1121, 1, 0, 0, 0, 1123, 1124, 1, 0, 0, 0, 1124, 137, 1, 0, 0, 0, 1125, 1123, 1, 0, 0, 0, 1126, 1127, 5, 22, 0, 0, 1127, 1128, 3, 254, 127, 0, 1128, 1129, 5, 44, 0, 0, 1129, 1130, 3, 136, 68, 0, 1130, 1132, 5, 26, 0, 0, 1131, 1133, 5, 22, 0, 0, 1132, 1131, 1, 0, 0, 0, 1132, 1133, 1, 0, 0, 0, 1133, 1135, 1, 0, 0, 0, 1134, 1136, 3, 254, 127, 0, 1135, 1134, 1, 0, 0, 0, 1135, 1136, 1, 0, 0, 0, 1136, 1137, 1, 0, 0, 0, 1137, 1138, 5, 154, 0, 0, 1138, 139, 1, 0, 0, 0, 1139, 1143, 3, 310, 155, 0, 1140, 1143, 3, 528, 264, 0, 1141, 1143, 3, 142, 71, 0, 1142, 1139, 1, 0, 0, 0, 1142, 1140, 1, 0, 0, 0, 1142, 1141, 1, 0, 0, 0, 1143, 141, 1, 0, 0, 0, 1144, 1145, 5, 22, 0, 0, 1145, 1150, 3, 442, 221, 0, 1146, 1147, 5, 155, 0, 0, 1147, 1149, 3, 442, 221, 0, 1148, 1146, 1, 0, 0, 0, 1149, 1152, 1, 0, 0, 0, 1150, 1148, 1, 0, 0, 0, 1150, 1151, 1, 0, 0, 0, 1151, 1153, 1, 0, 0, 0, 1152, 1150, 1, 0, 0, 0, 1153, 1154, 5, 154, 0, 0, 1154, 143, 1, 0, 0, 0, 1155, 1162, 5, 105, 0, 0, 1156, 1157, 5, 80, 0, 0, 1157, 1159, 3, 202, 101, 0, 1158, 1156, 1, 0, 0, 0, 1158, 1159, 1, 0, 0, 0, 1159, 1160, 1, 0, 0, 0, 1160, 1162, 5, 42, 0, 0, 1161, 1155, 1, 0, 0, 0, 1161, 1158, 1, 0, 0, 0, 1162, 145, 1, 0, 0, 0, 1163, 1165, 3, 148, 74, 0, 1164, 1163, 1, 0, 0, 0, 1165, 1166, 1, 0, 0, 0, 1166, 1164, 1, 0, 0, 0, 1166, 1167, 1, 0, 0, 0, 1167, 1168, 1, 0, 0, 0, 1168, 1169, 5, 0, 0, 1, 1169, 147, 1, 0, 0, 0, 1170, 1171, 3, 136, 68, 0, 1171, 1172, 3, 312, 156, 0, 1172, 149, 1, 0, 0, 0, 1173, 1176, 3, 254, 127, 0, 1174, 1176, 5, 119, 0, 0, 1175, 1173, 1, 0, 0, 0, 1175, 1174, 1, 0, 0, 0, 1176, 151, 1, 0, 0, 0, 1177, 1178, 7, 2, 0, 0, 1178, 153, 1, 0, 0, 0, 1179, 1180, 5, 24, 0, 0, 1180, 1181, 3, 252, 126, 0, 1181, 1182, 5, 4, 0, 0, 1182, 1183, 3, 202, 101, 0, 1183, 1184, 5, 154, 0, 0, 1184, 155, 1, 0, 0, 0, 1185, 1188, 3, 508, 254, 0, 1186, 1188, 3, 408, 204, 0, 1187, 1185, 1, 0, 0, 0, 1187, 1186, 1, 0, 0, 0, 1188, 157, 1, 0, 0, 0, 1189, 1190, 3, 78, 39, 0, 1190, 1191, 5, 148, 0, 0, 1191, 1193, 1, 0, 0, 0, 1192, 1189, 1, 0, 0, 0, 1192, 1193, 1, 0, 0, 0, 1193, 1194, 1, 0, 0, 0, 1194, 1195, 3, 202, 101, 0, 1195, 159, 1, 0, 0, 0, 1196, 1199, 3, 26, 13, 0, 1197, 1199, 3, 412, 206, 0, 1198, 1196, 1, 0, 0, 0, 1198, 1197, 1, 0, 0, 0, 1199, 161, 1, 0, 0, 0, 1200, 1201, 3, 256, 128, 0, 1201, 1202, 5, 161, 0, 0, 1202, 1203, 3, 166, 83, 0, 1203, 1204, 5, 154, 0, 0, 1204, 163, 1, 0, 0, 0, 1205, 1208, 3, 30, 15, 0, 1206, 1208, 3, 418, 209, 0, 1207, 1205, 1, 0, 0, 0, 1207, 1206, 1, 0, 0, 0, 1208, 165, 1, 0, 0, 0, 1209, 1210, 3, 508, 254, 0, 1210, 167, 1, 0, 0, 0, 1211, 1212, 5, 27, 0, 0, 1212, 1217, 3, 324, 162, 0, 1213, 1214, 5, 157, 0, 0, 1214, 1215, 3, 254, 127, 0, 1215, 1216, 5, 158, 0, 0, 1216, 1218, 1, 0, 0, 0, 1217, 1213, 1, 0, 0, 0, 1217, 1218, 1, 0, 0, 0, 1218, 1223, 1, 0, 0, 0, 1219, 1220, 5, 20, 0, 0, 1220, 1223, 3, 324, 162, 0, 1221, 1223, 5, 63, 0, 0, 1222, 1211, 1, 0, 0, 0, 1222, 1219, 1, 0, 0, 0, 1222, 1221, 1, 0, 0, 0, 1223, 169, 1, 0, 0, 0, 1224, 1225, 7, 3, 0, 0, 1225, 171, 1, 0, 0, 0, 1226, 1228, 3, 170, 85, 0, 1227, 1229, 5, 152, 0, 0, 1228, 1227, 1, 0, 0, 0, 1228, 1229, 1, 0, 0, 0, 1229, 173, 1, 0, 0, 0, 1230, 1235, 3, 172, 86, 0, 1231, 1232, 5, 155, 0, 0, 1232, 1234, 3, 172, 86, 0, 1233, 1231, 1, 0, 0, 0, 1234, 1237, 1, 0, 0, 0, 1235, 1233, 1, 0, 0, 0, 1235, 1236, 1, 0, 0, 0, 1236, 175, 1, 0, 0, 0, 1237, 1235, 1, 0, 0, 0, 1238, 1239, 5, 27, 0, 0, 1239, 1240, 3, 254, 127, 0, 1240, 1241, 5, 44, 0, 0, 1241, 1242, 3, 184, 92, 0, 1242, 1245, 3, 180, 90, 0, 1243, 1244, 5, 12, 0, 0, 1244, 1246, 3, 192, 96, 0, 1245, 1243, 1, 0, 0, 0, 1245, 1246, 1, 0, 0, 0, 1246, 1247, 1, 0, 0, 0, 1247, 1249, 5, 26, 0, 0, 1248, 1250, 5, 27, 0, 0, 1249, 1248, 1, 0, 0, 0, 1249, 1250, 1, 0, 0, 0, 1250, 1252, 1, 0, 0, 0, 1251, 1253, 3, 254, 127, 0, 1252, 1251, 1, 0, 0, 0, 1252, 1253, 1, 0, 0, 0, 1253, 1254, 1, 0, 0, 0, 1254, 1255, 5, 154, 0, 0, 1255, 177, 1, 0, 0, 0, 1256, 1276, 3, 490, 245, 0, 1257, 1276, 3, 488, 244, 0, 1258, 1276, 3, 498, 249, 0, 1259, 1276, 3, 342, 171, 0, 1260, 1276, 3, 336, 168, 0, 1261, 1276, 3, 350, 175, 0, 1262, 1276, 3, 522, 261, 0, 1263, 1276, 3, 506, 253, 0, 1264, 1276, 3, 130, 65, 0, 1265, 1276, 3, 466, 233, 0, 1266, 1276, 3, 532, 266, 0, 1267, 1276, 3, 206, 103, 0, 1268, 1276, 3, 14, 7, 0, 1269, 1276, 3, 42, 21, 0, 1270, 1276, 3, 48, 24, 0, 1271, 1276, 3, 154, 77, 0, 1272, 1276, 3, 528, 264, 0, 1273, 1276, 3, 250, 125, 0, 1274, 1276, 3, 248, 124, 0, 1275, 1256, 1, 0, 0, 0, 1275, 1257, 1, 0, 0, 0, 1275, 1258, 1, 0, 0, 0, 1275, 1259, 1, 0, 0, 0, 1275, 1260, 1, 0, 0, 0, 1275, 1261, 1, 0, 0, 0, 1275, 1262, 1, 0, 0, 0, 1275, 1263, 1, 0, 0, 0, 1275, 1264, 1, 0, 0, 0, 1275, 1265, 1, 0, 0, 0, 1275, 1266, 1, 0, 0, 0, 1275, 1267, 1, 0, 0, 0, 1275, 1268, 1, 0, 0, 0, 1275, 1269, 1, 0, 0, 0, 1275, 1270, 1, 0, 0, 0, 1275, 1271, 1, 0, 0, 0, 1275, 1272, 1, 0, 0, 0, 1275, 1273, 1, 0, 0, 0, 1275, 1274, 1, 0, 0, 0, 1276, 179, 1, 0, 0, 0, 1277, 1279, 3, 178, 89, 0, 1278, 1277, 1, 0, 0, 0, 1279, 1282, 1, 0, 0, 0, 1280, 1278, 1, 0, 0, 0, 1280, 1281, 1, 0, 0, 0, 1281, 181, 1, 0, 0, 0, 1282, 1280, 1, 0, 0, 0, 1283, 1284, 3, 194, 97, 0, 1284, 183, 1, 0, 0, 0, 1285, 1287, 3, 236, 118, 0, 1286, 1285, 1, 0, 0, 0, 1286, 1287, 1, 0, 0, 0, 1287, 1289, 1, 0, 0, 0, 1288, 1290, 3, 358, 179, 0, 1289, 1288, 1, 0, 0, 0, 1289, 1290, 1, 0, 0, 0, 1290, 185, 1, 0, 0, 0, 1291, 1296, 3, 182, 91, 0, 1292, 1293, 5, 155, 0, 0, 1293, 1295, 3, 182, 91, 0, 1294, 1292, 1, 0, 0, 0, 1295, 1298, 1, 0, 0, 0, 1296, 1294, 1, 0, 0, 0, 1296, 1297, 1, 0, 0, 0, 1297, 1302, 1, 0, 0, 0, 1298, 1296, 1, 0, 0, 0, 1299, 1302, 5, 65, 0, 0, 1300, 1302, 5, 6, 0, 0, 1301, 1291, 1, 0, 0, 0, 1301, 1299, 1, 0, 0, 0, 1301, 1300, 1, 0, 0, 0, 1302, 187, 1, 0, 0, 0, 1303, 1304, 3, 186, 93, 0, 1304, 1305, 5, 161, 0, 0, 1305, 1306, 3, 170, 85, 0, 1306, 189, 1, 0, 0, 0, 1307, 1311, 3, 90, 45, 0, 1308, 1311, 3, 388, 194, 0, 1309, 1311, 3, 94, 47, 0, 1310, 1307, 1, 0, 0, 0, 1310, 1308, 1, 0, 0, 0, 1310, 1309, 1, 0, 0, 0, 1311, 191, 1, 0, 0, 0, 1312, 1314, 3, 190, 95, 0, 1313, 1312, 1, 0, 0, 0, 1314, 1317, 1, 0, 0, 0, 1315, 1313, 1, 0, 0, 0, 1315, 1316, 1, 0, 0, 0, 1316, 193, 1, 0, 0, 0, 1317, 1315, 1, 0, 0, 0, 1318, 1322, 3, 254, 127, 0, 1319, 1322, 5, 134, 0, 0, 1320, 1322, 5, 119, 0, 0, 1321, 1318, 1, 0, 0, 0, 1321, 1319, 1, 0, 0, 0, 1321, 1320, 1, 0, 0, 0, 1322, 195, 1, 0, 0, 0, 1323, 1326, 3, 254, 127, 0, 1324, 1326, 5, 134, 0, 0, 1325, 1323, 1, 0, 0, 0, 1325, 1324, 1, 0, 0, 0, 1326, 197, 1, 0, 0, 0, 1327, 1328, 5, 157, 0, 0, 1328, 1333, 3, 196, 98, 0, 1329, 1330, 5, 155, 0, 0, 1330, 1332, 3, 196, 98, 0, 1331, 1329, 1, 0, 0, 0, 1332, 1335, 1, 0, 0, 0, 1333, 1331, 1, 0, 0, 0, 1333, 1334, 1, 0, 0, 0, 1334, 1336, 1, 0, 0, 0, 1335, 1333, 1, 0, 0, 0, 1336, 1337, 5, 158, 0, 0, 1337, 199, 1, 0, 0, 0, 1338, 1340, 3, 308, 154, 0, 1339, 1338, 1, 0, 0, 0, 1339, 1340, 1, 0, 0, 0, 1340, 1341, 1, 0, 0, 0, 1341, 1343, 5, 30, 0, 0, 1342, 1344, 3, 254, 127, 0, 1343, 1342, 1, 0, 0, 0, 1343, 1344, 1, 0, 0, 0, 1344, 1347, 1, 0, 0, 0, 1345, 1346, 5, 114, 0, 0, 1346, 1348, 3, 104, 52, 0, 1347, 1345, 1, 0, 0, 0, 1347, 1348, 1, 0, 0, 0, 1348, 1349, 1, 0, 0, 0, 1349, 1350, 5, 154, 0, 0, 1350, 201, 1, 0, 0, 0, 1351, 1352, 5, 137, 0, 0, 1352, 1363, 3, 366, 183, 0, 1353, 1359, 3, 422, 211, 0, 1354, 1355, 3, 316, 158, 0, 1355, 1356, 3, 422, 211, 0, 1356, 1358, 1, 0, 0, 0, 1357, 1354, 1, 0, 0, 0, 1358, 1361, 1, 0, 0, 0, 1359, 1357, 1, 0, 0, 0, 1359, 1360, 1, 0, 0, 0, 1360, 1363, 1, 0, 0, 0, 1361, 1359, 1, 0, 0, 0, 1362, 1351, 1, 0, 0, 0, 1362, 1353, 1, 0, 0, 0, 1363, 203, 1, 0, 0, 0, 1364, 1367, 3, 366, 183, 0, 1365, 1366, 5, 136, 0, 0, 1366, 1368, 3, 366, 183, 0, 1367, 1365, 1, 0, 0, 0, 1367, 1368, 1, 0, 0, 0, 1368, 1377, 1, 0, 0, 0, 1369, 1370, 5, 1, 0, 0, 1370, 1377, 3, 366, 183, 0, 1371, 1372, 5, 59, 0, 0, 1372, 1377, 3, 366, 183, 0, 1373, 1374, 3, 316, 158, 0, 1374, 1375, 3, 366, 183, 0, 1375, 1377, 1, 0, 0, 0, 1376, 1364, 1, 0, 0, 0, 1376, 1369, 1, 0, 0, 0, 1376, 1371, 1, 0, 0, 0, 1376, 1373, 1, 0, 0, 0, 1377, 205, 1, 0, 0, 0, 1378, 1379, 5, 31, 0, 0, 1379, 1380, 3, 256, 128, 0, 1380, 1381, 5, 161, 0, 0, 1381, 1383, 3, 508, 254, 0, 1382, 1384, 3, 210, 105, 0, 1383, 1382, 1, 0, 0, 0, 1383, 1384, 1, 0, 0, 0, 1384, 1385, 1, 0, 0, 0, 1385, 1386, 5, 154, 0, 0, 1386, 207, 1, 0, 0, 0, 1387, 1388, 3, 202, 101, 0, 1388, 209, 1, 0, 0, 0, 1389, 1390, 5, 63, 0, 0, 1390, 1392, 3, 202, 101, 0, 1391, 1389, 1, 0, 0, 0, 1391, 1392, 1, 0, 0, 0, 1392, 1393, 1, 0, 0, 0, 1393, 1394, 5, 44, 0, 0, 1394, 1395, 3, 208, 104, 0, 1395, 211, 1, 0, 0, 0, 1396, 1397, 5, 31, 0, 0, 1397, 1398, 5, 61, 0, 0, 1398, 1399, 3, 508, 254, 0, 1399, 213, 1, 0, 0, 0, 1400, 1401, 3, 410, 205, 0, 1401, 215, 1, 0, 0, 0, 1402, 1403, 5, 32, 0, 0, 1403, 1404, 3, 352, 176, 0, 1404, 1405, 5, 35, 0, 0, 1405, 1406, 3, 234, 117, 0, 1406, 217, 1, 0, 0, 0, 1407, 1408, 7, 4, 0, 0, 1408, 219, 1, 0, 0, 0, 1409, 1410, 3, 284, 142, 0, 1410, 221, 1, 0, 0, 0, 1411, 1416, 3, 324, 162, 0, 1412, 1413, 5, 157, 0, 0, 1413, 1414, 3, 324, 162, 0, 1414, 1415, 5, 158, 0, 0, 1415, 1417, 1, 0, 0, 0, 1416, 1412, 1, 0, 0, 0, 1416, 1417, 1, 0, 0, 0, 1417, 223, 1, 0, 0, 0, 1418, 1419, 5, 106, 0, 0, 1419, 1420, 3, 254, 127, 0, 1420, 1421, 5, 44, 0, 0, 1421, 1422, 3, 524, 262, 0, 1422, 1423, 5, 154, 0, 0, 1423, 225, 1, 0, 0, 0, 1424, 1429, 3, 324, 162, 0, 1425, 1426, 5, 157, 0, 0, 1426, 1427, 3, 6, 3, 0, 1427, 1428, 5, 158, 0, 0, 1428, 1430, 1, 0, 0, 0, 1429, 1425, 1, 0, 0, 0, 1429, 1430, 1, 0, 0, 0, 1430, 227, 1, 0, 0, 0, 1431, 1433, 7, 5, 0, 0, 1432, 1431, 1, 0, 0, 0, 1432, 1433, 1, 0, 0, 0, 1433, 1434, 1, 0, 0, 0, 1434, 1435, 5, 34, 0, 0, 1435, 1436, 3, 150, 75, 0, 1436, 1444, 3, 496, 248, 0, 1437, 1439, 5, 157, 0, 0, 1438, 1440, 5, 68, 0, 0, 1439, 1438, 1, 0, 0, 0, 1439, 1440, 1, 0, 0, 0, 1440, 1441, 1, 0, 0, 0, 1441, 1442, 3, 220, 110, 0, 1442, 1443, 5, 158, 0, 0, 1443, 1445, 1, 0, 0, 0, 1444, 1437, 1, 0, 0, 0, 1444, 1445, 1, 0, 0, 0, 1445, 1446, 1, 0, 0, 0, 1446, 1447, 5, 86, 0, 0, 1447, 1448, 3, 324, 162, 0, 1448, 229, 1, 0, 0, 0, 1449, 1453, 3, 156, 78, 0, 1450, 1453, 3, 202, 101, 0, 1451, 1453, 3, 254, 127, 0, 1452, 1449, 1, 0, 0, 0, 1452, 1450, 1, 0, 0, 0, 1452, 1451, 1, 0, 0, 0, 1453, 231, 1, 0, 0, 0, 1454, 1456, 3, 308, 154, 0, 1455, 1454, 1, 0, 0, 0, 1455, 1456, 1, 0, 0, 0, 1456, 1460, 1, 0, 0, 0, 1457, 1461, 3, 216, 108, 0, 1458, 1461, 3, 258, 129, 0, 1459, 1461, 3, 70, 35, 0, 1460, 1457, 1, 0, 0, 0, 1460, 1458, 1, 0, 0, 0, 1460, 1459, 1, 0, 0, 0, 1461, 1462, 1, 0, 0, 0, 1462, 1463, 5, 26, 0, 0, 1463, 1465, 5, 35, 0, 0, 1464, 1466, 3, 254, 127, 0, 1465, 1464, 1, 0, 0, 0, 1465, 1466, 1, 0, 0, 0, 1466, 1467, 1, 0, 0, 0, 1467, 1468, 5, 154, 0, 0, 1468, 233, 1, 0, 0, 0, 1469, 1470, 3, 58, 29, 0, 1470, 1471, 5, 12, 0, 0, 1471, 1473, 1, 0, 0, 0, 1472, 1469, 1, 0, 0, 0, 1472, 1473, 1, 0, 0, 0, 1473, 1477, 1, 0, 0, 0, 1474, 1476, 3, 102, 51, 0, 1475, 1474, 1, 0, 0, 0, 1476, 1479, 1, 0, 0, 0, 1477, 1475, 1, 0, 0, 0, 1477, 1478, 1, 0, 0, 0, 1478, 235, 1, 0, 0, 0, 1479, 1477, 1, 0, 0, 0, 1480, 1481, 5, 36, 0, 0, 1481, 1482, 5, 157, 0, 0, 1482, 1483, 3, 238, 119, 0, 1483, 1484, 5, 158, 0, 0, 1484, 1485, 5, 154, 0, 0, 1485, 237, 1, 0, 0, 0, 1486, 1487, 3, 284, 142, 0, 1487, 239, 1, 0, 0, 0, 1488, 1489, 5, 36, 0, 0, 1489, 1490, 5, 51, 0, 0, 1490, 1491, 5, 157, 0, 0, 1491, 1492, 3, 40, 20, 0, 1492, 1493, 5, 158, 0, 0, 1493, 241, 1, 0, 0, 0, 1494, 1495, 5, 126, 0, 0, 1495, 243, 1, 0, 0, 0, 1496, 1499, 3, 324, 162, 0, 1497, 1499, 5, 134, 0, 0, 1498, 1496, 1, 0, 0, 0, 1498, 1497, 1, 0, 0, 0, 1499, 245, 1, 0, 0, 0, 1500, 1505, 3, 244, 122, 0, 1501, 1502, 5, 155, 0, 0, 1502, 1504, 3, 244, 122, 0, 1503, 1501, 1, 0, 0, 0, 1504, 1507, 1, 0, 0, 0, 1505, 1503, 1, 0, 0, 0, 1505, 1506, 1, 0, 0, 0, 1506, 247, 1, 0, 0, 0, 1507, 1505, 1, 0, 0, 0, 1508, 1509, 5, 37, 0, 0, 1509, 1510, 3, 308, 154, 0, 1510, 1511, 3, 324, 162, 0, 1511, 1512, 5, 157, 0, 0, 1512, 1513, 3, 246, 123, 0, 1513, 1514, 5, 158, 0, 0, 1514, 1515, 5, 154, 0, 0, 1515, 249, 1, 0, 0, 0, 1516, 1517, 5, 37, 0, 0, 1517, 1518, 3, 254, 127, 0, 1518, 1519, 5, 44, 0, 0, 1519, 1520, 5, 157, 0, 0, 1520, 1521, 3, 174, 87, 0, 1521, 1522, 5, 158, 0, 0, 1522, 1523, 5, 154, 0, 0, 1523, 251, 1, 0, 0, 0, 1524, 1525, 3, 470, 235, 0, 1525, 1526, 5, 161, 0, 0, 1526, 1527, 3, 324, 162, 0, 1527, 253, 1, 0, 0, 0, 1528, 1529, 7, 6, 0, 0, 1529, 255, 1, 0, 0, 0, 1530, 1535, 3, 254, 127, 0, 1531, 1532, 5, 155, 0, 0, 1532, 1534, 3, 254, 127, 0, 1533, 1531, 1, 0, 0, 0, 1534, 1537, 1, 0, 0, 0, 1535, 1533, 1, 0, 0, 0, 1535, 1536, 1, 0, 0, 0, 1536, 257, 1, 0, 0, 0, 1537, 1535, 1, 0, 0, 0, 1538, 1539, 5, 39, 0, 0, 1539, 1540, 3, 104, 52, 0, 1540, 1541, 5, 35, 0, 0, 1541, 1549, 3, 234, 117, 0, 1542, 1543, 5, 29, 0, 0, 1543, 1544, 3, 104, 52, 0, 1544, 1545, 5, 35, 0, 0, 1545, 1546, 3, 234, 117, 0, 1546, 1548, 1, 0, 0, 0, 1547, 1542, 1, 0, 0, 0, 1548, 1551, 1, 0, 0, 0, 1549, 1547, 1, 0, 0, 0, 1549, 1550, 1, 0, 0, 0, 1550, 1555, 1, 0, 0, 0, 1551, 1549, 1, 0, 0, 0, 1552, 1553, 5, 28, 0, 0, 1553, 1554, 5, 35, 0, 0, 1554, 1556, 3, 234, 117, 0, 1555, 1552, 1, 0, 0, 0, 1555, 1556, 1, 0, 0, 0, 1556, 259, 1, 0, 0, 0, 1557, 1559, 3, 308, 154, 0, 1558, 1557, 1, 0, 0, 0, 1558, 1559, 1, 0, 0, 0, 1559, 1560, 1, 0, 0, 0, 1560, 1561, 5, 39, 0, 0, 1561, 1562, 3, 104, 52, 0, 1562, 1563, 5, 101, 0, 0, 1563, 1571, 3, 456, 228, 0, 1564, 1565, 5, 29, 0, 0, 1565, 1566, 3, 104, 52, 0, 1566, 1567, 5, 101, 0, 0, 1567, 1568, 3, 456, 228, 0, 1568, 1570, 1, 0, 0, 0, 1569, 1564, 1, 0, 0, 0, 1570, 1573, 1, 0, 0, 0, 1571, 1569, 1, 0, 0, 0, 1571, 1572, 1, 0, 0, 0, 1572, 1576, 1, 0, 0, 0, 1573, 1571, 1, 0, 0, 0, 1574, 1575, 5, 28, 0, 0, 1575, 1577, 3, 456, 228, 0, 1576, 1574, 1, 0, 0, 0, 1576, 1577, 1, 0, 0, 0, 1577, 1578, 1, 0, 0, 0, 1578, 1579, 5, 26, 0, 0, 1579, 1581, 5, 39, 0, 0, 1580, 1582, 3, 254, 127, 0, 1581, 1580, 1, 0, 0, 0, 1581, 1582, 1, 0, 0, 0, 1582, 1583, 1, 0, 0, 0, 1583, 1584, 5, 154, 0, 0, 1584, 261, 1, 0, 0, 0, 1585, 1586, 5, 106, 0, 0, 1586, 1587, 3, 254, 127, 0, 1587, 263, 1, 0, 0, 0, 1588, 1589, 5, 157, 0, 0, 1589, 1594, 3, 156, 78, 0, 1590, 1591, 5, 155, 0, 0, 1591, 1593, 3, 156, 78, 0, 1592, 1590, 1, 0, 0, 0, 1593, 1596, 1, 0, 0, 0, 1594, 1592, 1, 0, 0, 0, 1594, 1595, 1, 0, 0, 0, 1595, 1597, 1, 0, 0, 0, 1596, 1594, 1, 0, 0, 0, 1597, 1598, 5, 158, 0, 0, 1598, 265, 1, 0, 0, 0, 1599, 1600, 3, 324, 162, 0, 1600, 1601, 5, 77, 0, 0, 1601, 1602, 5, 152, 0, 0, 1602, 267, 1, 0, 0, 0, 1603, 1604, 3, 364, 182, 0, 1604, 1605, 5, 157, 0, 0, 1605, 1610, 3, 202, 101, 0, 1606, 1607, 5, 155, 0, 0, 1607, 1609, 3, 202, 101, 0, 1608, 1606, 1, 0, 0, 0, 1609, 1612, 1, 0, 0, 0, 1610, 1608, 1, 0, 0, 0, 1610, 1611, 1, 0, 0, 0, 1611, 1613, 1, 0, 0, 0, 1612, 1610, 1, 0, 0, 0, 1613, 1614, 5, 158, 0, 0, 1614, 269, 1, 0, 0, 0, 1615, 1617, 5, 19, 0, 0, 1616, 1615, 1, 0, 0, 0, 1616, 1617, 1, 0, 0, 0, 1617, 1618, 1, 0, 0, 0, 1618, 1630, 3, 324, 162, 0, 1619, 1620, 5, 27, 0, 0, 1620, 1625, 3, 324, 162, 0, 1621, 1622, 5, 157, 0, 0, 1622, 1623, 3, 254, 127, 0, 1623, 1624, 5, 158, 0, 0, 1624, 1626, 1, 0, 0, 0, 1625, 1621, 1, 0, 0, 0, 1625, 1626, 1, 0, 0, 0, 1626, 1630, 1, 0, 0, 0, 1627, 1628, 5, 20, 0, 0, 1628, 1630, 3, 324, 162, 0, 1629, 1616, 1, 0, 0, 0, 1629, 1619, 1, 0, 0, 0, 1629, 1627, 1, 0, 0, 0, 1630, 271, 1, 0, 0, 0, 1631, 1636, 3, 254, 127, 0, 1632, 1633, 5, 155, 0, 0, 1633, 1635, 3, 254, 127, 0, 1634, 1632, 1, 0, 0, 0, 1635, 1638, 1, 0, 0, 0, 1636, 1634, 1, 0, 0, 0, 1636, 1637, 1, 0, 0, 0, 1637, 1642, 1, 0, 0, 0, 1638, 1636, 1, 0, 0, 0, 1639, 1642, 5, 65, 0, 0, 1640, 1642, 5, 6, 0, 0, 1641, 1631, 1, 0, 0, 0, 1641, 1639, 1, 0, 0, 0, 1641, 1640, 1, 0, 0, 0, 1642, 273, 1, 0, 0, 0, 1643, 1645, 5, 21, 0, 0, 1644, 1643, 1, 0, 0, 0, 1644, 1645, 1, 0, 0, 0, 1645, 1646, 1, 0, 0, 0, 1646, 1647, 3, 256, 128, 0, 1647, 1649, 5, 161, 0, 0, 1648, 1650, 5, 41, 0, 0, 1649, 1648, 1, 0, 0, 0, 1649, 1650, 1, 0, 0, 0, 1650, 1651, 1, 0, 0, 0, 1651, 1654, 3, 508, 254, 0, 1652, 1653, 5, 151, 0, 0, 1653, 1655, 3, 202, 101, 0, 1654, 1652, 1, 0, 0, 0, 1654, 1655, 1, 0, 0, 0, 1655, 275, 1, 0, 0, 0, 1656, 1661, 3, 286, 143, 0, 1657, 1661, 3, 302, 151, 0, 1658, 1661, 3, 296, 148, 0, 1659, 1661, 3, 288, 144, 0, 1660, 1656, 1, 0, 0, 0, 1660, 1657, 1, 0, 0, 0, 1660, 1658, 1, 0, 0, 0, 1660, 1659, 1, 0, 0, 0, 1661, 277, 1, 0, 0, 0, 1662, 1663, 5, 31, 0, 0, 1663, 1664, 3, 256, 128, 0, 1664, 1665, 5, 161, 0, 0, 1665, 1666, 3, 508, 254, 0, 1666, 279, 1, 0, 0, 0, 1667, 1669, 7, 5, 0, 0, 1668, 1667, 1, 0, 0, 0, 1668, 1669, 1, 0, 0, 0, 1669, 1670, 1, 0, 0, 0, 1670, 1671, 5, 34, 0, 0, 1671, 1679, 3, 150, 75, 0, 1672, 1674, 5, 68, 0, 0, 1673, 1672, 1, 0, 0, 0, 1673, 1674, 1, 0, 0, 0, 1674, 1675, 1, 0, 0, 0, 1675, 1676, 5, 157, 0, 0, 1676, 1677, 3, 220, 110, 0, 1677, 1678, 5, 158, 0, 0, 1678, 1680, 1, 0, 0, 0, 1679, 1673, 1, 0, 0, 0, 1679, 1680, 1, 0, 0, 0, 1680, 1681, 1, 0, 0, 0, 1681, 1682, 5, 86, 0, 0, 1682, 1683, 3, 324, 162, 0, 1683, 281, 1, 0, 0, 0, 1684, 1685, 5, 106, 0, 0, 1685, 1686, 3, 254, 127, 0, 1686, 283, 1, 0, 0, 0, 1687, 1692, 3, 276, 138, 0, 1688, 1689, 5, 154, 0, 0, 1689, 1691, 3, 276, 138, 0, 1690, 1688, 1, 0, 0, 0, 1691, 1694, 1, 0, 0, 0, 1692, 1690, 1, 0, 0, 0, 1692, 1693, 1, 0, 0, 0, 1693, 285, 1, 0, 0, 0, 1694, 1692, 1, 0, 0, 0, 1695, 1700, 3, 274, 137, 0, 1696, 1700, 3, 294, 147, 0, 1697, 1700, 3, 304, 152, 0, 1698, 1700, 3, 278, 139, 0, 1699, 1695, 1, 0, 0, 0, 1699, 1696, 1, 0, 0, 0, 1699, 1697, 1, 0, 0, 0, 1699, 1698, 1, 0, 0, 0, 1700, 287, 1, 0, 0, 0, 1701, 1702, 5, 67, 0, 0, 1702, 1703, 3, 254, 127, 0, 1703, 1704, 5, 44, 0, 0, 1704, 1705, 5, 55, 0, 0, 1705, 1706, 3, 324, 162, 0, 1706, 1707, 3, 290, 145, 0, 1707, 289, 1, 0, 0, 0, 1708, 1715, 3, 240, 120, 0, 1709, 1710, 5, 36, 0, 0, 1710, 1711, 5, 51, 0, 0, 1711, 1712, 5, 157, 0, 0, 1712, 1713, 7, 7, 0, 0, 1713, 1715, 5, 158, 0, 0, 1714, 1708, 1, 0, 0, 0, 1714, 1709, 1, 0, 0, 0, 1715, 291, 1, 0, 0, 0, 1716, 1717, 5, 72, 0, 0, 1717, 1725, 3, 150, 75, 0, 1718, 1720, 5, 68, 0, 0, 1719, 1718, 1, 0, 0, 0, 1719, 1720, 1, 0, 0, 0, 1720, 1721, 1, 0, 0, 0, 1721, 1722, 5, 157, 0, 0, 1722, 1723, 3, 220, 110, 0, 1723, 1724, 5, 158, 0, 0, 1724, 1726, 1, 0, 0, 0, 1725, 1719, 1, 0, 0, 0, 1725, 1726, 1, 0, 0, 0, 1726, 293, 1, 0, 0, 0, 1727, 1729, 5, 92, 0, 0, 1728, 1727, 1, 0, 0, 0, 1728, 1729, 1, 0, 0, 0, 1729, 1730, 1, 0, 0, 0, 1730, 1731, 3, 256, 128, 0, 1731, 1733, 5, 161, 0, 0, 1732, 1734, 3, 320, 160, 0, 1733, 1732, 1, 0, 0, 0, 1733, 1734, 1, 0, 0, 0, 1734, 1735, 1, 0, 0, 0, 1735, 1737, 3, 508, 254, 0, 1736, 1738, 5, 17, 0, 0, 1737, 1736, 1, 0, 0, 0, 1737, 1738, 1, 0, 0, 0, 1738, 1741, 1, 0, 0, 0, 1739, 1740, 5, 151, 0, 0, 1740, 1742, 3, 202, 101, 0, 1741, 1739, 1, 0, 0, 0, 1741, 1742, 1, 0, 0, 0, 1742, 295, 1, 0, 0, 0, 1743, 1744, 3, 300, 150, 0, 1744, 1745, 5, 44, 0, 0, 1745, 1746, 3, 298, 149, 0, 1746, 297, 1, 0, 0, 0, 1747, 1750, 3, 324, 162, 0, 1748, 1750, 5, 152, 0, 0, 1749, 1747, 1, 0, 0, 0, 1749, 1748, 1, 0, 0, 0, 1750, 299, 1, 0, 0, 0, 1751, 1754, 3, 292, 146, 0, 1752, 1754, 3, 280, 140, 0, 1753, 1751, 1, 0, 0, 0, 1753, 1752, 1, 0, 0, 0, 1754, 301, 1, 0, 0, 0, 1755, 1756, 3, 282, 141, 0, 1756, 303, 1, 0, 0, 0, 1757, 1759, 5, 111, 0, 0, 1758, 1757, 1, 0, 0, 0, 1758, 1759, 1, 0, 0, 0, 1759, 1760, 1, 0, 0, 0, 1760, 1761, 3, 256, 128, 0, 1761, 1763, 5, 161, 0, 0, 1762, 1764, 3, 320, 160, 0, 1763, 1762, 1, 0, 0, 0, 1763, 1764, 1, 0, 0, 0, 1764, 1765, 1, 0, 0, 0, 1765, 1768, 3, 508, 254, 0, 1766, 1767, 5, 151, 0, 0, 1767, 1769, 3, 202, 101, 0, 1768, 1766, 1, 0, 0, 0, 1768, 1769, 1, 0, 0, 0, 1769, 305, 1, 0, 0, 0, 1770, 1771, 5, 115, 0, 0, 1771, 1775, 3, 104, 52, 0, 1772, 1773, 5, 32, 0, 0, 1773, 1775, 3, 352, 176, 0, 1774, 1770, 1, 0, 0, 0, 1774, 1772, 1, 0, 0, 0, 1775, 307, 1, 0, 0, 0, 1776, 1777, 3, 254, 127, 0, 1777, 1778, 5, 161, 0, 0, 1778, 309, 1, 0, 0, 0, 1779, 1780, 5, 46, 0, 0, 1780, 1781, 3, 256, 128, 0, 1781, 1782, 5, 154, 0, 0, 1782, 311, 1, 0, 0, 0, 1783, 1786, 3, 368, 184, 0, 1784, 1786, 3, 434, 217, 0, 1785, 1783, 1, 0, 0, 0, 1785, 1784, 1, 0, 0, 0, 1786, 313, 1, 0, 0, 0, 1787, 1793, 3, 332, 166, 0, 1788, 1793, 3, 196, 98, 0, 1789, 1793, 5, 119, 0, 0, 1790, 1793, 5, 121, 0, 0, 1791, 1793, 5, 60, 0, 0, 1792, 1787, 1, 0, 0, 0, 1792, 1788, 1, 0, 0, 0, 1792, 1789, 1, 0, 0, 0, 1792, 1790, 1, 0, 0, 0, 1792, 1791, 1, 0, 0, 0, 1793, 315, 1, 0, 0, 0, 1794, 1795, 7, 8, 0, 0, 1795, 317, 1, 0, 0, 0, 1796, 1798, 3, 308, 154, 0, 1797, 1796, 1, 0, 0, 0, 1797, 1798, 1, 0, 0, 0, 1798, 1800, 1, 0, 0, 0, 1799, 1801, 3, 306, 153, 0, 1800, 1799, 1, 0, 0, 0, 1800, 1801, 1, 0, 0, 0, 1801, 1802, 1, 0, 0, 0, 1802, 1803, 5, 50, 0, 0, 1803, 1804, 3, 456, 228, 0, 1804, 1805, 5, 26, 0, 0, 1805, 1807, 5, 50, 0, 0, 1806, 1808, 3, 254, 127, 0, 1807, 1806, 1, 0, 0, 0, 1807, 1808, 1, 0, 0, 0, 1808, 1809, 1, 0, 0, 0, 1809, 1810, 5, 154, 0, 0, 1810, 319, 1, 0, 0, 0, 1811, 1812, 7, 9, 0, 0, 1812, 321, 1, 0, 0, 0, 1813, 1814, 7, 10, 0, 0, 1814, 323, 1, 0, 0, 0, 1815, 1819, 3, 254, 127, 0, 1816, 1819, 5, 119, 0, 0, 1817, 1819, 5, 134, 0, 0, 1818, 1815, 1, 0, 0, 0, 1818, 1816, 1, 0, 0, 0, 1818, 1817, 1, 0, 0, 0, 1819, 1823, 1, 0, 0, 0, 1820, 1822, 3, 326, 163, 0, 1821, 1820, 1, 0, 0, 0, 1822, 1825, 1, 0, 0, 0, 1823, 1821, 1, 0, 0, 0, 1823, 1824, 1, 0, 0, 0, 1824, 325, 1, 0, 0, 0, 1825, 1823, 1, 0, 0, 0, 1826, 1827, 5, 170, 0, 0, 1827, 1829, 3, 510, 255, 0, 1828, 1826, 1, 0, 0, 0, 1829, 1830, 1, 0, 0, 0, 1830, 1828, 1, 0, 0, 0, 1830, 1831, 1, 0, 0, 0, 1831, 1849, 1, 0, 0, 0, 1832, 1833, 5, 157, 0, 0, 1833, 1834, 3, 6, 3, 0, 1834, 1835, 5, 158, 0, 0, 1835, 1849, 1, 0, 0, 0, 1836, 1837, 5, 157, 0, 0, 1837, 1838, 3, 156, 78, 0, 1838, 1839, 5, 158, 0, 0, 1839, 1849, 1, 0, 0, 0, 1840, 1841, 5, 179, 0, 0, 1841, 1846, 3, 44, 22, 0, 1842, 1843, 5, 157, 0, 0, 1843, 1844, 3, 202, 101, 0, 1844, 1845, 5, 158, 0, 0, 1845, 1847, 1, 0, 0, 0, 1846, 1842, 1, 0, 0, 0, 1846, 1847, 1, 0, 0, 0, 1847, 1849, 1, 0, 0, 0, 1848, 1828, 1, 0, 0, 0, 1848, 1832, 1, 0, 0, 0, 1848, 1836, 1, 0, 0, 0, 1848, 1840, 1, 0, 0, 0, 1849, 327, 1, 0, 0, 0, 1850, 1852, 3, 308, 154, 0, 1851, 1850, 1, 0, 0, 0, 1851, 1852, 1, 0, 0, 0, 1852, 1853, 1, 0, 0, 0, 1853, 1855, 5, 56, 0, 0, 1854, 1856, 3, 254, 127, 0, 1855, 1854, 1, 0, 0, 0, 1855, 1856, 1, 0, 0, 0, 1856, 1859, 1, 0, 0, 0, 1857, 1858, 5, 114, 0, 0, 1858, 1860, 3, 104, 52, 0, 1859, 1857, 1, 0, 0, 0, 1859, 1860, 1, 0, 0, 0, 1860, 1861, 1, 0, 0, 0, 1861, 1862, 5, 154, 0, 0, 1862, 329, 1, 0, 0, 0, 1863, 1865, 3, 308, 154, 0, 1864, 1863, 1, 0, 0, 0, 1864, 1865, 1, 0, 0, 0, 1865, 1866, 1, 0, 0, 0, 1866, 1867, 5, 60, 0, 0, 1867, 1868, 5, 154, 0, 0, 1868, 331, 1, 0, 0, 0, 1869, 1872, 3, 0, 0, 0, 1870, 1872, 3, 354, 177, 0, 1871, 1869, 1, 0, 0, 0, 1871, 1870, 1, 0, 0, 0, 1872, 333, 1, 0, 0, 0, 1873, 1878, 3, 130, 65, 0, 1874, 1878, 3, 466, 233, 0, 1875, 1878, 3, 532, 266, 0, 1876, 1878, 3, 206, 103, 0, 1877, 1873, 1, 0, 0, 0, 1877, 1874, 1, 0, 0, 0, 1877, 1875, 1, 0, 0, 0, 1877, 1876, 1, 0, 0, 0, 1878, 335, 1, 0, 0, 0, 1879, 1880, 5, 67, 0, 0, 1880, 1881, 5, 14, 0, 0, 1881, 1882, 3, 254, 127, 0, 1882, 1883, 5, 44, 0, 0, 1883, 1884, 3, 340, 170, 0, 1884, 1887, 5, 26, 0, 0, 1885, 1886, 5, 67, 0, 0, 1886, 1888, 5, 14, 0, 0, 1887, 1885, 1, 0, 0, 0, 1887, 1888, 1, 0, 0, 0, 1888, 1890, 1, 0, 0, 0, 1889, 1891, 3, 254, 127, 0, 1890, 1889, 1, 0, 0, 0, 1890, 1891, 1, 0, 0, 0, 1891, 1892, 1, 0, 0, 0, 1892, 1893, 5, 154, 0, 0, 1893, 337, 1, 0, 0, 0, 1894, 1912, 3, 490, 245, 0, 1895, 1912, 3, 488, 244, 0, 1896, 1912, 3, 498, 249, 0, 1897, 1912, 3, 342, 171, 0, 1898, 1912, 3, 336, 168, 0, 1899, 1912, 3, 350, 175, 0, 1900, 1912, 3, 522, 261, 0, 1901, 1912, 3, 506, 253, 0, 1902, 1912, 3, 130, 65, 0, 1903, 1912, 3, 532, 266, 0, 1904, 1912, 3, 206, 103, 0, 1905, 1912, 3, 14, 7, 0, 1906, 1912, 3, 42, 21, 0, 1907, 1912, 3, 48, 24, 0, 1908, 1912, 3, 528, 264, 0, 1909, 1912, 3, 250, 125, 0, 1910, 1912, 3, 248, 124, 0, 1911, 1894, 1, 0, 0, 0, 1911, 1895, 1, 0, 0, 0, 1911, 1896, 1, 0, 0, 0, 1911, 1897, 1, 0, 0, 0, 1911, 1898, 1, 0, 0, 0, 1911, 1899, 1, 0, 0, 0, 1911, 1900, 1, 0, 0, 0, 1911, 1901, 1, 0, 0, 0, 1911, 1902, 1, 0, 0, 0, 1911, 1903, 1, 0, 0, 0, 1911, 1904, 1, 0, 0, 0, 1911, 1905, 1, 0, 0, 0, 1911, 1906, 1, 0, 0, 0, 1911, 1907, 1, 0, 0, 0, 1911, 1908, 1, 0, 0, 0, 1911, 1909, 1, 0, 0, 0, 1911, 1910, 1, 0, 0, 0, 1912, 339, 1, 0, 0, 0, 1913, 1915, 3, 338, 169, 0, 1914, 1913, 1, 0, 0, 0, 1915, 1918, 1, 0, 0, 0, 1916, 1914, 1, 0, 0, 0, 1916, 1917, 1, 0, 0, 0, 1917, 341, 1, 0, 0, 0, 1918, 1916, 1, 0, 0, 0, 1919, 1920, 5, 67, 0, 0, 1920, 1921, 3, 254, 127, 0, 1921, 1922, 5, 44, 0, 0, 1922, 1923, 3, 348, 174, 0, 1923, 1924, 3, 346, 173, 0, 1924, 1926, 5, 26, 0, 0, 1925, 1927, 5, 67, 0, 0, 1926, 1925, 1, 0, 0, 0, 1926, 1927, 1, 0, 0, 0, 1927, 1929, 1, 0, 0, 0, 1928, 1930, 3, 254, 127, 0, 1929, 1928, 1, 0, 0, 0, 1929, 1930, 1, 0, 0, 0, 1930, 1931, 1, 0, 0, 0, 1931, 1932, 5, 154, 0, 0, 1932, 343, 1, 0, 0, 0, 1933, 1952, 3, 490, 245, 0, 1934, 1952, 3, 498, 249, 0, 1935, 1952, 3, 342, 171, 0, 1936, 1952, 3, 350, 175, 0, 1937, 1952, 3, 522, 261, 0, 1938, 1952, 3, 506, 253, 0, 1939, 1952, 3, 130, 65, 0, 1940, 1952, 3, 466, 233, 0, 1941, 1952, 3, 532, 266, 0, 1942, 1952, 3, 206, 103, 0, 1943, 1952, 3, 14, 7, 0, 1944, 1952, 3, 82, 41, 0, 1945, 1952, 3, 42, 21, 0, 1946, 1952, 3, 48, 24, 0, 1947, 1952, 3, 154, 77, 0, 1948, 1952, 3, 528, 264, 0, 1949, 1952, 3, 250, 125, 0, 1950, 1952, 3, 248, 124, 0, 1951, 1933, 1, 0, 0, 0, 1951, 1934, 1, 0, 0, 0, 1951, 1935, 1, 0, 0, 0, 1951, 1936, 1, 0, 0, 0, 1951, 1937, 1, 0, 0, 0, 1951, 1938, 1, 0, 0, 0, 1951, 1939, 1, 0, 0, 0, 1951, 1940, 1, 0, 0, 0, 1951, 1941, 1, 0, 0, 0, 1951, 1942, 1, 0, 0, 0, 1951, 1943, 1, 0, 0, 0, 1951, 1944, 1, 0, 0, 0, 1951, 1945, 1, 0, 0, 0, 1951, 1946, 1, 0, 0, 0, 1951, 1947, 1, 0, 0, 0, 1951, 1948, 1, 0, 0, 0, 1951, 1949, 1, 0, 0, 0, 1951, 1950, 1, 0, 0, 0, 1952, 345, 1, 0, 0, 0, 1953, 1955, 3, 344, 172, 0, 1954, 1953, 1, 0, 0, 0, 1955, 1958, 1, 0, 0, 0, 1956, 1954, 1, 0, 0, 0, 1956, 1957, 1, 0, 0, 0, 1957, 347, 1, 0, 0, 0, 1958, 1956, 1, 0, 0, 0, 1959, 1963, 3, 236, 118, 0, 1960, 1961, 3, 240, 120, 0, 1961, 1962, 5, 154, 0, 0, 1962, 1964, 1, 0, 0, 0, 1963, 1960, 1, 0, 0, 0, 1963, 1964, 1, 0, 0, 0, 1964, 1966, 1, 0, 0, 0, 1965, 1959, 1, 0, 0, 0, 1965, 1966, 1, 0, 0, 0, 1966, 349, 1, 0, 0, 0, 1967, 1968, 5, 67, 0, 0, 1968, 1969, 3, 254, 127, 0, 1969, 1970, 5, 44, 0, 0, 1970, 1971, 5, 55, 0, 0, 1971, 1972, 3, 324, 162, 0, 1972, 1973, 5, 157, 0, 0, 1973, 1974, 3, 240, 120, 0, 1974, 1975, 5, 158, 0, 0, 1975, 1976, 1, 0, 0, 0, 1976, 1977, 5, 154, 0, 0, 1977, 351, 1, 0, 0, 0, 1978, 1979, 3, 254, 127, 0, 1979, 1980, 5, 41, 0, 0, 1980, 1981, 3, 156, 78, 0, 1981, 353, 1, 0, 0, 0, 1982, 1983, 3, 0, 0, 0, 1983, 1984, 3, 254, 127, 0, 1984, 355, 1, 0, 0, 0, 1985, 1986, 3, 410, 205, 0, 1986, 1987, 5, 108, 0, 0, 1987, 1991, 3, 370, 185, 0, 1988, 1990, 3, 436, 218, 0, 1989, 1988, 1, 0, 0, 0, 1990, 1993, 1, 0, 0, 0, 1991, 1989, 1, 0, 0, 0, 1991, 1992, 1, 0, 0, 0, 1992, 1994, 1, 0, 0, 0, 1993, 1991, 1, 0, 0, 0, 1994, 1995, 5, 26, 0, 0, 1995, 1997, 5, 108, 0, 0, 1996, 1998, 3, 254, 127, 0, 1997, 1996, 1, 0, 0, 0, 1997, 1998, 1, 0, 0, 0, 1998, 357, 1, 0, 0, 0, 1999, 2000, 5, 69, 0, 0, 2000, 2001, 5, 157, 0, 0, 2001, 2002, 3, 360, 180, 0, 2002, 2003, 5, 158, 0, 0, 2003, 2004, 5, 154, 0, 0, 2004, 359, 1, 0, 0, 0, 2005, 2006, 3, 284, 142, 0, 2006, 361, 1, 0, 0, 0, 2007, 2008, 5, 69, 0, 0, 2008, 2009, 5, 51, 0, 0, 2009, 2010, 5, 157, 0, 0, 2010, 2011, 3, 40, 20, 0, 2011, 2012, 5, 158, 0, 0, 2012, 363, 1, 0, 0, 0, 2013, 2016, 3, 324, 162, 0, 2014, 2016, 3, 226, 113, 0, 2015, 2013, 1, 0, 0, 0, 2015, 2014, 1, 0, 0, 0, 2016, 365, 1, 0, 0, 0, 2017, 2029, 3, 324, 162, 0, 2018, 2029, 3, 314, 157, 0, 2019, 2029, 3, 12, 6, 0, 2020, 2029, 3, 226, 113, 0, 2021, 2029, 3, 406, 203, 0, 2022, 2029, 3, 520, 260, 0, 2023, 2029, 3, 18, 9, 0, 2024, 2025, 5, 157, 0, 0, 2025, 2026, 3, 202, 101, 0, 2026, 2027, 5, 158, 0, 0, 2027, 2029, 1, 0, 0, 0, 2028, 2017, 1, 0, 0, 0, 2028, 2018, 1, 0, 0, 0, 2028, 2019, 1, 0, 0, 0, 2028, 2020, 1, 0, 0, 0, 2028, 2021, 1, 0, 0, 0, 2028, 2022, 1, 0, 0, 0, 2028, 2023, 1, 0, 0, 0, 2028, 2024, 1, 0, 0, 0, 2029, 367, 1, 0, 0, 0, 2030, 2036, 3, 176, 88, 0, 2031, 2036, 3, 120, 60, 0, 2032, 2036, 3, 342, 171, 0, 2033, 2036, 3, 350, 175, 0, 2034, 2036, 3, 138, 69, 0, 2035, 2030, 1, 0, 0, 0, 2035, 2031, 1, 0, 0, 0, 2035, 2032, 1, 0, 0, 0, 2035, 2033, 1, 0, 0, 0, 2035, 2034, 1, 0, 0, 0, 2036, 369, 1, 0, 0, 0, 2037, 2038, 3, 254, 127, 0, 2038, 2039, 5, 154, 0, 0, 2039, 371, 1, 0, 0, 0, 2040, 2045, 3, 324, 162, 0, 2041, 2042, 5, 157, 0, 0, 2042, 2043, 3, 6, 3, 0, 2043, 2044, 5, 158, 0, 0, 2044, 2046, 1, 0, 0, 0, 2045, 2041, 1, 0, 0, 0, 2045, 2046, 1, 0, 0, 0, 2046, 373, 1, 0, 0, 0, 2047, 2049, 3, 308, 154, 0, 2048, 2047, 1, 0, 0, 0, 2048, 2049, 1, 0, 0, 0, 2049, 2050, 1, 0, 0, 0, 2050, 2051, 3, 372, 186, 0, 2051, 2052, 5, 154, 0, 0, 2052, 375, 1, 0, 0, 0, 2053, 2054, 5, 72, 0, 0, 2054, 2055, 3, 150, 75, 0, 2055, 2063, 3, 496, 248, 0, 2056, 2058, 5, 68, 0, 0, 2057, 2056, 1, 0, 0, 0, 2057, 2058, 1, 0, 0, 0, 2058, 2059, 1, 0, 0, 0, 2059, 2060, 5, 157, 0, 0, 2060, 2061, 3, 220, 110, 0, 2061, 2062, 5, 158, 0, 0, 2062, 2064, 1, 0, 0, 0, 2063, 2057, 1, 0, 0, 0, 2063, 2064, 1, 0, 0, 0, 2064, 377, 1, 0, 0, 0, 2065, 2083, 3, 490, 245, 0, 2066, 2083, 3, 488, 244, 0, 2067, 2083, 3, 498, 249, 0, 2068, 2083, 3, 342, 171, 0, 2069, 2083, 3, 336, 168, 0, 2070, 2083, 3, 350, 175, 0, 2071, 2083, 3, 522, 261, 0, 2072, 2083, 3, 506, 253, 0, 2073, 2083, 3, 130, 65, 0, 2074, 2083, 3, 532, 266, 0, 2075, 2083, 3, 206, 103, 0, 2076, 2083, 3, 14, 7, 0, 2077, 2083, 3, 42, 21, 0, 2078, 2083, 3, 48, 24, 0, 2079, 2083, 3, 528, 264, 0, 2080, 2083, 3, 250, 125, 0, 2081, 2083, 3, 248, 124, 0, 2082, 2065, 1, 0, 0, 0, 2082, 2066, 1, 0, 0, 0, 2082, 2067, 1, 0, 0, 0, 2082, 2068, 1, 0, 0, 0, 2082, 2069, 1, 0, 0, 0, 2082, 2070, 1, 0, 0, 0, 2082, 2071, 1, 0, 0, 0, 2082, 2072, 1, 0, 0, 0, 2082, 2073, 1, 0, 0, 0, 2082, 2074, 1, 0, 0, 0, 2082, 2075, 1, 0, 0, 0, 2082, 2076, 1, 0, 0, 0, 2082, 2077, 1, 0, 0, 0, 2082, 2078, 1, 0, 0, 0, 2082, 2079, 1, 0, 0, 0, 2082, 2080, 1, 0, 0, 0, 2082, 2081, 1, 0, 0, 0, 2083, 379, 1, 0, 0, 0, 2084, 2086, 3, 458, 229, 0, 2085, 2084, 1, 0, 0, 0, 2086, 2089, 1, 0, 0, 0, 2087, 2085, 1, 0, 0, 0, 2087, 2088, 1, 0, 0, 0, 2088, 381, 1, 0, 0, 0, 2089, 2087, 1, 0, 0, 0, 2090, 2104, 3, 490, 245, 0, 2091, 2104, 3, 488, 244, 0, 2092, 2104, 3, 522, 261, 0, 2093, 2104, 3, 506, 253, 0, 2094, 2104, 3, 130, 65, 0, 2095, 2104, 3, 532, 266, 0, 2096, 2104, 3, 206, 103, 0, 2097, 2104, 3, 14, 7, 0, 2098, 2104, 3, 42, 21, 0, 2099, 2104, 3, 48, 24, 0, 2100, 2104, 3, 528, 264, 0, 2101, 2104, 3, 250, 125, 0, 2102, 2104, 3, 248, 124, 0, 2103, 2090, 1, 0, 0, 0, 2103, 2091, 1, 0, 0, 0, 2103, 2092, 1, 0, 0, 0, 2103, 2093, 1, 0, 0, 0, 2103, 2094, 1, 0, 0, 0, 2103, 2095, 1, 0, 0, 0, 2103, 2096, 1, 0, 0, 0, 2103, 2097, 1, 0, 0, 0, 2103, 2098, 1, 0, 0, 0, 2103, 2099, 1, 0, 0, 0, 2103, 2100, 1, 0, 0, 0, 2103, 2101, 1, 0, 0, 0, 2103, 2102, 1, 0, 0, 0, 2104, 383, 1, 0, 0, 0, 2105, 2107, 3, 382, 191, 0, 2106, 2105, 1, 0, 0, 0, 2107, 2110, 1, 0, 0, 0, 2108, 2106, 1, 0, 0, 0, 2108, 2109, 1, 0, 0, 0, 2109, 385, 1, 0, 0, 0, 2110, 2108, 1, 0, 0, 0, 2111, 2114, 5, 6, 0, 0, 2112, 2114, 3, 454, 227, 0, 2113, 2111, 1, 0, 0, 0, 2113, 2112, 1, 0, 0, 0, 2114, 387, 1, 0, 0, 0, 2115, 2117, 3, 308, 154, 0, 2116, 2115, 1, 0, 0, 0, 2116, 2117, 1, 0, 0, 0, 2117, 2119, 1, 0, 0, 0, 2118, 2120, 5, 70, 0, 0, 2119, 2118, 1, 0, 0, 0, 2119, 2120, 1, 0, 0, 0, 2120, 2121, 1, 0, 0, 0, 2121, 2126, 5, 71, 0, 0, 2122, 2123, 5, 157, 0, 0, 2123, 2124, 3, 386, 193, 0, 2124, 2125, 5, 158, 0, 0, 2125, 2127, 1, 0, 0, 0, 2126, 2122, 1, 0, 0, 0, 2126, 2127, 1, 0, 0, 0, 2127, 2129, 1, 0, 0, 0, 2128, 2130, 5, 44, 0, 0, 2129, 2128, 1, 0, 0, 0, 2129, 2130, 1, 0, 0, 0, 2130, 2131, 1, 0, 0, 0, 2131, 2132, 3, 384, 192, 0, 2132, 2133, 5, 12, 0, 0, 2133, 2134, 3, 390, 195, 0, 2134, 2136, 5, 26, 0, 0, 2135, 2137, 5, 70, 0, 0, 2136, 2135, 1, 0, 0, 0, 2136, 2137, 1, 0, 0, 0, 2137, 2138, 1, 0, 0, 0, 2138, 2140, 5, 71, 0, 0, 2139, 2141, 3, 254, 127, 0, 2140, 2139, 1, 0, 0, 0, 2140, 2141, 1, 0, 0, 0, 2141, 2142, 1, 0, 0, 0, 2142, 2143, 5, 154, 0, 0, 2143, 389, 1, 0, 0, 0, 2144, 2146, 3, 458, 229, 0, 2145, 2144, 1, 0, 0, 0, 2146, 2149, 1, 0, 0, 0, 2147, 2145, 1, 0, 0, 0, 2147, 2148, 1, 0, 0, 0, 2148, 391, 1, 0, 0, 0, 2149, 2147, 1, 0, 0, 0, 2150, 2151, 5, 74, 0, 0, 2151, 2152, 5, 14, 0, 0, 2152, 2153, 3, 396, 198, 0, 2153, 2154, 5, 26, 0, 0, 2154, 2155, 5, 74, 0, 0, 2155, 2157, 5, 14, 0, 0, 2156, 2158, 3, 254, 127, 0, 2157, 2156, 1, 0, 0, 0, 2157, 2158, 1, 0, 0, 0, 2158, 393, 1, 0, 0, 0, 2159, 2177, 3, 490, 245, 0, 2160, 2177, 3, 488, 244, 0, 2161, 2177, 3, 498, 249, 0, 2162, 2177, 3, 342, 171, 0, 2163, 2177, 3, 336, 168, 0, 2164, 2177, 3, 350, 175, 0, 2165, 2177, 3, 522, 261, 0, 2166, 2177, 3, 506, 253, 0, 2167, 2177, 3, 130, 65, 0, 2168, 2177, 3, 532, 266, 0, 2169, 2177, 3, 206, 103, 0, 2170, 2177, 3, 14, 7, 0, 2171, 2177, 3, 42, 21, 0, 2172, 2177, 3, 48, 24, 0, 2173, 2177, 3, 528, 264, 0, 2174, 2177, 3, 250, 125, 0, 2175, 2177, 3, 248, 124, 0, 2176, 2159, 1, 0, 0, 0, 2176, 2160, 1, 0, 0, 0, 2176, 2161, 1, 0, 0, 0, 2176, 2162, 1, 0, 0, 0, 2176, 2163, 1, 0, 0, 0, 2176, 2164, 1, 0, 0, 0, 2176, 2165, 1, 0, 0, 0, 2176, 2166, 1, 0, 0, 0, 2176, 2167, 1, 0, 0, 0, 2176, 2168, 1, 0, 0, 0, 2176, 2169, 1, 0, 0, 0, 2176, 2170, 1, 0, 0, 0, 2176, 2171, 1, 0, 0, 0, 2176, 2172, 1, 0, 0, 0, 2176, 2173, 1, 0, 0, 0, 2176, 2174, 1, 0, 0, 0, 2176, 2175, 1, 0, 0, 0, 2177, 395, 1, 0, 0, 0, 2178, 2180, 3, 394, 197, 0, 2179, 2178, 1, 0, 0, 0, 2179, 2180, 1, 0, 0, 0, 2180, 397, 1, 0, 0, 0, 2181, 2182, 5, 74, 0, 0, 2182, 2183, 3, 402, 201, 0, 2183, 2184, 5, 26, 0, 0, 2184, 2186, 5, 74, 0, 0, 2185, 2187, 3, 254, 127, 0, 2186, 2185, 1, 0, 0, 0, 2186, 2187, 1, 0, 0, 0, 2187, 399, 1, 0, 0, 0, 2188, 2193, 3, 490, 245, 0, 2189, 2193, 3, 498, 249, 0, 2190, 2193, 3, 48, 24, 0, 2191, 2193, 3, 528, 264, 0, 2192, 2188, 1, 0, 0, 0, 2192, 2189, 1, 0, 0, 0, 2192, 2190, 1, 0, 0, 0, 2192, 2191, 1, 0, 0, 0, 2193, 401, 1, 0, 0, 0, 2194, 2196, 3, 400, 200, 0, 2195, 2194, 1, 0, 0, 0, 2195, 2196, 1, 0, 0, 0, 2196, 403, 1, 0, 0, 0, 2197, 2200, 3, 398, 199, 0, 2198, 2200, 3, 392, 196, 0, 2199, 2197, 1, 0, 0, 0, 2199, 2198, 1, 0, 0, 0, 2200, 405, 1, 0, 0, 0, 2201, 2202, 3, 324, 162, 0, 2202, 2208, 5, 179, 0, 0, 2203, 2209, 3, 12, 6, 0, 2204, 2205, 5, 157, 0, 0, 2205, 2206, 3, 202, 101, 0, 2206, 2207, 5, 158, 0, 0, 2207, 2209, 1, 0, 0, 0, 2208, 2203, 1, 0, 0, 0, 2208, 2204, 1, 0, 0, 0, 2209, 407, 1, 0, 0, 0, 2210, 2216, 3, 46, 23, 0, 2211, 2212, 3, 474, 237, 0, 2212, 2213, 3, 152, 76, 0, 2213, 2214, 3, 474, 237, 0, 2214, 2216, 1, 0, 0, 0, 2215, 2210, 1, 0, 0, 0, 2215, 2211, 1, 0, 0, 0, 2216, 409, 1, 0, 0, 0, 2217, 2218, 5, 77, 0, 0, 2218, 2219, 3, 408, 204, 0, 2219, 411, 1, 0, 0, 0, 2220, 2221, 5, 157, 0, 0, 2221, 2226, 3, 414, 207, 0, 2222, 2223, 5, 155, 0, 0, 2223, 2225, 3, 414, 207, 0, 2224, 2222, 1, 0, 0, 0, 2225, 2228, 1, 0, 0, 0, 2226, 2224, 1, 0, 0, 0, 2226, 2227, 1, 0, 0, 0, 2227, 2229, 1, 0, 0, 0, 2228, 2226, 1, 0, 0, 0, 2229, 2230, 5, 158, 0, 0, 2230, 413, 1, 0, 0, 0, 2231, 2232, 3, 254, 127, 0, 2232, 2233, 3, 160, 80, 0, 2233, 415, 1, 0, 0, 0, 2234, 2235, 3, 254, 127, 0, 2235, 2236, 3, 428, 214, 0, 2236, 417, 1, 0, 0, 0, 2237, 2242, 3, 416, 208, 0, 2238, 2239, 5, 155, 0, 0, 2239, 2241, 3, 416, 208, 0, 2240, 2238, 1, 0, 0, 0, 2241, 2244, 1, 0, 0, 0, 2242, 2240, 1, 0, 0, 0, 2242, 2243, 1, 0, 0, 0, 2243, 419, 1, 0, 0, 0, 2244, 2242, 1, 0, 0, 0, 2245, 2247, 5, 82, 0, 0, 2246, 2248, 3, 162, 81, 0, 2247, 2246, 1, 0, 0, 0, 2248, 2249, 1, 0, 0, 0, 2249, 2247, 1, 0, 0, 0, 2249, 2250, 1, 0, 0, 0, 2250, 2251, 1, 0, 0, 0, 2251, 2252, 5, 26, 0, 0, 2252, 2254, 5, 82, 0, 0, 2253, 2255, 3, 254, 127, 0, 2254, 2253, 1, 0, 0, 0, 2254, 2255, 1, 0, 0, 0, 2255, 421, 1, 0, 0, 0, 2256, 2260, 3, 460, 230, 0, 2257, 2258, 3, 424, 212, 0, 2258, 2259, 3, 460, 230, 0, 2259, 2261, 1, 0, 0, 0, 2260, 2257, 1, 0, 0, 0, 2260, 2261, 1, 0, 0, 0, 2261, 423, 1, 0, 0, 0, 2262, 2263, 7, 11, 0, 0, 2263, 425, 1, 0, 0, 0, 2264, 2266, 3, 308, 154, 0, 2265, 2264, 1, 0, 0, 0, 2265, 2266, 1, 0, 0, 0, 2266, 2267, 1, 0, 0, 0, 2267, 2268, 5, 85, 0, 0, 2268, 2271, 3, 202, 101, 0, 2269, 2270, 5, 90, 0, 0, 2270, 2272, 3, 202, 101, 0, 2271, 2269, 1, 0, 0, 0, 2271, 2272, 1, 0, 0, 0, 2272, 2273, 1, 0, 0, 0, 2273, 2274, 5, 154, 0, 0, 2274, 427, 1, 0, 0, 0, 2275, 2281, 3, 324, 162, 0, 2276, 2277, 5, 157, 0, 0, 2277, 2278, 3, 164, 82, 0, 2278, 2279, 5, 158, 0, 0, 2279, 2281, 1, 0, 0, 0, 2280, 2275, 1, 0, 0, 0, 2280, 2276, 1, 0, 0, 0, 2281, 429, 1, 0, 0, 0, 2282, 2284, 3, 308, 154, 0, 2283, 2282, 1, 0, 0, 0, 2283, 2284, 1, 0, 0, 0, 2284, 2285, 1, 0, 0, 0, 2285, 2287, 5, 86, 0, 0, 2286, 2288, 3, 202, 101, 0, 2287, 2286, 1, 0, 0, 0, 2287, 2288, 1, 0, 0, 0, 2288, 2289, 1, 0, 0, 0, 2289, 2290, 5, 154, 0, 0, 2290, 431, 1, 0, 0, 0, 2291, 2295, 3, 198, 99, 0, 2292, 2295, 3, 410, 205, 0, 2293, 2295, 3, 356, 178, 0, 2294, 2291, 1, 0, 0, 0, 2294, 2292, 1, 0, 0, 0, 2294, 2293, 1, 0, 0, 0, 2295, 433, 1, 0, 0, 0, 2296, 2299, 3, 20, 10, 0, 2297, 2299, 3, 336, 168, 0, 2298, 2296, 1, 0, 0, 0, 2298, 2297, 1, 0, 0, 0, 2299, 435, 1, 0, 0, 0, 2300, 2301, 3, 254, 127, 0, 2301, 2302, 5, 168, 0, 0, 2302, 2303, 3, 354, 177, 0, 2303, 2304, 5, 154, 0, 0, 2304, 437, 1, 0, 0, 0, 2305, 2306, 3, 202, 101, 0, 2306, 2307, 5, 114, 0, 0, 2307, 2308, 3, 78, 39, 0, 2308, 2309, 5, 155, 0, 0, 2309, 2311, 1, 0, 0, 0, 2310, 2305, 1, 0, 0, 0, 2311, 2314, 1, 0, 0, 0, 2312, 2310, 1, 0, 0, 0, 2312, 2313, 1, 0, 0, 0, 2313, 2315, 1, 0, 0, 0, 2314, 2312, 1, 0, 0, 0, 2315, 2316, 3, 202, 101, 0, 2316, 2317, 5, 114, 0, 0, 2317, 2318, 3, 78, 39, 0, 2318, 439, 1, 0, 0, 0, 2319, 2320, 5, 113, 0, 0, 2320, 2321, 3, 202, 101, 0, 2321, 2323, 5, 89, 0, 0, 2322, 2324, 5, 180, 0, 0, 2323, 2322, 1, 0, 0, 0, 2323, 2324, 1, 0, 0, 0, 2324, 2325, 1, 0, 0, 0, 2325, 2326, 3, 512, 256, 0, 2326, 2327, 5, 146, 0, 0, 2327, 2329, 5, 33, 0, 0, 2328, 2330, 3, 218, 109, 0, 2329, 2328, 1, 0, 0, 0, 2329, 2330, 1, 0, 0, 0, 2330, 2331, 1, 0, 0, 0, 2331, 2332, 3, 438, 219, 0, 2332, 2333, 5, 154, 0, 0, 2333, 441, 1, 0, 0, 0, 2334, 2335, 3, 364, 182, 0, 2335, 2336, 5, 170, 0, 0, 2336, 2337, 3, 510, 255, 0, 2337, 443, 1, 0, 0, 0, 2338, 2341, 3, 448, 224, 0, 2339, 2341, 3, 440, 220, 0, 2340, 2338, 1, 0, 0, 0, 2340, 2339, 1, 0, 0, 0, 2341, 445, 1, 0, 0, 0, 2342, 2343, 5, 113, 0, 0, 2343, 2344, 3, 202, 101, 0, 2344, 2346, 5, 89, 0, 0, 2345, 2347, 5, 180, 0, 0, 2346, 2345, 1, 0, 0, 0, 2346, 2347, 1, 0, 0, 0, 2347, 2348, 1, 0, 0, 0, 2348, 2349, 3, 512, 256, 0, 2349, 2350, 5, 151, 0, 0, 2350, 2351, 3, 438, 219, 0, 2351, 2352, 5, 154, 0, 0, 2352, 447, 1, 0, 0, 0, 2353, 2354, 5, 113, 0, 0, 2354, 2355, 3, 202, 101, 0, 2355, 2357, 5, 89, 0, 0, 2356, 2358, 5, 180, 0, 0, 2357, 2356, 1, 0, 0, 0, 2357, 2358, 1, 0, 0, 0, 2358, 2359, 1, 0, 0, 0, 2359, 2360, 3, 512, 256, 0, 2360, 2362, 5, 146, 0, 0, 2361, 2363, 3, 144, 72, 0, 2362, 2361, 1, 0, 0, 0, 2362, 2363, 1, 0, 0, 0, 2363, 2364, 1, 0, 0, 0, 2364, 2365, 3, 450, 225, 0, 2365, 2366, 5, 154, 0, 0, 2366, 449, 1, 0, 0, 0, 2367, 2368, 3, 536, 268, 0, 2368, 2369, 5, 114, 0, 0, 2369, 2377, 3, 78, 39, 0, 2370, 2371, 5, 155, 0, 0, 2371, 2372, 3, 536, 268, 0, 2372, 2373, 5, 114, 0, 0, 2373, 2374, 3, 78, 39, 0, 2374, 2376, 1, 0, 0, 0, 2375, 2370, 1, 0, 0, 0, 2376, 2379, 1, 0, 0, 0, 2377, 2375, 1, 0, 0, 0, 2377, 2378, 1, 0, 0, 0, 2378, 451, 1, 0, 0, 0, 2379, 2377, 1, 0, 0, 0, 2380, 2381, 5, 62, 0, 0, 2381, 2382, 3, 454, 227, 0, 2382, 453, 1, 0, 0, 0, 2383, 2388, 3, 324, 162, 0, 2384, 2385, 5, 155, 0, 0, 2385, 2387, 3, 324, 162, 0, 2386, 2384, 1, 0, 0, 0, 2387, 2390, 1, 0, 0, 0, 2388, 2386, 1, 0, 0, 0, 2388, 2389, 1, 0, 0, 0, 2389, 455, 1, 0, 0, 0, 2390, 2388, 1, 0, 0, 0, 2391, 2393, 3, 458, 229, 0, 2392, 2391, 1, 0, 0, 0, 2393, 2396, 1, 0, 0, 0, 2394, 2392, 1, 0, 0, 0, 2394, 2395, 1, 0, 0, 0, 2395, 457, 1, 0, 0, 0, 2396, 2394, 1, 0, 0, 0, 2397, 2411, 3, 534, 267, 0, 2398, 2411, 3, 36, 18, 0, 2399, 2411, 3, 426, 213, 0, 2400, 2411, 3, 464, 232, 0, 2401, 2411, 3, 530, 265, 0, 2402, 2411, 3, 374, 187, 0, 2403, 2411, 3, 260, 130, 0, 2404, 2411, 3, 72, 36, 0, 2405, 2411, 3, 318, 159, 0, 2406, 2411, 3, 328, 164, 0, 2407, 2411, 3, 200, 100, 0, 2408, 2411, 3, 430, 215, 0, 2409, 2411, 3, 330, 165, 0, 2410, 2397, 1, 0, 0, 0, 2410, 2398, 1, 0, 0, 0, 2410, 2399, 1, 0, 0, 0, 2410, 2400, 1, 0, 0, 0, 2410, 2401, 1, 0, 0, 0, 2410, 2402, 1, 0, 0, 0, 2410, 2403, 1, 0, 0, 0, 2410, 2404, 1, 0, 0, 0, 2410, 2405, 1, 0, 0, 0, 2410, 2406, 1, 0, 0, 0, 2410, 2407, 1, 0, 0, 0, 2410, 2408, 1, 0, 0, 0, 2410, 2409, 1, 0, 0, 0, 2411, 459, 1, 0, 0, 0, 2412, 2416, 3, 474, 237, 0, 2413, 2414, 3, 462, 231, 0, 2414, 2415, 3, 474, 237, 0, 2415, 2417, 1, 0, 0, 0, 2416, 2413, 1, 0, 0, 0, 2416, 2417, 1, 0, 0, 0, 2417, 461, 1, 0, 0, 0, 2418, 2419, 7, 12, 0, 0, 2419, 463, 1, 0, 0, 0, 2420, 2422, 3, 308, 154, 0, 2421, 2420, 1, 0, 0, 0, 2421, 2422, 1, 0, 0, 0, 2422, 2426, 1, 0, 0, 0, 2423, 2427, 3, 480, 240, 0, 2424, 2427, 3, 112, 56, 0, 2425, 2427, 3, 444, 222, 0, 2426, 2423, 1, 0, 0, 0, 2426, 2424, 1, 0, 0, 0, 2426, 2425, 1, 0, 0, 0, 2427, 465, 1, 0, 0, 0, 2428, 2429, 5, 92, 0, 0, 2429, 2430, 3, 256, 128, 0, 2430, 2431, 5, 161, 0, 0, 2431, 2433, 3, 508, 254, 0, 2432, 2434, 3, 468, 234, 0, 2433, 2432, 1, 0, 0, 0, 2433, 2434, 1, 0, 0, 0, 2434, 2437, 1, 0, 0, 0, 2435, 2436, 5, 151, 0, 0, 2436, 2438, 3, 202, 101, 0, 2437, 2435, 1, 0, 0, 0, 2437, 2438, 1, 0, 0, 0, 2438, 2439, 1, 0, 0, 0, 2439, 2440, 5, 154, 0, 0, 2440, 467, 1, 0, 0, 0, 2441, 2442, 7, 13, 0, 0, 2442, 469, 1, 0, 0, 0, 2443, 2448, 3, 324, 162, 0, 2444, 2445, 5, 155, 0, 0, 2445, 2447, 3, 324, 162, 0, 2446, 2444, 1, 0, 0, 0, 2447, 2450, 1, 0, 0, 0, 2448, 2446, 1, 0, 0, 0, 2448, 2449, 1, 0, 0, 0, 2449, 2454, 1, 0, 0, 0, 2450, 2448, 1, 0, 0, 0, 2451, 2454, 5, 65, 0, 0, 2452, 2454, 5, 6, 0, 0, 2453, 2443, 1, 0, 0, 0, 2453, 2451, 1, 0, 0, 0, 2453, 2452, 1, 0, 0, 0, 2454, 471, 1, 0, 0, 0, 2455, 2456, 5, 159, 0, 0, 2456, 2459, 3, 324, 162, 0, 2457, 2458, 5, 155, 0, 0, 2458, 2460, 3, 324, 162, 0, 2459, 2457, 1, 0, 0, 0, 2459, 2460, 1, 0, 0, 0, 2460, 2463, 1, 0, 0, 0, 2461, 2462, 5, 86, 0, 0, 2462, 2464, 3, 324, 162, 0, 2463, 2461, 1, 0, 0, 0, 2463, 2464, 1, 0, 0, 0, 2464, 2465, 1, 0, 0, 0, 2465, 2466, 5, 160, 0, 0, 2466, 473, 1, 0, 0, 0, 2467, 2469, 7, 14, 0, 0, 2468, 2467, 1, 0, 0, 0, 2468, 2469, 1, 0, 0, 0, 2469, 2470, 1, 0, 0, 0, 2470, 2476, 3, 514, 257, 0, 2471, 2472, 3, 10, 5, 0, 2472, 2473, 3, 514, 257, 0, 2473, 2475, 1, 0, 0, 0, 2474, 2471, 1, 0, 0, 0, 2475, 2478, 1, 0, 0, 0, 2476, 2474, 1, 0, 0, 0, 2476, 2477, 1, 0, 0, 0, 2477, 475, 1, 0, 0, 0, 2478, 2476, 1, 0, 0, 0, 2479, 2481, 3, 218, 109, 0, 2480, 2479, 1, 0, 0, 0, 2480, 2481, 1, 0, 0, 0, 2481, 2482, 1, 0, 0, 0, 2482, 2483, 3, 202, 101, 0, 2483, 477, 1, 0, 0, 0, 2484, 2486, 3, 218, 109, 0, 2485, 2484, 1, 0, 0, 0, 2485, 2486, 1, 0, 0, 0, 2486, 479, 1, 0, 0, 0, 2487, 2488, 3, 512, 256, 0, 2488, 2492, 5, 146, 0, 0, 2489, 2493, 3, 482, 241, 0, 2490, 2493, 3, 476, 238, 0, 2491, 2493, 3, 478, 239, 0, 2492, 2489, 1, 0, 0, 0, 2492, 2490, 1, 0, 0, 0, 2492, 2491, 1, 0, 0, 0, 2493, 2494, 1, 0, 0, 0, 2494, 2495, 5, 154, 0, 0, 2495, 481, 1, 0, 0, 0, 2496, 2498, 3, 144, 72, 0, 2497, 2496, 1, 0, 0, 0, 2497, 2498, 1, 0, 0, 0, 2498, 2499, 1, 0, 0, 0, 2499, 2500, 3, 536, 268, 0, 2500, 483, 1, 0, 0, 0, 2501, 2502, 3, 512, 256, 0, 2502, 2503, 5, 151, 0, 0, 2503, 2504, 3, 202, 101, 0, 2504, 2505, 5, 154, 0, 0, 2505, 485, 1, 0, 0, 0, 2506, 2507, 3, 364, 182, 0, 2507, 2508, 5, 157, 0, 0, 2508, 2509, 3, 156, 78, 0, 2509, 2510, 5, 158, 0, 0, 2510, 487, 1, 0, 0, 0, 2511, 2512, 3, 502, 251, 0, 2512, 2513, 5, 44, 0, 0, 2513, 2514, 3, 494, 247, 0, 2514, 2515, 5, 12, 0, 0, 2515, 2516, 3, 504, 252, 0, 2516, 2518, 5, 26, 0, 0, 2517, 2519, 3, 500, 250, 0, 2518, 2517, 1, 0, 0, 0, 2518, 2519, 1, 0, 0, 0, 2519, 2521, 1, 0, 0, 0, 2520, 2522, 3, 150, 75, 0, 2521, 2520, 1, 0, 0, 0, 2521, 2522, 1, 0, 0, 0, 2522, 2523, 1, 0, 0, 0, 2523, 2524, 5, 154, 0, 0, 2524, 489, 1, 0, 0, 0, 2525, 2526, 3, 502, 251, 0, 2526, 2527, 5, 154, 0, 0, 2527, 491, 1, 0, 0, 0, 2528, 2546, 3, 490, 245, 0, 2529, 2546, 3, 488, 244, 0, 2530, 2546, 3, 498, 249, 0, 2531, 2546, 3, 342, 171, 0, 2532, 2546, 3, 336, 168, 0, 2533, 2546, 3, 350, 175, 0, 2534, 2546, 3, 522, 261, 0, 2535, 2546, 3, 506, 253, 0, 2536, 2546, 3, 130, 65, 0, 2537, 2546, 3, 532, 266, 0, 2538, 2546, 3, 206, 103, 0, 2539, 2546, 3, 14, 7, 0, 2540, 2546, 3, 42, 21, 0, 2541, 2546, 3, 48, 24, 0, 2542, 2546, 3, 528, 264, 0, 2543, 2546, 3, 250, 125, 0, 2544, 2546, 3, 248, 124, 0, 2545, 2528, 1, 0, 0, 0, 2545, 2529, 1, 0, 0, 0, 2545, 2530, 1, 0, 0, 0, 2545, 2531, 1, 0, 0, 0, 2545, 2532, 1, 0, 0, 0, 2545, 2533, 1, 0, 0, 0, 2545, 2534, 1, 0, 0, 0, 2545, 2535, 1, 0, 0, 0, 2545, 2536, 1, 0, 0, 0, 2545, 2537, 1, 0, 0, 0, 2545, 2538, 1, 0, 0, 0, 2545, 2539, 1, 0, 0, 0, 2545, 2540, 1, 0, 0, 0, 2545, 2541, 1, 0, 0, 0, 2545, 2542, 1, 0, 0, 0, 2545, 2543, 1, 0, 0, 0, 2545, 2544, 1, 0, 0, 0, 2546, 493, 1, 0, 0, 0, 2547, 2549, 3, 492, 246, 0, 2548, 2547, 1, 0, 0, 0, 2549, 2552, 1, 0, 0, 0, 2550, 2548, 1, 0, 0, 0, 2550, 2551, 1, 0, 0, 0, 2551, 495, 1, 0, 0, 0, 2552, 2550, 1, 0, 0, 0, 2553, 2554, 5, 36, 0, 0, 2554, 2555, 5, 157, 0, 0, 2555, 2556, 3, 238, 119, 0, 2556, 2557, 5, 158, 0, 0, 2557, 2558, 3, 240, 120, 0, 2558, 2560, 1, 0, 0, 0, 2559, 2553, 1, 0, 0, 0, 2559, 2560, 1, 0, 0, 0, 2560, 497, 1, 0, 0, 0, 2561, 2562, 3, 500, 250, 0, 2562, 2563, 3, 254, 127, 0, 2563, 2564, 5, 44, 0, 0, 2564, 2565, 5, 55, 0, 0, 2565, 2566, 3, 324, 162, 0, 2566, 2567, 3, 240, 120, 0, 2567, 2568, 5, 154, 0, 0, 2568, 499, 1, 0, 0, 0, 2569, 2570, 7, 15, 0, 0, 2570, 501, 1, 0, 0, 0, 2571, 2574, 3, 376, 188, 0, 2572, 2574, 3, 228, 114, 0, 2573, 2571, 1, 0, 0, 0, 2573, 2572, 1, 0, 0, 0, 2574, 503, 1, 0, 0, 0, 2575, 2577, 3, 458, 229, 0, 2576, 2575, 1, 0, 0, 0, 2577, 2580, 1, 0, 0, 0, 2578, 2576, 1, 0, 0, 0, 2578, 2579, 1, 0, 0, 0, 2579, 505, 1, 0, 0, 0, 2580, 2578, 1, 0, 0, 0, 2581, 2582, 5, 99, 0, 0, 2582, 2583, 3, 254, 127, 0, 2583, 2584, 5, 44, 0, 0, 2584, 2585, 3, 508, 254, 0, 2585, 2586, 5, 154, 0, 0, 2586, 507, 1, 0, 0, 0, 2587, 2589, 3, 428, 214, 0, 2588, 2587, 1, 0, 0, 0, 2588, 2589, 1, 0, 0, 0, 2589, 2590, 1, 0, 0, 0, 2590, 2592, 3, 324, 162, 0, 2591, 2593, 3, 134, 67, 0, 2592, 2591, 1, 0, 0, 0, 2592, 2593, 1, 0, 0, 0, 2593, 509, 1, 0, 0, 0, 2594, 2599, 3, 254, 127, 0, 2595, 2599, 5, 134, 0, 0, 2596, 2599, 5, 119, 0, 0, 2597, 2599, 5, 6, 0, 0, 2598, 2594, 1, 0, 0, 0, 2598, 2595, 1, 0, 0, 0, 2598, 2596, 1, 0, 0, 0, 2598, 2597, 1, 0, 0, 0, 2599, 511, 1, 0, 0, 0, 2600, 2603, 3, 324, 162, 0, 2601, 2603, 3, 12, 6, 0, 2602, 2600, 1, 0, 0, 0, 2602, 2601, 1, 0, 0, 0, 2603, 513, 1, 0, 0, 0, 2604, 2610, 3, 204, 102, 0, 2605, 2606, 3, 322, 161, 0, 2606, 2607, 3, 204, 102, 0, 2607, 2609, 1, 0, 0, 0, 2608, 2605, 1, 0, 0, 0, 2609, 2612, 1, 0, 0, 0, 2610, 2608, 1, 0, 0, 0, 2610, 2611, 1, 0, 0, 0, 2611, 515, 1, 0, 0, 0, 2612, 2610, 1, 0, 0, 0, 2613, 2614, 5, 32, 0, 0, 2614, 2615, 3, 202, 101, 0, 2615, 517, 1, 0, 0, 0, 2616, 2617, 5, 172, 0, 0, 2617, 2621, 3, 254, 127, 0, 2618, 2620, 3, 242, 121, 0, 2619, 2618, 1, 0, 0, 0, 2620, 2623, 1, 0, 0, 0, 2621, 2619, 1, 0, 0, 0, 2621, 2622, 1, 0, 0, 0, 2622, 519, 1, 0, 0, 0, 2623, 2621, 1, 0, 0, 0, 2624, 2625, 3, 324, 162, 0, 2625, 2626, 5, 157, 0, 0, 2626, 2627, 3, 202, 101, 0, 2627, 2628, 5, 158, 0, 0, 2628, 521, 1, 0, 0, 0, 2629, 2632, 3, 224, 112, 0, 2630, 2632, 3, 262, 131, 0, 2631, 2629, 1, 0, 0, 0, 2631, 2630, 1, 0, 0, 0, 2632, 523, 1, 0, 0, 0, 2633, 2639, 3, 432, 216, 0, 2634, 2639, 3, 88, 44, 0, 2635, 2639, 3, 2, 1, 0, 2636, 2639, 3, 212, 106, 0, 2637, 2639, 3, 404, 202, 0, 2638, 2633, 1, 0, 0, 0, 2638, 2634, 1, 0, 0, 0, 2638, 2635, 1, 0, 0, 0, 2638, 2636, 1, 0, 0, 0, 2638, 2637, 1, 0, 0, 0, 2639, 525, 1, 0, 0, 0, 2640, 2641, 5, 9, 0, 0, 2641, 2642, 5, 157, 0, 0, 2642, 2647, 3, 266, 133, 0, 2643, 2644, 5, 155, 0, 0, 2644, 2646, 3, 266, 133, 0, 2645, 2643, 1, 0, 0, 0, 2646, 2649, 1, 0, 0, 0, 2647, 2645, 1, 0, 0, 0, 2647, 2648, 1, 0, 0, 0, 2648, 2650, 1, 0, 0, 0, 2649, 2647, 1, 0, 0, 0, 2650, 2651, 5, 158, 0, 0, 2651, 2652, 5, 61, 0, 0, 2652, 2653, 3, 508, 254, 0, 2653, 527, 1, 0, 0, 0, 2654, 2655, 5, 110, 0, 0, 2655, 2660, 3, 442, 221, 0, 2656, 2657, 5, 155, 0, 0, 2657, 2659, 3, 442, 221, 0, 2658, 2656, 1, 0, 0, 0, 2659, 2662, 1, 0, 0, 0, 2660, 2658, 1, 0, 0, 0, 2660, 2661, 1, 0, 0, 0, 2661, 2663, 1, 0, 0, 0, 2662, 2660, 1, 0, 0, 0, 2663, 2664, 5, 154, 0, 0, 2664, 529, 1, 0, 0, 0, 2665, 2667, 3, 308, 154, 0, 2666, 2665, 1, 0, 0, 0, 2666, 2667, 1, 0, 0, 0, 2667, 2671, 1, 0, 0, 0, 2668, 2672, 3, 484, 242, 0, 2669, 2672, 3, 114, 57, 0, 2670, 2672, 3, 446, 223, 0, 2671, 2668, 1, 0, 0, 0, 2671, 2669, 1, 0, 0, 0, 2671, 2670, 1, 0, 0, 0, 2672, 531, 1, 0, 0, 0, 2673, 2675, 5, 91, 0, 0, 2674, 2673, 1, 0, 0, 0, 2674, 2675, 1, 0, 0, 0, 2675, 2676, 1, 0, 0, 0, 2676, 2677, 5, 111, 0, 0, 2677, 2678, 3, 256, 128, 0, 2678, 2679, 5, 161, 0, 0, 2679, 2682, 3, 508, 254, 0, 2680, 2681, 5, 151, 0, 0, 2681, 2683, 3, 202, 101, 0, 2682, 2680, 1, 0, 0, 0, 2682, 2683, 1, 0, 0, 0, 2683, 2684, 1, 0, 0, 0, 2684, 2685, 5, 154, 0, 0, 2685, 533, 1, 0, 0, 0, 2686, 2688, 3, 308, 154, 0, 2687, 2686, 1, 0, 0, 0, 2687, 2688, 1, 0, 0, 0, 2688, 2689, 1, 0, 0, 0, 2689, 2691, 5, 112, 0, 0, 2690, 2692, 3, 452, 226, 0, 2691, 2690, 1, 0, 0, 0, 2691, 2692, 1, 0, 0, 0, 2692, 2694, 1, 0, 0, 0, 2693, 2695, 3, 106, 53, 0, 2694, 2693, 1, 0, 0, 0, 2694, 2695, 1, 0, 0, 0, 2695, 2697, 1, 0, 0, 0, 2696, 2698, 3, 516, 258, 0, 2697, 2696, 1, 0, 0, 0, 2697, 2698, 1, 0, 0, 0, 2698, 2699, 1, 0, 0, 0, 2699, 2700, 5, 154, 0, 0, 2700, 535, 1, 0, 0, 0, 2701, 2706, 3, 538, 269, 0, 2702, 2703, 5, 155, 0, 0, 2703, 2705, 3, 538, 269, 0, 2704, 2702, 1, 0, 0, 0, 2705, 2708, 1, 0, 0, 0, 2706, 2704, 1, 0, 0, 0, 2706, 2707, 1, 0, 0, 0, 2707, 2711, 1, 0, 0, 0, 2708, 2706, 1, 0, 0, 0, 2709, 2711, 5, 107, 0, 0, 2710, 2701, 1, 0, 0, 0, 2710, 2709, 1, 0, 0, 0, 2711, 537, 1, 0, 0, 0, 2712, 2715, 3, 202, 101, 0, 2713, 2714, 5, 4, 0, 0, 2714, 2716, 3, 202, 101, 0, 2715, 2713, 1, 0, 0, 0, 2715, 2716, 1, 0, 0, 0, 2716, 2723, 1, 0, 0, 0, 2717, 2720, 5, 60, 0, 0, 2718, 2719, 5, 4, 0, 0, 2719, 2721, 3, 202, 101, 0, 2720, 2718, 1, 0, 0, 0, 2720, 2721, 1, 0, 0, 0, 2721, 2723, 1, 0, 0, 0, 2722, 2712, 1, 0, 0, 0, 2722, 2717, 1, 0, 0, 0, 2723, 539, 1, 0, 0, 0, 298, 546, 552, 562, 572, 581, 586, 593, 599, 611, 614, 621, 627, 632, 636, 644, 650, 654, 657, 665, 674, 690, 699, 713, 716, 719, 726, 732, 760, 765, 772, 774, 780, 782, 790, 798, 801, 810, 817, 822, 835, 839, 843, 850, 855, 858, 871, 878, 886, 889, 898, 901, 904, 909, 916, 919, 929, 932, 935, 943, 946, 952, 955, 964, 969, 972, 978, 981, 986, 991, 994, 1006, 1023, 1028, 1034, 1041, 1050, 1060, 1062, 1073, 1076, 1083, 1088, 1093, 1106, 1118, 1123, 1132, 1135, 1142, 1150, 1158, 1161, 1166, 1175, 1187, 1192, 1198, 1207, 1217, 1222, 1228, 1235, 1245, 1249, 1252, 1275, 1280, 1286, 1289, 1296, 1301, 1310, 1315, 1321, 1325, 1333, 1339, 1343, 1347, 1359, 1362, 1367, 1376, 1383, 1391, 1416, 1429, 1432, 1439, 1444, 1452, 1455, 1460, 1465, 1472, 1477, 1498, 1505, 1535, 1549, 1555, 1558, 1571, 1576, 1581, 1594, 1610, 1616, 1625, 1629, 1636, 1641, 1644, 1649, 1654, 1660, 1668, 1673, 1679, 1692, 1699, 1714, 1719, 1725, 1728, 1733, 1737, 1741, 1749, 1753, 1758, 1763, 1768, 1774, 1785, 1792, 1797, 1800, 1807, 1818, 1823, 1830, 1846, 1848, 1851, 1855, 1859, 1864, 1871, 1877, 1887, 1890, 1911, 1916, 1926, 1929, 1951, 1956, 1963, 1965, 1991, 1997, 2015, 2028, 2035, 2045, 2048, 2057, 2063, 2082, 2087, 2103, 2108, 2113, 2116, 2119, 2126, 2129, 2136, 2140, 2147, 2157, 2176, 2179, 2186, 2192, 2195, 2199, 2208, 2215, 2226, 2242, 2249, 2254, 2260, 2265, 2271, 2280, 2283, 2287, 2294, 2298, 2312, 2323, 2329, 2340, 2346, 2357, 2362, 2377, 2388, 2394, 2410, 2416, 2421, 2426, 2433, 2437, 2448, 2453, 2459, 2463, 2468, 2476, 2480, 2485, 2492, 2497, 2518, 2521, 2545, 2550, 2559, 2573, 2578, 2588, 2592, 2598, 2602, 2610, 2621, 2631, 2638, 2647, 2660, 2666, 2671, 2674, 2682, 2687, 2691, 2694, 2697, 2706, 2710, 2715, 2720, 2722] \ No newline at end of file diff --git a/src/ApiMark.Vhdl/VhdlAst/Antlr/vhdl2008.tokens b/src/ApiMark.Vhdl/VhdlAst/Antlr/vhdl2008.tokens new file mode 100644 index 0000000..3bfdb14 --- /dev/null +++ b/src/ApiMark.Vhdl/VhdlAst/Antlr/vhdl2008.tokens @@ -0,0 +1,338 @@ +ABS=1 +ACCESS=2 +ACROSS=3 +AFTER=4 +ALIAS=5 +ALL=6 +AND=7 +ARCHITECTURE=8 +ARRAY=9 +ASSERT=10 +ATTRIBUTE=11 +BEGIN=12 +BLOCK=13 +BODY=14 +BREAK=15 +BUFFER=16 +BUS=17 +CASE=18 +COMPONENT=19 +CONFIGURATION=20 +CONSTANT=21 +CONTEXT=22 +DEFAULT=23 +DISCONNECT=24 +DOWNTO=25 +END=26 +ENTITY=27 +ELSE=28 +ELSIF=29 +EXIT=30 +FILE=31 +FOR=32 +FORCE=33 +FUNCTION=34 +GENERATE=35 +GENERIC=36 +GROUP=37 +GUARDED=38 +IF=39 +IMPURE=40 +IN=41 +INERTIAL=42 +INOUT=43 +IS=44 +LABEL=45 +LIBRARY=46 +LIMIT=47 +LINKAGE=48 +LITERAL=49 +LOOP=50 +MAP=51 +MOD=52 +NAND=53 +NATURE=54 +NEW=55 +NEXT=56 +NOISE=57 +NOR=58 +NOT=59 +NULL_=60 +OF=61 +ON=62 +OPEN=63 +OR=64 +OTHERS=65 +OUT=66 +PACKAGE=67 +PARAMETER=68 +PORT=69 +POSTPONED=70 +PROCESS=71 +PROCEDURE=72 +PROCEDURAL=73 +PROTECTED=74 +PURE=75 +QUANTITY=76 +RANGE=77 +RELEASE=78 +REVERSE_RANGE=79 +REJECT=80 +REM=81 +RECORD=82 +REFERENCE=83 +REGISTER=84 +REPORT=85 +RETURN=86 +ROL=87 +ROR=88 +SELECT=89 +SEVERITY=90 +SHARED=91 +SIGNAL=92 +SLA=93 +SLL=94 +SPECTRUM=95 +SRA=96 +SRL=97 +SUBNATURE=98 +SUBTYPE=99 +TERMINAL=100 +THEN=101 +THROUGH=102 +TO=103 +TOLERANCE=104 +TRANSPORT=105 +TYPE=106 +UNAFFECTED=107 +UNITS=108 +UNTIL=109 +USE=110 +VARIABLE=111 +WAIT=112 +WITH=113 +WHEN=114 +WHILE=115 +XNOR=116 +XOR=117 +DECIMAL_LITERAL=118 +STRING_LITERAL=119 +BASED_LITERAL=120 +BIT_STRING_LITERAL=121 +BIT_STRING_LITERAL_BINARY=122 +BIT_STRING_LITERAL_OCTAL=123 +BIT_STRING_LITERAL_HEX=124 +BASIC_IDENTIFIER=125 +EXTENDED_IDENTIFIER=126 +LETTER=127 +BLOCK_COMMENT=128 +COMMENT=129 +TAB=130 +SPACE=131 +NEWLINE=132 +CR=133 +CHARACTER_LITERAL=134 +OTHER_SPECIAL_CHARACTER=135 +DOUBLESTAR=136 +CONDITION_OPERATOR=137 +CONDITION_EQ=138 +CONDITION_NEQ=139 +CONDITION_LEQ=140 +CONDITION_LESSTHAN=141 +CONDITION_GEQ=142 +CONDITION_GREATERTHAN=143 +ASSIGN=144 +AT=145 +LEQ=146 +GEQ=147 +ARROW=148 +HASH=149 +NEQ=150 +WALRUS=151 +BOX=152 +DBLQUOTE=153 +SEMI=154 +COMMA=155 +AMPERSAND=156 +LPAREN=157 +RPAREN=158 +LBRACKET=159 +RBRACKET=160 +COLON=161 +MUL=162 +DIV=163 +PLUS=164 +MINUS=165 +LESSTHAN=166 +GREATERTHAN=167 +EQ=168 +BAR=169 +DOT=170 +BACKSLASH=171 +BACKTICK=172 +EXPONENT=173 +HEXDIGIT=174 +INTEGER=175 +DIGIT=176 +BASED_INTEGER=177 +EXTENDED_DIGIT=178 +APOSTROPHE=179 +QUESTION=180 +'ABS'=1 +'ACCESS'=2 +'ACROSS'=3 +'AFTER'=4 +'ALIAS'=5 +'ALL'=6 +'AND'=7 +'ARCHITECTURE'=8 +'ARRAY'=9 +'ASSERT'=10 +'ATTRIBUTE'=11 +'BEGIN'=12 +'BLOCK'=13 +'BODY'=14 +'BREAK'=15 +'BUFFER'=16 +'BUS'=17 +'CASE'=18 +'COMPONENT'=19 +'CONFIGURATION'=20 +'CONSTANT'=21 +'CONTEXT'=22 +'DEFAULT'=23 +'DISCONNECT'=24 +'DOWNTO'=25 +'END'=26 +'ENTITY'=27 +'ELSE'=28 +'ELSIF'=29 +'EXIT'=30 +'FILE'=31 +'FOR'=32 +'FORCE'=33 +'FUNCTION'=34 +'GENERATE'=35 +'GENERIC'=36 +'GROUP'=37 +'GUARDED'=38 +'IF'=39 +'IMPURE'=40 +'IN'=41 +'INERTIAL'=42 +'INOUT'=43 +'IS'=44 +'LABEL'=45 +'LIBRARY'=46 +'LIMIT'=47 +'LINKAGE'=48 +'LITERAL'=49 +'LOOP'=50 +'MAP'=51 +'MOD'=52 +'NAND'=53 +'NATURE'=54 +'NEW'=55 +'NEXT'=56 +'NOISE'=57 +'NOR'=58 +'NOT'=59 +'NULL'=60 +'OF'=61 +'ON'=62 +'OPEN'=63 +'OR'=64 +'OTHERS'=65 +'OUT'=66 +'PACKAGE'=67 +'PARAMETER'=68 +'PORT'=69 +'POSTPONED'=70 +'PROCESS'=71 +'PROCEDURE'=72 +'PROCEDURAL'=73 +'PROTECTED'=74 +'PURE'=75 +'QUANTITY'=76 +'RANGE'=77 +'RELEASE'=78 +'REVERSE_RANGE'=79 +'REJECT'=80 +'REM'=81 +'RECORD'=82 +'REFERENCE'=83 +'REGISTER'=84 +'REPORT'=85 +'RETURN'=86 +'ROL'=87 +'ROR'=88 +'SELECT'=89 +'SEVERITY'=90 +'SHARED'=91 +'SIGNAL'=92 +'SLA'=93 +'SLL'=94 +'SPECTRUM'=95 +'SRA'=96 +'SRL'=97 +'SUBNATURE'=98 +'SUBTYPE'=99 +'TERMINAL'=100 +'THEN'=101 +'THROUGH'=102 +'TO'=103 +'TOLERANCE'=104 +'TRANSPORT'=105 +'TYPE'=106 +'UNAFFECTED'=107 +'UNITS'=108 +'UNTIL'=109 +'USE'=110 +'VARIABLE'=111 +'WAIT'=112 +'WITH'=113 +'WHEN'=114 +'WHILE'=115 +'XNOR'=116 +'XOR'=117 +'\n'=132 +'\r'=133 +'**'=136 +'??'=137 +'?='=138 +'?/E'=139 +'?<='=140 +'?<'=141 +'?>='=142 +'?>'=143 +'=='=144 +'@'=145 +'<='=146 +'>='=147 +'=>'=148 +'#'=149 +'/='=150 +':='=151 +'<>'=152 +'"'=153 +';'=154 +','=155 +'&'=156 +'('=157 +')'=158 +'['=159 +']'=160 +':'=161 +'*'=162 +'/'=163 +'+'=164 +'-'=165 +'<'=166 +'>'=167 +'='=168 +'|'=169 +'.'=170 +'\\'=171 +'`'=172 +'\''=179 +'?'=180 diff --git a/src/ApiMark.Vhdl/VhdlAst/Antlr/vhdl2008BaseVisitor.cs b/src/ApiMark.Vhdl/VhdlAst/Antlr/vhdl2008BaseVisitor.cs new file mode 100644 index 0000000..175ae65 --- /dev/null +++ b/src/ApiMark.Vhdl/VhdlAst/Antlr/vhdl2008BaseVisitor.cs @@ -0,0 +1,2739 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// ANTLR Version: 4.13.1 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// Generated from vhdl2008.g4 by ANTLR 4.13.1 + +// Unreachable code detected +#pragma warning disable 0162 +// The variable '...' is assigned but its value is never used +#pragma warning disable 0219 +// Missing XML comment for publicly visible type or member '...' +#pragma warning disable 1591 +// Ambiguous reference in cref attribute +#pragma warning disable 419 + +namespace ApiMark.Vhdl.VhdlAst.Antlr { +using Antlr4.Runtime.Misc; +using Antlr4.Runtime.Tree; +using IToken = Antlr4.Runtime.IToken; +using ParserRuleContext = Antlr4.Runtime.ParserRuleContext; + +/// +/// This class provides an empty implementation of , +/// which can be extended to create a visitor which only needs to handle a subset +/// of the available methods. +/// +/// The return type of the visit operation. +[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.1")] +[System.Diagnostics.DebuggerNonUserCode] +[System.CLSCompliant(false)] +public partial class vhdl2008BaseVisitor : AbstractParseTreeVisitor, Ivhdl2008Visitor { + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAbstract_literal([NotNull] vhdl2008Parser.Abstract_literalContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAccess_type_definition([NotNull] vhdl2008Parser.Access_type_definitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitActual_designator([NotNull] vhdl2008Parser.Actual_designatorContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitActual_parameter_part([NotNull] vhdl2008Parser.Actual_parameter_partContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitActual_part([NotNull] vhdl2008Parser.Actual_partContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAdding_operator([NotNull] vhdl2008Parser.Adding_operatorContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAggregate([NotNull] vhdl2008Parser.AggregateContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAlias_declaration([NotNull] vhdl2008Parser.Alias_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAlias_designator([NotNull] vhdl2008Parser.Alias_designatorContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAllocator([NotNull] vhdl2008Parser.AllocatorContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitArchitecture_body([NotNull] vhdl2008Parser.Architecture_bodyContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitArchitecture_declarative_part([NotNull] vhdl2008Parser.Architecture_declarative_partContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitArchitecture_statement_part([NotNull] vhdl2008Parser.Architecture_statement_partContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitArray_constraint([NotNull] vhdl2008Parser.Array_constraintContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitArray_element_constraint([NotNull] vhdl2008Parser.Array_element_constraintContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitArray_element_resolution([NotNull] vhdl2008Parser.Array_element_resolutionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitArray_type_definition([NotNull] vhdl2008Parser.Array_type_definitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAssertion([NotNull] vhdl2008Parser.AssertionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAssertion_statement([NotNull] vhdl2008Parser.Assertion_statementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAssociation_element([NotNull] vhdl2008Parser.Association_elementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAssociation_list([NotNull] vhdl2008Parser.Association_listContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAttribute_declaration([NotNull] vhdl2008Parser.Attribute_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAttribute_designator([NotNull] vhdl2008Parser.Attribute_designatorContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAttribute_name([NotNull] vhdl2008Parser.Attribute_nameContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAttribute_specification([NotNull] vhdl2008Parser.Attribute_specificationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitBase([NotNull] vhdl2008Parser.BaseContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitBinding_indication([NotNull] vhdl2008Parser.Binding_indicationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitBlock_configuration([NotNull] vhdl2008Parser.Block_configurationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitBlock_declarative_item([NotNull] vhdl2008Parser.Block_declarative_itemContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitBlock_declarative_part([NotNull] vhdl2008Parser.Block_declarative_partContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitBlock_header([NotNull] vhdl2008Parser.Block_headerContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitBlock_specification([NotNull] vhdl2008Parser.Block_specificationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitBlock_statement([NotNull] vhdl2008Parser.Block_statementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitBlock_statement_part([NotNull] vhdl2008Parser.Block_statement_partContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitCase_generate_alternative([NotNull] vhdl2008Parser.Case_generate_alternativeContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitCase_generate_statement([NotNull] vhdl2008Parser.Case_generate_statementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitCase_statement([NotNull] vhdl2008Parser.Case_statementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitCase_statement_alternative([NotNull] vhdl2008Parser.Case_statement_alternativeContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitChoice([NotNull] vhdl2008Parser.ChoiceContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitChoices([NotNull] vhdl2008Parser.ChoicesContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitComponent_configuration([NotNull] vhdl2008Parser.Component_configurationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitComponent_declaration([NotNull] vhdl2008Parser.Component_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitComponent_instantiation_statement([NotNull] vhdl2008Parser.Component_instantiation_statementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitComponent_specification([NotNull] vhdl2008Parser.Component_specificationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitComposite_type_definition([NotNull] vhdl2008Parser.Composite_type_definitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConcurrent_assertion_statement([NotNull] vhdl2008Parser.Concurrent_assertion_statementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConcurrent_conditional_signal_assignment([NotNull] vhdl2008Parser.Concurrent_conditional_signal_assignmentContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConcurrent_procedure_call_statement([NotNull] vhdl2008Parser.Concurrent_procedure_call_statementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConcurrent_selected_signal_assignment([NotNull] vhdl2008Parser.Concurrent_selected_signal_assignmentContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConcurrent_signal_assignment_statement([NotNull] vhdl2008Parser.Concurrent_signal_assignment_statementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConcurrent_simple_signal_assignment([NotNull] vhdl2008Parser.Concurrent_simple_signal_assignmentContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConcurrent_statement([NotNull] vhdl2008Parser.Concurrent_statementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitCondition([NotNull] vhdl2008Parser.ConditionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitCondition_clause([NotNull] vhdl2008Parser.Condition_clauseContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConditional_expression([NotNull] vhdl2008Parser.Conditional_expressionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConditional_force_assignment([NotNull] vhdl2008Parser.Conditional_force_assignmentContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConditional_signal_assignment([NotNull] vhdl2008Parser.Conditional_signal_assignmentContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConditional_variable_assignment([NotNull] vhdl2008Parser.Conditional_variable_assignmentContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConditional_waveform_assignment([NotNull] vhdl2008Parser.Conditional_waveform_assignmentContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConditional_waveforms([NotNull] vhdl2008Parser.Conditional_waveformsContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConfiguration_declaration([NotNull] vhdl2008Parser.Configuration_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConfiguration_declarative_item([NotNull] vhdl2008Parser.Configuration_declarative_itemContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConfiguration_declarative_part([NotNull] vhdl2008Parser.Configuration_declarative_partContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConfiguration_item([NotNull] vhdl2008Parser.Configuration_itemContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConfiguration_specification([NotNull] vhdl2008Parser.Configuration_specificationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConstant_declaration([NotNull] vhdl2008Parser.Constant_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConstrained_array_definition([NotNull] vhdl2008Parser.Constrained_array_definitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConstraint([NotNull] vhdl2008Parser.ConstraintContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitContext_clause([NotNull] vhdl2008Parser.Context_clauseContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitContext_declaration([NotNull] vhdl2008Parser.Context_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitContext_item([NotNull] vhdl2008Parser.Context_itemContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitContext_reference([NotNull] vhdl2008Parser.Context_referenceContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitDelay_mechanism([NotNull] vhdl2008Parser.Delay_mechanismContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitDesign_file([NotNull] vhdl2008Parser.Design_fileContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitDesign_unit([NotNull] vhdl2008Parser.Design_unitContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitDesignator([NotNull] vhdl2008Parser.DesignatorContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitDirection([NotNull] vhdl2008Parser.DirectionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitDisconnection_specification([NotNull] vhdl2008Parser.Disconnection_specificationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitDiscrete_range([NotNull] vhdl2008Parser.Discrete_rangeContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitElement_association([NotNull] vhdl2008Parser.Element_associationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitElement_constraint([NotNull] vhdl2008Parser.Element_constraintContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitElement_declaration([NotNull] vhdl2008Parser.Element_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitElement_resolution([NotNull] vhdl2008Parser.Element_resolutionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitElement_subtype_definition([NotNull] vhdl2008Parser.Element_subtype_definitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEntity_aspect([NotNull] vhdl2008Parser.Entity_aspectContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEntity_class([NotNull] vhdl2008Parser.Entity_classContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEntity_class_entry([NotNull] vhdl2008Parser.Entity_class_entryContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEntity_class_entry_list([NotNull] vhdl2008Parser.Entity_class_entry_listContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEntity_declaration([NotNull] vhdl2008Parser.Entity_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEntity_declarative_item([NotNull] vhdl2008Parser.Entity_declarative_itemContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEntity_declarative_part([NotNull] vhdl2008Parser.Entity_declarative_partContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEntity_designator([NotNull] vhdl2008Parser.Entity_designatorContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEntity_header([NotNull] vhdl2008Parser.Entity_headerContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEntity_name_list([NotNull] vhdl2008Parser.Entity_name_listContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEntity_specification([NotNull] vhdl2008Parser.Entity_specificationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEntity_statement([NotNull] vhdl2008Parser.Entity_statementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEntity_statement_part([NotNull] vhdl2008Parser.Entity_statement_partContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEntity_tag([NotNull] vhdl2008Parser.Entity_tagContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEnumeration_literal([NotNull] vhdl2008Parser.Enumeration_literalContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEnumeration_type_definition([NotNull] vhdl2008Parser.Enumeration_type_definitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitExit_statement([NotNull] vhdl2008Parser.Exit_statementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitExpression([NotNull] vhdl2008Parser.ExpressionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFactor([NotNull] vhdl2008Parser.FactorContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFile_declaration([NotNull] vhdl2008Parser.File_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFile_logical_name([NotNull] vhdl2008Parser.File_logical_nameContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFile_open_information([NotNull] vhdl2008Parser.File_open_informationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFile_type_definition([NotNull] vhdl2008Parser.File_type_definitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFloating_type_definition([NotNull] vhdl2008Parser.Floating_type_definitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFor_generate_statement([NotNull] vhdl2008Parser.For_generate_statementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitForce_mode([NotNull] vhdl2008Parser.Force_modeContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFormal_parameter_list([NotNull] vhdl2008Parser.Formal_parameter_listContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFormal_part([NotNull] vhdl2008Parser.Formal_partContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFull_type_declaration([NotNull] vhdl2008Parser.Full_type_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFunction_call([NotNull] vhdl2008Parser.Function_callContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFunction_specification([NotNull] vhdl2008Parser.Function_specificationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitGenerate_specification([NotNull] vhdl2008Parser.Generate_specificationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitGenerate_statement([NotNull] vhdl2008Parser.Generate_statementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitGenerate_statement_body([NotNull] vhdl2008Parser.Generate_statement_bodyContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitGeneric_clause([NotNull] vhdl2008Parser.Generic_clauseContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitGeneric_list([NotNull] vhdl2008Parser.Generic_listContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitGeneric_map_aspect([NotNull] vhdl2008Parser.Generic_map_aspectContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitGraphic_character([NotNull] vhdl2008Parser.Graphic_characterContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitGroup_constituent([NotNull] vhdl2008Parser.Group_constituentContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitGroup_constituent_list([NotNull] vhdl2008Parser.Group_constituent_listContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitGroup_declaration([NotNull] vhdl2008Parser.Group_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitGroup_template_declaration([NotNull] vhdl2008Parser.Group_template_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitGuarded_signal_specification([NotNull] vhdl2008Parser.Guarded_signal_specificationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitIdentifier([NotNull] vhdl2008Parser.IdentifierContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitIdentifier_list([NotNull] vhdl2008Parser.Identifier_listContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitIf_generate_statement([NotNull] vhdl2008Parser.If_generate_statementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitIf_statement([NotNull] vhdl2008Parser.If_statementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitIncomplete_type_declaration([NotNull] vhdl2008Parser.Incomplete_type_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitIndex_constraint([NotNull] vhdl2008Parser.Index_constraintContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitIndex_subtype_definition([NotNull] vhdl2008Parser.Index_subtype_definitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitIndexed_name([NotNull] vhdl2008Parser.Indexed_nameContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitInstantiated_unit([NotNull] vhdl2008Parser.Instantiated_unitContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitInstantiation_list([NotNull] vhdl2008Parser.Instantiation_listContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitInterface_constant_declaration([NotNull] vhdl2008Parser.Interface_constant_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitInterface_declaration([NotNull] vhdl2008Parser.Interface_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitInterface_file_declaration([NotNull] vhdl2008Parser.Interface_file_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitInterface_function_specification([NotNull] vhdl2008Parser.Interface_function_specificationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitInterface_incomplete_type_declaration([NotNull] vhdl2008Parser.Interface_incomplete_type_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitInterface_list([NotNull] vhdl2008Parser.Interface_listContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitInterface_object_declaration([NotNull] vhdl2008Parser.Interface_object_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitInterface_package_declaration([NotNull] vhdl2008Parser.Interface_package_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitInterface_package_generic_map_aspect([NotNull] vhdl2008Parser.Interface_package_generic_map_aspectContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitInterface_procedure_specification([NotNull] vhdl2008Parser.Interface_procedure_specificationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitInterface_signal_declaration([NotNull] vhdl2008Parser.Interface_signal_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitInterface_subprogram_declaration([NotNull] vhdl2008Parser.Interface_subprogram_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitInterface_subprogram_default([NotNull] vhdl2008Parser.Interface_subprogram_defaultContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitInterface_subprogram_specification([NotNull] vhdl2008Parser.Interface_subprogram_specificationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitInterface_type_declaration([NotNull] vhdl2008Parser.Interface_type_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitInterface_variable_declaration([NotNull] vhdl2008Parser.Interface_variable_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitIteration_scheme([NotNull] vhdl2008Parser.Iteration_schemeContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitLabel_colon([NotNull] vhdl2008Parser.Label_colonContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitLibrary_clause([NotNull] vhdl2008Parser.Library_clauseContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitLibrary_unit([NotNull] vhdl2008Parser.Library_unitContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitLiteral([NotNull] vhdl2008Parser.LiteralContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitLogical_operator([NotNull] vhdl2008Parser.Logical_operatorContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitLoop_statement([NotNull] vhdl2008Parser.Loop_statementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitMode_rule([NotNull] vhdl2008Parser.Mode_ruleContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitMultiplying_operator([NotNull] vhdl2008Parser.Multiplying_operatorContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitName([NotNull] vhdl2008Parser.NameContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitName_part([NotNull] vhdl2008Parser.Name_partContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitNext_statement([NotNull] vhdl2008Parser.Next_statementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitNull_statement([NotNull] vhdl2008Parser.Null_statementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitNumeric_literal([NotNull] vhdl2008Parser.Numeric_literalContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitObject_declaration([NotNull] vhdl2008Parser.Object_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPackage_body([NotNull] vhdl2008Parser.Package_bodyContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPackage_body_declarative_item([NotNull] vhdl2008Parser.Package_body_declarative_itemContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPackage_body_declarative_part([NotNull] vhdl2008Parser.Package_body_declarative_partContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPackage_declaration([NotNull] vhdl2008Parser.Package_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPackage_declarative_item([NotNull] vhdl2008Parser.Package_declarative_itemContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPackage_declarative_part([NotNull] vhdl2008Parser.Package_declarative_partContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPackage_header([NotNull] vhdl2008Parser.Package_headerContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPackage_instantiation_declaration([NotNull] vhdl2008Parser.Package_instantiation_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitParameter_specification([NotNull] vhdl2008Parser.Parameter_specificationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPhysical_literal([NotNull] vhdl2008Parser.Physical_literalContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPhysical_type_definition([NotNull] vhdl2008Parser.Physical_type_definitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPort_clause([NotNull] vhdl2008Parser.Port_clauseContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPort_list([NotNull] vhdl2008Parser.Port_listContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPort_map_aspect([NotNull] vhdl2008Parser.Port_map_aspectContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPrefix([NotNull] vhdl2008Parser.PrefixContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPrimary([NotNull] vhdl2008Parser.PrimaryContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPrimary_unit([NotNull] vhdl2008Parser.Primary_unitContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPrimary_unit_declaration([NotNull] vhdl2008Parser.Primary_unit_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitProcedure_call([NotNull] vhdl2008Parser.Procedure_callContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitProcedure_call_statement([NotNull] vhdl2008Parser.Procedure_call_statementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitProcedure_specification([NotNull] vhdl2008Parser.Procedure_specificationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitProcedural_declarative_item([NotNull] vhdl2008Parser.Procedural_declarative_itemContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitProcedural_statement_part([NotNull] vhdl2008Parser.Procedural_statement_partContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitProcess_declarative_item([NotNull] vhdl2008Parser.Process_declarative_itemContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitProcess_declarative_part([NotNull] vhdl2008Parser.Process_declarative_partContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitProcess_sensitivity_list([NotNull] vhdl2008Parser.Process_sensitivity_listContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitProcess_statement([NotNull] vhdl2008Parser.Process_statementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitProcess_statement_part([NotNull] vhdl2008Parser.Process_statement_partContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitProtected_type_body([NotNull] vhdl2008Parser.Protected_type_bodyContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitProtected_type_body_declarative_item([NotNull] vhdl2008Parser.Protected_type_body_declarative_itemContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitProtected_type_body_declarative_part([NotNull] vhdl2008Parser.Protected_type_body_declarative_partContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitProtected_type_declaration([NotNull] vhdl2008Parser.Protected_type_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitProtected_type_declarative_item([NotNull] vhdl2008Parser.Protected_type_declarative_itemContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitProtected_type_declarative_part([NotNull] vhdl2008Parser.Protected_type_declarative_partContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitProtected_type_definition([NotNull] vhdl2008Parser.Protected_type_definitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitQualified_expression([NotNull] vhdl2008Parser.Qualified_expressionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitRange_decl([NotNull] vhdl2008Parser.Range_declContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitRange_constraint([NotNull] vhdl2008Parser.Range_constraintContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitRecord_constraint([NotNull] vhdl2008Parser.Record_constraintContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitRecord_element_constraint([NotNull] vhdl2008Parser.Record_element_constraintContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitRecord_element_resolution([NotNull] vhdl2008Parser.Record_element_resolutionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitRecord_resolution([NotNull] vhdl2008Parser.Record_resolutionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitRecord_type_definition([NotNull] vhdl2008Parser.Record_type_definitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitRelation([NotNull] vhdl2008Parser.RelationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitRelational_operator([NotNull] vhdl2008Parser.Relational_operatorContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitReport_statement([NotNull] vhdl2008Parser.Report_statementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitResolution_indication([NotNull] vhdl2008Parser.Resolution_indicationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitReturn_statement([NotNull] vhdl2008Parser.Return_statementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitScalar_type_definition([NotNull] vhdl2008Parser.Scalar_type_definitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSecondary_unit([NotNull] vhdl2008Parser.Secondary_unitContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSecondary_unit_declaration([NotNull] vhdl2008Parser.Secondary_unit_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSelected_expressions([NotNull] vhdl2008Parser.Selected_expressionsContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSelected_force_assignment([NotNull] vhdl2008Parser.Selected_force_assignmentContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSelected_name([NotNull] vhdl2008Parser.Selected_nameContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSelected_signal_assignment([NotNull] vhdl2008Parser.Selected_signal_assignmentContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSelected_variable_assignment([NotNull] vhdl2008Parser.Selected_variable_assignmentContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSelected_waveform_assignment([NotNull] vhdl2008Parser.Selected_waveform_assignmentContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSelected_waveforms([NotNull] vhdl2008Parser.Selected_waveformsContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSensitivity_clause([NotNull] vhdl2008Parser.Sensitivity_clauseContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSensitivity_list([NotNull] vhdl2008Parser.Sensitivity_listContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSequence_of_statements([NotNull] vhdl2008Parser.Sequence_of_statementsContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSequential_statement([NotNull] vhdl2008Parser.Sequential_statementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitShift_expression([NotNull] vhdl2008Parser.Shift_expressionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitShift_operator([NotNull] vhdl2008Parser.Shift_operatorContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSignal_assignment_statement([NotNull] vhdl2008Parser.Signal_assignment_statementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSignal_declaration([NotNull] vhdl2008Parser.Signal_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSignal_kind([NotNull] vhdl2008Parser.Signal_kindContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSignal_list([NotNull] vhdl2008Parser.Signal_listContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSignature([NotNull] vhdl2008Parser.SignatureContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSimple_expression([NotNull] vhdl2008Parser.Simple_expressionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSimple_force_assignment([NotNull] vhdl2008Parser.Simple_force_assignmentContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSimple_release_assignment([NotNull] vhdl2008Parser.Simple_release_assignmentContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSimple_signal_assignment([NotNull] vhdl2008Parser.Simple_signal_assignmentContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSimple_waveform_assignment([NotNull] vhdl2008Parser.Simple_waveform_assignmentContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSimple_variable_assignment([NotNull] vhdl2008Parser.Simple_variable_assignmentContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSlice_name([NotNull] vhdl2008Parser.Slice_nameContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSubprogram_body([NotNull] vhdl2008Parser.Subprogram_bodyContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSubprogram_declaration([NotNull] vhdl2008Parser.Subprogram_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSubprogram_declarative_item([NotNull] vhdl2008Parser.Subprogram_declarative_itemContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSubprogram_declarative_part([NotNull] vhdl2008Parser.Subprogram_declarative_partContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSubprogram_header([NotNull] vhdl2008Parser.Subprogram_headerContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSubprogram_instantiation_declaration([NotNull] vhdl2008Parser.Subprogram_instantiation_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSubprogram_kind([NotNull] vhdl2008Parser.Subprogram_kindContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSubprogram_specification([NotNull] vhdl2008Parser.Subprogram_specificationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSubprogram_statement_part([NotNull] vhdl2008Parser.Subprogram_statement_partContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSubtype_declaration([NotNull] vhdl2008Parser.Subtype_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSubtype_indication([NotNull] vhdl2008Parser.Subtype_indicationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSuffix([NotNull] vhdl2008Parser.SuffixContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTarget([NotNull] vhdl2008Parser.TargetContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTerm([NotNull] vhdl2008Parser.TermContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTimeout_clause([NotNull] vhdl2008Parser.Timeout_clauseContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTool_directive([NotNull] vhdl2008Parser.Tool_directiveContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitType_conversion([NotNull] vhdl2008Parser.Type_conversionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitType_declaration([NotNull] vhdl2008Parser.Type_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitType_definition([NotNull] vhdl2008Parser.Type_definitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitUnbounded_array_definition([NotNull] vhdl2008Parser.Unbounded_array_definitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitUse_clause([NotNull] vhdl2008Parser.Use_clauseContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitVariable_assignment_statement([NotNull] vhdl2008Parser.Variable_assignment_statementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitVariable_declaration([NotNull] vhdl2008Parser.Variable_declarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitWait_statement([NotNull] vhdl2008Parser.Wait_statementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitWaveform([NotNull] vhdl2008Parser.WaveformContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitWaveform_element([NotNull] vhdl2008Parser.Waveform_elementContext context) { return VisitChildren(context); } +} +} // namespace ApiMark.Vhdl.VhdlAst.Antlr diff --git a/src/ApiMark.Vhdl/VhdlAst/Antlr/vhdl2008Lexer.cs b/src/ApiMark.Vhdl/VhdlAst/Antlr/vhdl2008Lexer.cs new file mode 100644 index 0000000..b65c44e --- /dev/null +++ b/src/ApiMark.Vhdl/VhdlAst/Antlr/vhdl2008Lexer.cs @@ -0,0 +1,678 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// ANTLR Version: 4.13.1 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// Generated from vhdl2008.g4 by ANTLR 4.13.1 + +// Unreachable code detected +#pragma warning disable 0162 +// The variable '...' is assigned but its value is never used +#pragma warning disable 0219 +// Missing XML comment for publicly visible type or member '...' +#pragma warning disable 1591 +// Ambiguous reference in cref attribute +#pragma warning disable 419 + +namespace ApiMark.Vhdl.VhdlAst.Antlr { +using System; +using System.IO; +using System.Text; +using Antlr4.Runtime; +using Antlr4.Runtime.Atn; +using Antlr4.Runtime.Misc; +using DFA = Antlr4.Runtime.Dfa.DFA; + +[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.1")] +[System.CLSCompliant(false)] +public partial class vhdl2008Lexer : Lexer { + protected static DFA[] decisionToDFA; + protected static PredictionContextCache sharedContextCache = new PredictionContextCache(); + public const int + ABS=1, ACCESS=2, ACROSS=3, AFTER=4, ALIAS=5, ALL=6, AND=7, ARCHITECTURE=8, + ARRAY=9, ASSERT=10, ATTRIBUTE=11, BEGIN=12, BLOCK=13, BODY=14, BREAK=15, + BUFFER=16, BUS=17, CASE=18, COMPONENT=19, CONFIGURATION=20, CONSTANT=21, + CONTEXT=22, DEFAULT=23, DISCONNECT=24, DOWNTO=25, END=26, ENTITY=27, ELSE=28, + ELSIF=29, EXIT=30, FILE=31, FOR=32, FORCE=33, FUNCTION=34, GENERATE=35, + GENERIC=36, GROUP=37, GUARDED=38, IF=39, IMPURE=40, IN=41, INERTIAL=42, + INOUT=43, IS=44, LABEL=45, LIBRARY=46, LIMIT=47, LINKAGE=48, LITERAL=49, + LOOP=50, MAP=51, MOD=52, NAND=53, NATURE=54, NEW=55, NEXT=56, NOISE=57, + NOR=58, NOT=59, NULL_=60, OF=61, ON=62, OPEN=63, OR=64, OTHERS=65, OUT=66, + PACKAGE=67, PARAMETER=68, PORT=69, POSTPONED=70, PROCESS=71, PROCEDURE=72, + PROCEDURAL=73, PROTECTED=74, PURE=75, QUANTITY=76, RANGE=77, RELEASE=78, + REVERSE_RANGE=79, REJECT=80, REM=81, RECORD=82, REFERENCE=83, REGISTER=84, + REPORT=85, RETURN=86, ROL=87, ROR=88, SELECT=89, SEVERITY=90, SHARED=91, + SIGNAL=92, SLA=93, SLL=94, SPECTRUM=95, SRA=96, SRL=97, SUBNATURE=98, + SUBTYPE=99, TERMINAL=100, THEN=101, THROUGH=102, TO=103, TOLERANCE=104, + TRANSPORT=105, TYPE=106, UNAFFECTED=107, UNITS=108, UNTIL=109, USE=110, + VARIABLE=111, WAIT=112, WITH=113, WHEN=114, WHILE=115, XNOR=116, XOR=117, + DECIMAL_LITERAL=118, STRING_LITERAL=119, BASED_LITERAL=120, BIT_STRING_LITERAL=121, + BIT_STRING_LITERAL_BINARY=122, BIT_STRING_LITERAL_OCTAL=123, BIT_STRING_LITERAL_HEX=124, + BASIC_IDENTIFIER=125, EXTENDED_IDENTIFIER=126, LETTER=127, BLOCK_COMMENT=128, + COMMENT=129, TAB=130, SPACE=131, NEWLINE=132, CR=133, CHARACTER_LITERAL=134, + OTHER_SPECIAL_CHARACTER=135, DOUBLESTAR=136, CONDITION_OPERATOR=137, CONDITION_EQ=138, + CONDITION_NEQ=139, CONDITION_LEQ=140, CONDITION_LESSTHAN=141, CONDITION_GEQ=142, + CONDITION_GREATERTHAN=143, ASSIGN=144, AT=145, LEQ=146, GEQ=147, ARROW=148, + HASH=149, NEQ=150, WALRUS=151, BOX=152, DBLQUOTE=153, SEMI=154, COMMA=155, + AMPERSAND=156, LPAREN=157, RPAREN=158, LBRACKET=159, RBRACKET=160, COLON=161, + MUL=162, DIV=163, PLUS=164, MINUS=165, LESSTHAN=166, GREATERTHAN=167, + EQ=168, BAR=169, DOT=170, BACKSLASH=171, BACKTICK=172, EXPONENT=173, HEXDIGIT=174, + INTEGER=175, DIGIT=176, BASED_INTEGER=177, EXTENDED_DIGIT=178, APOSTROPHE=179, + QUESTION=180; + public static string[] channelNames = { + "DEFAULT_TOKEN_CHANNEL", "HIDDEN" + }; + + public static string[] modeNames = { + "DEFAULT_MODE" + }; + + public static readonly string[] ruleNames = { + "ABS", "ACCESS", "ACROSS", "AFTER", "ALIAS", "ALL", "AND", "ARCHITECTURE", + "ARRAY", "ASSERT", "ATTRIBUTE", "BEGIN", "BLOCK", "BODY", "BREAK", "BUFFER", + "BUS", "CASE", "COMPONENT", "CONFIGURATION", "CONSTANT", "CONTEXT", "DEFAULT", + "DISCONNECT", "DOWNTO", "END", "ENTITY", "ELSE", "ELSIF", "EXIT", "FILE", + "FOR", "FORCE", "FUNCTION", "GENERATE", "GENERIC", "GROUP", "GUARDED", + "IF", "IMPURE", "IN", "INERTIAL", "INOUT", "IS", "LABEL", "LIBRARY", "LIMIT", + "LINKAGE", "LITERAL", "LOOP", "MAP", "MOD", "NAND", "NATURE", "NEW", "NEXT", + "NOISE", "NOR", "NOT", "NULL_", "OF", "ON", "OPEN", "OR", "OTHERS", "OUT", + "PACKAGE", "PARAMETER", "PORT", "POSTPONED", "PROCESS", "PROCEDURE", "PROCEDURAL", + "PROTECTED", "PURE", "QUANTITY", "RANGE", "RELEASE", "REVERSE_RANGE", + "REJECT", "REM", "RECORD", "REFERENCE", "REGISTER", "REPORT", "RETURN", + "ROL", "ROR", "SELECT", "SEVERITY", "SHARED", "SIGNAL", "SLA", "SLL", + "SPECTRUM", "SRA", "SRL", "SUBNATURE", "SUBTYPE", "TERMINAL", "THEN", + "THROUGH", "TO", "TOLERANCE", "TRANSPORT", "TYPE", "UNAFFECTED", "UNITS", + "UNTIL", "USE", "VARIABLE", "WAIT", "WITH", "WHEN", "WHILE", "XNOR", "XOR", + "DECIMAL_LITERAL", "STRING_LITERAL", "BASED_LITERAL", "BIT_STRING_LITERAL", + "BIT_STRING_LITERAL_BINARY", "BIT_STRING_LITERAL_OCTAL", "BIT_STRING_LITERAL_HEX", + "BASIC_IDENTIFIER", "EXTENDED_IDENTIFIER", "LETTER", "BLOCK_COMMENT", + "COMMENT", "TAB", "SPACE", "NEWLINE", "CR", "CHARACTER_LITERAL", "OTHER_SPECIAL_CHARACTER", + "DOUBLESTAR", "CONDITION_OPERATOR", "CONDITION_EQ", "CONDITION_NEQ", "CONDITION_LEQ", + "CONDITION_LESSTHAN", "CONDITION_GEQ", "CONDITION_GREATERTHAN", "ASSIGN", + "AT", "LEQ", "GEQ", "ARROW", "HASH", "NEQ", "WALRUS", "BOX", "DBLQUOTE", + "SEMI", "COMMA", "AMPERSAND", "LPAREN", "RPAREN", "LBRACKET", "RBRACKET", + "COLON", "MUL", "DIV", "PLUS", "MINUS", "LESSTHAN", "GREATERTHAN", "EQ", + "BAR", "DOT", "BACKSLASH", "BACKTICK", "EXPONENT", "HEXDIGIT", "INTEGER", + "DIGIT", "BASED_INTEGER", "EXTENDED_DIGIT", "APOSTROPHE", "QUESTION" + }; + + + public vhdl2008Lexer(ICharStream input) + : this(input, Console.Out, Console.Error) { } + + public vhdl2008Lexer(ICharStream input, TextWriter output, TextWriter errorOutput) + : base(input, output, errorOutput) + { + Interpreter = new LexerATNSimulator(this, _ATN, decisionToDFA, sharedContextCache); + } + + private static readonly string[] _LiteralNames = { + null, "'ABS'", "'ACCESS'", "'ACROSS'", "'AFTER'", "'ALIAS'", "'ALL'", + "'AND'", "'ARCHITECTURE'", "'ARRAY'", "'ASSERT'", "'ATTRIBUTE'", "'BEGIN'", + "'BLOCK'", "'BODY'", "'BREAK'", "'BUFFER'", "'BUS'", "'CASE'", "'COMPONENT'", + "'CONFIGURATION'", "'CONSTANT'", "'CONTEXT'", "'DEFAULT'", "'DISCONNECT'", + "'DOWNTO'", "'END'", "'ENTITY'", "'ELSE'", "'ELSIF'", "'EXIT'", "'FILE'", + "'FOR'", "'FORCE'", "'FUNCTION'", "'GENERATE'", "'GENERIC'", "'GROUP'", + "'GUARDED'", "'IF'", "'IMPURE'", "'IN'", "'INERTIAL'", "'INOUT'", "'IS'", + "'LABEL'", "'LIBRARY'", "'LIMIT'", "'LINKAGE'", "'LITERAL'", "'LOOP'", + "'MAP'", "'MOD'", "'NAND'", "'NATURE'", "'NEW'", "'NEXT'", "'NOISE'", + "'NOR'", "'NOT'", "'NULL'", "'OF'", "'ON'", "'OPEN'", "'OR'", "'OTHERS'", + "'OUT'", "'PACKAGE'", "'PARAMETER'", "'PORT'", "'POSTPONED'", "'PROCESS'", + "'PROCEDURE'", "'PROCEDURAL'", "'PROTECTED'", "'PURE'", "'QUANTITY'", + "'RANGE'", "'RELEASE'", "'REVERSE_RANGE'", "'REJECT'", "'REM'", "'RECORD'", + "'REFERENCE'", "'REGISTER'", "'REPORT'", "'RETURN'", "'ROL'", "'ROR'", + "'SELECT'", "'SEVERITY'", "'SHARED'", "'SIGNAL'", "'SLA'", "'SLL'", "'SPECTRUM'", + "'SRA'", "'SRL'", "'SUBNATURE'", "'SUBTYPE'", "'TERMINAL'", "'THEN'", + "'THROUGH'", "'TO'", "'TOLERANCE'", "'TRANSPORT'", "'TYPE'", "'UNAFFECTED'", + "'UNITS'", "'UNTIL'", "'USE'", "'VARIABLE'", "'WAIT'", "'WITH'", "'WHEN'", + "'WHILE'", "'XNOR'", "'XOR'", null, null, null, null, null, null, null, + null, null, null, null, null, null, null, "'\\n'", "'\\r'", null, null, + "'**'", "'??'", "'?='", "'?/E'", "'?<='", "'?<'", "'?>='", "'?>'", "'=='", + "'@'", "'<='", "'>='", "'=>'", "'#'", "'/='", "':='", "'<>'", "'\"'", + "';'", "','", "'&'", "'('", "')'", "'['", "']'", "':'", "'*'", "'/'", + "'+'", "'-'", "'<'", "'>'", "'='", "'|'", "'.'", "'\\'", "'`'", null, + null, null, null, null, null, "'''", "'?'" + }; + private static readonly string[] _SymbolicNames = { + null, "ABS", "ACCESS", "ACROSS", "AFTER", "ALIAS", "ALL", "AND", "ARCHITECTURE", + "ARRAY", "ASSERT", "ATTRIBUTE", "BEGIN", "BLOCK", "BODY", "BREAK", "BUFFER", + "BUS", "CASE", "COMPONENT", "CONFIGURATION", "CONSTANT", "CONTEXT", "DEFAULT", + "DISCONNECT", "DOWNTO", "END", "ENTITY", "ELSE", "ELSIF", "EXIT", "FILE", + "FOR", "FORCE", "FUNCTION", "GENERATE", "GENERIC", "GROUP", "GUARDED", + "IF", "IMPURE", "IN", "INERTIAL", "INOUT", "IS", "LABEL", "LIBRARY", "LIMIT", + "LINKAGE", "LITERAL", "LOOP", "MAP", "MOD", "NAND", "NATURE", "NEW", "NEXT", + "NOISE", "NOR", "NOT", "NULL_", "OF", "ON", "OPEN", "OR", "OTHERS", "OUT", + "PACKAGE", "PARAMETER", "PORT", "POSTPONED", "PROCESS", "PROCEDURE", "PROCEDURAL", + "PROTECTED", "PURE", "QUANTITY", "RANGE", "RELEASE", "REVERSE_RANGE", + "REJECT", "REM", "RECORD", "REFERENCE", "REGISTER", "REPORT", "RETURN", + "ROL", "ROR", "SELECT", "SEVERITY", "SHARED", "SIGNAL", "SLA", "SLL", + "SPECTRUM", "SRA", "SRL", "SUBNATURE", "SUBTYPE", "TERMINAL", "THEN", + "THROUGH", "TO", "TOLERANCE", "TRANSPORT", "TYPE", "UNAFFECTED", "UNITS", + "UNTIL", "USE", "VARIABLE", "WAIT", "WITH", "WHEN", "WHILE", "XNOR", "XOR", + "DECIMAL_LITERAL", "STRING_LITERAL", "BASED_LITERAL", "BIT_STRING_LITERAL", + "BIT_STRING_LITERAL_BINARY", "BIT_STRING_LITERAL_OCTAL", "BIT_STRING_LITERAL_HEX", + "BASIC_IDENTIFIER", "EXTENDED_IDENTIFIER", "LETTER", "BLOCK_COMMENT", + "COMMENT", "TAB", "SPACE", "NEWLINE", "CR", "CHARACTER_LITERAL", "OTHER_SPECIAL_CHARACTER", + "DOUBLESTAR", "CONDITION_OPERATOR", "CONDITION_EQ", "CONDITION_NEQ", "CONDITION_LEQ", + "CONDITION_LESSTHAN", "CONDITION_GEQ", "CONDITION_GREATERTHAN", "ASSIGN", + "AT", "LEQ", "GEQ", "ARROW", "HASH", "NEQ", "WALRUS", "BOX", "DBLQUOTE", + "SEMI", "COMMA", "AMPERSAND", "LPAREN", "RPAREN", "LBRACKET", "RBRACKET", + "COLON", "MUL", "DIV", "PLUS", "MINUS", "LESSTHAN", "GREATERTHAN", "EQ", + "BAR", "DOT", "BACKSLASH", "BACKTICK", "EXPONENT", "HEXDIGIT", "INTEGER", + "DIGIT", "BASED_INTEGER", "EXTENDED_DIGIT", "APOSTROPHE", "QUESTION" + }; + public static readonly IVocabulary DefaultVocabulary = new Vocabulary(_LiteralNames, _SymbolicNames); + + [NotNull] + public override IVocabulary Vocabulary + { + get + { + return DefaultVocabulary; + } + } + + public override string GrammarFileName { get { return "vhdl2008.g4"; } } + + public override string[] RuleNames { get { return ruleNames; } } + + public override string[] ChannelNames { get { return channelNames; } } + + public override string[] ModeNames { get { return modeNames; } } + + public override int[] SerializedAtn { get { return _serializedATN; } } + + static vhdl2008Lexer() { + decisionToDFA = new DFA[_ATN.NumberOfDecisions]; + for (int i = 0; i < _ATN.NumberOfDecisions; i++) { + decisionToDFA[i] = new DFA(_ATN.GetDecisionState(i), i); + } + } + private static int[] _serializedATN = { + 4,0,180,1407,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6, + 7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2, + 14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2, + 21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2, + 28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,2,34,7,34,2, + 35,7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39,2,40,7,40,2,41,7,41,2, + 42,7,42,2,43,7,43,2,44,7,44,2,45,7,45,2,46,7,46,2,47,7,47,2,48,7,48,2, + 49,7,49,2,50,7,50,2,51,7,51,2,52,7,52,2,53,7,53,2,54,7,54,2,55,7,55,2, + 56,7,56,2,57,7,57,2,58,7,58,2,59,7,59,2,60,7,60,2,61,7,61,2,62,7,62,2, + 63,7,63,2,64,7,64,2,65,7,65,2,66,7,66,2,67,7,67,2,68,7,68,2,69,7,69,2, + 70,7,70,2,71,7,71,2,72,7,72,2,73,7,73,2,74,7,74,2,75,7,75,2,76,7,76,2, + 77,7,77,2,78,7,78,2,79,7,79,2,80,7,80,2,81,7,81,2,82,7,82,2,83,7,83,2, + 84,7,84,2,85,7,85,2,86,7,86,2,87,7,87,2,88,7,88,2,89,7,89,2,90,7,90,2, + 91,7,91,2,92,7,92,2,93,7,93,2,94,7,94,2,95,7,95,2,96,7,96,2,97,7,97,2, + 98,7,98,2,99,7,99,2,100,7,100,2,101,7,101,2,102,7,102,2,103,7,103,2,104, + 7,104,2,105,7,105,2,106,7,106,2,107,7,107,2,108,7,108,2,109,7,109,2,110, + 7,110,2,111,7,111,2,112,7,112,2,113,7,113,2,114,7,114,2,115,7,115,2,116, + 7,116,2,117,7,117,2,118,7,118,2,119,7,119,2,120,7,120,2,121,7,121,2,122, + 7,122,2,123,7,123,2,124,7,124,2,125,7,125,2,126,7,126,2,127,7,127,2,128, + 7,128,2,129,7,129,2,130,7,130,2,131,7,131,2,132,7,132,2,133,7,133,2,134, + 7,134,2,135,7,135,2,136,7,136,2,137,7,137,2,138,7,138,2,139,7,139,2,140, + 7,140,2,141,7,141,2,142,7,142,2,143,7,143,2,144,7,144,2,145,7,145,2,146, + 7,146,2,147,7,147,2,148,7,148,2,149,7,149,2,150,7,150,2,151,7,151,2,152, + 7,152,2,153,7,153,2,154,7,154,2,155,7,155,2,156,7,156,2,157,7,157,2,158, + 7,158,2,159,7,159,2,160,7,160,2,161,7,161,2,162,7,162,2,163,7,163,2,164, + 7,164,2,165,7,165,2,166,7,166,2,167,7,167,2,168,7,168,2,169,7,169,2,170, + 7,170,2,171,7,171,2,172,7,172,2,173,7,173,2,174,7,174,2,175,7,175,2,176, + 7,176,2,177,7,177,2,178,7,178,2,179,7,179,1,0,1,0,1,0,1,0,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,3,1, + 4,1,4,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,7,1,7,1,7,1,7, + 1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,8,1,9,1,9,1, + 9,1,9,1,9,1,9,1,9,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1, + 11,1,11,1,11,1,11,1,11,1,11,1,12,1,12,1,12,1,12,1,12,1,12,1,13,1,13,1, + 13,1,13,1,13,1,14,1,14,1,14,1,14,1,14,1,14,1,15,1,15,1,15,1,15,1,15,1, + 15,1,15,1,16,1,16,1,16,1,16,1,17,1,17,1,17,1,17,1,17,1,18,1,18,1,18,1, + 18,1,18,1,18,1,18,1,18,1,18,1,18,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1, + 19,1,19,1,19,1,19,1,19,1,19,1,19,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1, + 20,1,20,1,21,1,21,1,21,1,21,1,21,1,21,1,21,1,21,1,22,1,22,1,22,1,22,1, + 22,1,22,1,22,1,22,1,23,1,23,1,23,1,23,1,23,1,23,1,23,1,23,1,23,1,23,1, + 23,1,24,1,24,1,24,1,24,1,24,1,24,1,24,1,25,1,25,1,25,1,25,1,26,1,26,1, + 26,1,26,1,26,1,26,1,26,1,27,1,27,1,27,1,27,1,27,1,28,1,28,1,28,1,28,1, + 28,1,28,1,29,1,29,1,29,1,29,1,29,1,30,1,30,1,30,1,30,1,30,1,31,1,31,1, + 31,1,31,1,32,1,32,1,32,1,32,1,32,1,32,1,33,1,33,1,33,1,33,1,33,1,33,1, + 33,1,33,1,33,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,35,1,35,1, + 35,1,35,1,35,1,35,1,35,1,35,1,36,1,36,1,36,1,36,1,36,1,36,1,37,1,37,1, + 37,1,37,1,37,1,37,1,37,1,37,1,38,1,38,1,38,1,39,1,39,1,39,1,39,1,39,1, + 39,1,39,1,40,1,40,1,40,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1, + 42,1,42,1,42,1,42,1,42,1,42,1,43,1,43,1,43,1,44,1,44,1,44,1,44,1,44,1, + 44,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,46,1,46,1,46,1,46,1,46,1, + 46,1,47,1,47,1,47,1,47,1,47,1,47,1,47,1,47,1,48,1,48,1,48,1,48,1,48,1, + 48,1,48,1,48,1,49,1,49,1,49,1,49,1,49,1,50,1,50,1,50,1,50,1,51,1,51,1, + 51,1,51,1,52,1,52,1,52,1,52,1,52,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1, + 54,1,54,1,54,1,54,1,55,1,55,1,55,1,55,1,55,1,56,1,56,1,56,1,56,1,56,1, + 56,1,57,1,57,1,57,1,57,1,58,1,58,1,58,1,58,1,59,1,59,1,59,1,59,1,59,1, + 60,1,60,1,60,1,61,1,61,1,61,1,62,1,62,1,62,1,62,1,62,1,63,1,63,1,63,1, + 64,1,64,1,64,1,64,1,64,1,64,1,64,1,65,1,65,1,65,1,65,1,66,1,66,1,66,1, + 66,1,66,1,66,1,66,1,66,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1, + 67,1,68,1,68,1,68,1,68,1,68,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1, + 69,1,69,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,71,1,71,1,71,1,71,1, + 71,1,71,1,71,1,71,1,71,1,71,1,72,1,72,1,72,1,72,1,72,1,72,1,72,1,72,1, + 72,1,72,1,72,1,73,1,73,1,73,1,73,1,73,1,73,1,73,1,73,1,73,1,73,1,74,1, + 74,1,74,1,74,1,74,1,75,1,75,1,75,1,75,1,75,1,75,1,75,1,75,1,75,1,76,1, + 76,1,76,1,76,1,76,1,76,1,77,1,77,1,77,1,77,1,77,1,77,1,77,1,77,1,78,1, + 78,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,79,1, + 79,1,79,1,79,1,79,1,79,1,79,1,80,1,80,1,80,1,80,1,81,1,81,1,81,1,81,1, + 81,1,81,1,81,1,82,1,82,1,82,1,82,1,82,1,82,1,82,1,82,1,82,1,82,1,83,1, + 83,1,83,1,83,1,83,1,83,1,83,1,83,1,83,1,84,1,84,1,84,1,84,1,84,1,84,1, + 84,1,85,1,85,1,85,1,85,1,85,1,85,1,85,1,86,1,86,1,86,1,86,1,87,1,87,1, + 87,1,87,1,88,1,88,1,88,1,88,1,88,1,88,1,88,1,89,1,89,1,89,1,89,1,89,1, + 89,1,89,1,89,1,89,1,90,1,90,1,90,1,90,1,90,1,90,1,90,1,91,1,91,1,91,1, + 91,1,91,1,91,1,91,1,92,1,92,1,92,1,92,1,93,1,93,1,93,1,93,1,94,1,94,1, + 94,1,94,1,94,1,94,1,94,1,94,1,94,1,95,1,95,1,95,1,95,1,96,1,96,1,96,1, + 96,1,97,1,97,1,97,1,97,1,97,1,97,1,97,1,97,1,97,1,97,1,98,1,98,1,98,1, + 98,1,98,1,98,1,98,1,98,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1, + 100,1,100,1,100,1,100,1,100,1,101,1,101,1,101,1,101,1,101,1,101,1,101, + 1,101,1,102,1,102,1,102,1,103,1,103,1,103,1,103,1,103,1,103,1,103,1,103, + 1,103,1,103,1,104,1,104,1,104,1,104,1,104,1,104,1,104,1,104,1,104,1,104, + 1,105,1,105,1,105,1,105,1,105,1,106,1,106,1,106,1,106,1,106,1,106,1,106, + 1,106,1,106,1,106,1,106,1,107,1,107,1,107,1,107,1,107,1,107,1,108,1,108, + 1,108,1,108,1,108,1,108,1,109,1,109,1,109,1,109,1,110,1,110,1,110,1,110, + 1,110,1,110,1,110,1,110,1,110,1,111,1,111,1,111,1,111,1,111,1,112,1,112, + 1,112,1,112,1,112,1,113,1,113,1,113,1,113,1,113,1,114,1,114,1,114,1,114, + 1,114,1,114,1,115,1,115,1,115,1,115,1,115,1,116,1,116,1,116,1,116,1,117, + 1,117,1,117,1,117,3,117,1135,8,117,1,117,3,117,1138,8,117,1,118,1,118, + 1,118,1,118,1,118,5,118,1145,8,118,10,118,12,118,1148,9,118,1,118,1,118, + 1,119,1,119,1,119,1,119,1,119,1,119,3,119,1158,8,119,1,119,1,119,3,119, + 1162,8,119,1,120,1,120,1,120,3,120,1167,8,120,1,121,1,121,1,121,1,121, + 4,121,1173,8,121,11,121,12,121,1174,1,121,1,121,1,122,1,122,1,122,1,122, + 4,122,1183,8,122,11,122,12,122,1184,1,122,1,122,1,123,1,123,1,123,1,123, + 4,123,1193,8,123,11,123,12,123,1194,1,123,1,123,1,124,1,124,1,124,1,124, + 3,124,1203,8,124,1,124,1,124,5,124,1207,8,124,10,124,12,124,1210,9,124, + 1,125,1,125,1,125,1,125,1,125,4,125,1217,8,125,11,125,12,125,1218,1,125, + 1,125,1,126,1,126,1,127,1,127,1,127,1,127,5,127,1229,8,127,10,127,12,127, + 1232,9,127,1,127,1,127,1,127,1,127,1,127,1,128,1,128,1,128,1,128,5,128, + 1243,8,128,10,128,12,128,1246,9,128,1,128,1,128,1,129,4,129,1251,8,129, + 11,129,12,129,1252,1,129,1,129,1,130,4,130,1258,8,130,11,130,12,130,1259, + 1,130,1,130,1,131,1,131,1,131,1,131,1,132,1,132,1,132,1,132,1,133,1,133, + 1,133,1,133,1,134,1,134,1,135,1,135,1,135,1,136,1,136,1,136,1,137,1,137, + 1,137,1,138,1,138,1,138,1,138,1,139,1,139,1,139,1,139,1,140,1,140,1,140, + 1,141,1,141,1,141,1,141,1,142,1,142,1,142,1,143,1,143,1,143,1,144,1,144, + 1,145,1,145,1,145,1,146,1,146,1,146,1,147,1,147,1,147,1,148,1,148,1,149, + 1,149,1,149,1,150,1,150,1,150,1,151,1,151,1,151,1,152,1,152,1,153,1,153, + 1,154,1,154,1,155,1,155,1,156,1,156,1,157,1,157,1,158,1,158,1,159,1,159, + 1,160,1,160,1,161,1,161,1,162,1,162,1,163,1,163,1,164,1,164,1,165,1,165, + 1,166,1,166,1,167,1,167,1,168,1,168,1,169,1,169,1,170,1,170,1,171,1,171, + 1,172,1,172,3,172,1372,8,172,1,172,1,172,1,172,1,172,3,172,1378,8,172, + 1,173,1,173,1,174,1,174,1,174,5,174,1385,8,174,10,174,12,174,1388,9,174, + 1,175,1,175,1,176,1,176,1,176,5,176,1395,8,176,10,176,12,176,1398,9,176, + 1,177,1,177,3,177,1402,8,177,1,178,1,178,1,179,1,179,1,1230,0,180,1,1, + 3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25,13,27,14,29,15, + 31,16,33,17,35,18,37,19,39,20,41,21,43,22,45,23,47,24,49,25,51,26,53,27, + 55,28,57,29,59,30,61,31,63,32,65,33,67,34,69,35,71,36,73,37,75,38,77,39, + 79,40,81,41,83,42,85,43,87,44,89,45,91,46,93,47,95,48,97,49,99,50,101, + 51,103,52,105,53,107,54,109,55,111,56,113,57,115,58,117,59,119,60,121, + 61,123,62,125,63,127,64,129,65,131,66,133,67,135,68,137,69,139,70,141, + 71,143,72,145,73,147,74,149,75,151,76,153,77,155,78,157,79,159,80,161, + 81,163,82,165,83,167,84,169,85,171,86,173,87,175,88,177,89,179,90,181, + 91,183,92,185,93,187,94,189,95,191,96,193,97,195,98,197,99,199,100,201, + 101,203,102,205,103,207,104,209,105,211,106,213,107,215,108,217,109,219, + 110,221,111,223,112,225,113,227,114,229,115,231,116,233,117,235,118,237, + 119,239,120,241,121,243,122,245,123,247,124,249,125,251,126,253,127,255, + 128,257,129,259,130,261,131,263,132,265,133,267,134,269,135,271,136,273, + 137,275,138,277,139,279,140,281,141,283,142,285,143,287,144,289,145,291, + 146,293,147,295,148,297,149,299,150,301,151,303,152,305,153,307,154,309, + 155,311,156,313,157,315,158,317,159,319,160,321,161,323,162,325,163,327, + 164,329,165,331,166,333,167,335,168,337,169,339,170,341,171,343,172,345, + 173,347,174,349,175,351,176,353,177,355,178,357,179,359,180,1,0,36,2,0, + 65,65,97,97,2,0,66,66,98,98,2,0,83,83,115,115,2,0,67,67,99,99,2,0,69,69, + 101,101,2,0,82,82,114,114,2,0,79,79,111,111,2,0,70,70,102,102,2,0,84,84, + 116,116,2,0,76,76,108,108,2,0,73,73,105,105,2,0,78,78,110,110,2,0,68,68, + 100,100,2,0,72,72,104,104,2,0,85,85,117,117,2,0,89,89,121,121,2,0,71,71, + 103,103,2,0,75,75,107,107,2,0,77,77,109,109,2,0,80,80,112,112,2,0,88,88, + 120,120,2,0,87,87,119,119,2,0,81,81,113,113,2,0,86,86,118,118,2,0,74,74, + 106,106,3,0,10,10,13,13,34,34,2,0,48,49,95,95,2,0,48,55,95,95,4,0,48,57, + 65,70,95,95,97,102,5,0,32,32,38,38,40,41,43,62,124,124,3,0,35,35,91,93, + 95,95,2,0,65,90,97,122,1,0,10,10,17,0,32,33,36,37,63,64,94,94,96,96,123, + 123,125,126,164,164,166,167,169,169,171,174,176,177,181,183,187,187,924, + 924,1024,1118,8470,8470,2,0,43,43,45,45,2,0,65,70,97,102,1437,0,1,1,0, + 0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13, + 1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0, + 0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35, + 1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0, + 0,0,47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57, + 1,0,0,0,0,59,1,0,0,0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,1,0,0, + 0,0,69,1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77,1,0,0,0,0,79, + 1,0,0,0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87,1,0,0,0,0,89,1,0,0, + 0,0,91,1,0,0,0,0,93,1,0,0,0,0,95,1,0,0,0,0,97,1,0,0,0,0,99,1,0,0,0,0,101, + 1,0,0,0,0,103,1,0,0,0,0,105,1,0,0,0,0,107,1,0,0,0,0,109,1,0,0,0,0,111, + 1,0,0,0,0,113,1,0,0,0,0,115,1,0,0,0,0,117,1,0,0,0,0,119,1,0,0,0,0,121, + 1,0,0,0,0,123,1,0,0,0,0,125,1,0,0,0,0,127,1,0,0,0,0,129,1,0,0,0,0,131, + 1,0,0,0,0,133,1,0,0,0,0,135,1,0,0,0,0,137,1,0,0,0,0,139,1,0,0,0,0,141, + 1,0,0,0,0,143,1,0,0,0,0,145,1,0,0,0,0,147,1,0,0,0,0,149,1,0,0,0,0,151, + 1,0,0,0,0,153,1,0,0,0,0,155,1,0,0,0,0,157,1,0,0,0,0,159,1,0,0,0,0,161, + 1,0,0,0,0,163,1,0,0,0,0,165,1,0,0,0,0,167,1,0,0,0,0,169,1,0,0,0,0,171, + 1,0,0,0,0,173,1,0,0,0,0,175,1,0,0,0,0,177,1,0,0,0,0,179,1,0,0,0,0,181, + 1,0,0,0,0,183,1,0,0,0,0,185,1,0,0,0,0,187,1,0,0,0,0,189,1,0,0,0,0,191, + 1,0,0,0,0,193,1,0,0,0,0,195,1,0,0,0,0,197,1,0,0,0,0,199,1,0,0,0,0,201, + 1,0,0,0,0,203,1,0,0,0,0,205,1,0,0,0,0,207,1,0,0,0,0,209,1,0,0,0,0,211, + 1,0,0,0,0,213,1,0,0,0,0,215,1,0,0,0,0,217,1,0,0,0,0,219,1,0,0,0,0,221, + 1,0,0,0,0,223,1,0,0,0,0,225,1,0,0,0,0,227,1,0,0,0,0,229,1,0,0,0,0,231, + 1,0,0,0,0,233,1,0,0,0,0,235,1,0,0,0,0,237,1,0,0,0,0,239,1,0,0,0,0,241, + 1,0,0,0,0,243,1,0,0,0,0,245,1,0,0,0,0,247,1,0,0,0,0,249,1,0,0,0,0,251, + 1,0,0,0,0,253,1,0,0,0,0,255,1,0,0,0,0,257,1,0,0,0,0,259,1,0,0,0,0,261, + 1,0,0,0,0,263,1,0,0,0,0,265,1,0,0,0,0,267,1,0,0,0,0,269,1,0,0,0,0,271, + 1,0,0,0,0,273,1,0,0,0,0,275,1,0,0,0,0,277,1,0,0,0,0,279,1,0,0,0,0,281, + 1,0,0,0,0,283,1,0,0,0,0,285,1,0,0,0,0,287,1,0,0,0,0,289,1,0,0,0,0,291, + 1,0,0,0,0,293,1,0,0,0,0,295,1,0,0,0,0,297,1,0,0,0,0,299,1,0,0,0,0,301, + 1,0,0,0,0,303,1,0,0,0,0,305,1,0,0,0,0,307,1,0,0,0,0,309,1,0,0,0,0,311, + 1,0,0,0,0,313,1,0,0,0,0,315,1,0,0,0,0,317,1,0,0,0,0,319,1,0,0,0,0,321, + 1,0,0,0,0,323,1,0,0,0,0,325,1,0,0,0,0,327,1,0,0,0,0,329,1,0,0,0,0,331, + 1,0,0,0,0,333,1,0,0,0,0,335,1,0,0,0,0,337,1,0,0,0,0,339,1,0,0,0,0,341, + 1,0,0,0,0,343,1,0,0,0,0,345,1,0,0,0,0,347,1,0,0,0,0,349,1,0,0,0,0,351, + 1,0,0,0,0,353,1,0,0,0,0,355,1,0,0,0,0,357,1,0,0,0,0,359,1,0,0,0,1,361, + 1,0,0,0,3,365,1,0,0,0,5,372,1,0,0,0,7,379,1,0,0,0,9,385,1,0,0,0,11,391, + 1,0,0,0,13,395,1,0,0,0,15,399,1,0,0,0,17,412,1,0,0,0,19,418,1,0,0,0,21, + 425,1,0,0,0,23,435,1,0,0,0,25,441,1,0,0,0,27,447,1,0,0,0,29,452,1,0,0, + 0,31,458,1,0,0,0,33,465,1,0,0,0,35,469,1,0,0,0,37,474,1,0,0,0,39,484,1, + 0,0,0,41,498,1,0,0,0,43,507,1,0,0,0,45,515,1,0,0,0,47,523,1,0,0,0,49,534, + 1,0,0,0,51,541,1,0,0,0,53,545,1,0,0,0,55,552,1,0,0,0,57,557,1,0,0,0,59, + 563,1,0,0,0,61,568,1,0,0,0,63,573,1,0,0,0,65,577,1,0,0,0,67,583,1,0,0, + 0,69,592,1,0,0,0,71,601,1,0,0,0,73,609,1,0,0,0,75,615,1,0,0,0,77,623,1, + 0,0,0,79,626,1,0,0,0,81,633,1,0,0,0,83,636,1,0,0,0,85,645,1,0,0,0,87,651, + 1,0,0,0,89,654,1,0,0,0,91,660,1,0,0,0,93,668,1,0,0,0,95,674,1,0,0,0,97, + 682,1,0,0,0,99,690,1,0,0,0,101,695,1,0,0,0,103,699,1,0,0,0,105,703,1,0, + 0,0,107,708,1,0,0,0,109,715,1,0,0,0,111,719,1,0,0,0,113,724,1,0,0,0,115, + 730,1,0,0,0,117,734,1,0,0,0,119,738,1,0,0,0,121,743,1,0,0,0,123,746,1, + 0,0,0,125,749,1,0,0,0,127,754,1,0,0,0,129,757,1,0,0,0,131,764,1,0,0,0, + 133,768,1,0,0,0,135,776,1,0,0,0,137,786,1,0,0,0,139,791,1,0,0,0,141,801, + 1,0,0,0,143,809,1,0,0,0,145,819,1,0,0,0,147,830,1,0,0,0,149,840,1,0,0, + 0,151,845,1,0,0,0,153,854,1,0,0,0,155,860,1,0,0,0,157,868,1,0,0,0,159, + 882,1,0,0,0,161,889,1,0,0,0,163,893,1,0,0,0,165,900,1,0,0,0,167,910,1, + 0,0,0,169,919,1,0,0,0,171,926,1,0,0,0,173,933,1,0,0,0,175,937,1,0,0,0, + 177,941,1,0,0,0,179,948,1,0,0,0,181,957,1,0,0,0,183,964,1,0,0,0,185,971, + 1,0,0,0,187,975,1,0,0,0,189,979,1,0,0,0,191,988,1,0,0,0,193,992,1,0,0, + 0,195,996,1,0,0,0,197,1006,1,0,0,0,199,1014,1,0,0,0,201,1023,1,0,0,0,203, + 1028,1,0,0,0,205,1036,1,0,0,0,207,1039,1,0,0,0,209,1049,1,0,0,0,211,1059, + 1,0,0,0,213,1064,1,0,0,0,215,1075,1,0,0,0,217,1081,1,0,0,0,219,1087,1, + 0,0,0,221,1091,1,0,0,0,223,1100,1,0,0,0,225,1105,1,0,0,0,227,1110,1,0, + 0,0,229,1115,1,0,0,0,231,1121,1,0,0,0,233,1126,1,0,0,0,235,1130,1,0,0, + 0,237,1139,1,0,0,0,239,1151,1,0,0,0,241,1166,1,0,0,0,243,1168,1,0,0,0, + 245,1178,1,0,0,0,247,1188,1,0,0,0,249,1198,1,0,0,0,251,1211,1,0,0,0,253, + 1222,1,0,0,0,255,1224,1,0,0,0,257,1238,1,0,0,0,259,1250,1,0,0,0,261,1257, + 1,0,0,0,263,1263,1,0,0,0,265,1267,1,0,0,0,267,1271,1,0,0,0,269,1275,1, + 0,0,0,271,1277,1,0,0,0,273,1280,1,0,0,0,275,1283,1,0,0,0,277,1286,1,0, + 0,0,279,1290,1,0,0,0,281,1294,1,0,0,0,283,1297,1,0,0,0,285,1301,1,0,0, + 0,287,1304,1,0,0,0,289,1307,1,0,0,0,291,1309,1,0,0,0,293,1312,1,0,0,0, + 295,1315,1,0,0,0,297,1318,1,0,0,0,299,1320,1,0,0,0,301,1323,1,0,0,0,303, + 1326,1,0,0,0,305,1329,1,0,0,0,307,1331,1,0,0,0,309,1333,1,0,0,0,311,1335, + 1,0,0,0,313,1337,1,0,0,0,315,1339,1,0,0,0,317,1341,1,0,0,0,319,1343,1, + 0,0,0,321,1345,1,0,0,0,323,1347,1,0,0,0,325,1349,1,0,0,0,327,1351,1,0, + 0,0,329,1353,1,0,0,0,331,1355,1,0,0,0,333,1357,1,0,0,0,335,1359,1,0,0, + 0,337,1361,1,0,0,0,339,1363,1,0,0,0,341,1365,1,0,0,0,343,1367,1,0,0,0, + 345,1369,1,0,0,0,347,1379,1,0,0,0,349,1381,1,0,0,0,351,1389,1,0,0,0,353, + 1391,1,0,0,0,355,1401,1,0,0,0,357,1403,1,0,0,0,359,1405,1,0,0,0,361,362, + 7,0,0,0,362,363,7,1,0,0,363,364,7,2,0,0,364,2,1,0,0,0,365,366,7,0,0,0, + 366,367,7,3,0,0,367,368,7,3,0,0,368,369,7,4,0,0,369,370,7,2,0,0,370,371, + 7,2,0,0,371,4,1,0,0,0,372,373,7,0,0,0,373,374,7,3,0,0,374,375,7,5,0,0, + 375,376,7,6,0,0,376,377,7,2,0,0,377,378,7,2,0,0,378,6,1,0,0,0,379,380, + 7,0,0,0,380,381,7,7,0,0,381,382,7,8,0,0,382,383,7,4,0,0,383,384,7,5,0, + 0,384,8,1,0,0,0,385,386,7,0,0,0,386,387,7,9,0,0,387,388,7,10,0,0,388,389, + 7,0,0,0,389,390,7,2,0,0,390,10,1,0,0,0,391,392,7,0,0,0,392,393,7,9,0,0, + 393,394,7,9,0,0,394,12,1,0,0,0,395,396,7,0,0,0,396,397,7,11,0,0,397,398, + 7,12,0,0,398,14,1,0,0,0,399,400,7,0,0,0,400,401,7,5,0,0,401,402,7,3,0, + 0,402,403,7,13,0,0,403,404,7,10,0,0,404,405,7,8,0,0,405,406,7,4,0,0,406, + 407,7,3,0,0,407,408,7,8,0,0,408,409,7,14,0,0,409,410,7,5,0,0,410,411,7, + 4,0,0,411,16,1,0,0,0,412,413,7,0,0,0,413,414,7,5,0,0,414,415,7,5,0,0,415, + 416,7,0,0,0,416,417,7,15,0,0,417,18,1,0,0,0,418,419,7,0,0,0,419,420,7, + 2,0,0,420,421,7,2,0,0,421,422,7,4,0,0,422,423,7,5,0,0,423,424,7,8,0,0, + 424,20,1,0,0,0,425,426,7,0,0,0,426,427,7,8,0,0,427,428,7,8,0,0,428,429, + 7,5,0,0,429,430,7,10,0,0,430,431,7,1,0,0,431,432,7,14,0,0,432,433,7,8, + 0,0,433,434,7,4,0,0,434,22,1,0,0,0,435,436,7,1,0,0,436,437,7,4,0,0,437, + 438,7,16,0,0,438,439,7,10,0,0,439,440,7,11,0,0,440,24,1,0,0,0,441,442, + 7,1,0,0,442,443,7,9,0,0,443,444,7,6,0,0,444,445,7,3,0,0,445,446,7,17,0, + 0,446,26,1,0,0,0,447,448,7,1,0,0,448,449,7,6,0,0,449,450,7,12,0,0,450, + 451,7,15,0,0,451,28,1,0,0,0,452,453,7,1,0,0,453,454,7,5,0,0,454,455,7, + 4,0,0,455,456,7,0,0,0,456,457,7,17,0,0,457,30,1,0,0,0,458,459,7,1,0,0, + 459,460,7,14,0,0,460,461,7,7,0,0,461,462,7,7,0,0,462,463,7,4,0,0,463,464, + 7,5,0,0,464,32,1,0,0,0,465,466,7,1,0,0,466,467,7,14,0,0,467,468,7,2,0, + 0,468,34,1,0,0,0,469,470,7,3,0,0,470,471,7,0,0,0,471,472,7,2,0,0,472,473, + 7,4,0,0,473,36,1,0,0,0,474,475,7,3,0,0,475,476,7,6,0,0,476,477,7,18,0, + 0,477,478,7,19,0,0,478,479,7,6,0,0,479,480,7,11,0,0,480,481,7,4,0,0,481, + 482,7,11,0,0,482,483,7,8,0,0,483,38,1,0,0,0,484,485,7,3,0,0,485,486,7, + 6,0,0,486,487,7,11,0,0,487,488,7,7,0,0,488,489,7,10,0,0,489,490,7,16,0, + 0,490,491,7,14,0,0,491,492,7,5,0,0,492,493,7,0,0,0,493,494,7,8,0,0,494, + 495,7,10,0,0,495,496,7,6,0,0,496,497,7,11,0,0,497,40,1,0,0,0,498,499,7, + 3,0,0,499,500,7,6,0,0,500,501,7,11,0,0,501,502,7,2,0,0,502,503,7,8,0,0, + 503,504,7,0,0,0,504,505,7,11,0,0,505,506,7,8,0,0,506,42,1,0,0,0,507,508, + 7,3,0,0,508,509,7,6,0,0,509,510,7,11,0,0,510,511,7,8,0,0,511,512,7,4,0, + 0,512,513,7,20,0,0,513,514,7,8,0,0,514,44,1,0,0,0,515,516,7,12,0,0,516, + 517,7,4,0,0,517,518,7,7,0,0,518,519,7,0,0,0,519,520,7,14,0,0,520,521,7, + 9,0,0,521,522,7,8,0,0,522,46,1,0,0,0,523,524,7,12,0,0,524,525,7,10,0,0, + 525,526,7,2,0,0,526,527,7,3,0,0,527,528,7,6,0,0,528,529,7,11,0,0,529,530, + 7,11,0,0,530,531,7,4,0,0,531,532,7,3,0,0,532,533,7,8,0,0,533,48,1,0,0, + 0,534,535,7,12,0,0,535,536,7,6,0,0,536,537,7,21,0,0,537,538,7,11,0,0,538, + 539,7,8,0,0,539,540,7,6,0,0,540,50,1,0,0,0,541,542,7,4,0,0,542,543,7,11, + 0,0,543,544,7,12,0,0,544,52,1,0,0,0,545,546,7,4,0,0,546,547,7,11,0,0,547, + 548,7,8,0,0,548,549,7,10,0,0,549,550,7,8,0,0,550,551,7,15,0,0,551,54,1, + 0,0,0,552,553,7,4,0,0,553,554,7,9,0,0,554,555,7,2,0,0,555,556,7,4,0,0, + 556,56,1,0,0,0,557,558,7,4,0,0,558,559,7,9,0,0,559,560,7,2,0,0,560,561, + 7,10,0,0,561,562,7,7,0,0,562,58,1,0,0,0,563,564,7,4,0,0,564,565,7,20,0, + 0,565,566,7,10,0,0,566,567,7,8,0,0,567,60,1,0,0,0,568,569,7,7,0,0,569, + 570,7,10,0,0,570,571,7,9,0,0,571,572,7,4,0,0,572,62,1,0,0,0,573,574,7, + 7,0,0,574,575,7,6,0,0,575,576,7,5,0,0,576,64,1,0,0,0,577,578,7,7,0,0,578, + 579,7,6,0,0,579,580,7,5,0,0,580,581,7,3,0,0,581,582,7,4,0,0,582,66,1,0, + 0,0,583,584,7,7,0,0,584,585,7,14,0,0,585,586,7,11,0,0,586,587,7,3,0,0, + 587,588,7,8,0,0,588,589,7,10,0,0,589,590,7,6,0,0,590,591,7,11,0,0,591, + 68,1,0,0,0,592,593,7,16,0,0,593,594,7,4,0,0,594,595,7,11,0,0,595,596,7, + 4,0,0,596,597,7,5,0,0,597,598,7,0,0,0,598,599,7,8,0,0,599,600,7,4,0,0, + 600,70,1,0,0,0,601,602,7,16,0,0,602,603,7,4,0,0,603,604,7,11,0,0,604,605, + 7,4,0,0,605,606,7,5,0,0,606,607,7,10,0,0,607,608,7,3,0,0,608,72,1,0,0, + 0,609,610,7,16,0,0,610,611,7,5,0,0,611,612,7,6,0,0,612,613,7,14,0,0,613, + 614,7,19,0,0,614,74,1,0,0,0,615,616,7,16,0,0,616,617,7,14,0,0,617,618, + 7,0,0,0,618,619,7,5,0,0,619,620,7,12,0,0,620,621,7,4,0,0,621,622,7,12, + 0,0,622,76,1,0,0,0,623,624,7,10,0,0,624,625,7,7,0,0,625,78,1,0,0,0,626, + 627,7,10,0,0,627,628,7,18,0,0,628,629,7,19,0,0,629,630,7,14,0,0,630,631, + 7,5,0,0,631,632,7,4,0,0,632,80,1,0,0,0,633,634,7,10,0,0,634,635,7,11,0, + 0,635,82,1,0,0,0,636,637,7,10,0,0,637,638,7,11,0,0,638,639,7,4,0,0,639, + 640,7,5,0,0,640,641,7,8,0,0,641,642,7,10,0,0,642,643,7,0,0,0,643,644,7, + 9,0,0,644,84,1,0,0,0,645,646,7,10,0,0,646,647,7,11,0,0,647,648,7,6,0,0, + 648,649,7,14,0,0,649,650,7,8,0,0,650,86,1,0,0,0,651,652,7,10,0,0,652,653, + 7,2,0,0,653,88,1,0,0,0,654,655,7,9,0,0,655,656,7,0,0,0,656,657,7,1,0,0, + 657,658,7,4,0,0,658,659,7,9,0,0,659,90,1,0,0,0,660,661,7,9,0,0,661,662, + 7,10,0,0,662,663,7,1,0,0,663,664,7,5,0,0,664,665,7,0,0,0,665,666,7,5,0, + 0,666,667,7,15,0,0,667,92,1,0,0,0,668,669,7,9,0,0,669,670,7,10,0,0,670, + 671,7,18,0,0,671,672,7,10,0,0,672,673,7,8,0,0,673,94,1,0,0,0,674,675,7, + 9,0,0,675,676,7,10,0,0,676,677,7,11,0,0,677,678,7,17,0,0,678,679,7,0,0, + 0,679,680,7,16,0,0,680,681,7,4,0,0,681,96,1,0,0,0,682,683,7,9,0,0,683, + 684,7,10,0,0,684,685,7,8,0,0,685,686,7,4,0,0,686,687,7,5,0,0,687,688,7, + 0,0,0,688,689,7,9,0,0,689,98,1,0,0,0,690,691,7,9,0,0,691,692,7,6,0,0,692, + 693,7,6,0,0,693,694,7,19,0,0,694,100,1,0,0,0,695,696,7,18,0,0,696,697, + 7,0,0,0,697,698,7,19,0,0,698,102,1,0,0,0,699,700,7,18,0,0,700,701,7,6, + 0,0,701,702,7,12,0,0,702,104,1,0,0,0,703,704,7,11,0,0,704,705,7,0,0,0, + 705,706,7,11,0,0,706,707,7,12,0,0,707,106,1,0,0,0,708,709,7,11,0,0,709, + 710,7,0,0,0,710,711,7,8,0,0,711,712,7,14,0,0,712,713,7,5,0,0,713,714,7, + 4,0,0,714,108,1,0,0,0,715,716,7,11,0,0,716,717,7,4,0,0,717,718,7,21,0, + 0,718,110,1,0,0,0,719,720,7,11,0,0,720,721,7,4,0,0,721,722,7,20,0,0,722, + 723,7,8,0,0,723,112,1,0,0,0,724,725,7,11,0,0,725,726,7,6,0,0,726,727,7, + 10,0,0,727,728,7,2,0,0,728,729,7,4,0,0,729,114,1,0,0,0,730,731,7,11,0, + 0,731,732,7,6,0,0,732,733,7,5,0,0,733,116,1,0,0,0,734,735,7,11,0,0,735, + 736,7,6,0,0,736,737,7,8,0,0,737,118,1,0,0,0,738,739,7,11,0,0,739,740,7, + 14,0,0,740,741,7,9,0,0,741,742,7,9,0,0,742,120,1,0,0,0,743,744,7,6,0,0, + 744,745,7,7,0,0,745,122,1,0,0,0,746,747,7,6,0,0,747,748,7,11,0,0,748,124, + 1,0,0,0,749,750,7,6,0,0,750,751,7,19,0,0,751,752,7,4,0,0,752,753,7,11, + 0,0,753,126,1,0,0,0,754,755,7,6,0,0,755,756,7,5,0,0,756,128,1,0,0,0,757, + 758,7,6,0,0,758,759,7,8,0,0,759,760,7,13,0,0,760,761,7,4,0,0,761,762,7, + 5,0,0,762,763,7,2,0,0,763,130,1,0,0,0,764,765,7,6,0,0,765,766,7,14,0,0, + 766,767,7,8,0,0,767,132,1,0,0,0,768,769,7,19,0,0,769,770,7,0,0,0,770,771, + 7,3,0,0,771,772,7,17,0,0,772,773,7,0,0,0,773,774,7,16,0,0,774,775,7,4, + 0,0,775,134,1,0,0,0,776,777,7,19,0,0,777,778,7,0,0,0,778,779,7,5,0,0,779, + 780,7,0,0,0,780,781,7,18,0,0,781,782,7,4,0,0,782,783,7,8,0,0,783,784,7, + 4,0,0,784,785,7,5,0,0,785,136,1,0,0,0,786,787,7,19,0,0,787,788,7,6,0,0, + 788,789,7,5,0,0,789,790,7,8,0,0,790,138,1,0,0,0,791,792,7,19,0,0,792,793, + 7,6,0,0,793,794,7,2,0,0,794,795,7,8,0,0,795,796,7,19,0,0,796,797,7,6,0, + 0,797,798,7,11,0,0,798,799,7,4,0,0,799,800,7,12,0,0,800,140,1,0,0,0,801, + 802,7,19,0,0,802,803,7,5,0,0,803,804,7,6,0,0,804,805,7,3,0,0,805,806,7, + 4,0,0,806,807,7,2,0,0,807,808,7,2,0,0,808,142,1,0,0,0,809,810,7,19,0,0, + 810,811,7,5,0,0,811,812,7,6,0,0,812,813,7,3,0,0,813,814,7,4,0,0,814,815, + 7,12,0,0,815,816,7,14,0,0,816,817,7,5,0,0,817,818,7,4,0,0,818,144,1,0, + 0,0,819,820,7,19,0,0,820,821,7,5,0,0,821,822,7,6,0,0,822,823,7,3,0,0,823, + 824,7,4,0,0,824,825,7,12,0,0,825,826,7,14,0,0,826,827,7,5,0,0,827,828, + 7,0,0,0,828,829,7,9,0,0,829,146,1,0,0,0,830,831,7,19,0,0,831,832,7,5,0, + 0,832,833,7,6,0,0,833,834,7,8,0,0,834,835,7,4,0,0,835,836,7,3,0,0,836, + 837,7,8,0,0,837,838,7,4,0,0,838,839,7,12,0,0,839,148,1,0,0,0,840,841,7, + 19,0,0,841,842,7,14,0,0,842,843,7,5,0,0,843,844,7,4,0,0,844,150,1,0,0, + 0,845,846,7,22,0,0,846,847,7,14,0,0,847,848,7,0,0,0,848,849,7,11,0,0,849, + 850,7,8,0,0,850,851,7,10,0,0,851,852,7,8,0,0,852,853,7,15,0,0,853,152, + 1,0,0,0,854,855,7,5,0,0,855,856,7,0,0,0,856,857,7,11,0,0,857,858,7,16, + 0,0,858,859,7,4,0,0,859,154,1,0,0,0,860,861,7,5,0,0,861,862,7,4,0,0,862, + 863,7,9,0,0,863,864,7,4,0,0,864,865,7,0,0,0,865,866,7,2,0,0,866,867,7, + 4,0,0,867,156,1,0,0,0,868,869,7,5,0,0,869,870,7,4,0,0,870,871,7,23,0,0, + 871,872,7,4,0,0,872,873,7,5,0,0,873,874,7,2,0,0,874,875,7,4,0,0,875,876, + 5,95,0,0,876,877,7,5,0,0,877,878,7,0,0,0,878,879,7,11,0,0,879,880,7,16, + 0,0,880,881,7,4,0,0,881,158,1,0,0,0,882,883,7,5,0,0,883,884,7,4,0,0,884, + 885,7,24,0,0,885,886,7,4,0,0,886,887,7,3,0,0,887,888,7,8,0,0,888,160,1, + 0,0,0,889,890,7,5,0,0,890,891,7,4,0,0,891,892,7,18,0,0,892,162,1,0,0,0, + 893,894,7,5,0,0,894,895,7,4,0,0,895,896,7,3,0,0,896,897,7,6,0,0,897,898, + 7,5,0,0,898,899,7,12,0,0,899,164,1,0,0,0,900,901,7,5,0,0,901,902,7,4,0, + 0,902,903,7,7,0,0,903,904,7,4,0,0,904,905,7,5,0,0,905,906,7,4,0,0,906, + 907,7,11,0,0,907,908,7,3,0,0,908,909,7,4,0,0,909,166,1,0,0,0,910,911,7, + 5,0,0,911,912,7,4,0,0,912,913,7,16,0,0,913,914,7,10,0,0,914,915,7,2,0, + 0,915,916,7,8,0,0,916,917,7,4,0,0,917,918,7,5,0,0,918,168,1,0,0,0,919, + 920,7,5,0,0,920,921,7,4,0,0,921,922,7,19,0,0,922,923,7,6,0,0,923,924,7, + 5,0,0,924,925,7,8,0,0,925,170,1,0,0,0,926,927,7,5,0,0,927,928,7,4,0,0, + 928,929,7,8,0,0,929,930,7,14,0,0,930,931,7,5,0,0,931,932,7,11,0,0,932, + 172,1,0,0,0,933,934,7,5,0,0,934,935,7,6,0,0,935,936,7,9,0,0,936,174,1, + 0,0,0,937,938,7,5,0,0,938,939,7,6,0,0,939,940,7,5,0,0,940,176,1,0,0,0, + 941,942,7,2,0,0,942,943,7,4,0,0,943,944,7,9,0,0,944,945,7,4,0,0,945,946, + 7,3,0,0,946,947,7,8,0,0,947,178,1,0,0,0,948,949,7,2,0,0,949,950,7,4,0, + 0,950,951,7,23,0,0,951,952,7,4,0,0,952,953,7,5,0,0,953,954,7,10,0,0,954, + 955,7,8,0,0,955,956,7,15,0,0,956,180,1,0,0,0,957,958,7,2,0,0,958,959,7, + 13,0,0,959,960,7,0,0,0,960,961,7,5,0,0,961,962,7,4,0,0,962,963,7,12,0, + 0,963,182,1,0,0,0,964,965,7,2,0,0,965,966,7,10,0,0,966,967,7,16,0,0,967, + 968,7,11,0,0,968,969,7,0,0,0,969,970,7,9,0,0,970,184,1,0,0,0,971,972,7, + 2,0,0,972,973,7,9,0,0,973,974,7,0,0,0,974,186,1,0,0,0,975,976,7,2,0,0, + 976,977,7,9,0,0,977,978,7,9,0,0,978,188,1,0,0,0,979,980,7,2,0,0,980,981, + 7,19,0,0,981,982,7,4,0,0,982,983,7,3,0,0,983,984,7,8,0,0,984,985,7,5,0, + 0,985,986,7,14,0,0,986,987,7,18,0,0,987,190,1,0,0,0,988,989,7,2,0,0,989, + 990,7,5,0,0,990,991,7,0,0,0,991,192,1,0,0,0,992,993,7,2,0,0,993,994,7, + 5,0,0,994,995,7,9,0,0,995,194,1,0,0,0,996,997,7,2,0,0,997,998,7,14,0,0, + 998,999,7,1,0,0,999,1000,7,11,0,0,1000,1001,7,0,0,0,1001,1002,7,8,0,0, + 1002,1003,7,14,0,0,1003,1004,7,5,0,0,1004,1005,7,4,0,0,1005,196,1,0,0, + 0,1006,1007,7,2,0,0,1007,1008,7,14,0,0,1008,1009,7,1,0,0,1009,1010,7,8, + 0,0,1010,1011,7,15,0,0,1011,1012,7,19,0,0,1012,1013,7,4,0,0,1013,198,1, + 0,0,0,1014,1015,7,8,0,0,1015,1016,7,4,0,0,1016,1017,7,5,0,0,1017,1018, + 7,18,0,0,1018,1019,7,10,0,0,1019,1020,7,11,0,0,1020,1021,7,0,0,0,1021, + 1022,7,9,0,0,1022,200,1,0,0,0,1023,1024,7,8,0,0,1024,1025,7,13,0,0,1025, + 1026,7,4,0,0,1026,1027,7,11,0,0,1027,202,1,0,0,0,1028,1029,7,8,0,0,1029, + 1030,7,13,0,0,1030,1031,7,5,0,0,1031,1032,7,6,0,0,1032,1033,7,14,0,0,1033, + 1034,7,16,0,0,1034,1035,7,13,0,0,1035,204,1,0,0,0,1036,1037,7,8,0,0,1037, + 1038,7,6,0,0,1038,206,1,0,0,0,1039,1040,7,8,0,0,1040,1041,7,6,0,0,1041, + 1042,7,9,0,0,1042,1043,7,4,0,0,1043,1044,7,5,0,0,1044,1045,7,0,0,0,1045, + 1046,7,11,0,0,1046,1047,7,3,0,0,1047,1048,7,4,0,0,1048,208,1,0,0,0,1049, + 1050,7,8,0,0,1050,1051,7,5,0,0,1051,1052,7,0,0,0,1052,1053,7,11,0,0,1053, + 1054,7,2,0,0,1054,1055,7,19,0,0,1055,1056,7,6,0,0,1056,1057,7,5,0,0,1057, + 1058,7,8,0,0,1058,210,1,0,0,0,1059,1060,7,8,0,0,1060,1061,7,15,0,0,1061, + 1062,7,19,0,0,1062,1063,7,4,0,0,1063,212,1,0,0,0,1064,1065,7,14,0,0,1065, + 1066,7,11,0,0,1066,1067,7,0,0,0,1067,1068,7,7,0,0,1068,1069,7,7,0,0,1069, + 1070,7,4,0,0,1070,1071,7,3,0,0,1071,1072,7,8,0,0,1072,1073,7,4,0,0,1073, + 1074,7,12,0,0,1074,214,1,0,0,0,1075,1076,7,14,0,0,1076,1077,7,11,0,0,1077, + 1078,7,10,0,0,1078,1079,7,8,0,0,1079,1080,7,2,0,0,1080,216,1,0,0,0,1081, + 1082,7,14,0,0,1082,1083,7,11,0,0,1083,1084,7,8,0,0,1084,1085,7,10,0,0, + 1085,1086,7,9,0,0,1086,218,1,0,0,0,1087,1088,7,14,0,0,1088,1089,7,2,0, + 0,1089,1090,7,4,0,0,1090,220,1,0,0,0,1091,1092,7,23,0,0,1092,1093,7,0, + 0,0,1093,1094,7,5,0,0,1094,1095,7,10,0,0,1095,1096,7,0,0,0,1096,1097,7, + 1,0,0,1097,1098,7,9,0,0,1098,1099,7,4,0,0,1099,222,1,0,0,0,1100,1101,7, + 21,0,0,1101,1102,7,0,0,0,1102,1103,7,10,0,0,1103,1104,7,8,0,0,1104,224, + 1,0,0,0,1105,1106,7,21,0,0,1106,1107,7,10,0,0,1107,1108,7,8,0,0,1108,1109, + 7,13,0,0,1109,226,1,0,0,0,1110,1111,7,21,0,0,1111,1112,7,13,0,0,1112,1113, + 7,4,0,0,1113,1114,7,11,0,0,1114,228,1,0,0,0,1115,1116,7,21,0,0,1116,1117, + 7,13,0,0,1117,1118,7,10,0,0,1118,1119,7,9,0,0,1119,1120,7,4,0,0,1120,230, + 1,0,0,0,1121,1122,7,20,0,0,1122,1123,7,11,0,0,1123,1124,7,6,0,0,1124,1125, + 7,5,0,0,1125,232,1,0,0,0,1126,1127,7,20,0,0,1127,1128,7,6,0,0,1128,1129, + 7,5,0,0,1129,234,1,0,0,0,1130,1134,3,349,174,0,1131,1132,3,339,169,0,1132, + 1133,3,349,174,0,1133,1135,1,0,0,0,1134,1131,1,0,0,0,1134,1135,1,0,0,0, + 1135,1137,1,0,0,0,1136,1138,3,345,172,0,1137,1136,1,0,0,0,1137,1138,1, + 0,0,0,1138,236,1,0,0,0,1139,1146,5,34,0,0,1140,1145,8,25,0,0,1141,1145, + 5,39,0,0,1142,1143,5,34,0,0,1143,1145,5,34,0,0,1144,1140,1,0,0,0,1144, + 1141,1,0,0,0,1144,1142,1,0,0,0,1145,1148,1,0,0,0,1146,1144,1,0,0,0,1146, + 1147,1,0,0,0,1147,1149,1,0,0,0,1148,1146,1,0,0,0,1149,1150,5,34,0,0,1150, + 238,1,0,0,0,1151,1152,3,349,174,0,1152,1153,3,297,148,0,1153,1157,3,353, + 176,0,1154,1155,3,339,169,0,1155,1156,3,353,176,0,1156,1158,1,0,0,0,1157, + 1154,1,0,0,0,1157,1158,1,0,0,0,1158,1159,1,0,0,0,1159,1161,3,297,148,0, + 1160,1162,3,345,172,0,1161,1160,1,0,0,0,1161,1162,1,0,0,0,1162,240,1,0, + 0,0,1163,1167,3,243,121,0,1164,1167,3,245,122,0,1165,1167,3,247,123,0, + 1166,1163,1,0,0,0,1166,1164,1,0,0,0,1166,1165,1,0,0,0,1167,242,1,0,0,0, + 1168,1169,7,1,0,0,1169,1170,5,34,0,0,1170,1172,1,0,0,0,1171,1173,7,26, + 0,0,1172,1171,1,0,0,0,1173,1174,1,0,0,0,1174,1172,1,0,0,0,1174,1175,1, + 0,0,0,1175,1176,1,0,0,0,1176,1177,5,34,0,0,1177,244,1,0,0,0,1178,1179, + 7,6,0,0,1179,1180,5,34,0,0,1180,1182,1,0,0,0,1181,1183,7,27,0,0,1182,1181, + 1,0,0,0,1183,1184,1,0,0,0,1184,1182,1,0,0,0,1184,1185,1,0,0,0,1185,1186, + 1,0,0,0,1186,1187,5,34,0,0,1187,246,1,0,0,0,1188,1189,7,20,0,0,1189,1190, + 5,34,0,0,1190,1192,1,0,0,0,1191,1193,7,28,0,0,1192,1191,1,0,0,0,1193,1194, + 1,0,0,0,1194,1192,1,0,0,0,1194,1195,1,0,0,0,1195,1196,1,0,0,0,1196,1197, + 5,34,0,0,1197,248,1,0,0,0,1198,1208,3,253,126,0,1199,1202,5,95,0,0,1200, + 1203,3,253,126,0,1201,1203,3,351,175,0,1202,1200,1,0,0,0,1202,1201,1,0, + 0,0,1203,1207,1,0,0,0,1204,1207,3,253,126,0,1205,1207,3,351,175,0,1206, + 1199,1,0,0,0,1206,1204,1,0,0,0,1206,1205,1,0,0,0,1207,1210,1,0,0,0,1208, + 1206,1,0,0,0,1208,1209,1,0,0,0,1209,250,1,0,0,0,1210,1208,1,0,0,0,1211, + 1216,5,92,0,0,1212,1217,3,253,126,0,1213,1217,7,29,0,0,1214,1217,3,269, + 134,0,1215,1217,7,30,0,0,1216,1212,1,0,0,0,1216,1213,1,0,0,0,1216,1214, + 1,0,0,0,1216,1215,1,0,0,0,1217,1218,1,0,0,0,1218,1216,1,0,0,0,1218,1219, + 1,0,0,0,1219,1220,1,0,0,0,1220,1221,5,92,0,0,1221,252,1,0,0,0,1222,1223, + 7,31,0,0,1223,254,1,0,0,0,1224,1225,5,47,0,0,1225,1226,5,42,0,0,1226,1230, + 1,0,0,0,1227,1229,9,0,0,0,1228,1227,1,0,0,0,1229,1232,1,0,0,0,1230,1231, + 1,0,0,0,1230,1228,1,0,0,0,1231,1233,1,0,0,0,1232,1230,1,0,0,0,1233,1234, + 5,42,0,0,1234,1235,5,47,0,0,1235,1236,1,0,0,0,1236,1237,6,127,0,0,1237, + 256,1,0,0,0,1238,1239,5,45,0,0,1239,1240,5,45,0,0,1240,1244,1,0,0,0,1241, + 1243,8,32,0,0,1242,1241,1,0,0,0,1243,1246,1,0,0,0,1244,1242,1,0,0,0,1244, + 1245,1,0,0,0,1245,1247,1,0,0,0,1246,1244,1,0,0,0,1247,1248,6,128,0,0,1248, + 258,1,0,0,0,1249,1251,5,9,0,0,1250,1249,1,0,0,0,1251,1252,1,0,0,0,1252, + 1250,1,0,0,0,1252,1253,1,0,0,0,1253,1254,1,0,0,0,1254,1255,6,129,0,0,1255, + 260,1,0,0,0,1256,1258,5,32,0,0,1257,1256,1,0,0,0,1258,1259,1,0,0,0,1259, + 1257,1,0,0,0,1259,1260,1,0,0,0,1260,1261,1,0,0,0,1261,1262,6,130,0,0,1262, + 262,1,0,0,0,1263,1264,5,10,0,0,1264,1265,1,0,0,0,1265,1266,6,131,0,0,1266, + 264,1,0,0,0,1267,1268,5,13,0,0,1268,1269,1,0,0,0,1269,1270,6,132,0,0,1270, + 266,1,0,0,0,1271,1272,3,357,178,0,1272,1273,9,0,0,0,1273,1274,3,357,178, + 0,1274,268,1,0,0,0,1275,1276,7,33,0,0,1276,270,1,0,0,0,1277,1278,5,42, + 0,0,1278,1279,5,42,0,0,1279,272,1,0,0,0,1280,1281,5,63,0,0,1281,1282,5, + 63,0,0,1282,274,1,0,0,0,1283,1284,5,63,0,0,1284,1285,5,61,0,0,1285,276, + 1,0,0,0,1286,1287,5,63,0,0,1287,1288,5,47,0,0,1288,1289,7,4,0,0,1289,278, + 1,0,0,0,1290,1291,5,63,0,0,1291,1292,5,60,0,0,1292,1293,5,61,0,0,1293, + 280,1,0,0,0,1294,1295,5,63,0,0,1295,1296,5,60,0,0,1296,282,1,0,0,0,1297, + 1298,5,63,0,0,1298,1299,5,62,0,0,1299,1300,5,61,0,0,1300,284,1,0,0,0,1301, + 1302,5,63,0,0,1302,1303,5,62,0,0,1303,286,1,0,0,0,1304,1305,5,61,0,0,1305, + 1306,5,61,0,0,1306,288,1,0,0,0,1307,1308,5,64,0,0,1308,290,1,0,0,0,1309, + 1310,5,60,0,0,1310,1311,5,61,0,0,1311,292,1,0,0,0,1312,1313,5,62,0,0,1313, + 1314,5,61,0,0,1314,294,1,0,0,0,1315,1316,5,61,0,0,1316,1317,5,62,0,0,1317, + 296,1,0,0,0,1318,1319,5,35,0,0,1319,298,1,0,0,0,1320,1321,5,47,0,0,1321, + 1322,5,61,0,0,1322,300,1,0,0,0,1323,1324,5,58,0,0,1324,1325,5,61,0,0,1325, + 302,1,0,0,0,1326,1327,5,60,0,0,1327,1328,5,62,0,0,1328,304,1,0,0,0,1329, + 1330,5,34,0,0,1330,306,1,0,0,0,1331,1332,5,59,0,0,1332,308,1,0,0,0,1333, + 1334,5,44,0,0,1334,310,1,0,0,0,1335,1336,5,38,0,0,1336,312,1,0,0,0,1337, + 1338,5,40,0,0,1338,314,1,0,0,0,1339,1340,5,41,0,0,1340,316,1,0,0,0,1341, + 1342,5,91,0,0,1342,318,1,0,0,0,1343,1344,5,93,0,0,1344,320,1,0,0,0,1345, + 1346,5,58,0,0,1346,322,1,0,0,0,1347,1348,5,42,0,0,1348,324,1,0,0,0,1349, + 1350,5,47,0,0,1350,326,1,0,0,0,1351,1352,5,43,0,0,1352,328,1,0,0,0,1353, + 1354,5,45,0,0,1354,330,1,0,0,0,1355,1356,5,60,0,0,1356,332,1,0,0,0,1357, + 1358,5,62,0,0,1358,334,1,0,0,0,1359,1360,5,61,0,0,1360,336,1,0,0,0,1361, + 1362,5,124,0,0,1362,338,1,0,0,0,1363,1364,5,46,0,0,1364,340,1,0,0,0,1365, + 1366,5,92,0,0,1366,342,1,0,0,0,1367,1368,5,96,0,0,1368,344,1,0,0,0,1369, + 1371,7,4,0,0,1370,1372,7,34,0,0,1371,1370,1,0,0,0,1371,1372,1,0,0,0,1372, + 1373,1,0,0,0,1373,1377,3,349,174,0,1374,1375,3,339,169,0,1375,1376,3,349, + 174,0,1376,1378,1,0,0,0,1377,1374,1,0,0,0,1377,1378,1,0,0,0,1378,346,1, + 0,0,0,1379,1380,7,35,0,0,1380,348,1,0,0,0,1381,1386,3,351,175,0,1382,1385, + 5,95,0,0,1383,1385,3,351,175,0,1384,1382,1,0,0,0,1384,1383,1,0,0,0,1385, + 1388,1,0,0,0,1386,1384,1,0,0,0,1386,1387,1,0,0,0,1387,350,1,0,0,0,1388, + 1386,1,0,0,0,1389,1390,2,48,57,0,1390,352,1,0,0,0,1391,1396,3,355,177, + 0,1392,1395,5,95,0,0,1393,1395,3,355,177,0,1394,1392,1,0,0,0,1394,1393, + 1,0,0,0,1395,1398,1,0,0,0,1396,1394,1,0,0,0,1396,1397,1,0,0,0,1397,354, + 1,0,0,0,1398,1396,1,0,0,0,1399,1402,3,351,175,0,1400,1402,3,253,126,0, + 1401,1399,1,0,0,0,1401,1400,1,0,0,0,1402,356,1,0,0,0,1403,1404,5,39,0, + 0,1404,358,1,0,0,0,1405,1406,5,63,0,0,1406,360,1,0,0,0,27,0,1134,1137, + 1144,1146,1157,1161,1166,1174,1184,1194,1202,1206,1208,1216,1218,1230, + 1244,1252,1259,1371,1377,1384,1386,1394,1396,1401,1,6,0,0 + }; + + public static readonly ATN _ATN = + new ATNDeserializer().Deserialize(_serializedATN); + + +} +} // namespace ApiMark.Vhdl.VhdlAst.Antlr diff --git a/src/ApiMark.Vhdl/VhdlAst/Antlr/vhdl2008Lexer.interp b/src/ApiMark.Vhdl/VhdlAst/Antlr/vhdl2008Lexer.interp new file mode 100644 index 0000000..8c71d9d --- /dev/null +++ b/src/ApiMark.Vhdl/VhdlAst/Antlr/vhdl2008Lexer.interp @@ -0,0 +1,557 @@ +token literal names: +null +'ABS' +'ACCESS' +'ACROSS' +'AFTER' +'ALIAS' +'ALL' +'AND' +'ARCHITECTURE' +'ARRAY' +'ASSERT' +'ATTRIBUTE' +'BEGIN' +'BLOCK' +'BODY' +'BREAK' +'BUFFER' +'BUS' +'CASE' +'COMPONENT' +'CONFIGURATION' +'CONSTANT' +'CONTEXT' +'DEFAULT' +'DISCONNECT' +'DOWNTO' +'END' +'ENTITY' +'ELSE' +'ELSIF' +'EXIT' +'FILE' +'FOR' +'FORCE' +'FUNCTION' +'GENERATE' +'GENERIC' +'GROUP' +'GUARDED' +'IF' +'IMPURE' +'IN' +'INERTIAL' +'INOUT' +'IS' +'LABEL' +'LIBRARY' +'LIMIT' +'LINKAGE' +'LITERAL' +'LOOP' +'MAP' +'MOD' +'NAND' +'NATURE' +'NEW' +'NEXT' +'NOISE' +'NOR' +'NOT' +'NULL' +'OF' +'ON' +'OPEN' +'OR' +'OTHERS' +'OUT' +'PACKAGE' +'PARAMETER' +'PORT' +'POSTPONED' +'PROCESS' +'PROCEDURE' +'PROCEDURAL' +'PROTECTED' +'PURE' +'QUANTITY' +'RANGE' +'RELEASE' +'REVERSE_RANGE' +'REJECT' +'REM' +'RECORD' +'REFERENCE' +'REGISTER' +'REPORT' +'RETURN' +'ROL' +'ROR' +'SELECT' +'SEVERITY' +'SHARED' +'SIGNAL' +'SLA' +'SLL' +'SPECTRUM' +'SRA' +'SRL' +'SUBNATURE' +'SUBTYPE' +'TERMINAL' +'THEN' +'THROUGH' +'TO' +'TOLERANCE' +'TRANSPORT' +'TYPE' +'UNAFFECTED' +'UNITS' +'UNTIL' +'USE' +'VARIABLE' +'WAIT' +'WITH' +'WHEN' +'WHILE' +'XNOR' +'XOR' +null +null +null +null +null +null +null +null +null +null +null +null +null +null +'\n' +'\r' +null +null +'**' +'??' +'?=' +'?/E' +'?<=' +'?<' +'?>=' +'?>' +'==' +'@' +'<=' +'>=' +'=>' +'#' +'/=' +':=' +'<>' +'"' +';' +',' +'&' +'(' +')' +'[' +']' +':' +'*' +'/' +'+' +'-' +'<' +'>' +'=' +'|' +'.' +'\\' +'`' +null +null +null +null +null +null +'\'' +'?' + +token symbolic names: +null +ABS +ACCESS +ACROSS +AFTER +ALIAS +ALL +AND +ARCHITECTURE +ARRAY +ASSERT +ATTRIBUTE +BEGIN +BLOCK +BODY +BREAK +BUFFER +BUS +CASE +COMPONENT +CONFIGURATION +CONSTANT +CONTEXT +DEFAULT +DISCONNECT +DOWNTO +END +ENTITY +ELSE +ELSIF +EXIT +FILE +FOR +FORCE +FUNCTION +GENERATE +GENERIC +GROUP +GUARDED +IF +IMPURE +IN +INERTIAL +INOUT +IS +LABEL +LIBRARY +LIMIT +LINKAGE +LITERAL +LOOP +MAP +MOD +NAND +NATURE +NEW +NEXT +NOISE +NOR +NOT +NULL_ +OF +ON +OPEN +OR +OTHERS +OUT +PACKAGE +PARAMETER +PORT +POSTPONED +PROCESS +PROCEDURE +PROCEDURAL +PROTECTED +PURE +QUANTITY +RANGE +RELEASE +REVERSE_RANGE +REJECT +REM +RECORD +REFERENCE +REGISTER +REPORT +RETURN +ROL +ROR +SELECT +SEVERITY +SHARED +SIGNAL +SLA +SLL +SPECTRUM +SRA +SRL +SUBNATURE +SUBTYPE +TERMINAL +THEN +THROUGH +TO +TOLERANCE +TRANSPORT +TYPE +UNAFFECTED +UNITS +UNTIL +USE +VARIABLE +WAIT +WITH +WHEN +WHILE +XNOR +XOR +DECIMAL_LITERAL +STRING_LITERAL +BASED_LITERAL +BIT_STRING_LITERAL +BIT_STRING_LITERAL_BINARY +BIT_STRING_LITERAL_OCTAL +BIT_STRING_LITERAL_HEX +BASIC_IDENTIFIER +EXTENDED_IDENTIFIER +LETTER +BLOCK_COMMENT +COMMENT +TAB +SPACE +NEWLINE +CR +CHARACTER_LITERAL +OTHER_SPECIAL_CHARACTER +DOUBLESTAR +CONDITION_OPERATOR +CONDITION_EQ +CONDITION_NEQ +CONDITION_LEQ +CONDITION_LESSTHAN +CONDITION_GEQ +CONDITION_GREATERTHAN +ASSIGN +AT +LEQ +GEQ +ARROW +HASH +NEQ +WALRUS +BOX +DBLQUOTE +SEMI +COMMA +AMPERSAND +LPAREN +RPAREN +LBRACKET +RBRACKET +COLON +MUL +DIV +PLUS +MINUS +LESSTHAN +GREATERTHAN +EQ +BAR +DOT +BACKSLASH +BACKTICK +EXPONENT +HEXDIGIT +INTEGER +DIGIT +BASED_INTEGER +EXTENDED_DIGIT +APOSTROPHE +QUESTION + +rule names: +ABS +ACCESS +ACROSS +AFTER +ALIAS +ALL +AND +ARCHITECTURE +ARRAY +ASSERT +ATTRIBUTE +BEGIN +BLOCK +BODY +BREAK +BUFFER +BUS +CASE +COMPONENT +CONFIGURATION +CONSTANT +CONTEXT +DEFAULT +DISCONNECT +DOWNTO +END +ENTITY +ELSE +ELSIF +EXIT +FILE +FOR +FORCE +FUNCTION +GENERATE +GENERIC +GROUP +GUARDED +IF +IMPURE +IN +INERTIAL +INOUT +IS +LABEL +LIBRARY +LIMIT +LINKAGE +LITERAL +LOOP +MAP +MOD +NAND +NATURE +NEW +NEXT +NOISE +NOR +NOT +NULL_ +OF +ON +OPEN +OR +OTHERS +OUT +PACKAGE +PARAMETER +PORT +POSTPONED +PROCESS +PROCEDURE +PROCEDURAL +PROTECTED +PURE +QUANTITY +RANGE +RELEASE +REVERSE_RANGE +REJECT +REM +RECORD +REFERENCE +REGISTER +REPORT +RETURN +ROL +ROR +SELECT +SEVERITY +SHARED +SIGNAL +SLA +SLL +SPECTRUM +SRA +SRL +SUBNATURE +SUBTYPE +TERMINAL +THEN +THROUGH +TO +TOLERANCE +TRANSPORT +TYPE +UNAFFECTED +UNITS +UNTIL +USE +VARIABLE +WAIT +WITH +WHEN +WHILE +XNOR +XOR +DECIMAL_LITERAL +STRING_LITERAL +BASED_LITERAL +BIT_STRING_LITERAL +BIT_STRING_LITERAL_BINARY +BIT_STRING_LITERAL_OCTAL +BIT_STRING_LITERAL_HEX +BASIC_IDENTIFIER +EXTENDED_IDENTIFIER +LETTER +BLOCK_COMMENT +COMMENT +TAB +SPACE +NEWLINE +CR +CHARACTER_LITERAL +OTHER_SPECIAL_CHARACTER +DOUBLESTAR +CONDITION_OPERATOR +CONDITION_EQ +CONDITION_NEQ +CONDITION_LEQ +CONDITION_LESSTHAN +CONDITION_GEQ +CONDITION_GREATERTHAN +ASSIGN +AT +LEQ +GEQ +ARROW +HASH +NEQ +WALRUS +BOX +DBLQUOTE +SEMI +COMMA +AMPERSAND +LPAREN +RPAREN +LBRACKET +RBRACKET +COLON +MUL +DIV +PLUS +MINUS +LESSTHAN +GREATERTHAN +EQ +BAR +DOT +BACKSLASH +BACKTICK +EXPONENT +HEXDIGIT +INTEGER +DIGIT +BASED_INTEGER +EXTENDED_DIGIT +APOSTROPHE +QUESTION + +channel names: +DEFAULT_TOKEN_CHANNEL +HIDDEN + +mode names: +DEFAULT_MODE + +atn: +[4, 0, 180, 1407, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, 88, 2, 89, 7, 89, 2, 90, 7, 90, 2, 91, 7, 91, 2, 92, 7, 92, 2, 93, 7, 93, 2, 94, 7, 94, 2, 95, 7, 95, 2, 96, 7, 96, 2, 97, 7, 97, 2, 98, 7, 98, 2, 99, 7, 99, 2, 100, 7, 100, 2, 101, 7, 101, 2, 102, 7, 102, 2, 103, 7, 103, 2, 104, 7, 104, 2, 105, 7, 105, 2, 106, 7, 106, 2, 107, 7, 107, 2, 108, 7, 108, 2, 109, 7, 109, 2, 110, 7, 110, 2, 111, 7, 111, 2, 112, 7, 112, 2, 113, 7, 113, 2, 114, 7, 114, 2, 115, 7, 115, 2, 116, 7, 116, 2, 117, 7, 117, 2, 118, 7, 118, 2, 119, 7, 119, 2, 120, 7, 120, 2, 121, 7, 121, 2, 122, 7, 122, 2, 123, 7, 123, 2, 124, 7, 124, 2, 125, 7, 125, 2, 126, 7, 126, 2, 127, 7, 127, 2, 128, 7, 128, 2, 129, 7, 129, 2, 130, 7, 130, 2, 131, 7, 131, 2, 132, 7, 132, 2, 133, 7, 133, 2, 134, 7, 134, 2, 135, 7, 135, 2, 136, 7, 136, 2, 137, 7, 137, 2, 138, 7, 138, 2, 139, 7, 139, 2, 140, 7, 140, 2, 141, 7, 141, 2, 142, 7, 142, 2, 143, 7, 143, 2, 144, 7, 144, 2, 145, 7, 145, 2, 146, 7, 146, 2, 147, 7, 147, 2, 148, 7, 148, 2, 149, 7, 149, 2, 150, 7, 150, 2, 151, 7, 151, 2, 152, 7, 152, 2, 153, 7, 153, 2, 154, 7, 154, 2, 155, 7, 155, 2, 156, 7, 156, 2, 157, 7, 157, 2, 158, 7, 158, 2, 159, 7, 159, 2, 160, 7, 160, 2, 161, 7, 161, 2, 162, 7, 162, 2, 163, 7, 163, 2, 164, 7, 164, 2, 165, 7, 165, 2, 166, 7, 166, 2, 167, 7, 167, 2, 168, 7, 168, 2, 169, 7, 169, 2, 170, 7, 170, 2, 171, 7, 171, 2, 172, 7, 172, 2, 173, 7, 173, 2, 174, 7, 174, 2, 175, 7, 175, 2, 176, 7, 176, 2, 177, 7, 177, 2, 178, 7, 178, 2, 179, 7, 179, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 60, 1, 60, 1, 60, 1, 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 80, 1, 80, 1, 80, 1, 80, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 86, 1, 86, 1, 86, 1, 86, 1, 87, 1, 87, 1, 87, 1, 87, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 92, 1, 92, 1, 92, 1, 92, 1, 93, 1, 93, 1, 93, 1, 93, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 95, 1, 95, 1, 95, 1, 95, 1, 96, 1, 96, 1, 96, 1, 96, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 98, 1, 98, 1, 98, 1, 98, 1, 98, 1, 98, 1, 98, 1, 98, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 101, 1, 101, 1, 101, 1, 101, 1, 101, 1, 101, 1, 101, 1, 101, 1, 102, 1, 102, 1, 102, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, 1, 106, 1, 106, 1, 106, 1, 106, 1, 106, 1, 106, 1, 106, 1, 106, 1, 106, 1, 106, 1, 106, 1, 107, 1, 107, 1, 107, 1, 107, 1, 107, 1, 107, 1, 108, 1, 108, 1, 108, 1, 108, 1, 108, 1, 108, 1, 109, 1, 109, 1, 109, 1, 109, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 1, 115, 1, 115, 1, 115, 1, 115, 1, 115, 1, 116, 1, 116, 1, 116, 1, 116, 1, 117, 1, 117, 1, 117, 1, 117, 3, 117, 1135, 8, 117, 1, 117, 3, 117, 1138, 8, 117, 1, 118, 1, 118, 1, 118, 1, 118, 1, 118, 5, 118, 1145, 8, 118, 10, 118, 12, 118, 1148, 9, 118, 1, 118, 1, 118, 1, 119, 1, 119, 1, 119, 1, 119, 1, 119, 1, 119, 3, 119, 1158, 8, 119, 1, 119, 1, 119, 3, 119, 1162, 8, 119, 1, 120, 1, 120, 1, 120, 3, 120, 1167, 8, 120, 1, 121, 1, 121, 1, 121, 1, 121, 4, 121, 1173, 8, 121, 11, 121, 12, 121, 1174, 1, 121, 1, 121, 1, 122, 1, 122, 1, 122, 1, 122, 4, 122, 1183, 8, 122, 11, 122, 12, 122, 1184, 1, 122, 1, 122, 1, 123, 1, 123, 1, 123, 1, 123, 4, 123, 1193, 8, 123, 11, 123, 12, 123, 1194, 1, 123, 1, 123, 1, 124, 1, 124, 1, 124, 1, 124, 3, 124, 1203, 8, 124, 1, 124, 1, 124, 5, 124, 1207, 8, 124, 10, 124, 12, 124, 1210, 9, 124, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 4, 125, 1217, 8, 125, 11, 125, 12, 125, 1218, 1, 125, 1, 125, 1, 126, 1, 126, 1, 127, 1, 127, 1, 127, 1, 127, 5, 127, 1229, 8, 127, 10, 127, 12, 127, 1232, 9, 127, 1, 127, 1, 127, 1, 127, 1, 127, 1, 127, 1, 128, 1, 128, 1, 128, 1, 128, 5, 128, 1243, 8, 128, 10, 128, 12, 128, 1246, 9, 128, 1, 128, 1, 128, 1, 129, 4, 129, 1251, 8, 129, 11, 129, 12, 129, 1252, 1, 129, 1, 129, 1, 130, 4, 130, 1258, 8, 130, 11, 130, 12, 130, 1259, 1, 130, 1, 130, 1, 131, 1, 131, 1, 131, 1, 131, 1, 132, 1, 132, 1, 132, 1, 132, 1, 133, 1, 133, 1, 133, 1, 133, 1, 134, 1, 134, 1, 135, 1, 135, 1, 135, 1, 136, 1, 136, 1, 136, 1, 137, 1, 137, 1, 137, 1, 138, 1, 138, 1, 138, 1, 138, 1, 139, 1, 139, 1, 139, 1, 139, 1, 140, 1, 140, 1, 140, 1, 141, 1, 141, 1, 141, 1, 141, 1, 142, 1, 142, 1, 142, 1, 143, 1, 143, 1, 143, 1, 144, 1, 144, 1, 145, 1, 145, 1, 145, 1, 146, 1, 146, 1, 146, 1, 147, 1, 147, 1, 147, 1, 148, 1, 148, 1, 149, 1, 149, 1, 149, 1, 150, 1, 150, 1, 150, 1, 151, 1, 151, 1, 151, 1, 152, 1, 152, 1, 153, 1, 153, 1, 154, 1, 154, 1, 155, 1, 155, 1, 156, 1, 156, 1, 157, 1, 157, 1, 158, 1, 158, 1, 159, 1, 159, 1, 160, 1, 160, 1, 161, 1, 161, 1, 162, 1, 162, 1, 163, 1, 163, 1, 164, 1, 164, 1, 165, 1, 165, 1, 166, 1, 166, 1, 167, 1, 167, 1, 168, 1, 168, 1, 169, 1, 169, 1, 170, 1, 170, 1, 171, 1, 171, 1, 172, 1, 172, 3, 172, 1372, 8, 172, 1, 172, 1, 172, 1, 172, 1, 172, 3, 172, 1378, 8, 172, 1, 173, 1, 173, 1, 174, 1, 174, 1, 174, 5, 174, 1385, 8, 174, 10, 174, 12, 174, 1388, 9, 174, 1, 175, 1, 175, 1, 176, 1, 176, 1, 176, 5, 176, 1395, 8, 176, 10, 176, 12, 176, 1398, 9, 176, 1, 177, 1, 177, 3, 177, 1402, 8, 177, 1, 178, 1, 178, 1, 179, 1, 179, 1, 1230, 0, 180, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, 107, 54, 109, 55, 111, 56, 113, 57, 115, 58, 117, 59, 119, 60, 121, 61, 123, 62, 125, 63, 127, 64, 129, 65, 131, 66, 133, 67, 135, 68, 137, 69, 139, 70, 141, 71, 143, 72, 145, 73, 147, 74, 149, 75, 151, 76, 153, 77, 155, 78, 157, 79, 159, 80, 161, 81, 163, 82, 165, 83, 167, 84, 169, 85, 171, 86, 173, 87, 175, 88, 177, 89, 179, 90, 181, 91, 183, 92, 185, 93, 187, 94, 189, 95, 191, 96, 193, 97, 195, 98, 197, 99, 199, 100, 201, 101, 203, 102, 205, 103, 207, 104, 209, 105, 211, 106, 213, 107, 215, 108, 217, 109, 219, 110, 221, 111, 223, 112, 225, 113, 227, 114, 229, 115, 231, 116, 233, 117, 235, 118, 237, 119, 239, 120, 241, 121, 243, 122, 245, 123, 247, 124, 249, 125, 251, 126, 253, 127, 255, 128, 257, 129, 259, 130, 261, 131, 263, 132, 265, 133, 267, 134, 269, 135, 271, 136, 273, 137, 275, 138, 277, 139, 279, 140, 281, 141, 283, 142, 285, 143, 287, 144, 289, 145, 291, 146, 293, 147, 295, 148, 297, 149, 299, 150, 301, 151, 303, 152, 305, 153, 307, 154, 309, 155, 311, 156, 313, 157, 315, 158, 317, 159, 319, 160, 321, 161, 323, 162, 325, 163, 327, 164, 329, 165, 331, 166, 333, 167, 335, 168, 337, 169, 339, 170, 341, 171, 343, 172, 345, 173, 347, 174, 349, 175, 351, 176, 353, 177, 355, 178, 357, 179, 359, 180, 1, 0, 36, 2, 0, 65, 65, 97, 97, 2, 0, 66, 66, 98, 98, 2, 0, 83, 83, 115, 115, 2, 0, 67, 67, 99, 99, 2, 0, 69, 69, 101, 101, 2, 0, 82, 82, 114, 114, 2, 0, 79, 79, 111, 111, 2, 0, 70, 70, 102, 102, 2, 0, 84, 84, 116, 116, 2, 0, 76, 76, 108, 108, 2, 0, 73, 73, 105, 105, 2, 0, 78, 78, 110, 110, 2, 0, 68, 68, 100, 100, 2, 0, 72, 72, 104, 104, 2, 0, 85, 85, 117, 117, 2, 0, 89, 89, 121, 121, 2, 0, 71, 71, 103, 103, 2, 0, 75, 75, 107, 107, 2, 0, 77, 77, 109, 109, 2, 0, 80, 80, 112, 112, 2, 0, 88, 88, 120, 120, 2, 0, 87, 87, 119, 119, 2, 0, 81, 81, 113, 113, 2, 0, 86, 86, 118, 118, 2, 0, 74, 74, 106, 106, 3, 0, 10, 10, 13, 13, 34, 34, 2, 0, 48, 49, 95, 95, 2, 0, 48, 55, 95, 95, 4, 0, 48, 57, 65, 70, 95, 95, 97, 102, 5, 0, 32, 32, 38, 38, 40, 41, 43, 62, 124, 124, 3, 0, 35, 35, 91, 93, 95, 95, 2, 0, 65, 90, 97, 122, 1, 0, 10, 10, 17, 0, 32, 33, 36, 37, 63, 64, 94, 94, 96, 96, 123, 123, 125, 126, 164, 164, 166, 167, 169, 169, 171, 174, 176, 177, 181, 183, 187, 187, 924, 924, 1024, 1118, 8470, 8470, 2, 0, 43, 43, 45, 45, 2, 0, 65, 70, 97, 102, 1437, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 0, 131, 1, 0, 0, 0, 0, 133, 1, 0, 0, 0, 0, 135, 1, 0, 0, 0, 0, 137, 1, 0, 0, 0, 0, 139, 1, 0, 0, 0, 0, 141, 1, 0, 0, 0, 0, 143, 1, 0, 0, 0, 0, 145, 1, 0, 0, 0, 0, 147, 1, 0, 0, 0, 0, 149, 1, 0, 0, 0, 0, 151, 1, 0, 0, 0, 0, 153, 1, 0, 0, 0, 0, 155, 1, 0, 0, 0, 0, 157, 1, 0, 0, 0, 0, 159, 1, 0, 0, 0, 0, 161, 1, 0, 0, 0, 0, 163, 1, 0, 0, 0, 0, 165, 1, 0, 0, 0, 0, 167, 1, 0, 0, 0, 0, 169, 1, 0, 0, 0, 0, 171, 1, 0, 0, 0, 0, 173, 1, 0, 0, 0, 0, 175, 1, 0, 0, 0, 0, 177, 1, 0, 0, 0, 0, 179, 1, 0, 0, 0, 0, 181, 1, 0, 0, 0, 0, 183, 1, 0, 0, 0, 0, 185, 1, 0, 0, 0, 0, 187, 1, 0, 0, 0, 0, 189, 1, 0, 0, 0, 0, 191, 1, 0, 0, 0, 0, 193, 1, 0, 0, 0, 0, 195, 1, 0, 0, 0, 0, 197, 1, 0, 0, 0, 0, 199, 1, 0, 0, 0, 0, 201, 1, 0, 0, 0, 0, 203, 1, 0, 0, 0, 0, 205, 1, 0, 0, 0, 0, 207, 1, 0, 0, 0, 0, 209, 1, 0, 0, 0, 0, 211, 1, 0, 0, 0, 0, 213, 1, 0, 0, 0, 0, 215, 1, 0, 0, 0, 0, 217, 1, 0, 0, 0, 0, 219, 1, 0, 0, 0, 0, 221, 1, 0, 0, 0, 0, 223, 1, 0, 0, 0, 0, 225, 1, 0, 0, 0, 0, 227, 1, 0, 0, 0, 0, 229, 1, 0, 0, 0, 0, 231, 1, 0, 0, 0, 0, 233, 1, 0, 0, 0, 0, 235, 1, 0, 0, 0, 0, 237, 1, 0, 0, 0, 0, 239, 1, 0, 0, 0, 0, 241, 1, 0, 0, 0, 0, 243, 1, 0, 0, 0, 0, 245, 1, 0, 0, 0, 0, 247, 1, 0, 0, 0, 0, 249, 1, 0, 0, 0, 0, 251, 1, 0, 0, 0, 0, 253, 1, 0, 0, 0, 0, 255, 1, 0, 0, 0, 0, 257, 1, 0, 0, 0, 0, 259, 1, 0, 0, 0, 0, 261, 1, 0, 0, 0, 0, 263, 1, 0, 0, 0, 0, 265, 1, 0, 0, 0, 0, 267, 1, 0, 0, 0, 0, 269, 1, 0, 0, 0, 0, 271, 1, 0, 0, 0, 0, 273, 1, 0, 0, 0, 0, 275, 1, 0, 0, 0, 0, 277, 1, 0, 0, 0, 0, 279, 1, 0, 0, 0, 0, 281, 1, 0, 0, 0, 0, 283, 1, 0, 0, 0, 0, 285, 1, 0, 0, 0, 0, 287, 1, 0, 0, 0, 0, 289, 1, 0, 0, 0, 0, 291, 1, 0, 0, 0, 0, 293, 1, 0, 0, 0, 0, 295, 1, 0, 0, 0, 0, 297, 1, 0, 0, 0, 0, 299, 1, 0, 0, 0, 0, 301, 1, 0, 0, 0, 0, 303, 1, 0, 0, 0, 0, 305, 1, 0, 0, 0, 0, 307, 1, 0, 0, 0, 0, 309, 1, 0, 0, 0, 0, 311, 1, 0, 0, 0, 0, 313, 1, 0, 0, 0, 0, 315, 1, 0, 0, 0, 0, 317, 1, 0, 0, 0, 0, 319, 1, 0, 0, 0, 0, 321, 1, 0, 0, 0, 0, 323, 1, 0, 0, 0, 0, 325, 1, 0, 0, 0, 0, 327, 1, 0, 0, 0, 0, 329, 1, 0, 0, 0, 0, 331, 1, 0, 0, 0, 0, 333, 1, 0, 0, 0, 0, 335, 1, 0, 0, 0, 0, 337, 1, 0, 0, 0, 0, 339, 1, 0, 0, 0, 0, 341, 1, 0, 0, 0, 0, 343, 1, 0, 0, 0, 0, 345, 1, 0, 0, 0, 0, 347, 1, 0, 0, 0, 0, 349, 1, 0, 0, 0, 0, 351, 1, 0, 0, 0, 0, 353, 1, 0, 0, 0, 0, 355, 1, 0, 0, 0, 0, 357, 1, 0, 0, 0, 0, 359, 1, 0, 0, 0, 1, 361, 1, 0, 0, 0, 3, 365, 1, 0, 0, 0, 5, 372, 1, 0, 0, 0, 7, 379, 1, 0, 0, 0, 9, 385, 1, 0, 0, 0, 11, 391, 1, 0, 0, 0, 13, 395, 1, 0, 0, 0, 15, 399, 1, 0, 0, 0, 17, 412, 1, 0, 0, 0, 19, 418, 1, 0, 0, 0, 21, 425, 1, 0, 0, 0, 23, 435, 1, 0, 0, 0, 25, 441, 1, 0, 0, 0, 27, 447, 1, 0, 0, 0, 29, 452, 1, 0, 0, 0, 31, 458, 1, 0, 0, 0, 33, 465, 1, 0, 0, 0, 35, 469, 1, 0, 0, 0, 37, 474, 1, 0, 0, 0, 39, 484, 1, 0, 0, 0, 41, 498, 1, 0, 0, 0, 43, 507, 1, 0, 0, 0, 45, 515, 1, 0, 0, 0, 47, 523, 1, 0, 0, 0, 49, 534, 1, 0, 0, 0, 51, 541, 1, 0, 0, 0, 53, 545, 1, 0, 0, 0, 55, 552, 1, 0, 0, 0, 57, 557, 1, 0, 0, 0, 59, 563, 1, 0, 0, 0, 61, 568, 1, 0, 0, 0, 63, 573, 1, 0, 0, 0, 65, 577, 1, 0, 0, 0, 67, 583, 1, 0, 0, 0, 69, 592, 1, 0, 0, 0, 71, 601, 1, 0, 0, 0, 73, 609, 1, 0, 0, 0, 75, 615, 1, 0, 0, 0, 77, 623, 1, 0, 0, 0, 79, 626, 1, 0, 0, 0, 81, 633, 1, 0, 0, 0, 83, 636, 1, 0, 0, 0, 85, 645, 1, 0, 0, 0, 87, 651, 1, 0, 0, 0, 89, 654, 1, 0, 0, 0, 91, 660, 1, 0, 0, 0, 93, 668, 1, 0, 0, 0, 95, 674, 1, 0, 0, 0, 97, 682, 1, 0, 0, 0, 99, 690, 1, 0, 0, 0, 101, 695, 1, 0, 0, 0, 103, 699, 1, 0, 0, 0, 105, 703, 1, 0, 0, 0, 107, 708, 1, 0, 0, 0, 109, 715, 1, 0, 0, 0, 111, 719, 1, 0, 0, 0, 113, 724, 1, 0, 0, 0, 115, 730, 1, 0, 0, 0, 117, 734, 1, 0, 0, 0, 119, 738, 1, 0, 0, 0, 121, 743, 1, 0, 0, 0, 123, 746, 1, 0, 0, 0, 125, 749, 1, 0, 0, 0, 127, 754, 1, 0, 0, 0, 129, 757, 1, 0, 0, 0, 131, 764, 1, 0, 0, 0, 133, 768, 1, 0, 0, 0, 135, 776, 1, 0, 0, 0, 137, 786, 1, 0, 0, 0, 139, 791, 1, 0, 0, 0, 141, 801, 1, 0, 0, 0, 143, 809, 1, 0, 0, 0, 145, 819, 1, 0, 0, 0, 147, 830, 1, 0, 0, 0, 149, 840, 1, 0, 0, 0, 151, 845, 1, 0, 0, 0, 153, 854, 1, 0, 0, 0, 155, 860, 1, 0, 0, 0, 157, 868, 1, 0, 0, 0, 159, 882, 1, 0, 0, 0, 161, 889, 1, 0, 0, 0, 163, 893, 1, 0, 0, 0, 165, 900, 1, 0, 0, 0, 167, 910, 1, 0, 0, 0, 169, 919, 1, 0, 0, 0, 171, 926, 1, 0, 0, 0, 173, 933, 1, 0, 0, 0, 175, 937, 1, 0, 0, 0, 177, 941, 1, 0, 0, 0, 179, 948, 1, 0, 0, 0, 181, 957, 1, 0, 0, 0, 183, 964, 1, 0, 0, 0, 185, 971, 1, 0, 0, 0, 187, 975, 1, 0, 0, 0, 189, 979, 1, 0, 0, 0, 191, 988, 1, 0, 0, 0, 193, 992, 1, 0, 0, 0, 195, 996, 1, 0, 0, 0, 197, 1006, 1, 0, 0, 0, 199, 1014, 1, 0, 0, 0, 201, 1023, 1, 0, 0, 0, 203, 1028, 1, 0, 0, 0, 205, 1036, 1, 0, 0, 0, 207, 1039, 1, 0, 0, 0, 209, 1049, 1, 0, 0, 0, 211, 1059, 1, 0, 0, 0, 213, 1064, 1, 0, 0, 0, 215, 1075, 1, 0, 0, 0, 217, 1081, 1, 0, 0, 0, 219, 1087, 1, 0, 0, 0, 221, 1091, 1, 0, 0, 0, 223, 1100, 1, 0, 0, 0, 225, 1105, 1, 0, 0, 0, 227, 1110, 1, 0, 0, 0, 229, 1115, 1, 0, 0, 0, 231, 1121, 1, 0, 0, 0, 233, 1126, 1, 0, 0, 0, 235, 1130, 1, 0, 0, 0, 237, 1139, 1, 0, 0, 0, 239, 1151, 1, 0, 0, 0, 241, 1166, 1, 0, 0, 0, 243, 1168, 1, 0, 0, 0, 245, 1178, 1, 0, 0, 0, 247, 1188, 1, 0, 0, 0, 249, 1198, 1, 0, 0, 0, 251, 1211, 1, 0, 0, 0, 253, 1222, 1, 0, 0, 0, 255, 1224, 1, 0, 0, 0, 257, 1238, 1, 0, 0, 0, 259, 1250, 1, 0, 0, 0, 261, 1257, 1, 0, 0, 0, 263, 1263, 1, 0, 0, 0, 265, 1267, 1, 0, 0, 0, 267, 1271, 1, 0, 0, 0, 269, 1275, 1, 0, 0, 0, 271, 1277, 1, 0, 0, 0, 273, 1280, 1, 0, 0, 0, 275, 1283, 1, 0, 0, 0, 277, 1286, 1, 0, 0, 0, 279, 1290, 1, 0, 0, 0, 281, 1294, 1, 0, 0, 0, 283, 1297, 1, 0, 0, 0, 285, 1301, 1, 0, 0, 0, 287, 1304, 1, 0, 0, 0, 289, 1307, 1, 0, 0, 0, 291, 1309, 1, 0, 0, 0, 293, 1312, 1, 0, 0, 0, 295, 1315, 1, 0, 0, 0, 297, 1318, 1, 0, 0, 0, 299, 1320, 1, 0, 0, 0, 301, 1323, 1, 0, 0, 0, 303, 1326, 1, 0, 0, 0, 305, 1329, 1, 0, 0, 0, 307, 1331, 1, 0, 0, 0, 309, 1333, 1, 0, 0, 0, 311, 1335, 1, 0, 0, 0, 313, 1337, 1, 0, 0, 0, 315, 1339, 1, 0, 0, 0, 317, 1341, 1, 0, 0, 0, 319, 1343, 1, 0, 0, 0, 321, 1345, 1, 0, 0, 0, 323, 1347, 1, 0, 0, 0, 325, 1349, 1, 0, 0, 0, 327, 1351, 1, 0, 0, 0, 329, 1353, 1, 0, 0, 0, 331, 1355, 1, 0, 0, 0, 333, 1357, 1, 0, 0, 0, 335, 1359, 1, 0, 0, 0, 337, 1361, 1, 0, 0, 0, 339, 1363, 1, 0, 0, 0, 341, 1365, 1, 0, 0, 0, 343, 1367, 1, 0, 0, 0, 345, 1369, 1, 0, 0, 0, 347, 1379, 1, 0, 0, 0, 349, 1381, 1, 0, 0, 0, 351, 1389, 1, 0, 0, 0, 353, 1391, 1, 0, 0, 0, 355, 1401, 1, 0, 0, 0, 357, 1403, 1, 0, 0, 0, 359, 1405, 1, 0, 0, 0, 361, 362, 7, 0, 0, 0, 362, 363, 7, 1, 0, 0, 363, 364, 7, 2, 0, 0, 364, 2, 1, 0, 0, 0, 365, 366, 7, 0, 0, 0, 366, 367, 7, 3, 0, 0, 367, 368, 7, 3, 0, 0, 368, 369, 7, 4, 0, 0, 369, 370, 7, 2, 0, 0, 370, 371, 7, 2, 0, 0, 371, 4, 1, 0, 0, 0, 372, 373, 7, 0, 0, 0, 373, 374, 7, 3, 0, 0, 374, 375, 7, 5, 0, 0, 375, 376, 7, 6, 0, 0, 376, 377, 7, 2, 0, 0, 377, 378, 7, 2, 0, 0, 378, 6, 1, 0, 0, 0, 379, 380, 7, 0, 0, 0, 380, 381, 7, 7, 0, 0, 381, 382, 7, 8, 0, 0, 382, 383, 7, 4, 0, 0, 383, 384, 7, 5, 0, 0, 384, 8, 1, 0, 0, 0, 385, 386, 7, 0, 0, 0, 386, 387, 7, 9, 0, 0, 387, 388, 7, 10, 0, 0, 388, 389, 7, 0, 0, 0, 389, 390, 7, 2, 0, 0, 390, 10, 1, 0, 0, 0, 391, 392, 7, 0, 0, 0, 392, 393, 7, 9, 0, 0, 393, 394, 7, 9, 0, 0, 394, 12, 1, 0, 0, 0, 395, 396, 7, 0, 0, 0, 396, 397, 7, 11, 0, 0, 397, 398, 7, 12, 0, 0, 398, 14, 1, 0, 0, 0, 399, 400, 7, 0, 0, 0, 400, 401, 7, 5, 0, 0, 401, 402, 7, 3, 0, 0, 402, 403, 7, 13, 0, 0, 403, 404, 7, 10, 0, 0, 404, 405, 7, 8, 0, 0, 405, 406, 7, 4, 0, 0, 406, 407, 7, 3, 0, 0, 407, 408, 7, 8, 0, 0, 408, 409, 7, 14, 0, 0, 409, 410, 7, 5, 0, 0, 410, 411, 7, 4, 0, 0, 411, 16, 1, 0, 0, 0, 412, 413, 7, 0, 0, 0, 413, 414, 7, 5, 0, 0, 414, 415, 7, 5, 0, 0, 415, 416, 7, 0, 0, 0, 416, 417, 7, 15, 0, 0, 417, 18, 1, 0, 0, 0, 418, 419, 7, 0, 0, 0, 419, 420, 7, 2, 0, 0, 420, 421, 7, 2, 0, 0, 421, 422, 7, 4, 0, 0, 422, 423, 7, 5, 0, 0, 423, 424, 7, 8, 0, 0, 424, 20, 1, 0, 0, 0, 425, 426, 7, 0, 0, 0, 426, 427, 7, 8, 0, 0, 427, 428, 7, 8, 0, 0, 428, 429, 7, 5, 0, 0, 429, 430, 7, 10, 0, 0, 430, 431, 7, 1, 0, 0, 431, 432, 7, 14, 0, 0, 432, 433, 7, 8, 0, 0, 433, 434, 7, 4, 0, 0, 434, 22, 1, 0, 0, 0, 435, 436, 7, 1, 0, 0, 436, 437, 7, 4, 0, 0, 437, 438, 7, 16, 0, 0, 438, 439, 7, 10, 0, 0, 439, 440, 7, 11, 0, 0, 440, 24, 1, 0, 0, 0, 441, 442, 7, 1, 0, 0, 442, 443, 7, 9, 0, 0, 443, 444, 7, 6, 0, 0, 444, 445, 7, 3, 0, 0, 445, 446, 7, 17, 0, 0, 446, 26, 1, 0, 0, 0, 447, 448, 7, 1, 0, 0, 448, 449, 7, 6, 0, 0, 449, 450, 7, 12, 0, 0, 450, 451, 7, 15, 0, 0, 451, 28, 1, 0, 0, 0, 452, 453, 7, 1, 0, 0, 453, 454, 7, 5, 0, 0, 454, 455, 7, 4, 0, 0, 455, 456, 7, 0, 0, 0, 456, 457, 7, 17, 0, 0, 457, 30, 1, 0, 0, 0, 458, 459, 7, 1, 0, 0, 459, 460, 7, 14, 0, 0, 460, 461, 7, 7, 0, 0, 461, 462, 7, 7, 0, 0, 462, 463, 7, 4, 0, 0, 463, 464, 7, 5, 0, 0, 464, 32, 1, 0, 0, 0, 465, 466, 7, 1, 0, 0, 466, 467, 7, 14, 0, 0, 467, 468, 7, 2, 0, 0, 468, 34, 1, 0, 0, 0, 469, 470, 7, 3, 0, 0, 470, 471, 7, 0, 0, 0, 471, 472, 7, 2, 0, 0, 472, 473, 7, 4, 0, 0, 473, 36, 1, 0, 0, 0, 474, 475, 7, 3, 0, 0, 475, 476, 7, 6, 0, 0, 476, 477, 7, 18, 0, 0, 477, 478, 7, 19, 0, 0, 478, 479, 7, 6, 0, 0, 479, 480, 7, 11, 0, 0, 480, 481, 7, 4, 0, 0, 481, 482, 7, 11, 0, 0, 482, 483, 7, 8, 0, 0, 483, 38, 1, 0, 0, 0, 484, 485, 7, 3, 0, 0, 485, 486, 7, 6, 0, 0, 486, 487, 7, 11, 0, 0, 487, 488, 7, 7, 0, 0, 488, 489, 7, 10, 0, 0, 489, 490, 7, 16, 0, 0, 490, 491, 7, 14, 0, 0, 491, 492, 7, 5, 0, 0, 492, 493, 7, 0, 0, 0, 493, 494, 7, 8, 0, 0, 494, 495, 7, 10, 0, 0, 495, 496, 7, 6, 0, 0, 496, 497, 7, 11, 0, 0, 497, 40, 1, 0, 0, 0, 498, 499, 7, 3, 0, 0, 499, 500, 7, 6, 0, 0, 500, 501, 7, 11, 0, 0, 501, 502, 7, 2, 0, 0, 502, 503, 7, 8, 0, 0, 503, 504, 7, 0, 0, 0, 504, 505, 7, 11, 0, 0, 505, 506, 7, 8, 0, 0, 506, 42, 1, 0, 0, 0, 507, 508, 7, 3, 0, 0, 508, 509, 7, 6, 0, 0, 509, 510, 7, 11, 0, 0, 510, 511, 7, 8, 0, 0, 511, 512, 7, 4, 0, 0, 512, 513, 7, 20, 0, 0, 513, 514, 7, 8, 0, 0, 514, 44, 1, 0, 0, 0, 515, 516, 7, 12, 0, 0, 516, 517, 7, 4, 0, 0, 517, 518, 7, 7, 0, 0, 518, 519, 7, 0, 0, 0, 519, 520, 7, 14, 0, 0, 520, 521, 7, 9, 0, 0, 521, 522, 7, 8, 0, 0, 522, 46, 1, 0, 0, 0, 523, 524, 7, 12, 0, 0, 524, 525, 7, 10, 0, 0, 525, 526, 7, 2, 0, 0, 526, 527, 7, 3, 0, 0, 527, 528, 7, 6, 0, 0, 528, 529, 7, 11, 0, 0, 529, 530, 7, 11, 0, 0, 530, 531, 7, 4, 0, 0, 531, 532, 7, 3, 0, 0, 532, 533, 7, 8, 0, 0, 533, 48, 1, 0, 0, 0, 534, 535, 7, 12, 0, 0, 535, 536, 7, 6, 0, 0, 536, 537, 7, 21, 0, 0, 537, 538, 7, 11, 0, 0, 538, 539, 7, 8, 0, 0, 539, 540, 7, 6, 0, 0, 540, 50, 1, 0, 0, 0, 541, 542, 7, 4, 0, 0, 542, 543, 7, 11, 0, 0, 543, 544, 7, 12, 0, 0, 544, 52, 1, 0, 0, 0, 545, 546, 7, 4, 0, 0, 546, 547, 7, 11, 0, 0, 547, 548, 7, 8, 0, 0, 548, 549, 7, 10, 0, 0, 549, 550, 7, 8, 0, 0, 550, 551, 7, 15, 0, 0, 551, 54, 1, 0, 0, 0, 552, 553, 7, 4, 0, 0, 553, 554, 7, 9, 0, 0, 554, 555, 7, 2, 0, 0, 555, 556, 7, 4, 0, 0, 556, 56, 1, 0, 0, 0, 557, 558, 7, 4, 0, 0, 558, 559, 7, 9, 0, 0, 559, 560, 7, 2, 0, 0, 560, 561, 7, 10, 0, 0, 561, 562, 7, 7, 0, 0, 562, 58, 1, 0, 0, 0, 563, 564, 7, 4, 0, 0, 564, 565, 7, 20, 0, 0, 565, 566, 7, 10, 0, 0, 566, 567, 7, 8, 0, 0, 567, 60, 1, 0, 0, 0, 568, 569, 7, 7, 0, 0, 569, 570, 7, 10, 0, 0, 570, 571, 7, 9, 0, 0, 571, 572, 7, 4, 0, 0, 572, 62, 1, 0, 0, 0, 573, 574, 7, 7, 0, 0, 574, 575, 7, 6, 0, 0, 575, 576, 7, 5, 0, 0, 576, 64, 1, 0, 0, 0, 577, 578, 7, 7, 0, 0, 578, 579, 7, 6, 0, 0, 579, 580, 7, 5, 0, 0, 580, 581, 7, 3, 0, 0, 581, 582, 7, 4, 0, 0, 582, 66, 1, 0, 0, 0, 583, 584, 7, 7, 0, 0, 584, 585, 7, 14, 0, 0, 585, 586, 7, 11, 0, 0, 586, 587, 7, 3, 0, 0, 587, 588, 7, 8, 0, 0, 588, 589, 7, 10, 0, 0, 589, 590, 7, 6, 0, 0, 590, 591, 7, 11, 0, 0, 591, 68, 1, 0, 0, 0, 592, 593, 7, 16, 0, 0, 593, 594, 7, 4, 0, 0, 594, 595, 7, 11, 0, 0, 595, 596, 7, 4, 0, 0, 596, 597, 7, 5, 0, 0, 597, 598, 7, 0, 0, 0, 598, 599, 7, 8, 0, 0, 599, 600, 7, 4, 0, 0, 600, 70, 1, 0, 0, 0, 601, 602, 7, 16, 0, 0, 602, 603, 7, 4, 0, 0, 603, 604, 7, 11, 0, 0, 604, 605, 7, 4, 0, 0, 605, 606, 7, 5, 0, 0, 606, 607, 7, 10, 0, 0, 607, 608, 7, 3, 0, 0, 608, 72, 1, 0, 0, 0, 609, 610, 7, 16, 0, 0, 610, 611, 7, 5, 0, 0, 611, 612, 7, 6, 0, 0, 612, 613, 7, 14, 0, 0, 613, 614, 7, 19, 0, 0, 614, 74, 1, 0, 0, 0, 615, 616, 7, 16, 0, 0, 616, 617, 7, 14, 0, 0, 617, 618, 7, 0, 0, 0, 618, 619, 7, 5, 0, 0, 619, 620, 7, 12, 0, 0, 620, 621, 7, 4, 0, 0, 621, 622, 7, 12, 0, 0, 622, 76, 1, 0, 0, 0, 623, 624, 7, 10, 0, 0, 624, 625, 7, 7, 0, 0, 625, 78, 1, 0, 0, 0, 626, 627, 7, 10, 0, 0, 627, 628, 7, 18, 0, 0, 628, 629, 7, 19, 0, 0, 629, 630, 7, 14, 0, 0, 630, 631, 7, 5, 0, 0, 631, 632, 7, 4, 0, 0, 632, 80, 1, 0, 0, 0, 633, 634, 7, 10, 0, 0, 634, 635, 7, 11, 0, 0, 635, 82, 1, 0, 0, 0, 636, 637, 7, 10, 0, 0, 637, 638, 7, 11, 0, 0, 638, 639, 7, 4, 0, 0, 639, 640, 7, 5, 0, 0, 640, 641, 7, 8, 0, 0, 641, 642, 7, 10, 0, 0, 642, 643, 7, 0, 0, 0, 643, 644, 7, 9, 0, 0, 644, 84, 1, 0, 0, 0, 645, 646, 7, 10, 0, 0, 646, 647, 7, 11, 0, 0, 647, 648, 7, 6, 0, 0, 648, 649, 7, 14, 0, 0, 649, 650, 7, 8, 0, 0, 650, 86, 1, 0, 0, 0, 651, 652, 7, 10, 0, 0, 652, 653, 7, 2, 0, 0, 653, 88, 1, 0, 0, 0, 654, 655, 7, 9, 0, 0, 655, 656, 7, 0, 0, 0, 656, 657, 7, 1, 0, 0, 657, 658, 7, 4, 0, 0, 658, 659, 7, 9, 0, 0, 659, 90, 1, 0, 0, 0, 660, 661, 7, 9, 0, 0, 661, 662, 7, 10, 0, 0, 662, 663, 7, 1, 0, 0, 663, 664, 7, 5, 0, 0, 664, 665, 7, 0, 0, 0, 665, 666, 7, 5, 0, 0, 666, 667, 7, 15, 0, 0, 667, 92, 1, 0, 0, 0, 668, 669, 7, 9, 0, 0, 669, 670, 7, 10, 0, 0, 670, 671, 7, 18, 0, 0, 671, 672, 7, 10, 0, 0, 672, 673, 7, 8, 0, 0, 673, 94, 1, 0, 0, 0, 674, 675, 7, 9, 0, 0, 675, 676, 7, 10, 0, 0, 676, 677, 7, 11, 0, 0, 677, 678, 7, 17, 0, 0, 678, 679, 7, 0, 0, 0, 679, 680, 7, 16, 0, 0, 680, 681, 7, 4, 0, 0, 681, 96, 1, 0, 0, 0, 682, 683, 7, 9, 0, 0, 683, 684, 7, 10, 0, 0, 684, 685, 7, 8, 0, 0, 685, 686, 7, 4, 0, 0, 686, 687, 7, 5, 0, 0, 687, 688, 7, 0, 0, 0, 688, 689, 7, 9, 0, 0, 689, 98, 1, 0, 0, 0, 690, 691, 7, 9, 0, 0, 691, 692, 7, 6, 0, 0, 692, 693, 7, 6, 0, 0, 693, 694, 7, 19, 0, 0, 694, 100, 1, 0, 0, 0, 695, 696, 7, 18, 0, 0, 696, 697, 7, 0, 0, 0, 697, 698, 7, 19, 0, 0, 698, 102, 1, 0, 0, 0, 699, 700, 7, 18, 0, 0, 700, 701, 7, 6, 0, 0, 701, 702, 7, 12, 0, 0, 702, 104, 1, 0, 0, 0, 703, 704, 7, 11, 0, 0, 704, 705, 7, 0, 0, 0, 705, 706, 7, 11, 0, 0, 706, 707, 7, 12, 0, 0, 707, 106, 1, 0, 0, 0, 708, 709, 7, 11, 0, 0, 709, 710, 7, 0, 0, 0, 710, 711, 7, 8, 0, 0, 711, 712, 7, 14, 0, 0, 712, 713, 7, 5, 0, 0, 713, 714, 7, 4, 0, 0, 714, 108, 1, 0, 0, 0, 715, 716, 7, 11, 0, 0, 716, 717, 7, 4, 0, 0, 717, 718, 7, 21, 0, 0, 718, 110, 1, 0, 0, 0, 719, 720, 7, 11, 0, 0, 720, 721, 7, 4, 0, 0, 721, 722, 7, 20, 0, 0, 722, 723, 7, 8, 0, 0, 723, 112, 1, 0, 0, 0, 724, 725, 7, 11, 0, 0, 725, 726, 7, 6, 0, 0, 726, 727, 7, 10, 0, 0, 727, 728, 7, 2, 0, 0, 728, 729, 7, 4, 0, 0, 729, 114, 1, 0, 0, 0, 730, 731, 7, 11, 0, 0, 731, 732, 7, 6, 0, 0, 732, 733, 7, 5, 0, 0, 733, 116, 1, 0, 0, 0, 734, 735, 7, 11, 0, 0, 735, 736, 7, 6, 0, 0, 736, 737, 7, 8, 0, 0, 737, 118, 1, 0, 0, 0, 738, 739, 7, 11, 0, 0, 739, 740, 7, 14, 0, 0, 740, 741, 7, 9, 0, 0, 741, 742, 7, 9, 0, 0, 742, 120, 1, 0, 0, 0, 743, 744, 7, 6, 0, 0, 744, 745, 7, 7, 0, 0, 745, 122, 1, 0, 0, 0, 746, 747, 7, 6, 0, 0, 747, 748, 7, 11, 0, 0, 748, 124, 1, 0, 0, 0, 749, 750, 7, 6, 0, 0, 750, 751, 7, 19, 0, 0, 751, 752, 7, 4, 0, 0, 752, 753, 7, 11, 0, 0, 753, 126, 1, 0, 0, 0, 754, 755, 7, 6, 0, 0, 755, 756, 7, 5, 0, 0, 756, 128, 1, 0, 0, 0, 757, 758, 7, 6, 0, 0, 758, 759, 7, 8, 0, 0, 759, 760, 7, 13, 0, 0, 760, 761, 7, 4, 0, 0, 761, 762, 7, 5, 0, 0, 762, 763, 7, 2, 0, 0, 763, 130, 1, 0, 0, 0, 764, 765, 7, 6, 0, 0, 765, 766, 7, 14, 0, 0, 766, 767, 7, 8, 0, 0, 767, 132, 1, 0, 0, 0, 768, 769, 7, 19, 0, 0, 769, 770, 7, 0, 0, 0, 770, 771, 7, 3, 0, 0, 771, 772, 7, 17, 0, 0, 772, 773, 7, 0, 0, 0, 773, 774, 7, 16, 0, 0, 774, 775, 7, 4, 0, 0, 775, 134, 1, 0, 0, 0, 776, 777, 7, 19, 0, 0, 777, 778, 7, 0, 0, 0, 778, 779, 7, 5, 0, 0, 779, 780, 7, 0, 0, 0, 780, 781, 7, 18, 0, 0, 781, 782, 7, 4, 0, 0, 782, 783, 7, 8, 0, 0, 783, 784, 7, 4, 0, 0, 784, 785, 7, 5, 0, 0, 785, 136, 1, 0, 0, 0, 786, 787, 7, 19, 0, 0, 787, 788, 7, 6, 0, 0, 788, 789, 7, 5, 0, 0, 789, 790, 7, 8, 0, 0, 790, 138, 1, 0, 0, 0, 791, 792, 7, 19, 0, 0, 792, 793, 7, 6, 0, 0, 793, 794, 7, 2, 0, 0, 794, 795, 7, 8, 0, 0, 795, 796, 7, 19, 0, 0, 796, 797, 7, 6, 0, 0, 797, 798, 7, 11, 0, 0, 798, 799, 7, 4, 0, 0, 799, 800, 7, 12, 0, 0, 800, 140, 1, 0, 0, 0, 801, 802, 7, 19, 0, 0, 802, 803, 7, 5, 0, 0, 803, 804, 7, 6, 0, 0, 804, 805, 7, 3, 0, 0, 805, 806, 7, 4, 0, 0, 806, 807, 7, 2, 0, 0, 807, 808, 7, 2, 0, 0, 808, 142, 1, 0, 0, 0, 809, 810, 7, 19, 0, 0, 810, 811, 7, 5, 0, 0, 811, 812, 7, 6, 0, 0, 812, 813, 7, 3, 0, 0, 813, 814, 7, 4, 0, 0, 814, 815, 7, 12, 0, 0, 815, 816, 7, 14, 0, 0, 816, 817, 7, 5, 0, 0, 817, 818, 7, 4, 0, 0, 818, 144, 1, 0, 0, 0, 819, 820, 7, 19, 0, 0, 820, 821, 7, 5, 0, 0, 821, 822, 7, 6, 0, 0, 822, 823, 7, 3, 0, 0, 823, 824, 7, 4, 0, 0, 824, 825, 7, 12, 0, 0, 825, 826, 7, 14, 0, 0, 826, 827, 7, 5, 0, 0, 827, 828, 7, 0, 0, 0, 828, 829, 7, 9, 0, 0, 829, 146, 1, 0, 0, 0, 830, 831, 7, 19, 0, 0, 831, 832, 7, 5, 0, 0, 832, 833, 7, 6, 0, 0, 833, 834, 7, 8, 0, 0, 834, 835, 7, 4, 0, 0, 835, 836, 7, 3, 0, 0, 836, 837, 7, 8, 0, 0, 837, 838, 7, 4, 0, 0, 838, 839, 7, 12, 0, 0, 839, 148, 1, 0, 0, 0, 840, 841, 7, 19, 0, 0, 841, 842, 7, 14, 0, 0, 842, 843, 7, 5, 0, 0, 843, 844, 7, 4, 0, 0, 844, 150, 1, 0, 0, 0, 845, 846, 7, 22, 0, 0, 846, 847, 7, 14, 0, 0, 847, 848, 7, 0, 0, 0, 848, 849, 7, 11, 0, 0, 849, 850, 7, 8, 0, 0, 850, 851, 7, 10, 0, 0, 851, 852, 7, 8, 0, 0, 852, 853, 7, 15, 0, 0, 853, 152, 1, 0, 0, 0, 854, 855, 7, 5, 0, 0, 855, 856, 7, 0, 0, 0, 856, 857, 7, 11, 0, 0, 857, 858, 7, 16, 0, 0, 858, 859, 7, 4, 0, 0, 859, 154, 1, 0, 0, 0, 860, 861, 7, 5, 0, 0, 861, 862, 7, 4, 0, 0, 862, 863, 7, 9, 0, 0, 863, 864, 7, 4, 0, 0, 864, 865, 7, 0, 0, 0, 865, 866, 7, 2, 0, 0, 866, 867, 7, 4, 0, 0, 867, 156, 1, 0, 0, 0, 868, 869, 7, 5, 0, 0, 869, 870, 7, 4, 0, 0, 870, 871, 7, 23, 0, 0, 871, 872, 7, 4, 0, 0, 872, 873, 7, 5, 0, 0, 873, 874, 7, 2, 0, 0, 874, 875, 7, 4, 0, 0, 875, 876, 5, 95, 0, 0, 876, 877, 7, 5, 0, 0, 877, 878, 7, 0, 0, 0, 878, 879, 7, 11, 0, 0, 879, 880, 7, 16, 0, 0, 880, 881, 7, 4, 0, 0, 881, 158, 1, 0, 0, 0, 882, 883, 7, 5, 0, 0, 883, 884, 7, 4, 0, 0, 884, 885, 7, 24, 0, 0, 885, 886, 7, 4, 0, 0, 886, 887, 7, 3, 0, 0, 887, 888, 7, 8, 0, 0, 888, 160, 1, 0, 0, 0, 889, 890, 7, 5, 0, 0, 890, 891, 7, 4, 0, 0, 891, 892, 7, 18, 0, 0, 892, 162, 1, 0, 0, 0, 893, 894, 7, 5, 0, 0, 894, 895, 7, 4, 0, 0, 895, 896, 7, 3, 0, 0, 896, 897, 7, 6, 0, 0, 897, 898, 7, 5, 0, 0, 898, 899, 7, 12, 0, 0, 899, 164, 1, 0, 0, 0, 900, 901, 7, 5, 0, 0, 901, 902, 7, 4, 0, 0, 902, 903, 7, 7, 0, 0, 903, 904, 7, 4, 0, 0, 904, 905, 7, 5, 0, 0, 905, 906, 7, 4, 0, 0, 906, 907, 7, 11, 0, 0, 907, 908, 7, 3, 0, 0, 908, 909, 7, 4, 0, 0, 909, 166, 1, 0, 0, 0, 910, 911, 7, 5, 0, 0, 911, 912, 7, 4, 0, 0, 912, 913, 7, 16, 0, 0, 913, 914, 7, 10, 0, 0, 914, 915, 7, 2, 0, 0, 915, 916, 7, 8, 0, 0, 916, 917, 7, 4, 0, 0, 917, 918, 7, 5, 0, 0, 918, 168, 1, 0, 0, 0, 919, 920, 7, 5, 0, 0, 920, 921, 7, 4, 0, 0, 921, 922, 7, 19, 0, 0, 922, 923, 7, 6, 0, 0, 923, 924, 7, 5, 0, 0, 924, 925, 7, 8, 0, 0, 925, 170, 1, 0, 0, 0, 926, 927, 7, 5, 0, 0, 927, 928, 7, 4, 0, 0, 928, 929, 7, 8, 0, 0, 929, 930, 7, 14, 0, 0, 930, 931, 7, 5, 0, 0, 931, 932, 7, 11, 0, 0, 932, 172, 1, 0, 0, 0, 933, 934, 7, 5, 0, 0, 934, 935, 7, 6, 0, 0, 935, 936, 7, 9, 0, 0, 936, 174, 1, 0, 0, 0, 937, 938, 7, 5, 0, 0, 938, 939, 7, 6, 0, 0, 939, 940, 7, 5, 0, 0, 940, 176, 1, 0, 0, 0, 941, 942, 7, 2, 0, 0, 942, 943, 7, 4, 0, 0, 943, 944, 7, 9, 0, 0, 944, 945, 7, 4, 0, 0, 945, 946, 7, 3, 0, 0, 946, 947, 7, 8, 0, 0, 947, 178, 1, 0, 0, 0, 948, 949, 7, 2, 0, 0, 949, 950, 7, 4, 0, 0, 950, 951, 7, 23, 0, 0, 951, 952, 7, 4, 0, 0, 952, 953, 7, 5, 0, 0, 953, 954, 7, 10, 0, 0, 954, 955, 7, 8, 0, 0, 955, 956, 7, 15, 0, 0, 956, 180, 1, 0, 0, 0, 957, 958, 7, 2, 0, 0, 958, 959, 7, 13, 0, 0, 959, 960, 7, 0, 0, 0, 960, 961, 7, 5, 0, 0, 961, 962, 7, 4, 0, 0, 962, 963, 7, 12, 0, 0, 963, 182, 1, 0, 0, 0, 964, 965, 7, 2, 0, 0, 965, 966, 7, 10, 0, 0, 966, 967, 7, 16, 0, 0, 967, 968, 7, 11, 0, 0, 968, 969, 7, 0, 0, 0, 969, 970, 7, 9, 0, 0, 970, 184, 1, 0, 0, 0, 971, 972, 7, 2, 0, 0, 972, 973, 7, 9, 0, 0, 973, 974, 7, 0, 0, 0, 974, 186, 1, 0, 0, 0, 975, 976, 7, 2, 0, 0, 976, 977, 7, 9, 0, 0, 977, 978, 7, 9, 0, 0, 978, 188, 1, 0, 0, 0, 979, 980, 7, 2, 0, 0, 980, 981, 7, 19, 0, 0, 981, 982, 7, 4, 0, 0, 982, 983, 7, 3, 0, 0, 983, 984, 7, 8, 0, 0, 984, 985, 7, 5, 0, 0, 985, 986, 7, 14, 0, 0, 986, 987, 7, 18, 0, 0, 987, 190, 1, 0, 0, 0, 988, 989, 7, 2, 0, 0, 989, 990, 7, 5, 0, 0, 990, 991, 7, 0, 0, 0, 991, 192, 1, 0, 0, 0, 992, 993, 7, 2, 0, 0, 993, 994, 7, 5, 0, 0, 994, 995, 7, 9, 0, 0, 995, 194, 1, 0, 0, 0, 996, 997, 7, 2, 0, 0, 997, 998, 7, 14, 0, 0, 998, 999, 7, 1, 0, 0, 999, 1000, 7, 11, 0, 0, 1000, 1001, 7, 0, 0, 0, 1001, 1002, 7, 8, 0, 0, 1002, 1003, 7, 14, 0, 0, 1003, 1004, 7, 5, 0, 0, 1004, 1005, 7, 4, 0, 0, 1005, 196, 1, 0, 0, 0, 1006, 1007, 7, 2, 0, 0, 1007, 1008, 7, 14, 0, 0, 1008, 1009, 7, 1, 0, 0, 1009, 1010, 7, 8, 0, 0, 1010, 1011, 7, 15, 0, 0, 1011, 1012, 7, 19, 0, 0, 1012, 1013, 7, 4, 0, 0, 1013, 198, 1, 0, 0, 0, 1014, 1015, 7, 8, 0, 0, 1015, 1016, 7, 4, 0, 0, 1016, 1017, 7, 5, 0, 0, 1017, 1018, 7, 18, 0, 0, 1018, 1019, 7, 10, 0, 0, 1019, 1020, 7, 11, 0, 0, 1020, 1021, 7, 0, 0, 0, 1021, 1022, 7, 9, 0, 0, 1022, 200, 1, 0, 0, 0, 1023, 1024, 7, 8, 0, 0, 1024, 1025, 7, 13, 0, 0, 1025, 1026, 7, 4, 0, 0, 1026, 1027, 7, 11, 0, 0, 1027, 202, 1, 0, 0, 0, 1028, 1029, 7, 8, 0, 0, 1029, 1030, 7, 13, 0, 0, 1030, 1031, 7, 5, 0, 0, 1031, 1032, 7, 6, 0, 0, 1032, 1033, 7, 14, 0, 0, 1033, 1034, 7, 16, 0, 0, 1034, 1035, 7, 13, 0, 0, 1035, 204, 1, 0, 0, 0, 1036, 1037, 7, 8, 0, 0, 1037, 1038, 7, 6, 0, 0, 1038, 206, 1, 0, 0, 0, 1039, 1040, 7, 8, 0, 0, 1040, 1041, 7, 6, 0, 0, 1041, 1042, 7, 9, 0, 0, 1042, 1043, 7, 4, 0, 0, 1043, 1044, 7, 5, 0, 0, 1044, 1045, 7, 0, 0, 0, 1045, 1046, 7, 11, 0, 0, 1046, 1047, 7, 3, 0, 0, 1047, 1048, 7, 4, 0, 0, 1048, 208, 1, 0, 0, 0, 1049, 1050, 7, 8, 0, 0, 1050, 1051, 7, 5, 0, 0, 1051, 1052, 7, 0, 0, 0, 1052, 1053, 7, 11, 0, 0, 1053, 1054, 7, 2, 0, 0, 1054, 1055, 7, 19, 0, 0, 1055, 1056, 7, 6, 0, 0, 1056, 1057, 7, 5, 0, 0, 1057, 1058, 7, 8, 0, 0, 1058, 210, 1, 0, 0, 0, 1059, 1060, 7, 8, 0, 0, 1060, 1061, 7, 15, 0, 0, 1061, 1062, 7, 19, 0, 0, 1062, 1063, 7, 4, 0, 0, 1063, 212, 1, 0, 0, 0, 1064, 1065, 7, 14, 0, 0, 1065, 1066, 7, 11, 0, 0, 1066, 1067, 7, 0, 0, 0, 1067, 1068, 7, 7, 0, 0, 1068, 1069, 7, 7, 0, 0, 1069, 1070, 7, 4, 0, 0, 1070, 1071, 7, 3, 0, 0, 1071, 1072, 7, 8, 0, 0, 1072, 1073, 7, 4, 0, 0, 1073, 1074, 7, 12, 0, 0, 1074, 214, 1, 0, 0, 0, 1075, 1076, 7, 14, 0, 0, 1076, 1077, 7, 11, 0, 0, 1077, 1078, 7, 10, 0, 0, 1078, 1079, 7, 8, 0, 0, 1079, 1080, 7, 2, 0, 0, 1080, 216, 1, 0, 0, 0, 1081, 1082, 7, 14, 0, 0, 1082, 1083, 7, 11, 0, 0, 1083, 1084, 7, 8, 0, 0, 1084, 1085, 7, 10, 0, 0, 1085, 1086, 7, 9, 0, 0, 1086, 218, 1, 0, 0, 0, 1087, 1088, 7, 14, 0, 0, 1088, 1089, 7, 2, 0, 0, 1089, 1090, 7, 4, 0, 0, 1090, 220, 1, 0, 0, 0, 1091, 1092, 7, 23, 0, 0, 1092, 1093, 7, 0, 0, 0, 1093, 1094, 7, 5, 0, 0, 1094, 1095, 7, 10, 0, 0, 1095, 1096, 7, 0, 0, 0, 1096, 1097, 7, 1, 0, 0, 1097, 1098, 7, 9, 0, 0, 1098, 1099, 7, 4, 0, 0, 1099, 222, 1, 0, 0, 0, 1100, 1101, 7, 21, 0, 0, 1101, 1102, 7, 0, 0, 0, 1102, 1103, 7, 10, 0, 0, 1103, 1104, 7, 8, 0, 0, 1104, 224, 1, 0, 0, 0, 1105, 1106, 7, 21, 0, 0, 1106, 1107, 7, 10, 0, 0, 1107, 1108, 7, 8, 0, 0, 1108, 1109, 7, 13, 0, 0, 1109, 226, 1, 0, 0, 0, 1110, 1111, 7, 21, 0, 0, 1111, 1112, 7, 13, 0, 0, 1112, 1113, 7, 4, 0, 0, 1113, 1114, 7, 11, 0, 0, 1114, 228, 1, 0, 0, 0, 1115, 1116, 7, 21, 0, 0, 1116, 1117, 7, 13, 0, 0, 1117, 1118, 7, 10, 0, 0, 1118, 1119, 7, 9, 0, 0, 1119, 1120, 7, 4, 0, 0, 1120, 230, 1, 0, 0, 0, 1121, 1122, 7, 20, 0, 0, 1122, 1123, 7, 11, 0, 0, 1123, 1124, 7, 6, 0, 0, 1124, 1125, 7, 5, 0, 0, 1125, 232, 1, 0, 0, 0, 1126, 1127, 7, 20, 0, 0, 1127, 1128, 7, 6, 0, 0, 1128, 1129, 7, 5, 0, 0, 1129, 234, 1, 0, 0, 0, 1130, 1134, 3, 349, 174, 0, 1131, 1132, 3, 339, 169, 0, 1132, 1133, 3, 349, 174, 0, 1133, 1135, 1, 0, 0, 0, 1134, 1131, 1, 0, 0, 0, 1134, 1135, 1, 0, 0, 0, 1135, 1137, 1, 0, 0, 0, 1136, 1138, 3, 345, 172, 0, 1137, 1136, 1, 0, 0, 0, 1137, 1138, 1, 0, 0, 0, 1138, 236, 1, 0, 0, 0, 1139, 1146, 5, 34, 0, 0, 1140, 1145, 8, 25, 0, 0, 1141, 1145, 5, 39, 0, 0, 1142, 1143, 5, 34, 0, 0, 1143, 1145, 5, 34, 0, 0, 1144, 1140, 1, 0, 0, 0, 1144, 1141, 1, 0, 0, 0, 1144, 1142, 1, 0, 0, 0, 1145, 1148, 1, 0, 0, 0, 1146, 1144, 1, 0, 0, 0, 1146, 1147, 1, 0, 0, 0, 1147, 1149, 1, 0, 0, 0, 1148, 1146, 1, 0, 0, 0, 1149, 1150, 5, 34, 0, 0, 1150, 238, 1, 0, 0, 0, 1151, 1152, 3, 349, 174, 0, 1152, 1153, 3, 297, 148, 0, 1153, 1157, 3, 353, 176, 0, 1154, 1155, 3, 339, 169, 0, 1155, 1156, 3, 353, 176, 0, 1156, 1158, 1, 0, 0, 0, 1157, 1154, 1, 0, 0, 0, 1157, 1158, 1, 0, 0, 0, 1158, 1159, 1, 0, 0, 0, 1159, 1161, 3, 297, 148, 0, 1160, 1162, 3, 345, 172, 0, 1161, 1160, 1, 0, 0, 0, 1161, 1162, 1, 0, 0, 0, 1162, 240, 1, 0, 0, 0, 1163, 1167, 3, 243, 121, 0, 1164, 1167, 3, 245, 122, 0, 1165, 1167, 3, 247, 123, 0, 1166, 1163, 1, 0, 0, 0, 1166, 1164, 1, 0, 0, 0, 1166, 1165, 1, 0, 0, 0, 1167, 242, 1, 0, 0, 0, 1168, 1169, 7, 1, 0, 0, 1169, 1170, 5, 34, 0, 0, 1170, 1172, 1, 0, 0, 0, 1171, 1173, 7, 26, 0, 0, 1172, 1171, 1, 0, 0, 0, 1173, 1174, 1, 0, 0, 0, 1174, 1172, 1, 0, 0, 0, 1174, 1175, 1, 0, 0, 0, 1175, 1176, 1, 0, 0, 0, 1176, 1177, 5, 34, 0, 0, 1177, 244, 1, 0, 0, 0, 1178, 1179, 7, 6, 0, 0, 1179, 1180, 5, 34, 0, 0, 1180, 1182, 1, 0, 0, 0, 1181, 1183, 7, 27, 0, 0, 1182, 1181, 1, 0, 0, 0, 1183, 1184, 1, 0, 0, 0, 1184, 1182, 1, 0, 0, 0, 1184, 1185, 1, 0, 0, 0, 1185, 1186, 1, 0, 0, 0, 1186, 1187, 5, 34, 0, 0, 1187, 246, 1, 0, 0, 0, 1188, 1189, 7, 20, 0, 0, 1189, 1190, 5, 34, 0, 0, 1190, 1192, 1, 0, 0, 0, 1191, 1193, 7, 28, 0, 0, 1192, 1191, 1, 0, 0, 0, 1193, 1194, 1, 0, 0, 0, 1194, 1192, 1, 0, 0, 0, 1194, 1195, 1, 0, 0, 0, 1195, 1196, 1, 0, 0, 0, 1196, 1197, 5, 34, 0, 0, 1197, 248, 1, 0, 0, 0, 1198, 1208, 3, 253, 126, 0, 1199, 1202, 5, 95, 0, 0, 1200, 1203, 3, 253, 126, 0, 1201, 1203, 3, 351, 175, 0, 1202, 1200, 1, 0, 0, 0, 1202, 1201, 1, 0, 0, 0, 1203, 1207, 1, 0, 0, 0, 1204, 1207, 3, 253, 126, 0, 1205, 1207, 3, 351, 175, 0, 1206, 1199, 1, 0, 0, 0, 1206, 1204, 1, 0, 0, 0, 1206, 1205, 1, 0, 0, 0, 1207, 1210, 1, 0, 0, 0, 1208, 1206, 1, 0, 0, 0, 1208, 1209, 1, 0, 0, 0, 1209, 250, 1, 0, 0, 0, 1210, 1208, 1, 0, 0, 0, 1211, 1216, 5, 92, 0, 0, 1212, 1217, 3, 253, 126, 0, 1213, 1217, 7, 29, 0, 0, 1214, 1217, 3, 269, 134, 0, 1215, 1217, 7, 30, 0, 0, 1216, 1212, 1, 0, 0, 0, 1216, 1213, 1, 0, 0, 0, 1216, 1214, 1, 0, 0, 0, 1216, 1215, 1, 0, 0, 0, 1217, 1218, 1, 0, 0, 0, 1218, 1216, 1, 0, 0, 0, 1218, 1219, 1, 0, 0, 0, 1219, 1220, 1, 0, 0, 0, 1220, 1221, 5, 92, 0, 0, 1221, 252, 1, 0, 0, 0, 1222, 1223, 7, 31, 0, 0, 1223, 254, 1, 0, 0, 0, 1224, 1225, 5, 47, 0, 0, 1225, 1226, 5, 42, 0, 0, 1226, 1230, 1, 0, 0, 0, 1227, 1229, 9, 0, 0, 0, 1228, 1227, 1, 0, 0, 0, 1229, 1232, 1, 0, 0, 0, 1230, 1231, 1, 0, 0, 0, 1230, 1228, 1, 0, 0, 0, 1231, 1233, 1, 0, 0, 0, 1232, 1230, 1, 0, 0, 0, 1233, 1234, 5, 42, 0, 0, 1234, 1235, 5, 47, 0, 0, 1235, 1236, 1, 0, 0, 0, 1236, 1237, 6, 127, 0, 0, 1237, 256, 1, 0, 0, 0, 1238, 1239, 5, 45, 0, 0, 1239, 1240, 5, 45, 0, 0, 1240, 1244, 1, 0, 0, 0, 1241, 1243, 8, 32, 0, 0, 1242, 1241, 1, 0, 0, 0, 1243, 1246, 1, 0, 0, 0, 1244, 1242, 1, 0, 0, 0, 1244, 1245, 1, 0, 0, 0, 1245, 1247, 1, 0, 0, 0, 1246, 1244, 1, 0, 0, 0, 1247, 1248, 6, 128, 0, 0, 1248, 258, 1, 0, 0, 0, 1249, 1251, 5, 9, 0, 0, 1250, 1249, 1, 0, 0, 0, 1251, 1252, 1, 0, 0, 0, 1252, 1250, 1, 0, 0, 0, 1252, 1253, 1, 0, 0, 0, 1253, 1254, 1, 0, 0, 0, 1254, 1255, 6, 129, 0, 0, 1255, 260, 1, 0, 0, 0, 1256, 1258, 5, 32, 0, 0, 1257, 1256, 1, 0, 0, 0, 1258, 1259, 1, 0, 0, 0, 1259, 1257, 1, 0, 0, 0, 1259, 1260, 1, 0, 0, 0, 1260, 1261, 1, 0, 0, 0, 1261, 1262, 6, 130, 0, 0, 1262, 262, 1, 0, 0, 0, 1263, 1264, 5, 10, 0, 0, 1264, 1265, 1, 0, 0, 0, 1265, 1266, 6, 131, 0, 0, 1266, 264, 1, 0, 0, 0, 1267, 1268, 5, 13, 0, 0, 1268, 1269, 1, 0, 0, 0, 1269, 1270, 6, 132, 0, 0, 1270, 266, 1, 0, 0, 0, 1271, 1272, 3, 357, 178, 0, 1272, 1273, 9, 0, 0, 0, 1273, 1274, 3, 357, 178, 0, 1274, 268, 1, 0, 0, 0, 1275, 1276, 7, 33, 0, 0, 1276, 270, 1, 0, 0, 0, 1277, 1278, 5, 42, 0, 0, 1278, 1279, 5, 42, 0, 0, 1279, 272, 1, 0, 0, 0, 1280, 1281, 5, 63, 0, 0, 1281, 1282, 5, 63, 0, 0, 1282, 274, 1, 0, 0, 0, 1283, 1284, 5, 63, 0, 0, 1284, 1285, 5, 61, 0, 0, 1285, 276, 1, 0, 0, 0, 1286, 1287, 5, 63, 0, 0, 1287, 1288, 5, 47, 0, 0, 1288, 1289, 7, 4, 0, 0, 1289, 278, 1, 0, 0, 0, 1290, 1291, 5, 63, 0, 0, 1291, 1292, 5, 60, 0, 0, 1292, 1293, 5, 61, 0, 0, 1293, 280, 1, 0, 0, 0, 1294, 1295, 5, 63, 0, 0, 1295, 1296, 5, 60, 0, 0, 1296, 282, 1, 0, 0, 0, 1297, 1298, 5, 63, 0, 0, 1298, 1299, 5, 62, 0, 0, 1299, 1300, 5, 61, 0, 0, 1300, 284, 1, 0, 0, 0, 1301, 1302, 5, 63, 0, 0, 1302, 1303, 5, 62, 0, 0, 1303, 286, 1, 0, 0, 0, 1304, 1305, 5, 61, 0, 0, 1305, 1306, 5, 61, 0, 0, 1306, 288, 1, 0, 0, 0, 1307, 1308, 5, 64, 0, 0, 1308, 290, 1, 0, 0, 0, 1309, 1310, 5, 60, 0, 0, 1310, 1311, 5, 61, 0, 0, 1311, 292, 1, 0, 0, 0, 1312, 1313, 5, 62, 0, 0, 1313, 1314, 5, 61, 0, 0, 1314, 294, 1, 0, 0, 0, 1315, 1316, 5, 61, 0, 0, 1316, 1317, 5, 62, 0, 0, 1317, 296, 1, 0, 0, 0, 1318, 1319, 5, 35, 0, 0, 1319, 298, 1, 0, 0, 0, 1320, 1321, 5, 47, 0, 0, 1321, 1322, 5, 61, 0, 0, 1322, 300, 1, 0, 0, 0, 1323, 1324, 5, 58, 0, 0, 1324, 1325, 5, 61, 0, 0, 1325, 302, 1, 0, 0, 0, 1326, 1327, 5, 60, 0, 0, 1327, 1328, 5, 62, 0, 0, 1328, 304, 1, 0, 0, 0, 1329, 1330, 5, 34, 0, 0, 1330, 306, 1, 0, 0, 0, 1331, 1332, 5, 59, 0, 0, 1332, 308, 1, 0, 0, 0, 1333, 1334, 5, 44, 0, 0, 1334, 310, 1, 0, 0, 0, 1335, 1336, 5, 38, 0, 0, 1336, 312, 1, 0, 0, 0, 1337, 1338, 5, 40, 0, 0, 1338, 314, 1, 0, 0, 0, 1339, 1340, 5, 41, 0, 0, 1340, 316, 1, 0, 0, 0, 1341, 1342, 5, 91, 0, 0, 1342, 318, 1, 0, 0, 0, 1343, 1344, 5, 93, 0, 0, 1344, 320, 1, 0, 0, 0, 1345, 1346, 5, 58, 0, 0, 1346, 322, 1, 0, 0, 0, 1347, 1348, 5, 42, 0, 0, 1348, 324, 1, 0, 0, 0, 1349, 1350, 5, 47, 0, 0, 1350, 326, 1, 0, 0, 0, 1351, 1352, 5, 43, 0, 0, 1352, 328, 1, 0, 0, 0, 1353, 1354, 5, 45, 0, 0, 1354, 330, 1, 0, 0, 0, 1355, 1356, 5, 60, 0, 0, 1356, 332, 1, 0, 0, 0, 1357, 1358, 5, 62, 0, 0, 1358, 334, 1, 0, 0, 0, 1359, 1360, 5, 61, 0, 0, 1360, 336, 1, 0, 0, 0, 1361, 1362, 5, 124, 0, 0, 1362, 338, 1, 0, 0, 0, 1363, 1364, 5, 46, 0, 0, 1364, 340, 1, 0, 0, 0, 1365, 1366, 5, 92, 0, 0, 1366, 342, 1, 0, 0, 0, 1367, 1368, 5, 96, 0, 0, 1368, 344, 1, 0, 0, 0, 1369, 1371, 7, 4, 0, 0, 1370, 1372, 7, 34, 0, 0, 1371, 1370, 1, 0, 0, 0, 1371, 1372, 1, 0, 0, 0, 1372, 1373, 1, 0, 0, 0, 1373, 1377, 3, 349, 174, 0, 1374, 1375, 3, 339, 169, 0, 1375, 1376, 3, 349, 174, 0, 1376, 1378, 1, 0, 0, 0, 1377, 1374, 1, 0, 0, 0, 1377, 1378, 1, 0, 0, 0, 1378, 346, 1, 0, 0, 0, 1379, 1380, 7, 35, 0, 0, 1380, 348, 1, 0, 0, 0, 1381, 1386, 3, 351, 175, 0, 1382, 1385, 5, 95, 0, 0, 1383, 1385, 3, 351, 175, 0, 1384, 1382, 1, 0, 0, 0, 1384, 1383, 1, 0, 0, 0, 1385, 1388, 1, 0, 0, 0, 1386, 1384, 1, 0, 0, 0, 1386, 1387, 1, 0, 0, 0, 1387, 350, 1, 0, 0, 0, 1388, 1386, 1, 0, 0, 0, 1389, 1390, 2, 48, 57, 0, 1390, 352, 1, 0, 0, 0, 1391, 1396, 3, 355, 177, 0, 1392, 1395, 5, 95, 0, 0, 1393, 1395, 3, 355, 177, 0, 1394, 1392, 1, 0, 0, 0, 1394, 1393, 1, 0, 0, 0, 1395, 1398, 1, 0, 0, 0, 1396, 1394, 1, 0, 0, 0, 1396, 1397, 1, 0, 0, 0, 1397, 354, 1, 0, 0, 0, 1398, 1396, 1, 0, 0, 0, 1399, 1402, 3, 351, 175, 0, 1400, 1402, 3, 253, 126, 0, 1401, 1399, 1, 0, 0, 0, 1401, 1400, 1, 0, 0, 0, 1402, 356, 1, 0, 0, 0, 1403, 1404, 5, 39, 0, 0, 1404, 358, 1, 0, 0, 0, 1405, 1406, 5, 63, 0, 0, 1406, 360, 1, 0, 0, 0, 27, 0, 1134, 1137, 1144, 1146, 1157, 1161, 1166, 1174, 1184, 1194, 1202, 1206, 1208, 1216, 1218, 1230, 1244, 1252, 1259, 1371, 1377, 1384, 1386, 1394, 1396, 1401, 1, 6, 0, 0] \ No newline at end of file diff --git a/src/ApiMark.Vhdl/VhdlAst/Antlr/vhdl2008Lexer.tokens b/src/ApiMark.Vhdl/VhdlAst/Antlr/vhdl2008Lexer.tokens new file mode 100644 index 0000000..3bfdb14 --- /dev/null +++ b/src/ApiMark.Vhdl/VhdlAst/Antlr/vhdl2008Lexer.tokens @@ -0,0 +1,338 @@ +ABS=1 +ACCESS=2 +ACROSS=3 +AFTER=4 +ALIAS=5 +ALL=6 +AND=7 +ARCHITECTURE=8 +ARRAY=9 +ASSERT=10 +ATTRIBUTE=11 +BEGIN=12 +BLOCK=13 +BODY=14 +BREAK=15 +BUFFER=16 +BUS=17 +CASE=18 +COMPONENT=19 +CONFIGURATION=20 +CONSTANT=21 +CONTEXT=22 +DEFAULT=23 +DISCONNECT=24 +DOWNTO=25 +END=26 +ENTITY=27 +ELSE=28 +ELSIF=29 +EXIT=30 +FILE=31 +FOR=32 +FORCE=33 +FUNCTION=34 +GENERATE=35 +GENERIC=36 +GROUP=37 +GUARDED=38 +IF=39 +IMPURE=40 +IN=41 +INERTIAL=42 +INOUT=43 +IS=44 +LABEL=45 +LIBRARY=46 +LIMIT=47 +LINKAGE=48 +LITERAL=49 +LOOP=50 +MAP=51 +MOD=52 +NAND=53 +NATURE=54 +NEW=55 +NEXT=56 +NOISE=57 +NOR=58 +NOT=59 +NULL_=60 +OF=61 +ON=62 +OPEN=63 +OR=64 +OTHERS=65 +OUT=66 +PACKAGE=67 +PARAMETER=68 +PORT=69 +POSTPONED=70 +PROCESS=71 +PROCEDURE=72 +PROCEDURAL=73 +PROTECTED=74 +PURE=75 +QUANTITY=76 +RANGE=77 +RELEASE=78 +REVERSE_RANGE=79 +REJECT=80 +REM=81 +RECORD=82 +REFERENCE=83 +REGISTER=84 +REPORT=85 +RETURN=86 +ROL=87 +ROR=88 +SELECT=89 +SEVERITY=90 +SHARED=91 +SIGNAL=92 +SLA=93 +SLL=94 +SPECTRUM=95 +SRA=96 +SRL=97 +SUBNATURE=98 +SUBTYPE=99 +TERMINAL=100 +THEN=101 +THROUGH=102 +TO=103 +TOLERANCE=104 +TRANSPORT=105 +TYPE=106 +UNAFFECTED=107 +UNITS=108 +UNTIL=109 +USE=110 +VARIABLE=111 +WAIT=112 +WITH=113 +WHEN=114 +WHILE=115 +XNOR=116 +XOR=117 +DECIMAL_LITERAL=118 +STRING_LITERAL=119 +BASED_LITERAL=120 +BIT_STRING_LITERAL=121 +BIT_STRING_LITERAL_BINARY=122 +BIT_STRING_LITERAL_OCTAL=123 +BIT_STRING_LITERAL_HEX=124 +BASIC_IDENTIFIER=125 +EXTENDED_IDENTIFIER=126 +LETTER=127 +BLOCK_COMMENT=128 +COMMENT=129 +TAB=130 +SPACE=131 +NEWLINE=132 +CR=133 +CHARACTER_LITERAL=134 +OTHER_SPECIAL_CHARACTER=135 +DOUBLESTAR=136 +CONDITION_OPERATOR=137 +CONDITION_EQ=138 +CONDITION_NEQ=139 +CONDITION_LEQ=140 +CONDITION_LESSTHAN=141 +CONDITION_GEQ=142 +CONDITION_GREATERTHAN=143 +ASSIGN=144 +AT=145 +LEQ=146 +GEQ=147 +ARROW=148 +HASH=149 +NEQ=150 +WALRUS=151 +BOX=152 +DBLQUOTE=153 +SEMI=154 +COMMA=155 +AMPERSAND=156 +LPAREN=157 +RPAREN=158 +LBRACKET=159 +RBRACKET=160 +COLON=161 +MUL=162 +DIV=163 +PLUS=164 +MINUS=165 +LESSTHAN=166 +GREATERTHAN=167 +EQ=168 +BAR=169 +DOT=170 +BACKSLASH=171 +BACKTICK=172 +EXPONENT=173 +HEXDIGIT=174 +INTEGER=175 +DIGIT=176 +BASED_INTEGER=177 +EXTENDED_DIGIT=178 +APOSTROPHE=179 +QUESTION=180 +'ABS'=1 +'ACCESS'=2 +'ACROSS'=3 +'AFTER'=4 +'ALIAS'=5 +'ALL'=6 +'AND'=7 +'ARCHITECTURE'=8 +'ARRAY'=9 +'ASSERT'=10 +'ATTRIBUTE'=11 +'BEGIN'=12 +'BLOCK'=13 +'BODY'=14 +'BREAK'=15 +'BUFFER'=16 +'BUS'=17 +'CASE'=18 +'COMPONENT'=19 +'CONFIGURATION'=20 +'CONSTANT'=21 +'CONTEXT'=22 +'DEFAULT'=23 +'DISCONNECT'=24 +'DOWNTO'=25 +'END'=26 +'ENTITY'=27 +'ELSE'=28 +'ELSIF'=29 +'EXIT'=30 +'FILE'=31 +'FOR'=32 +'FORCE'=33 +'FUNCTION'=34 +'GENERATE'=35 +'GENERIC'=36 +'GROUP'=37 +'GUARDED'=38 +'IF'=39 +'IMPURE'=40 +'IN'=41 +'INERTIAL'=42 +'INOUT'=43 +'IS'=44 +'LABEL'=45 +'LIBRARY'=46 +'LIMIT'=47 +'LINKAGE'=48 +'LITERAL'=49 +'LOOP'=50 +'MAP'=51 +'MOD'=52 +'NAND'=53 +'NATURE'=54 +'NEW'=55 +'NEXT'=56 +'NOISE'=57 +'NOR'=58 +'NOT'=59 +'NULL'=60 +'OF'=61 +'ON'=62 +'OPEN'=63 +'OR'=64 +'OTHERS'=65 +'OUT'=66 +'PACKAGE'=67 +'PARAMETER'=68 +'PORT'=69 +'POSTPONED'=70 +'PROCESS'=71 +'PROCEDURE'=72 +'PROCEDURAL'=73 +'PROTECTED'=74 +'PURE'=75 +'QUANTITY'=76 +'RANGE'=77 +'RELEASE'=78 +'REVERSE_RANGE'=79 +'REJECT'=80 +'REM'=81 +'RECORD'=82 +'REFERENCE'=83 +'REGISTER'=84 +'REPORT'=85 +'RETURN'=86 +'ROL'=87 +'ROR'=88 +'SELECT'=89 +'SEVERITY'=90 +'SHARED'=91 +'SIGNAL'=92 +'SLA'=93 +'SLL'=94 +'SPECTRUM'=95 +'SRA'=96 +'SRL'=97 +'SUBNATURE'=98 +'SUBTYPE'=99 +'TERMINAL'=100 +'THEN'=101 +'THROUGH'=102 +'TO'=103 +'TOLERANCE'=104 +'TRANSPORT'=105 +'TYPE'=106 +'UNAFFECTED'=107 +'UNITS'=108 +'UNTIL'=109 +'USE'=110 +'VARIABLE'=111 +'WAIT'=112 +'WITH'=113 +'WHEN'=114 +'WHILE'=115 +'XNOR'=116 +'XOR'=117 +'\n'=132 +'\r'=133 +'**'=136 +'??'=137 +'?='=138 +'?/E'=139 +'?<='=140 +'?<'=141 +'?>='=142 +'?>'=143 +'=='=144 +'@'=145 +'<='=146 +'>='=147 +'=>'=148 +'#'=149 +'/='=150 +':='=151 +'<>'=152 +'"'=153 +';'=154 +','=155 +'&'=156 +'('=157 +')'=158 +'['=159 +']'=160 +':'=161 +'*'=162 +'/'=163 +'+'=164 +'-'=165 +'<'=166 +'>'=167 +'='=168 +'|'=169 +'.'=170 +'\\'=171 +'`'=172 +'\''=179 +'?'=180 diff --git a/src/ApiMark.Vhdl/VhdlAst/Antlr/vhdl2008Parser.cs b/src/ApiMark.Vhdl/VhdlAst/Antlr/vhdl2008Parser.cs new file mode 100644 index 0000000..ab34d42 --- /dev/null +++ b/src/ApiMark.Vhdl/VhdlAst/Antlr/vhdl2008Parser.cs @@ -0,0 +1,20354 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// ANTLR Version: 4.13.1 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// Generated from vhdl2008.g4 by ANTLR 4.13.1 + +// Unreachable code detected +#pragma warning disable 0162 +// The variable '...' is assigned but its value is never used +#pragma warning disable 0219 +// Missing XML comment for publicly visible type or member '...' +#pragma warning disable 1591 +// Ambiguous reference in cref attribute +#pragma warning disable 419 + +namespace ApiMark.Vhdl.VhdlAst.Antlr { +using System; +using System.IO; +using System.Text; +using System.Diagnostics; +using System.Collections.Generic; +using Antlr4.Runtime; +using Antlr4.Runtime.Atn; +using Antlr4.Runtime.Misc; +using Antlr4.Runtime.Tree; +using DFA = Antlr4.Runtime.Dfa.DFA; + +[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.1")] +[System.CLSCompliant(false)] +public partial class vhdl2008Parser : Parser { + protected static DFA[] decisionToDFA; + protected static PredictionContextCache sharedContextCache = new PredictionContextCache(); + public const int + ABS=1, ACCESS=2, ACROSS=3, AFTER=4, ALIAS=5, ALL=6, AND=7, ARCHITECTURE=8, + ARRAY=9, ASSERT=10, ATTRIBUTE=11, BEGIN=12, BLOCK=13, BODY=14, BREAK=15, + BUFFER=16, BUS=17, CASE=18, COMPONENT=19, CONFIGURATION=20, CONSTANT=21, + CONTEXT=22, DEFAULT=23, DISCONNECT=24, DOWNTO=25, END=26, ENTITY=27, ELSE=28, + ELSIF=29, EXIT=30, FILE=31, FOR=32, FORCE=33, FUNCTION=34, GENERATE=35, + GENERIC=36, GROUP=37, GUARDED=38, IF=39, IMPURE=40, IN=41, INERTIAL=42, + INOUT=43, IS=44, LABEL=45, LIBRARY=46, LIMIT=47, LINKAGE=48, LITERAL=49, + LOOP=50, MAP=51, MOD=52, NAND=53, NATURE=54, NEW=55, NEXT=56, NOISE=57, + NOR=58, NOT=59, NULL_=60, OF=61, ON=62, OPEN=63, OR=64, OTHERS=65, OUT=66, + PACKAGE=67, PARAMETER=68, PORT=69, POSTPONED=70, PROCESS=71, PROCEDURE=72, + PROCEDURAL=73, PROTECTED=74, PURE=75, QUANTITY=76, RANGE=77, RELEASE=78, + REVERSE_RANGE=79, REJECT=80, REM=81, RECORD=82, REFERENCE=83, REGISTER=84, + REPORT=85, RETURN=86, ROL=87, ROR=88, SELECT=89, SEVERITY=90, SHARED=91, + SIGNAL=92, SLA=93, SLL=94, SPECTRUM=95, SRA=96, SRL=97, SUBNATURE=98, + SUBTYPE=99, TERMINAL=100, THEN=101, THROUGH=102, TO=103, TOLERANCE=104, + TRANSPORT=105, TYPE=106, UNAFFECTED=107, UNITS=108, UNTIL=109, USE=110, + VARIABLE=111, WAIT=112, WITH=113, WHEN=114, WHILE=115, XNOR=116, XOR=117, + DECIMAL_LITERAL=118, STRING_LITERAL=119, BASED_LITERAL=120, BIT_STRING_LITERAL=121, + BIT_STRING_LITERAL_BINARY=122, BIT_STRING_LITERAL_OCTAL=123, BIT_STRING_LITERAL_HEX=124, + BASIC_IDENTIFIER=125, EXTENDED_IDENTIFIER=126, LETTER=127, BLOCK_COMMENT=128, + COMMENT=129, TAB=130, SPACE=131, NEWLINE=132, CR=133, CHARACTER_LITERAL=134, + OTHER_SPECIAL_CHARACTER=135, DOUBLESTAR=136, CONDITION_OPERATOR=137, CONDITION_EQ=138, + CONDITION_NEQ=139, CONDITION_LEQ=140, CONDITION_LESSTHAN=141, CONDITION_GEQ=142, + CONDITION_GREATERTHAN=143, ASSIGN=144, AT=145, LEQ=146, GEQ=147, ARROW=148, + HASH=149, NEQ=150, WALRUS=151, BOX=152, DBLQUOTE=153, SEMI=154, COMMA=155, + AMPERSAND=156, LPAREN=157, RPAREN=158, LBRACKET=159, RBRACKET=160, COLON=161, + MUL=162, DIV=163, PLUS=164, MINUS=165, LESSTHAN=166, GREATERTHAN=167, + EQ=168, BAR=169, DOT=170, BACKSLASH=171, BACKTICK=172, EXPONENT=173, HEXDIGIT=174, + INTEGER=175, DIGIT=176, BASED_INTEGER=177, EXTENDED_DIGIT=178, APOSTROPHE=179, + QUESTION=180; + public const int + RULE_abstract_literal = 0, RULE_access_type_definition = 1, RULE_actual_designator = 2, + RULE_actual_parameter_part = 3, RULE_actual_part = 4, RULE_adding_operator = 5, + RULE_aggregate = 6, RULE_alias_declaration = 7, RULE_alias_designator = 8, + RULE_allocator = 9, RULE_architecture_body = 10, RULE_architecture_declarative_part = 11, + RULE_architecture_statement_part = 12, RULE_array_constraint = 13, RULE_array_element_constraint = 14, + RULE_array_element_resolution = 15, RULE_array_type_definition = 16, RULE_assertion = 17, + RULE_assertion_statement = 18, RULE_association_element = 19, RULE_association_list = 20, + RULE_attribute_declaration = 21, RULE_attribute_designator = 22, RULE_attribute_name = 23, + RULE_attribute_specification = 24, RULE_base = 25, RULE_binding_indication = 26, + RULE_block_configuration = 27, RULE_block_declarative_item = 28, RULE_block_declarative_part = 29, + RULE_block_header = 30, RULE_block_specification = 31, RULE_block_statement = 32, + RULE_block_statement_part = 33, RULE_case_generate_alternative = 34, RULE_case_generate_statement = 35, + RULE_case_statement = 36, RULE_case_statement_alternative = 37, RULE_choice = 38, + RULE_choices = 39, RULE_component_configuration = 40, RULE_component_declaration = 41, + RULE_component_instantiation_statement = 42, RULE_component_specification = 43, + RULE_composite_type_definition = 44, RULE_concurrent_assertion_statement = 45, + RULE_concurrent_conditional_signal_assignment = 46, RULE_concurrent_procedure_call_statement = 47, + RULE_concurrent_selected_signal_assignment = 48, RULE_concurrent_signal_assignment_statement = 49, + RULE_concurrent_simple_signal_assignment = 50, RULE_concurrent_statement = 51, + RULE_condition = 52, RULE_condition_clause = 53, RULE_conditional_expression = 54, + RULE_conditional_force_assignment = 55, RULE_conditional_signal_assignment = 56, + RULE_conditional_variable_assignment = 57, RULE_conditional_waveform_assignment = 58, + RULE_conditional_waveforms = 59, RULE_configuration_declaration = 60, + RULE_configuration_declarative_item = 61, RULE_configuration_declarative_part = 62, + RULE_configuration_item = 63, RULE_configuration_specification = 64, RULE_constant_declaration = 65, + RULE_constrained_array_definition = 66, RULE_constraint = 67, RULE_context_clause = 68, + RULE_context_declaration = 69, RULE_context_item = 70, RULE_context_reference = 71, + RULE_delay_mechanism = 72, RULE_design_file = 73, RULE_design_unit = 74, + RULE_designator = 75, RULE_direction = 76, RULE_disconnection_specification = 77, + RULE_discrete_range = 78, RULE_element_association = 79, RULE_element_constraint = 80, + RULE_element_declaration = 81, RULE_element_resolution = 82, RULE_element_subtype_definition = 83, + RULE_entity_aspect = 84, RULE_entity_class = 85, RULE_entity_class_entry = 86, + RULE_entity_class_entry_list = 87, RULE_entity_declaration = 88, RULE_entity_declarative_item = 89, + RULE_entity_declarative_part = 90, RULE_entity_designator = 91, RULE_entity_header = 92, + RULE_entity_name_list = 93, RULE_entity_specification = 94, RULE_entity_statement = 95, + RULE_entity_statement_part = 96, RULE_entity_tag = 97, RULE_enumeration_literal = 98, + RULE_enumeration_type_definition = 99, RULE_exit_statement = 100, RULE_expression = 101, + RULE_factor = 102, RULE_file_declaration = 103, RULE_file_logical_name = 104, + RULE_file_open_information = 105, RULE_file_type_definition = 106, RULE_floating_type_definition = 107, + RULE_for_generate_statement = 108, RULE_force_mode = 109, RULE_formal_parameter_list = 110, + RULE_formal_part = 111, RULE_full_type_declaration = 112, RULE_function_call = 113, + RULE_function_specification = 114, RULE_generate_specification = 115, + RULE_generate_statement = 116, RULE_generate_statement_body = 117, RULE_generic_clause = 118, + RULE_generic_list = 119, RULE_generic_map_aspect = 120, RULE_graphic_character = 121, + RULE_group_constituent = 122, RULE_group_constituent_list = 123, RULE_group_declaration = 124, + RULE_group_template_declaration = 125, RULE_guarded_signal_specification = 126, + RULE_identifier = 127, RULE_identifier_list = 128, RULE_if_generate_statement = 129, + RULE_if_statement = 130, RULE_incomplete_type_declaration = 131, RULE_index_constraint = 132, + RULE_index_subtype_definition = 133, RULE_indexed_name = 134, RULE_instantiated_unit = 135, + RULE_instantiation_list = 136, RULE_interface_constant_declaration = 137, + RULE_interface_declaration = 138, RULE_interface_file_declaration = 139, + RULE_interface_function_specification = 140, RULE_interface_incomplete_type_declaration = 141, + RULE_interface_list = 142, RULE_interface_object_declaration = 143, RULE_interface_package_declaration = 144, + RULE_interface_package_generic_map_aspect = 145, RULE_interface_procedure_specification = 146, + RULE_interface_signal_declaration = 147, RULE_interface_subprogram_declaration = 148, + RULE_interface_subprogram_default = 149, RULE_interface_subprogram_specification = 150, + RULE_interface_type_declaration = 151, RULE_interface_variable_declaration = 152, + RULE_iteration_scheme = 153, RULE_label_colon = 154, RULE_library_clause = 155, + RULE_library_unit = 156, RULE_literal = 157, RULE_logical_operator = 158, + RULE_loop_statement = 159, RULE_mode_rule = 160, RULE_multiplying_operator = 161, + RULE_name = 162, RULE_name_part = 163, RULE_next_statement = 164, RULE_null_statement = 165, + RULE_numeric_literal = 166, RULE_object_declaration = 167, RULE_package_body = 168, + RULE_package_body_declarative_item = 169, RULE_package_body_declarative_part = 170, + RULE_package_declaration = 171, RULE_package_declarative_item = 172, RULE_package_declarative_part = 173, + RULE_package_header = 174, RULE_package_instantiation_declaration = 175, + RULE_parameter_specification = 176, RULE_physical_literal = 177, RULE_physical_type_definition = 178, + RULE_port_clause = 179, RULE_port_list = 180, RULE_port_map_aspect = 181, + RULE_prefix = 182, RULE_primary = 183, RULE_primary_unit = 184, RULE_primary_unit_declaration = 185, + RULE_procedure_call = 186, RULE_procedure_call_statement = 187, RULE_procedure_specification = 188, + RULE_procedural_declarative_item = 189, RULE_procedural_statement_part = 190, + RULE_process_declarative_item = 191, RULE_process_declarative_part = 192, + RULE_process_sensitivity_list = 193, RULE_process_statement = 194, RULE_process_statement_part = 195, + RULE_protected_type_body = 196, RULE_protected_type_body_declarative_item = 197, + RULE_protected_type_body_declarative_part = 198, RULE_protected_type_declaration = 199, + RULE_protected_type_declarative_item = 200, RULE_protected_type_declarative_part = 201, + RULE_protected_type_definition = 202, RULE_qualified_expression = 203, + RULE_range_decl = 204, RULE_range_constraint = 205, RULE_record_constraint = 206, + RULE_record_element_constraint = 207, RULE_record_element_resolution = 208, + RULE_record_resolution = 209, RULE_record_type_definition = 210, RULE_relation = 211, + RULE_relational_operator = 212, RULE_report_statement = 213, RULE_resolution_indication = 214, + RULE_return_statement = 215, RULE_scalar_type_definition = 216, RULE_secondary_unit = 217, + RULE_secondary_unit_declaration = 218, RULE_selected_expressions = 219, + RULE_selected_force_assignment = 220, RULE_selected_name = 221, RULE_selected_signal_assignment = 222, + RULE_selected_variable_assignment = 223, RULE_selected_waveform_assignment = 224, + RULE_selected_waveforms = 225, RULE_sensitivity_clause = 226, RULE_sensitivity_list = 227, + RULE_sequence_of_statements = 228, RULE_sequential_statement = 229, RULE_shift_expression = 230, + RULE_shift_operator = 231, RULE_signal_assignment_statement = 232, RULE_signal_declaration = 233, + RULE_signal_kind = 234, RULE_signal_list = 235, RULE_signature = 236, + RULE_simple_expression = 237, RULE_simple_force_assignment = 238, RULE_simple_release_assignment = 239, + RULE_simple_signal_assignment = 240, RULE_simple_waveform_assignment = 241, + RULE_simple_variable_assignment = 242, RULE_slice_name = 243, RULE_subprogram_body = 244, + RULE_subprogram_declaration = 245, RULE_subprogram_declarative_item = 246, + RULE_subprogram_declarative_part = 247, RULE_subprogram_header = 248, + RULE_subprogram_instantiation_declaration = 249, RULE_subprogram_kind = 250, + RULE_subprogram_specification = 251, RULE_subprogram_statement_part = 252, + RULE_subtype_declaration = 253, RULE_subtype_indication = 254, RULE_suffix = 255, + RULE_target = 256, RULE_term = 257, RULE_timeout_clause = 258, RULE_tool_directive = 259, + RULE_type_conversion = 260, RULE_type_declaration = 261, RULE_type_definition = 262, + RULE_unbounded_array_definition = 263, RULE_use_clause = 264, RULE_variable_assignment_statement = 265, + RULE_variable_declaration = 266, RULE_wait_statement = 267, RULE_waveform = 268, + RULE_waveform_element = 269; + public static readonly string[] ruleNames = { + "abstract_literal", "access_type_definition", "actual_designator", "actual_parameter_part", + "actual_part", "adding_operator", "aggregate", "alias_declaration", "alias_designator", + "allocator", "architecture_body", "architecture_declarative_part", "architecture_statement_part", + "array_constraint", "array_element_constraint", "array_element_resolution", + "array_type_definition", "assertion", "assertion_statement", "association_element", + "association_list", "attribute_declaration", "attribute_designator", "attribute_name", + "attribute_specification", "base", "binding_indication", "block_configuration", + "block_declarative_item", "block_declarative_part", "block_header", "block_specification", + "block_statement", "block_statement_part", "case_generate_alternative", + "case_generate_statement", "case_statement", "case_statement_alternative", + "choice", "choices", "component_configuration", "component_declaration", + "component_instantiation_statement", "component_specification", "composite_type_definition", + "concurrent_assertion_statement", "concurrent_conditional_signal_assignment", + "concurrent_procedure_call_statement", "concurrent_selected_signal_assignment", + "concurrent_signal_assignment_statement", "concurrent_simple_signal_assignment", + "concurrent_statement", "condition", "condition_clause", "conditional_expression", + "conditional_force_assignment", "conditional_signal_assignment", "conditional_variable_assignment", + "conditional_waveform_assignment", "conditional_waveforms", "configuration_declaration", + "configuration_declarative_item", "configuration_declarative_part", "configuration_item", + "configuration_specification", "constant_declaration", "constrained_array_definition", + "constraint", "context_clause", "context_declaration", "context_item", + "context_reference", "delay_mechanism", "design_file", "design_unit", + "designator", "direction", "disconnection_specification", "discrete_range", + "element_association", "element_constraint", "element_declaration", "element_resolution", + "element_subtype_definition", "entity_aspect", "entity_class", "entity_class_entry", + "entity_class_entry_list", "entity_declaration", "entity_declarative_item", + "entity_declarative_part", "entity_designator", "entity_header", "entity_name_list", + "entity_specification", "entity_statement", "entity_statement_part", "entity_tag", + "enumeration_literal", "enumeration_type_definition", "exit_statement", + "expression", "factor", "file_declaration", "file_logical_name", "file_open_information", + "file_type_definition", "floating_type_definition", "for_generate_statement", + "force_mode", "formal_parameter_list", "formal_part", "full_type_declaration", + "function_call", "function_specification", "generate_specification", "generate_statement", + "generate_statement_body", "generic_clause", "generic_list", "generic_map_aspect", + "graphic_character", "group_constituent", "group_constituent_list", "group_declaration", + "group_template_declaration", "guarded_signal_specification", "identifier", + "identifier_list", "if_generate_statement", "if_statement", "incomplete_type_declaration", + "index_constraint", "index_subtype_definition", "indexed_name", "instantiated_unit", + "instantiation_list", "interface_constant_declaration", "interface_declaration", + "interface_file_declaration", "interface_function_specification", "interface_incomplete_type_declaration", + "interface_list", "interface_object_declaration", "interface_package_declaration", + "interface_package_generic_map_aspect", "interface_procedure_specification", + "interface_signal_declaration", "interface_subprogram_declaration", "interface_subprogram_default", + "interface_subprogram_specification", "interface_type_declaration", "interface_variable_declaration", + "iteration_scheme", "label_colon", "library_clause", "library_unit", "literal", + "logical_operator", "loop_statement", "mode_rule", "multiplying_operator", + "name", "name_part", "next_statement", "null_statement", "numeric_literal", + "object_declaration", "package_body", "package_body_declarative_item", + "package_body_declarative_part", "package_declaration", "package_declarative_item", + "package_declarative_part", "package_header", "package_instantiation_declaration", + "parameter_specification", "physical_literal", "physical_type_definition", + "port_clause", "port_list", "port_map_aspect", "prefix", "primary", "primary_unit", + "primary_unit_declaration", "procedure_call", "procedure_call_statement", + "procedure_specification", "procedural_declarative_item", "procedural_statement_part", + "process_declarative_item", "process_declarative_part", "process_sensitivity_list", + "process_statement", "process_statement_part", "protected_type_body", + "protected_type_body_declarative_item", "protected_type_body_declarative_part", + "protected_type_declaration", "protected_type_declarative_item", "protected_type_declarative_part", + "protected_type_definition", "qualified_expression", "range_decl", "range_constraint", + "record_constraint", "record_element_constraint", "record_element_resolution", + "record_resolution", "record_type_definition", "relation", "relational_operator", + "report_statement", "resolution_indication", "return_statement", "scalar_type_definition", + "secondary_unit", "secondary_unit_declaration", "selected_expressions", + "selected_force_assignment", "selected_name", "selected_signal_assignment", + "selected_variable_assignment", "selected_waveform_assignment", "selected_waveforms", + "sensitivity_clause", "sensitivity_list", "sequence_of_statements", "sequential_statement", + "shift_expression", "shift_operator", "signal_assignment_statement", "signal_declaration", + "signal_kind", "signal_list", "signature", "simple_expression", "simple_force_assignment", + "simple_release_assignment", "simple_signal_assignment", "simple_waveform_assignment", + "simple_variable_assignment", "slice_name", "subprogram_body", "subprogram_declaration", + "subprogram_declarative_item", "subprogram_declarative_part", "subprogram_header", + "subprogram_instantiation_declaration", "subprogram_kind", "subprogram_specification", + "subprogram_statement_part", "subtype_declaration", "subtype_indication", + "suffix", "target", "term", "timeout_clause", "tool_directive", "type_conversion", + "type_declaration", "type_definition", "unbounded_array_definition", "use_clause", + "variable_assignment_statement", "variable_declaration", "wait_statement", + "waveform", "waveform_element" + }; + + private static readonly string[] _LiteralNames = { + null, "'ABS'", "'ACCESS'", "'ACROSS'", "'AFTER'", "'ALIAS'", "'ALL'", + "'AND'", "'ARCHITECTURE'", "'ARRAY'", "'ASSERT'", "'ATTRIBUTE'", "'BEGIN'", + "'BLOCK'", "'BODY'", "'BREAK'", "'BUFFER'", "'BUS'", "'CASE'", "'COMPONENT'", + "'CONFIGURATION'", "'CONSTANT'", "'CONTEXT'", "'DEFAULT'", "'DISCONNECT'", + "'DOWNTO'", "'END'", "'ENTITY'", "'ELSE'", "'ELSIF'", "'EXIT'", "'FILE'", + "'FOR'", "'FORCE'", "'FUNCTION'", "'GENERATE'", "'GENERIC'", "'GROUP'", + "'GUARDED'", "'IF'", "'IMPURE'", "'IN'", "'INERTIAL'", "'INOUT'", "'IS'", + "'LABEL'", "'LIBRARY'", "'LIMIT'", "'LINKAGE'", "'LITERAL'", "'LOOP'", + "'MAP'", "'MOD'", "'NAND'", "'NATURE'", "'NEW'", "'NEXT'", "'NOISE'", + "'NOR'", "'NOT'", "'NULL'", "'OF'", "'ON'", "'OPEN'", "'OR'", "'OTHERS'", + "'OUT'", "'PACKAGE'", "'PARAMETER'", "'PORT'", "'POSTPONED'", "'PROCESS'", + "'PROCEDURE'", "'PROCEDURAL'", "'PROTECTED'", "'PURE'", "'QUANTITY'", + "'RANGE'", "'RELEASE'", "'REVERSE_RANGE'", "'REJECT'", "'REM'", "'RECORD'", + "'REFERENCE'", "'REGISTER'", "'REPORT'", "'RETURN'", "'ROL'", "'ROR'", + "'SELECT'", "'SEVERITY'", "'SHARED'", "'SIGNAL'", "'SLA'", "'SLL'", "'SPECTRUM'", + "'SRA'", "'SRL'", "'SUBNATURE'", "'SUBTYPE'", "'TERMINAL'", "'THEN'", + "'THROUGH'", "'TO'", "'TOLERANCE'", "'TRANSPORT'", "'TYPE'", "'UNAFFECTED'", + "'UNITS'", "'UNTIL'", "'USE'", "'VARIABLE'", "'WAIT'", "'WITH'", "'WHEN'", + "'WHILE'", "'XNOR'", "'XOR'", null, null, null, null, null, null, null, + null, null, null, null, null, null, null, "'\\n'", "'\\r'", null, null, + "'**'", "'??'", "'?='", "'?/E'", "'?<='", "'?<'", "'?>='", "'?>'", "'=='", + "'@'", "'<='", "'>='", "'=>'", "'#'", "'/='", "':='", "'<>'", "'\"'", + "';'", "','", "'&'", "'('", "')'", "'['", "']'", "':'", "'*'", "'/'", + "'+'", "'-'", "'<'", "'>'", "'='", "'|'", "'.'", "'\\'", "'`'", null, + null, null, null, null, null, "'''", "'?'" + }; + private static readonly string[] _SymbolicNames = { + null, "ABS", "ACCESS", "ACROSS", "AFTER", "ALIAS", "ALL", "AND", "ARCHITECTURE", + "ARRAY", "ASSERT", "ATTRIBUTE", "BEGIN", "BLOCK", "BODY", "BREAK", "BUFFER", + "BUS", "CASE", "COMPONENT", "CONFIGURATION", "CONSTANT", "CONTEXT", "DEFAULT", + "DISCONNECT", "DOWNTO", "END", "ENTITY", "ELSE", "ELSIF", "EXIT", "FILE", + "FOR", "FORCE", "FUNCTION", "GENERATE", "GENERIC", "GROUP", "GUARDED", + "IF", "IMPURE", "IN", "INERTIAL", "INOUT", "IS", "LABEL", "LIBRARY", "LIMIT", + "LINKAGE", "LITERAL", "LOOP", "MAP", "MOD", "NAND", "NATURE", "NEW", "NEXT", + "NOISE", "NOR", "NOT", "NULL_", "OF", "ON", "OPEN", "OR", "OTHERS", "OUT", + "PACKAGE", "PARAMETER", "PORT", "POSTPONED", "PROCESS", "PROCEDURE", "PROCEDURAL", + "PROTECTED", "PURE", "QUANTITY", "RANGE", "RELEASE", "REVERSE_RANGE", + "REJECT", "REM", "RECORD", "REFERENCE", "REGISTER", "REPORT", "RETURN", + "ROL", "ROR", "SELECT", "SEVERITY", "SHARED", "SIGNAL", "SLA", "SLL", + "SPECTRUM", "SRA", "SRL", "SUBNATURE", "SUBTYPE", "TERMINAL", "THEN", + "THROUGH", "TO", "TOLERANCE", "TRANSPORT", "TYPE", "UNAFFECTED", "UNITS", + "UNTIL", "USE", "VARIABLE", "WAIT", "WITH", "WHEN", "WHILE", "XNOR", "XOR", + "DECIMAL_LITERAL", "STRING_LITERAL", "BASED_LITERAL", "BIT_STRING_LITERAL", + "BIT_STRING_LITERAL_BINARY", "BIT_STRING_LITERAL_OCTAL", "BIT_STRING_LITERAL_HEX", + "BASIC_IDENTIFIER", "EXTENDED_IDENTIFIER", "LETTER", "BLOCK_COMMENT", + "COMMENT", "TAB", "SPACE", "NEWLINE", "CR", "CHARACTER_LITERAL", "OTHER_SPECIAL_CHARACTER", + "DOUBLESTAR", "CONDITION_OPERATOR", "CONDITION_EQ", "CONDITION_NEQ", "CONDITION_LEQ", + "CONDITION_LESSTHAN", "CONDITION_GEQ", "CONDITION_GREATERTHAN", "ASSIGN", + "AT", "LEQ", "GEQ", "ARROW", "HASH", "NEQ", "WALRUS", "BOX", "DBLQUOTE", + "SEMI", "COMMA", "AMPERSAND", "LPAREN", "RPAREN", "LBRACKET", "RBRACKET", + "COLON", "MUL", "DIV", "PLUS", "MINUS", "LESSTHAN", "GREATERTHAN", "EQ", + "BAR", "DOT", "BACKSLASH", "BACKTICK", "EXPONENT", "HEXDIGIT", "INTEGER", + "DIGIT", "BASED_INTEGER", "EXTENDED_DIGIT", "APOSTROPHE", "QUESTION" + }; + public static readonly IVocabulary DefaultVocabulary = new Vocabulary(_LiteralNames, _SymbolicNames); + + [NotNull] + public override IVocabulary Vocabulary + { + get + { + return DefaultVocabulary; + } + } + + public override string GrammarFileName { get { return "vhdl2008.g4"; } } + + public override string[] RuleNames { get { return ruleNames; } } + + public override int[] SerializedAtn { get { return _serializedATN; } } + + static vhdl2008Parser() { + decisionToDFA = new DFA[_ATN.NumberOfDecisions]; + for (int i = 0; i < _ATN.NumberOfDecisions; i++) { + decisionToDFA[i] = new DFA(_ATN.GetDecisionState(i), i); + } + } + + public vhdl2008Parser(ITokenStream input) : this(input, Console.Out, Console.Error) { } + + public vhdl2008Parser(ITokenStream input, TextWriter output, TextWriter errorOutput) + : base(input, output, errorOutput) + { + Interpreter = new ParserATNSimulator(this, _ATN, decisionToDFA, sharedContextCache); + } + + public partial class Abstract_literalContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DECIMAL_LITERAL() { return GetToken(vhdl2008Parser.DECIMAL_LITERAL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BASED_LITERAL() { return GetToken(vhdl2008Parser.BASED_LITERAL, 0); } + public Abstract_literalContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_abstract_literal; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitAbstract_literal(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Abstract_literalContext abstract_literal() { + Abstract_literalContext _localctx = new Abstract_literalContext(Context, State); + EnterRule(_localctx, 0, RULE_abstract_literal); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 540; + _la = TokenStream.LA(1); + if ( !(_la==DECIMAL_LITERAL || _la==BASED_LITERAL) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Access_type_definitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ACCESS() { return GetToken(vhdl2008Parser.ACCESS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Subtype_indicationContext subtype_indication() { + return GetRuleContext(0); + } + public Access_type_definitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_access_type_definition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitAccess_type_definition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Access_type_definitionContext access_type_definition() { + Access_type_definitionContext _localctx = new Access_type_definitionContext(Context, State); + EnterRule(_localctx, 2, RULE_access_type_definition); + try { + EnterOuterAlt(_localctx, 1); + { + State = 542; + Match(ACCESS); + State = 543; + subtype_indication(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Actual_designatorContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode INERTIAL() { return GetToken(vhdl2008Parser.INERTIAL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public NameContext name() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Subtype_indicationContext subtype_indication() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OPEN() { return GetToken(vhdl2008Parser.OPEN, 0); } + public Actual_designatorContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_actual_designator; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitActual_designator(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Actual_designatorContext actual_designator() { + Actual_designatorContext _localctx = new Actual_designatorContext(Context, State); + EnterRule(_localctx, 4, RULE_actual_designator); + int _la; + try { + State = 552; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,1,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 546; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==INERTIAL) { + { + State = 545; + Match(INERTIAL); + } + } + + State = 548; + expression(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 549; + name(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 550; + subtype_indication(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 551; + Match(OPEN); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Actual_parameter_partContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Association_listContext association_list() { + return GetRuleContext(0); + } + public Actual_parameter_partContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_actual_parameter_part; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitActual_parameter_part(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Actual_parameter_partContext actual_parameter_part() { + Actual_parameter_partContext _localctx = new Actual_parameter_partContext(Context, State); + EnterRule(_localctx, 6, RULE_actual_parameter_part); + try { + EnterOuterAlt(_localctx, 1); + { + State = 554; + association_list(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Actual_partContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Actual_designatorContext actual_designator() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public NameContext name() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + public Actual_partContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_actual_part; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitActual_part(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Actual_partContext actual_part() { + Actual_partContext _localctx = new Actual_partContext(Context, State); + EnterRule(_localctx, 8, RULE_actual_part); + try { + State = 562; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,2,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 556; + actual_designator(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 557; + name(); + State = 558; + Match(LPAREN); + State = 559; + actual_designator(); + State = 560; + Match(RPAREN); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Adding_operatorContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PLUS() { return GetToken(vhdl2008Parser.PLUS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode MINUS() { return GetToken(vhdl2008Parser.MINUS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode AMPERSAND() { return GetToken(vhdl2008Parser.AMPERSAND, 0); } + public Adding_operatorContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_adding_operator; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitAdding_operator(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Adding_operatorContext adding_operator() { + Adding_operatorContext _localctx = new Adding_operatorContext(Context, State); + EnterRule(_localctx, 10, RULE_adding_operator); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 564; + _la = TokenStream.LA(1); + if ( !(((((_la - 156)) & ~0x3f) == 0 && ((1L << (_la - 156)) & 769L) != 0)) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class AggregateContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Element_associationContext[] element_association() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Element_associationContext element_association(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(vhdl2008Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(vhdl2008Parser.COMMA, i); + } + public AggregateContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_aggregate; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitAggregate(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public AggregateContext aggregate() { + AggregateContext _localctx = new AggregateContext(Context, State); + EnterRule(_localctx, 12, RULE_aggregate); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 566; + Match(LPAREN); + State = 567; + element_association(); + State = 572; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 568; + Match(COMMA); + State = 569; + element_association(); + } + } + State = 574; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 575; + Match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Alias_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ALIAS() { return GetToken(vhdl2008Parser.ALIAS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Alias_designatorContext alias_designator() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IS() { return GetToken(vhdl2008Parser.IS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public NameContext name() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON() { return GetToken(vhdl2008Parser.COLON, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Subtype_indicationContext subtype_indication() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public SignatureContext signature() { + return GetRuleContext(0); + } + public Alias_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_alias_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitAlias_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Alias_declarationContext alias_declaration() { + Alias_declarationContext _localctx = new Alias_declarationContext(Context, State); + EnterRule(_localctx, 14, RULE_alias_declaration); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 577; + Match(ALIAS); + State = 578; + alias_designator(); + State = 581; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==COLON) { + { + State = 579; + Match(COLON); + State = 580; + subtype_indication(); + } + } + + State = 583; + Match(IS); + State = 584; + name(); + State = 586; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==LBRACKET) { + { + State = 585; + signature(); + } + } + + State = 588; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Alias_designatorContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CHARACTER_LITERAL() { return GetToken(vhdl2008Parser.CHARACTER_LITERAL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode STRING_LITERAL() { return GetToken(vhdl2008Parser.STRING_LITERAL, 0); } + public Alias_designatorContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_alias_designator; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitAlias_designator(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Alias_designatorContext alias_designator() { + Alias_designatorContext _localctx = new Alias_designatorContext(Context, State); + EnterRule(_localctx, 16, RULE_alias_designator); + try { + State = 593; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case BASIC_IDENTIFIER: + case EXTENDED_IDENTIFIER: + EnterOuterAlt(_localctx, 1); + { + State = 590; + identifier(); + } + break; + case CHARACTER_LITERAL: + EnterOuterAlt(_localctx, 2); + { + State = 591; + Match(CHARACTER_LITERAL); + } + break; + case STRING_LITERAL: + EnterOuterAlt(_localctx, 3); + { + State = 592; + Match(STRING_LITERAL); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class AllocatorContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode NEW() { return GetToken(vhdl2008Parser.NEW, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Subtype_indicationContext subtype_indication() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Qualified_expressionContext qualified_expression() { + return GetRuleContext(0); + } + public AllocatorContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_allocator; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitAllocator(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public AllocatorContext allocator() { + AllocatorContext _localctx = new AllocatorContext(Context, State); + EnterRule(_localctx, 18, RULE_allocator); + try { + State = 599; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,7,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 595; + Match(NEW); + State = 596; + subtype_indication(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 597; + Match(NEW); + State = 598; + qualified_expression(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Architecture_bodyContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] ARCHITECTURE() { return GetTokens(vhdl2008Parser.ARCHITECTURE); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ARCHITECTURE(int i) { + return GetToken(vhdl2008Parser.ARCHITECTURE, i); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext[] identifier() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OF() { return GetToken(vhdl2008Parser.OF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public NameContext name() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IS() { return GetToken(vhdl2008Parser.IS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Architecture_declarative_partContext architecture_declarative_part() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BEGIN() { return GetToken(vhdl2008Parser.BEGIN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Architecture_statement_partContext architecture_statement_part() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode END() { return GetToken(vhdl2008Parser.END, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + public Architecture_bodyContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_architecture_body; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitArchitecture_body(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Architecture_bodyContext architecture_body() { + Architecture_bodyContext _localctx = new Architecture_bodyContext(Context, State); + EnterRule(_localctx, 20, RULE_architecture_body); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 601; + Match(ARCHITECTURE); + State = 602; + identifier(); + State = 603; + Match(OF); + State = 604; + name(); + State = 605; + Match(IS); + State = 606; + architecture_declarative_part(); + State = 607; + Match(BEGIN); + State = 608; + architecture_statement_part(); + State = 609; + Match(END); + State = 611; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==ARCHITECTURE) { + { + State = 610; + Match(ARCHITECTURE); + } + } + + State = 614; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER) { + { + State = 613; + identifier(); + } + } + + State = 616; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Architecture_declarative_partContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Block_declarative_itemContext[] block_declarative_item() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Block_declarative_itemContext block_declarative_item(int i) { + return GetRuleContext(i); + } + public Architecture_declarative_partContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_architecture_declarative_part; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitArchitecture_declarative_part(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Architecture_declarative_partContext architecture_declarative_part() { + Architecture_declarative_partContext _localctx = new Architecture_declarative_partContext(Context, State); + EnterRule(_localctx, 22, RULE_architecture_declarative_part); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 621; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 1260592302112L) != 0) || ((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & 26942380179745L) != 0)) { + { + { + State = 618; + block_declarative_item(); + } + } + State = 623; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Architecture_statement_partContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Concurrent_statementContext[] concurrent_statement() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Concurrent_statementContext concurrent_statement(int i) { + return GetRuleContext(i); + } + public Architecture_statement_partContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_architecture_statement_part; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitArchitecture_statement_part(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Architecture_statement_partContext architecture_statement_part() { + Architecture_statement_partContext _localctx = new Architecture_statement_partContext(Context, State); + EnterRule(_localctx, 24, RULE_architecture_statement_part); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 627; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (((((_la - 10)) & ~0x3f) == 0 && ((1L << (_la - 10)) & 3458764514361606401L) != 0) || ((((_la - 113)) & ~0x3f) == 0 && ((1L << (_la - 113)) & 17592188153921L) != 0)) { + { + { + State = 624; + concurrent_statement(); + } + } + State = 629; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Array_constraintContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Index_constraintContext index_constraint() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Array_element_constraintContext array_element_constraint() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OPEN() { return GetToken(vhdl2008Parser.OPEN, 0); } + public Array_constraintContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_array_constraint; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitArray_constraint(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Array_constraintContext array_constraint() { + Array_constraintContext _localctx = new Array_constraintContext(Context, State); + EnterRule(_localctx, 26, RULE_array_constraint); + int _la; + try { + State = 636; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case LPAREN: + EnterOuterAlt(_localctx, 1); + { + State = 630; + index_constraint(); + State = 632; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==OPEN || _la==LPAREN) { + { + State = 631; + array_element_constraint(); + } + } + + } + break; + case OPEN: + EnterOuterAlt(_localctx, 2); + { + State = 634; + Match(OPEN); + { + State = 635; + array_element_constraint(); + } + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Array_element_constraintContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Element_constraintContext element_constraint() { + return GetRuleContext(0); + } + public Array_element_constraintContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_array_element_constraint; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitArray_element_constraint(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Array_element_constraintContext array_element_constraint() { + Array_element_constraintContext _localctx = new Array_element_constraintContext(Context, State); + EnterRule(_localctx, 28, RULE_array_element_constraint); + try { + EnterOuterAlt(_localctx, 1); + { + State = 638; + element_constraint(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Array_element_resolutionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Resolution_indicationContext resolution_indication() { + return GetRuleContext(0); + } + public Array_element_resolutionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_array_element_resolution; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitArray_element_resolution(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Array_element_resolutionContext array_element_resolution() { + Array_element_resolutionContext _localctx = new Array_element_resolutionContext(Context, State); + EnterRule(_localctx, 30, RULE_array_element_resolution); + try { + EnterOuterAlt(_localctx, 1); + { + State = 640; + resolution_indication(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Array_type_definitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Unbounded_array_definitionContext unbounded_array_definition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Constrained_array_definitionContext constrained_array_definition() { + return GetRuleContext(0); + } + public Array_type_definitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_array_type_definition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitArray_type_definition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Array_type_definitionContext array_type_definition() { + Array_type_definitionContext _localctx = new Array_type_definitionContext(Context, State); + EnterRule(_localctx, 32, RULE_array_type_definition); + try { + State = 644; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,14,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 642; + unbounded_array_definition(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 643; + constrained_array_definition(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class AssertionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ASSERT() { return GetToken(vhdl2008Parser.ASSERT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ConditionContext condition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode REPORT() { return GetToken(vhdl2008Parser.REPORT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext[] expression() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEVERITY() { return GetToken(vhdl2008Parser.SEVERITY, 0); } + public AssertionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_assertion; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitAssertion(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public AssertionContext assertion() { + AssertionContext _localctx = new AssertionContext(Context, State); + EnterRule(_localctx, 34, RULE_assertion); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 646; + Match(ASSERT); + State = 647; + condition(); + State = 650; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==REPORT) { + { + State = 648; + Match(REPORT); + State = 649; + expression(); + } + } + + State = 654; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==SEVERITY) { + { + State = 652; + Match(SEVERITY); + State = 653; + expression(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Assertion_statementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public AssertionContext assertion() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Label_colonContext label_colon() { + return GetRuleContext(0); + } + public Assertion_statementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_assertion_statement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitAssertion_statement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Assertion_statementContext assertion_statement() { + Assertion_statementContext _localctx = new Assertion_statementContext(Context, State); + EnterRule(_localctx, 36, RULE_assertion_statement); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 657; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER) { + { + State = 656; + label_colon(); + } + } + + State = 659; + assertion(); + State = 660; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Association_elementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Actual_partContext actual_part() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Formal_partContext formal_part() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ARROW() { return GetToken(vhdl2008Parser.ARROW, 0); } + public Association_elementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_association_element; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitAssociation_element(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Association_elementContext association_element() { + Association_elementContext _localctx = new Association_elementContext(Context, State); + EnterRule(_localctx, 38, RULE_association_element); + try { + EnterOuterAlt(_localctx, 1); + { + State = 665; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,18,Context) ) { + case 1: + { + State = 662; + formal_part(); + State = 663; + Match(ARROW); + } + break; + } + State = 667; + actual_part(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Association_listContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Association_elementContext[] association_element() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Association_elementContext association_element(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(vhdl2008Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(vhdl2008Parser.COMMA, i); + } + public Association_listContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_association_list; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitAssociation_list(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Association_listContext association_list() { + Association_listContext _localctx = new Association_listContext(Context, State); + EnterRule(_localctx, 40, RULE_association_list); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 669; + association_element(); + State = 674; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 670; + Match(COMMA); + State = 671; + association_element(); + } + } + State = 676; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Attribute_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ATTRIBUTE() { return GetToken(vhdl2008Parser.ATTRIBUTE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Label_colonContext label_colon() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public NameContext name() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + public Attribute_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_attribute_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitAttribute_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Attribute_declarationContext attribute_declaration() { + Attribute_declarationContext _localctx = new Attribute_declarationContext(Context, State); + EnterRule(_localctx, 42, RULE_attribute_declaration); + try { + EnterOuterAlt(_localctx, 1); + { + State = 677; + Match(ATTRIBUTE); + State = 678; + label_colon(); + State = 679; + name(); + State = 680; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Attribute_designatorContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RANGE() { return GetToken(vhdl2008Parser.RANGE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode REVERSE_RANGE() { return GetToken(vhdl2008Parser.REVERSE_RANGE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ACROSS() { return GetToken(vhdl2008Parser.ACROSS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode THROUGH() { return GetToken(vhdl2008Parser.THROUGH, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode REFERENCE() { return GetToken(vhdl2008Parser.REFERENCE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TOLERANCE() { return GetToken(vhdl2008Parser.TOLERANCE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SUBTYPE() { return GetToken(vhdl2008Parser.SUBTYPE, 0); } + public Attribute_designatorContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_attribute_designator; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitAttribute_designator(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Attribute_designatorContext attribute_designator() { + Attribute_designatorContext _localctx = new Attribute_designatorContext(Context, State); + EnterRule(_localctx, 44, RULE_attribute_designator); + try { + State = 690; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case BASIC_IDENTIFIER: + case EXTENDED_IDENTIFIER: + EnterOuterAlt(_localctx, 1); + { + State = 682; + identifier(); + } + break; + case RANGE: + EnterOuterAlt(_localctx, 2); + { + State = 683; + Match(RANGE); + } + break; + case REVERSE_RANGE: + EnterOuterAlt(_localctx, 3); + { + State = 684; + Match(REVERSE_RANGE); + } + break; + case ACROSS: + EnterOuterAlt(_localctx, 4); + { + State = 685; + Match(ACROSS); + } + break; + case THROUGH: + EnterOuterAlt(_localctx, 5); + { + State = 686; + Match(THROUGH); + } + break; + case REFERENCE: + EnterOuterAlt(_localctx, 6); + { + State = 687; + Match(REFERENCE); + } + break; + case TOLERANCE: + EnterOuterAlt(_localctx, 7); + { + State = 688; + Match(TOLERANCE); + } + break; + case SUBTYPE: + EnterOuterAlt(_localctx, 8); + { + State = 689; + Match(SUBTYPE); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Attribute_nameContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public PrefixContext prefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode APOSTROPHE() { return GetToken(vhdl2008Parser.APOSTROPHE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Attribute_designatorContext attribute_designator() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + public Attribute_nameContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_attribute_name; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitAttribute_name(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Attribute_nameContext attribute_name() { + Attribute_nameContext _localctx = new Attribute_nameContext(Context, State); + EnterRule(_localctx, 46, RULE_attribute_name); + try { + EnterOuterAlt(_localctx, 1); + { + State = 692; + prefix(); + State = 693; + Match(APOSTROPHE); + State = 694; + attribute_designator(); + State = 699; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,21,Context) ) { + case 1: + { + State = 695; + Match(LPAREN); + State = 696; + expression(); + State = 697; + Match(RPAREN); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Attribute_specificationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ATTRIBUTE() { return GetToken(vhdl2008Parser.ATTRIBUTE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Attribute_designatorContext attribute_designator() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OF() { return GetToken(vhdl2008Parser.OF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Entity_specificationContext entity_specification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IS() { return GetToken(vhdl2008Parser.IS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + public Attribute_specificationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_attribute_specification; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitAttribute_specification(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Attribute_specificationContext attribute_specification() { + Attribute_specificationContext _localctx = new Attribute_specificationContext(Context, State); + EnterRule(_localctx, 48, RULE_attribute_specification); + try { + EnterOuterAlt(_localctx, 1); + { + State = 701; + Match(ATTRIBUTE); + State = 702; + attribute_designator(); + State = 703; + Match(OF); + State = 704; + entity_specification(); + State = 705; + Match(IS); + State = 706; + expression(); + State = 707; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class BaseContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode INTEGER() { return GetToken(vhdl2008Parser.INTEGER, 0); } + public BaseContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_base; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitBase(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public BaseContext @base() { + BaseContext _localctx = new BaseContext(Context, State); + EnterRule(_localctx, 50, RULE_base); + try { + EnterOuterAlt(_localctx, 1); + { + State = 709; + Match(INTEGER); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Binding_indicationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode USE() { return GetToken(vhdl2008Parser.USE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Entity_aspectContext entity_aspect() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Generic_map_aspectContext generic_map_aspect() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Port_map_aspectContext port_map_aspect() { + return GetRuleContext(0); + } + public Binding_indicationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_binding_indication; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitBinding_indication(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Binding_indicationContext binding_indication() { + Binding_indicationContext _localctx = new Binding_indicationContext(Context, State); + EnterRule(_localctx, 52, RULE_binding_indication); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 713; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==USE) { + { + State = 711; + Match(USE); + State = 712; + entity_aspect(); + } + } + + State = 716; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==GENERIC) { + { + State = 715; + generic_map_aspect(); + } + } + + State = 719; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==PORT) { + { + State = 718; + port_map_aspect(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Block_configurationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] FOR() { return GetTokens(vhdl2008Parser.FOR); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FOR(int i) { + return GetToken(vhdl2008Parser.FOR, i); + } + [System.Diagnostics.DebuggerNonUserCode] public Block_specificationContext block_specification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode END() { return GetToken(vhdl2008Parser.END, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Use_clauseContext[] use_clause() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Use_clauseContext use_clause(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public Configuration_itemContext[] configuration_item() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Configuration_itemContext configuration_item(int i) { + return GetRuleContext(i); + } + public Block_configurationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_block_configuration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitBlock_configuration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Block_configurationContext block_configuration() { + Block_configurationContext _localctx = new Block_configurationContext(Context, State); + EnterRule(_localctx, 54, RULE_block_configuration); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 721; + Match(FOR); + State = 722; + block_specification(); + State = 726; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==USE) { + { + { + State = 723; + use_clause(); + } + } + State = 728; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 732; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==FOR) { + { + { + State = 729; + configuration_item(); + } + } + State = 734; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 735; + Match(END); + State = 736; + Match(FOR); + State = 737; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Block_declarative_itemContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Subprogram_declarationContext subprogram_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Subprogram_bodyContext subprogram_body() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Subprogram_instantiation_declarationContext subprogram_instantiation_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Package_declarationContext package_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Package_bodyContext package_body() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Package_instantiation_declarationContext package_instantiation_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Type_declarationContext type_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Subtype_declarationContext subtype_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Constant_declarationContext constant_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Signal_declarationContext signal_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Variable_declarationContext variable_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public File_declarationContext file_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Alias_declarationContext alias_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Component_declarationContext component_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Attribute_declarationContext attribute_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Attribute_specificationContext attribute_specification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Configuration_specificationContext configuration_specification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Disconnection_specificationContext disconnection_specification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Use_clauseContext use_clause() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Group_template_declarationContext group_template_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Group_declarationContext group_declaration() { + return GetRuleContext(0); + } + public Block_declarative_itemContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_block_declarative_item; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitBlock_declarative_item(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Block_declarative_itemContext block_declarative_item() { + Block_declarative_itemContext _localctx = new Block_declarative_itemContext(Context, State); + EnterRule(_localctx, 56, RULE_block_declarative_item); + try { + State = 760; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,27,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 739; + subprogram_declaration(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 740; + subprogram_body(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 741; + subprogram_instantiation_declaration(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 742; + package_declaration(); + } + break; + case 5: + EnterOuterAlt(_localctx, 5); + { + State = 743; + package_body(); + } + break; + case 6: + EnterOuterAlt(_localctx, 6); + { + State = 744; + package_instantiation_declaration(); + } + break; + case 7: + EnterOuterAlt(_localctx, 7); + { + State = 745; + type_declaration(); + } + break; + case 8: + EnterOuterAlt(_localctx, 8); + { + State = 746; + subtype_declaration(); + } + break; + case 9: + EnterOuterAlt(_localctx, 9); + { + State = 747; + constant_declaration(); + } + break; + case 10: + EnterOuterAlt(_localctx, 10); + { + State = 748; + signal_declaration(); + } + break; + case 11: + EnterOuterAlt(_localctx, 11); + { + State = 749; + variable_declaration(); + } + break; + case 12: + EnterOuterAlt(_localctx, 12); + { + State = 750; + file_declaration(); + } + break; + case 13: + EnterOuterAlt(_localctx, 13); + { + State = 751; + alias_declaration(); + } + break; + case 14: + EnterOuterAlt(_localctx, 14); + { + State = 752; + component_declaration(); + } + break; + case 15: + EnterOuterAlt(_localctx, 15); + { + State = 753; + attribute_declaration(); + } + break; + case 16: + EnterOuterAlt(_localctx, 16); + { + State = 754; + attribute_specification(); + } + break; + case 17: + EnterOuterAlt(_localctx, 17); + { + State = 755; + configuration_specification(); + } + break; + case 18: + EnterOuterAlt(_localctx, 18); + { + State = 756; + disconnection_specification(); + } + break; + case 19: + EnterOuterAlt(_localctx, 19); + { + State = 757; + use_clause(); + } + break; + case 20: + EnterOuterAlt(_localctx, 20); + { + State = 758; + group_template_declaration(); + } + break; + case 21: + EnterOuterAlt(_localctx, 21); + { + State = 759; + group_declaration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Block_declarative_partContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Block_declarative_itemContext[] block_declarative_item() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Block_declarative_itemContext block_declarative_item(int i) { + return GetRuleContext(i); + } + public Block_declarative_partContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_block_declarative_part; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitBlock_declarative_part(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Block_declarative_partContext block_declarative_part() { + Block_declarative_partContext _localctx = new Block_declarative_partContext(Context, State); + EnterRule(_localctx, 58, RULE_block_declarative_part); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 765; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 1260592302112L) != 0) || ((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & 26942380179745L) != 0)) { + { + { + State = 762; + block_declarative_item(); + } + } + State = 767; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Block_headerContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Generic_clauseContext generic_clause() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Port_clauseContext port_clause() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Generic_map_aspectContext generic_map_aspect() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] SEMI() { return GetTokens(vhdl2008Parser.SEMI); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI(int i) { + return GetToken(vhdl2008Parser.SEMI, i); + } + [System.Diagnostics.DebuggerNonUserCode] public Port_map_aspectContext port_map_aspect() { + return GetRuleContext(0); + } + public Block_headerContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_block_header; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitBlock_header(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Block_headerContext block_header() { + Block_headerContext _localctx = new Block_headerContext(Context, State); + EnterRule(_localctx, 60, RULE_block_header); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 774; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==GENERIC) { + { + State = 768; + generic_clause(); + State = 772; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==GENERIC) { + { + State = 769; + generic_map_aspect(); + State = 770; + Match(SEMI); + } + } + + } + } + + State = 782; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==PORT) { + { + State = 776; + port_clause(); + State = 780; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==PORT) { + { + State = 777; + port_map_aspect(); + State = 778; + Match(SEMI); + } + } + + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Block_specificationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public NameContext name() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Generate_specificationContext generate_specification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + public Block_specificationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_block_specification; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitBlock_specification(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Block_specificationContext block_specification() { + Block_specificationContext _localctx = new Block_specificationContext(Context, State); + EnterRule(_localctx, 62, RULE_block_specification); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 784; + name(); + State = 785; + identifier(); + State = 790; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==LPAREN) { + { + State = 786; + Match(LPAREN); + State = 787; + generate_specification(); + State = 788; + Match(RPAREN); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Block_statementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Label_colonContext label_colon() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] BLOCK() { return GetTokens(vhdl2008Parser.BLOCK); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BLOCK(int i) { + return GetToken(vhdl2008Parser.BLOCK, i); + } + [System.Diagnostics.DebuggerNonUserCode] public Block_headerContext block_header() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Block_declarative_partContext block_declarative_part() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BEGIN() { return GetToken(vhdl2008Parser.BEGIN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Block_statement_partContext block_statement_part() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode END() { return GetToken(vhdl2008Parser.END, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IS() { return GetToken(vhdl2008Parser.IS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + public Block_statementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_block_statement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitBlock_statement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Block_statementContext block_statement() { + Block_statementContext _localctx = new Block_statementContext(Context, State); + EnterRule(_localctx, 64, RULE_block_statement); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 792; + label_colon(); + State = 793; + Match(BLOCK); + State = 798; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==LPAREN) { + { + State = 794; + Match(LPAREN); + State = 795; + expression(); + State = 796; + Match(RPAREN); + } + } + + State = 801; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==IS) { + { + State = 800; + Match(IS); + } + } + + State = 803; + block_header(); + State = 804; + block_declarative_part(); + State = 805; + Match(BEGIN); + State = 806; + block_statement_part(); + State = 807; + Match(END); + State = 808; + Match(BLOCK); + State = 810; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER) { + { + State = 809; + identifier(); + } + } + + State = 812; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Block_statement_partContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Concurrent_statementContext[] concurrent_statement() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Concurrent_statementContext concurrent_statement(int i) { + return GetRuleContext(i); + } + public Block_statement_partContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_block_statement_part; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitBlock_statement_part(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Block_statement_partContext block_statement_part() { + Block_statement_partContext _localctx = new Block_statement_partContext(Context, State); + EnterRule(_localctx, 66, RULE_block_statement_part); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 817; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (((((_la - 10)) & ~0x3f) == 0 && ((1L << (_la - 10)) & 3458764514361606401L) != 0) || ((((_la - 113)) & ~0x3f) == 0 && ((1L << (_la - 113)) & 17592188153921L) != 0)) { + { + { + State = 814; + concurrent_statement(); + } + } + State = 819; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Case_generate_alternativeContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode WHEN() { return GetToken(vhdl2008Parser.WHEN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ChoicesContext choices() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ARROW() { return GetToken(vhdl2008Parser.ARROW, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Generate_statement_bodyContext generate_statement_body() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Label_colonContext label_colon() { + return GetRuleContext(0); + } + public Case_generate_alternativeContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_case_generate_alternative; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitCase_generate_alternative(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Case_generate_alternativeContext case_generate_alternative() { + Case_generate_alternativeContext _localctx = new Case_generate_alternativeContext(Context, State); + EnterRule(_localctx, 68, RULE_case_generate_alternative); + try { + EnterOuterAlt(_localctx, 1); + { + State = 820; + Match(WHEN); + State = 822; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,38,Context) ) { + case 1: + { + State = 821; + label_colon(); + } + break; + } + State = 824; + choices(); + State = 825; + Match(ARROW); + State = 826; + generate_statement_body(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Case_generate_statementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CASE() { return GetToken(vhdl2008Parser.CASE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode GENERATE() { return GetToken(vhdl2008Parser.GENERATE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Case_generate_alternativeContext[] case_generate_alternative() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Case_generate_alternativeContext case_generate_alternative(int i) { + return GetRuleContext(i); + } + public Case_generate_statementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_case_generate_statement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitCase_generate_statement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Case_generate_statementContext case_generate_statement() { + Case_generate_statementContext _localctx = new Case_generate_statementContext(Context, State); + EnterRule(_localctx, 70, RULE_case_generate_statement); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 828; + Match(CASE); + State = 829; + expression(); + State = 830; + Match(GENERATE); + State = 831; + case_generate_alternative(); + State = 835; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==WHEN) { + { + { + State = 832; + case_generate_alternative(); + } + } + State = 837; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Case_statementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] CASE() { return GetTokens(vhdl2008Parser.CASE); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CASE(int i) { + return GetToken(vhdl2008Parser.CASE, i); + } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IS() { return GetToken(vhdl2008Parser.IS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode END() { return GetToken(vhdl2008Parser.END, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Label_colonContext label_colon() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] QUESTION() { return GetTokens(vhdl2008Parser.QUESTION); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode QUESTION(int i) { + return GetToken(vhdl2008Parser.QUESTION, i); + } + [System.Diagnostics.DebuggerNonUserCode] public Case_statement_alternativeContext[] case_statement_alternative() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Case_statement_alternativeContext case_statement_alternative(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + public Case_statementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_case_statement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitCase_statement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Case_statementContext case_statement() { + Case_statementContext _localctx = new Case_statementContext(Context, State); + EnterRule(_localctx, 72, RULE_case_statement); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 839; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER) { + { + State = 838; + label_colon(); + } + } + + State = 841; + Match(CASE); + State = 843; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==QUESTION) { + { + State = 842; + Match(QUESTION); + } + } + + State = 845; + expression(); + State = 846; + Match(IS); + State = 848; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + do { + { + { + State = 847; + case_statement_alternative(); + } + } + State = 850; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } while ( _la==WHEN ); + State = 852; + Match(END); + State = 853; + Match(CASE); + State = 855; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==QUESTION) { + { + State = 854; + Match(QUESTION); + } + } + + State = 858; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER) { + { + State = 857; + identifier(); + } + } + + State = 860; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Case_statement_alternativeContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode WHEN() { return GetToken(vhdl2008Parser.WHEN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ChoicesContext choices() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ARROW() { return GetToken(vhdl2008Parser.ARROW, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Sequence_of_statementsContext sequence_of_statements() { + return GetRuleContext(0); + } + public Case_statement_alternativeContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_case_statement_alternative; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitCase_statement_alternative(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Case_statement_alternativeContext case_statement_alternative() { + Case_statement_alternativeContext _localctx = new Case_statement_alternativeContext(Context, State); + EnterRule(_localctx, 74, RULE_case_statement_alternative); + try { + EnterOuterAlt(_localctx, 1); + { + State = 862; + Match(WHEN); + State = 863; + choices(); + State = 864; + Match(ARROW); + State = 865; + sequence_of_statements(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ChoiceContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Simple_expressionContext simple_expression() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Discrete_rangeContext discrete_range() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OTHERS() { return GetToken(vhdl2008Parser.OTHERS, 0); } + public ChoiceContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_choice; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitChoice(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ChoiceContext choice() { + ChoiceContext _localctx = new ChoiceContext(Context, State); + EnterRule(_localctx, 76, RULE_choice); + try { + State = 871; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,45,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 867; + simple_expression(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 868; + discrete_range(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 869; + identifier(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 870; + Match(OTHERS); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ChoicesContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ChoiceContext[] choice() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ChoiceContext choice(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] BAR() { return GetTokens(vhdl2008Parser.BAR); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BAR(int i) { + return GetToken(vhdl2008Parser.BAR, i); + } + public ChoicesContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_choices; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitChoices(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ChoicesContext choices() { + ChoicesContext _localctx = new ChoicesContext(Context, State); + EnterRule(_localctx, 78, RULE_choices); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 873; + choice(); + State = 878; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==BAR) { + { + { + State = 874; + Match(BAR); + State = 875; + choice(); + } + } + State = 880; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Component_configurationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] FOR() { return GetTokens(vhdl2008Parser.FOR); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FOR(int i) { + return GetToken(vhdl2008Parser.FOR, i); + } + [System.Diagnostics.DebuggerNonUserCode] public Component_specificationContext component_specification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode END() { return GetToken(vhdl2008Parser.END, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] SEMI() { return GetTokens(vhdl2008Parser.SEMI); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI(int i) { + return GetToken(vhdl2008Parser.SEMI, i); + } + [System.Diagnostics.DebuggerNonUserCode] public Binding_indicationContext binding_indication() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Block_configurationContext block_configuration() { + return GetRuleContext(0); + } + public Component_configurationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_component_configuration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitComponent_configuration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Component_configurationContext component_configuration() { + Component_configurationContext _localctx = new Component_configurationContext(Context, State); + EnterRule(_localctx, 80, RULE_component_configuration); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 881; + Match(FOR); + State = 882; + component_specification(); + State = 886; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==GENERIC || _la==PORT || _la==USE || _la==SEMI) { + { + State = 883; + binding_indication(); + State = 884; + Match(SEMI); + } + } + + State = 889; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==FOR) { + { + State = 888; + block_configuration(); + } + } + + State = 891; + Match(END); + State = 892; + Match(FOR); + State = 893; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Component_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMPONENT() { return GetTokens(vhdl2008Parser.COMPONENT); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMPONENT(int i) { + return GetToken(vhdl2008Parser.COMPONENT, i); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext[] identifier() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode END() { return GetToken(vhdl2008Parser.END, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IS() { return GetToken(vhdl2008Parser.IS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Generic_clauseContext generic_clause() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Port_clauseContext port_clause() { + return GetRuleContext(0); + } + public Component_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_component_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitComponent_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Component_declarationContext component_declaration() { + Component_declarationContext _localctx = new Component_declarationContext(Context, State); + EnterRule(_localctx, 82, RULE_component_declaration); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 895; + Match(COMPONENT); + State = 896; + identifier(); + State = 898; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==IS) { + { + State = 897; + Match(IS); + } + } + + State = 901; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==GENERIC) { + { + State = 900; + generic_clause(); + } + } + + State = 904; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==PORT) { + { + State = 903; + port_clause(); + } + } + + State = 906; + Match(END); + State = 907; + Match(COMPONENT); + State = 909; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER) { + { + State = 908; + identifier(); + } + } + + State = 911; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Component_instantiation_statementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Label_colonContext label_colon() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Instantiated_unitContext instantiated_unit() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Generic_map_aspectContext generic_map_aspect() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Port_map_aspectContext port_map_aspect() { + return GetRuleContext(0); + } + public Component_instantiation_statementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_component_instantiation_statement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitComponent_instantiation_statement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Component_instantiation_statementContext component_instantiation_statement() { + Component_instantiation_statementContext _localctx = new Component_instantiation_statementContext(Context, State); + EnterRule(_localctx, 84, RULE_component_instantiation_statement); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 913; + label_colon(); + State = 914; + instantiated_unit(); + State = 916; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==GENERIC) { + { + State = 915; + generic_map_aspect(); + } + } + + State = 919; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==PORT) { + { + State = 918; + port_map_aspect(); + } + } + + State = 921; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Component_specificationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Instantiation_listContext instantiation_list() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON() { return GetToken(vhdl2008Parser.COLON, 0); } + [System.Diagnostics.DebuggerNonUserCode] public NameContext name() { + return GetRuleContext(0); + } + public Component_specificationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_component_specification; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitComponent_specification(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Component_specificationContext component_specification() { + Component_specificationContext _localctx = new Component_specificationContext(Context, State); + EnterRule(_localctx, 86, RULE_component_specification); + try { + EnterOuterAlt(_localctx, 1); + { + State = 923; + instantiation_list(); + State = 924; + Match(COLON); + State = 925; + name(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Composite_type_definitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Array_type_definitionContext array_type_definition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Record_type_definitionContext record_type_definition() { + return GetRuleContext(0); + } + public Composite_type_definitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_composite_type_definition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitComposite_type_definition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Composite_type_definitionContext composite_type_definition() { + Composite_type_definitionContext _localctx = new Composite_type_definitionContext(Context, State); + EnterRule(_localctx, 88, RULE_composite_type_definition); + try { + State = 929; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case ARRAY: + EnterOuterAlt(_localctx, 1); + { + State = 927; + array_type_definition(); + } + break; + case RECORD: + EnterOuterAlt(_localctx, 2); + { + State = 928; + record_type_definition(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Concurrent_assertion_statementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public AssertionContext assertion() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Label_colonContext label_colon() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode POSTPONED() { return GetToken(vhdl2008Parser.POSTPONED, 0); } + public Concurrent_assertion_statementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_concurrent_assertion_statement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitConcurrent_assertion_statement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Concurrent_assertion_statementContext concurrent_assertion_statement() { + Concurrent_assertion_statementContext _localctx = new Concurrent_assertion_statementContext(Context, State); + EnterRule(_localctx, 90, RULE_concurrent_assertion_statement); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 932; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER) { + { + State = 931; + label_colon(); + } + } + + State = 935; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==POSTPONED) { + { + State = 934; + Match(POSTPONED); + } + } + + State = 937; + assertion(); + State = 938; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Concurrent_conditional_signal_assignmentContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public TargetContext target() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LEQ() { return GetToken(vhdl2008Parser.LEQ, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Conditional_waveformsContext conditional_waveforms() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode GUARDED() { return GetToken(vhdl2008Parser.GUARDED, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Delay_mechanismContext delay_mechanism() { + return GetRuleContext(0); + } + public Concurrent_conditional_signal_assignmentContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_concurrent_conditional_signal_assignment; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitConcurrent_conditional_signal_assignment(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Concurrent_conditional_signal_assignmentContext concurrent_conditional_signal_assignment() { + Concurrent_conditional_signal_assignmentContext _localctx = new Concurrent_conditional_signal_assignmentContext(Context, State); + EnterRule(_localctx, 92, RULE_concurrent_conditional_signal_assignment); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 940; + target(); + State = 941; + Match(LEQ); + State = 943; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==GUARDED) { + { + State = 942; + Match(GUARDED); + } + } + + State = 946; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 42)) & ~0x3f) == 0 && ((1L << (_la - 42)) & -9223371761976868863L) != 0)) { + { + State = 945; + delay_mechanism(); + } + } + + State = 948; + conditional_waveforms(); + State = 949; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Concurrent_procedure_call_statementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Procedure_callContext procedure_call() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Label_colonContext label_colon() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode POSTPONED() { return GetToken(vhdl2008Parser.POSTPONED, 0); } + public Concurrent_procedure_call_statementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_concurrent_procedure_call_statement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitConcurrent_procedure_call_statement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Concurrent_procedure_call_statementContext concurrent_procedure_call_statement() { + Concurrent_procedure_call_statementContext _localctx = new Concurrent_procedure_call_statementContext(Context, State); + EnterRule(_localctx, 94, RULE_concurrent_procedure_call_statement); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 952; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,60,Context) ) { + case 1: + { + State = 951; + label_colon(); + } + break; + } + State = 955; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==POSTPONED) { + { + State = 954; + Match(POSTPONED); + } + } + + State = 957; + procedure_call(); + State = 958; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Concurrent_selected_signal_assignmentContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode WITH() { return GetToken(vhdl2008Parser.WITH, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SELECT() { return GetToken(vhdl2008Parser.SELECT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public TargetContext target() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LEQ() { return GetToken(vhdl2008Parser.LEQ, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Selected_waveformsContext selected_waveforms() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode QUESTION() { return GetToken(vhdl2008Parser.QUESTION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode GUARDED() { return GetToken(vhdl2008Parser.GUARDED, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Delay_mechanismContext delay_mechanism() { + return GetRuleContext(0); + } + public Concurrent_selected_signal_assignmentContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_concurrent_selected_signal_assignment; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitConcurrent_selected_signal_assignment(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Concurrent_selected_signal_assignmentContext concurrent_selected_signal_assignment() { + Concurrent_selected_signal_assignmentContext _localctx = new Concurrent_selected_signal_assignmentContext(Context, State); + EnterRule(_localctx, 96, RULE_concurrent_selected_signal_assignment); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 960; + Match(WITH); + State = 961; + expression(); + State = 962; + Match(SELECT); + State = 964; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==QUESTION) { + { + State = 963; + Match(QUESTION); + } + } + + State = 966; + target(); + State = 967; + Match(LEQ); + State = 969; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==GUARDED) { + { + State = 968; + Match(GUARDED); + } + } + + State = 972; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 42)) & ~0x3f) == 0 && ((1L << (_la - 42)) & -9223371761976868863L) != 0)) { + { + State = 971; + delay_mechanism(); + } + } + + State = 974; + selected_waveforms(); + State = 975; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Concurrent_signal_assignment_statementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Conditional_signal_assignmentContext conditional_signal_assignment() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Selected_signal_assignmentContext selected_signal_assignment() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Concurrent_selected_signal_assignmentContext concurrent_selected_signal_assignment() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Label_colonContext label_colon() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode POSTPONED() { return GetToken(vhdl2008Parser.POSTPONED, 0); } + public Concurrent_signal_assignment_statementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_concurrent_signal_assignment_statement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitConcurrent_signal_assignment_statement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Concurrent_signal_assignment_statementContext concurrent_signal_assignment_statement() { + Concurrent_signal_assignment_statementContext _localctx = new Concurrent_signal_assignment_statementContext(Context, State); + EnterRule(_localctx, 98, RULE_concurrent_signal_assignment_statement); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 978; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,65,Context) ) { + case 1: + { + State = 977; + label_colon(); + } + break; + } + State = 981; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==POSTPONED) { + { + State = 980; + Match(POSTPONED); + } + } + + State = 986; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,67,Context) ) { + case 1: + { + State = 983; + conditional_signal_assignment(); + } + break; + case 2: + { + State = 984; + selected_signal_assignment(); + } + break; + case 3: + { + State = 985; + concurrent_selected_signal_assignment(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Concurrent_simple_signal_assignmentContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public TargetContext target() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LEQ() { return GetToken(vhdl2008Parser.LEQ, 0); } + [System.Diagnostics.DebuggerNonUserCode] public WaveformContext waveform() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode GUARDED() { return GetToken(vhdl2008Parser.GUARDED, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Delay_mechanismContext delay_mechanism() { + return GetRuleContext(0); + } + public Concurrent_simple_signal_assignmentContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_concurrent_simple_signal_assignment; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitConcurrent_simple_signal_assignment(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Concurrent_simple_signal_assignmentContext concurrent_simple_signal_assignment() { + Concurrent_simple_signal_assignmentContext _localctx = new Concurrent_simple_signal_assignmentContext(Context, State); + EnterRule(_localctx, 100, RULE_concurrent_simple_signal_assignment); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 988; + target(); + State = 989; + Match(LEQ); + State = 991; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==GUARDED) { + { + State = 990; + Match(GUARDED); + } + } + + State = 994; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 42)) & ~0x3f) == 0 && ((1L << (_la - 42)) & -9223371761976868863L) != 0)) { + { + State = 993; + delay_mechanism(); + } + } + + State = 996; + waveform(); + State = 997; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Concurrent_statementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Block_statementContext block_statement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Process_statementContext process_statement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Concurrent_procedure_call_statementContext concurrent_procedure_call_statement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Concurrent_assertion_statementContext concurrent_assertion_statement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Concurrent_signal_assignment_statementContext concurrent_signal_assignment_statement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Component_instantiation_statementContext component_instantiation_statement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Generate_statementContext generate_statement() { + return GetRuleContext(0); + } + public Concurrent_statementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_concurrent_statement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitConcurrent_statement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Concurrent_statementContext concurrent_statement() { + Concurrent_statementContext _localctx = new Concurrent_statementContext(Context, State); + EnterRule(_localctx, 102, RULE_concurrent_statement); + try { + State = 1006; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,70,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 999; + block_statement(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1000; + process_statement(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 1001; + concurrent_procedure_call_statement(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 1002; + concurrent_assertion_statement(); + } + break; + case 5: + EnterOuterAlt(_localctx, 5); + { + State = 1003; + concurrent_signal_assignment_statement(); + } + break; + case 6: + EnterOuterAlt(_localctx, 6); + { + State = 1004; + component_instantiation_statement(); + } + break; + case 7: + EnterOuterAlt(_localctx, 7); + { + State = 1005; + generate_statement(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ConditionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression() { + return GetRuleContext(0); + } + public ConditionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_condition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitCondition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ConditionContext condition() { + ConditionContext _localctx = new ConditionContext(Context, State); + EnterRule(_localctx, 104, RULE_condition); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1008; + expression(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Condition_clauseContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode UNTIL() { return GetToken(vhdl2008Parser.UNTIL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ConditionContext condition() { + return GetRuleContext(0); + } + public Condition_clauseContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_condition_clause; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitCondition_clause(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Condition_clauseContext condition_clause() { + Condition_clauseContext _localctx = new Condition_clauseContext(Context, State); + EnterRule(_localctx, 106, RULE_condition_clause); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1010; + Match(UNTIL); + State = 1011; + condition(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Conditional_expressionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext[] expression() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] WHEN() { return GetTokens(vhdl2008Parser.WHEN); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode WHEN(int i) { + return GetToken(vhdl2008Parser.WHEN, i); + } + [System.Diagnostics.DebuggerNonUserCode] public ConditionContext[] condition() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ConditionContext condition(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] ELSE() { return GetTokens(vhdl2008Parser.ELSE); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ELSE(int i) { + return GetToken(vhdl2008Parser.ELSE, i); + } + public Conditional_expressionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_conditional_expression; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitConditional_expression(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Conditional_expressionContext conditional_expression() { + Conditional_expressionContext _localctx = new Conditional_expressionContext(Context, State); + EnterRule(_localctx, 108, RULE_conditional_expression); + try { + int _alt; + EnterOuterAlt(_localctx, 1); + { + State = 1013; + expression(); + State = 1014; + Match(WHEN); + State = 1015; + condition(); + State = 1023; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,71,Context); + while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + State = 1016; + Match(ELSE); + State = 1017; + expression(); + State = 1018; + Match(WHEN); + State = 1019; + condition(); + } + } + } + State = 1025; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,71,Context); + } + State = 1028; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,72,Context) ) { + case 1: + { + State = 1026; + Match(ELSE); + State = 1027; + expression(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Conditional_force_assignmentContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public TargetContext target() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LEQ() { return GetToken(vhdl2008Parser.LEQ, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FORCE() { return GetToken(vhdl2008Parser.FORCE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Conditional_expressionContext conditional_expression() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Force_modeContext force_mode() { + return GetRuleContext(0); + } + public Conditional_force_assignmentContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_conditional_force_assignment; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitConditional_force_assignment(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Conditional_force_assignmentContext conditional_force_assignment() { + Conditional_force_assignmentContext _localctx = new Conditional_force_assignmentContext(Context, State); + EnterRule(_localctx, 110, RULE_conditional_force_assignment); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1030; + target(); + State = 1031; + Match(LEQ); + State = 1032; + Match(FORCE); + State = 1034; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==IN || _la==OUT) { + { + State = 1033; + force_mode(); + } + } + + State = 1036; + conditional_expression(); + State = 1037; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Conditional_signal_assignmentContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Conditional_waveform_assignmentContext conditional_waveform_assignment() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Conditional_force_assignmentContext conditional_force_assignment() { + return GetRuleContext(0); + } + public Conditional_signal_assignmentContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_conditional_signal_assignment; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitConditional_signal_assignment(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Conditional_signal_assignmentContext conditional_signal_assignment() { + Conditional_signal_assignmentContext _localctx = new Conditional_signal_assignmentContext(Context, State); + EnterRule(_localctx, 112, RULE_conditional_signal_assignment); + try { + State = 1041; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,74,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 1039; + conditional_waveform_assignment(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1040; + conditional_force_assignment(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Conditional_variable_assignmentContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public TargetContext target() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode WALRUS() { return GetToken(vhdl2008Parser.WALRUS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Conditional_expressionContext conditional_expression() { + return GetRuleContext(0); + } + public Conditional_variable_assignmentContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_conditional_variable_assignment; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitConditional_variable_assignment(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Conditional_variable_assignmentContext conditional_variable_assignment() { + Conditional_variable_assignmentContext _localctx = new Conditional_variable_assignmentContext(Context, State); + EnterRule(_localctx, 114, RULE_conditional_variable_assignment); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1043; + target(); + State = 1044; + Match(WALRUS); + State = 1045; + conditional_expression(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Conditional_waveform_assignmentContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public TargetContext target() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LEQ() { return GetToken(vhdl2008Parser.LEQ, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Conditional_waveformsContext conditional_waveforms() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Delay_mechanismContext delay_mechanism() { + return GetRuleContext(0); + } + public Conditional_waveform_assignmentContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_conditional_waveform_assignment; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitConditional_waveform_assignment(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Conditional_waveform_assignmentContext conditional_waveform_assignment() { + Conditional_waveform_assignmentContext _localctx = new Conditional_waveform_assignmentContext(Context, State); + EnterRule(_localctx, 116, RULE_conditional_waveform_assignment); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1047; + target(); + State = 1048; + Match(LEQ); + State = 1050; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 42)) & ~0x3f) == 0 && ((1L << (_la - 42)) & -9223371761976868863L) != 0)) { + { + State = 1049; + delay_mechanism(); + } + } + + State = 1052; + conditional_waveforms(); + State = 1053; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Conditional_waveformsContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public WaveformContext waveform() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode WHEN() { return GetToken(vhdl2008Parser.WHEN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ConditionContext condition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ELSE() { return GetToken(vhdl2008Parser.ELSE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Conditional_waveformsContext conditional_waveforms() { + return GetRuleContext(0); + } + public Conditional_waveformsContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_conditional_waveforms; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitConditional_waveforms(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Conditional_waveformsContext conditional_waveforms() { + Conditional_waveformsContext _localctx = new Conditional_waveformsContext(Context, State); + EnterRule(_localctx, 118, RULE_conditional_waveforms); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1055; + waveform(); + State = 1062; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==WHEN) { + { + State = 1056; + Match(WHEN); + State = 1057; + condition(); + State = 1060; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==ELSE) { + { + State = 1058; + Match(ELSE); + State = 1059; + conditional_waveforms(); + } + } + + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Configuration_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] CONFIGURATION() { return GetTokens(vhdl2008Parser.CONFIGURATION); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONFIGURATION(int i) { + return GetToken(vhdl2008Parser.CONFIGURATION, i); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext[] identifier() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OF() { return GetToken(vhdl2008Parser.OF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public NameContext name() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IS() { return GetToken(vhdl2008Parser.IS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Configuration_declarative_partContext configuration_declarative_part() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Block_configurationContext block_configuration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode END() { return GetToken(vhdl2008Parser.END, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + public Configuration_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_configuration_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitConfiguration_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Configuration_declarationContext configuration_declaration() { + Configuration_declarationContext _localctx = new Configuration_declarationContext(Context, State); + EnterRule(_localctx, 120, RULE_configuration_declaration); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1064; + Match(CONFIGURATION); + State = 1065; + identifier(); + State = 1066; + Match(OF); + State = 1067; + name(); + State = 1068; + Match(IS); + State = 1069; + configuration_declarative_part(); + State = 1070; + block_configuration(); + State = 1071; + Match(END); + State = 1073; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==CONFIGURATION) { + { + State = 1072; + Match(CONFIGURATION); + } + } + + State = 1076; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER) { + { + State = 1075; + identifier(); + } + } + + State = 1078; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Configuration_declarative_itemContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Use_clauseContext use_clause() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Attribute_specificationContext attribute_specification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Group_declarationContext group_declaration() { + return GetRuleContext(0); + } + public Configuration_declarative_itemContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_configuration_declarative_item; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitConfiguration_declarative_item(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Configuration_declarative_itemContext configuration_declarative_item() { + Configuration_declarative_itemContext _localctx = new Configuration_declarative_itemContext(Context, State); + EnterRule(_localctx, 122, RULE_configuration_declarative_item); + try { + State = 1083; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case USE: + EnterOuterAlt(_localctx, 1); + { + State = 1080; + use_clause(); + } + break; + case ATTRIBUTE: + EnterOuterAlt(_localctx, 2); + { + State = 1081; + attribute_specification(); + } + break; + case GROUP: + EnterOuterAlt(_localctx, 3); + { + State = 1082; + group_declaration(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Configuration_declarative_partContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Configuration_declarative_itemContext[] configuration_declarative_item() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Configuration_declarative_itemContext configuration_declarative_item(int i) { + return GetRuleContext(i); + } + public Configuration_declarative_partContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_configuration_declarative_part; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitConfiguration_declarative_part(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Configuration_declarative_partContext configuration_declarative_part() { + Configuration_declarative_partContext _localctx = new Configuration_declarative_partContext(Context, State); + EnterRule(_localctx, 124, RULE_configuration_declarative_part); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1088; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==ATTRIBUTE || _la==GROUP || _la==USE) { + { + { + State = 1085; + configuration_declarative_item(); + } + } + State = 1090; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Configuration_itemContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Block_configurationContext block_configuration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Component_configurationContext component_configuration() { + return GetRuleContext(0); + } + public Configuration_itemContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_configuration_item; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitConfiguration_item(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Configuration_itemContext configuration_item() { + Configuration_itemContext _localctx = new Configuration_itemContext(Context, State); + EnterRule(_localctx, 126, RULE_configuration_item); + try { + State = 1093; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,82,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 1091; + block_configuration(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1092; + component_configuration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Configuration_specificationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FOR() { return GetToken(vhdl2008Parser.FOR, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Component_specificationContext component_specification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Binding_indicationContext binding_indication() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + public Configuration_specificationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_configuration_specification; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitConfiguration_specification(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Configuration_specificationContext configuration_specification() { + Configuration_specificationContext _localctx = new Configuration_specificationContext(Context, State); + EnterRule(_localctx, 128, RULE_configuration_specification); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1095; + Match(FOR); + State = 1096; + component_specification(); + State = 1097; + binding_indication(); + State = 1098; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Constant_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONSTANT() { return GetToken(vhdl2008Parser.CONSTANT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Identifier_listContext identifier_list() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON() { return GetToken(vhdl2008Parser.COLON, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Subtype_indicationContext subtype_indication() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode WALRUS() { return GetToken(vhdl2008Parser.WALRUS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression() { + return GetRuleContext(0); + } + public Constant_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_constant_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitConstant_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Constant_declarationContext constant_declaration() { + Constant_declarationContext _localctx = new Constant_declarationContext(Context, State); + EnterRule(_localctx, 130, RULE_constant_declaration); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1100; + Match(CONSTANT); + State = 1101; + identifier_list(); + State = 1102; + Match(COLON); + State = 1103; + subtype_indication(); + State = 1106; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==WALRUS) { + { + State = 1104; + Match(WALRUS); + State = 1105; + expression(); + } + } + + State = 1108; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Constrained_array_definitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ARRAY() { return GetToken(vhdl2008Parser.ARRAY, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Index_constraintContext index_constraint() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OF() { return GetToken(vhdl2008Parser.OF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Subtype_indicationContext subtype_indication() { + return GetRuleContext(0); + } + public Constrained_array_definitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_constrained_array_definition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitConstrained_array_definition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Constrained_array_definitionContext constrained_array_definition() { + Constrained_array_definitionContext _localctx = new Constrained_array_definitionContext(Context, State); + EnterRule(_localctx, 132, RULE_constrained_array_definition); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1110; + Match(ARRAY); + State = 1111; + index_constraint(); + State = 1112; + Match(OF); + State = 1113; + subtype_indication(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ConstraintContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Range_constraintContext range_constraint() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Index_constraintContext index_constraint() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Record_constraintContext record_constraint() { + return GetRuleContext(0); + } + public ConstraintContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_constraint; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitConstraint(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ConstraintContext constraint() { + ConstraintContext _localctx = new ConstraintContext(Context, State); + EnterRule(_localctx, 134, RULE_constraint); + try { + State = 1118; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,84,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 1115; + range_constraint(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1116; + index_constraint(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 1117; + record_constraint(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Context_clauseContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Context_itemContext[] context_item() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Context_itemContext context_item(int i) { + return GetRuleContext(i); + } + public Context_clauseContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_context_clause; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitContext_clause(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Context_clauseContext context_clause() { + Context_clauseContext _localctx = new Context_clauseContext(Context, State); + EnterRule(_localctx, 136, RULE_context_clause); + try { + int _alt; + EnterOuterAlt(_localctx, 1); + { + State = 1123; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,85,Context); + while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + State = 1120; + context_item(); + } + } + } + State = 1125; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,85,Context); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Context_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] CONTEXT() { return GetTokens(vhdl2008Parser.CONTEXT); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONTEXT(int i) { + return GetToken(vhdl2008Parser.CONTEXT, i); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext[] identifier() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IS() { return GetToken(vhdl2008Parser.IS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Context_clauseContext context_clause() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode END() { return GetToken(vhdl2008Parser.END, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + public Context_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_context_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitContext_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Context_declarationContext context_declaration() { + Context_declarationContext _localctx = new Context_declarationContext(Context, State); + EnterRule(_localctx, 138, RULE_context_declaration); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1126; + Match(CONTEXT); + State = 1127; + identifier(); + State = 1128; + Match(IS); + State = 1129; + context_clause(); + State = 1130; + Match(END); + State = 1132; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==CONTEXT) { + { + State = 1131; + Match(CONTEXT); + } + } + + State = 1135; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER) { + { + State = 1134; + identifier(); + } + } + + State = 1137; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Context_itemContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Library_clauseContext library_clause() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Use_clauseContext use_clause() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Context_referenceContext context_reference() { + return GetRuleContext(0); + } + public Context_itemContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_context_item; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitContext_item(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Context_itemContext context_item() { + Context_itemContext _localctx = new Context_itemContext(Context, State); + EnterRule(_localctx, 140, RULE_context_item); + try { + State = 1142; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case LIBRARY: + EnterOuterAlt(_localctx, 1); + { + State = 1139; + library_clause(); + } + break; + case USE: + EnterOuterAlt(_localctx, 2); + { + State = 1140; + use_clause(); + } + break; + case CONTEXT: + EnterOuterAlt(_localctx, 3); + { + State = 1141; + context_reference(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Context_referenceContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONTEXT() { return GetToken(vhdl2008Parser.CONTEXT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Selected_nameContext[] selected_name() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Selected_nameContext selected_name(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(vhdl2008Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(vhdl2008Parser.COMMA, i); + } + public Context_referenceContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_context_reference; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitContext_reference(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Context_referenceContext context_reference() { + Context_referenceContext _localctx = new Context_referenceContext(Context, State); + EnterRule(_localctx, 142, RULE_context_reference); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1144; + Match(CONTEXT); + State = 1145; + selected_name(); + State = 1150; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 1146; + Match(COMMA); + State = 1147; + selected_name(); + } + } + State = 1152; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 1153; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Delay_mechanismContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TRANSPORT() { return GetToken(vhdl2008Parser.TRANSPORT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode INERTIAL() { return GetToken(vhdl2008Parser.INERTIAL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode REJECT() { return GetToken(vhdl2008Parser.REJECT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression() { + return GetRuleContext(0); + } + public Delay_mechanismContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_delay_mechanism; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitDelay_mechanism(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Delay_mechanismContext delay_mechanism() { + Delay_mechanismContext _localctx = new Delay_mechanismContext(Context, State); + EnterRule(_localctx, 144, RULE_delay_mechanism); + int _la; + try { + State = 1161; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case TRANSPORT: + EnterOuterAlt(_localctx, 1); + { + State = 1155; + Match(TRANSPORT); + } + break; + case INERTIAL: + case REJECT: + EnterOuterAlt(_localctx, 2); + { + State = 1158; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==REJECT) { + { + State = 1156; + Match(REJECT); + State = 1157; + expression(); + } + } + + State = 1160; + Match(INERTIAL); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Design_fileContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode Eof() { return GetToken(vhdl2008Parser.Eof, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Design_unitContext[] design_unit() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Design_unitContext design_unit(int i) { + return GetRuleContext(i); + } + public Design_fileContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_design_file; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitDesign_file(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Design_fileContext design_file() { + Design_fileContext _localctx = new Design_fileContext(Context, State); + EnterRule(_localctx, 146, RULE_design_file); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1164; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + do { + { + { + State = 1163; + design_unit(); + } + } + State = 1166; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } while ( (((_la) & ~0x3f) == 0 && ((1L << _la) & 70368883638528L) != 0) || _la==PACKAGE || _la==USE ); + State = 1168; + Match(Eof); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Design_unitContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Context_clauseContext context_clause() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Library_unitContext library_unit() { + return GetRuleContext(0); + } + public Design_unitContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_design_unit; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitDesign_unit(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Design_unitContext design_unit() { + Design_unitContext _localctx = new Design_unitContext(Context, State); + EnterRule(_localctx, 148, RULE_design_unit); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1170; + context_clause(); + State = 1171; + library_unit(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class DesignatorContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode STRING_LITERAL() { return GetToken(vhdl2008Parser.STRING_LITERAL, 0); } + public DesignatorContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_designator; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitDesignator(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public DesignatorContext designator() { + DesignatorContext _localctx = new DesignatorContext(Context, State); + EnterRule(_localctx, 150, RULE_designator); + try { + State = 1175; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case BASIC_IDENTIFIER: + case EXTENDED_IDENTIFIER: + EnterOuterAlt(_localctx, 1); + { + State = 1173; + identifier(); + } + break; + case STRING_LITERAL: + EnterOuterAlt(_localctx, 2); + { + State = 1174; + Match(STRING_LITERAL); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class DirectionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TO() { return GetToken(vhdl2008Parser.TO, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOWNTO() { return GetToken(vhdl2008Parser.DOWNTO, 0); } + public DirectionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_direction; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitDirection(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public DirectionContext direction() { + DirectionContext _localctx = new DirectionContext(Context, State); + EnterRule(_localctx, 152, RULE_direction); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1177; + _la = TokenStream.LA(1); + if ( !(_la==DOWNTO || _la==TO) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Disconnection_specificationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DISCONNECT() { return GetToken(vhdl2008Parser.DISCONNECT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Guarded_signal_specificationContext guarded_signal_specification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode AFTER() { return GetToken(vhdl2008Parser.AFTER, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + public Disconnection_specificationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_disconnection_specification; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitDisconnection_specification(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Disconnection_specificationContext disconnection_specification() { + Disconnection_specificationContext _localctx = new Disconnection_specificationContext(Context, State); + EnterRule(_localctx, 154, RULE_disconnection_specification); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1179; + Match(DISCONNECT); + State = 1180; + guarded_signal_specification(); + State = 1181; + Match(AFTER); + State = 1182; + expression(); + State = 1183; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Discrete_rangeContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Subtype_indicationContext subtype_indication() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Range_declContext range_decl() { + return GetRuleContext(0); + } + public Discrete_rangeContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_discrete_range; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitDiscrete_range(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Discrete_rangeContext discrete_range() { + Discrete_rangeContext _localctx = new Discrete_rangeContext(Context, State); + EnterRule(_localctx, 156, RULE_discrete_range); + try { + State = 1187; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,94,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 1185; + subtype_indication(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1186; + range_decl(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Element_associationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ChoicesContext choices() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ARROW() { return GetToken(vhdl2008Parser.ARROW, 0); } + public Element_associationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_element_association; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitElement_association(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Element_associationContext element_association() { + Element_associationContext _localctx = new Element_associationContext(Context, State); + EnterRule(_localctx, 158, RULE_element_association); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1192; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,95,Context) ) { + case 1: + { + State = 1189; + choices(); + State = 1190; + Match(ARROW); + } + break; + } + State = 1194; + expression(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Element_constraintContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Array_constraintContext array_constraint() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Record_constraintContext record_constraint() { + return GetRuleContext(0); + } + public Element_constraintContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_element_constraint; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitElement_constraint(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Element_constraintContext element_constraint() { + Element_constraintContext _localctx = new Element_constraintContext(Context, State); + EnterRule(_localctx, 160, RULE_element_constraint); + try { + State = 1198; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,96,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 1196; + array_constraint(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1197; + record_constraint(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Element_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Identifier_listContext identifier_list() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON() { return GetToken(vhdl2008Parser.COLON, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Element_subtype_definitionContext element_subtype_definition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + public Element_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_element_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitElement_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Element_declarationContext element_declaration() { + Element_declarationContext _localctx = new Element_declarationContext(Context, State); + EnterRule(_localctx, 162, RULE_element_declaration); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1200; + identifier_list(); + State = 1201; + Match(COLON); + State = 1202; + element_subtype_definition(); + State = 1203; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Element_resolutionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Array_element_resolutionContext array_element_resolution() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Record_resolutionContext record_resolution() { + return GetRuleContext(0); + } + public Element_resolutionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_element_resolution; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitElement_resolution(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Element_resolutionContext element_resolution() { + Element_resolutionContext _localctx = new Element_resolutionContext(Context, State); + EnterRule(_localctx, 164, RULE_element_resolution); + try { + State = 1207; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,97,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 1205; + array_element_resolution(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1206; + record_resolution(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Element_subtype_definitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Subtype_indicationContext subtype_indication() { + return GetRuleContext(0); + } + public Element_subtype_definitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_element_subtype_definition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitElement_subtype_definition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Element_subtype_definitionContext element_subtype_definition() { + Element_subtype_definitionContext _localctx = new Element_subtype_definitionContext(Context, State); + EnterRule(_localctx, 166, RULE_element_subtype_definition); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1209; + subtype_indication(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Entity_aspectContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ENTITY() { return GetToken(vhdl2008Parser.ENTITY, 0); } + [System.Diagnostics.DebuggerNonUserCode] public NameContext name() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONFIGURATION() { return GetToken(vhdl2008Parser.CONFIGURATION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OPEN() { return GetToken(vhdl2008Parser.OPEN, 0); } + public Entity_aspectContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_entity_aspect; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitEntity_aspect(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Entity_aspectContext entity_aspect() { + Entity_aspectContext _localctx = new Entity_aspectContext(Context, State); + EnterRule(_localctx, 168, RULE_entity_aspect); + int _la; + try { + State = 1222; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case ENTITY: + EnterOuterAlt(_localctx, 1); + { + State = 1211; + Match(ENTITY); + State = 1212; + name(); + State = 1217; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==LPAREN) { + { + State = 1213; + Match(LPAREN); + State = 1214; + identifier(); + State = 1215; + Match(RPAREN); + } + } + + } + break; + case CONFIGURATION: + EnterOuterAlt(_localctx, 2); + { + State = 1219; + Match(CONFIGURATION); + State = 1220; + name(); + } + break; + case OPEN: + EnterOuterAlt(_localctx, 3); + { + State = 1221; + Match(OPEN); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Entity_classContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ENTITY() { return GetToken(vhdl2008Parser.ENTITY, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ARCHITECTURE() { return GetToken(vhdl2008Parser.ARCHITECTURE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONFIGURATION() { return GetToken(vhdl2008Parser.CONFIGURATION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PROCEDURE() { return GetToken(vhdl2008Parser.PROCEDURE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FUNCTION() { return GetToken(vhdl2008Parser.FUNCTION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PACKAGE() { return GetToken(vhdl2008Parser.PACKAGE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TYPE() { return GetToken(vhdl2008Parser.TYPE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SUBTYPE() { return GetToken(vhdl2008Parser.SUBTYPE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONSTANT() { return GetToken(vhdl2008Parser.CONSTANT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SIGNAL() { return GetToken(vhdl2008Parser.SIGNAL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode VARIABLE() { return GetToken(vhdl2008Parser.VARIABLE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMPONENT() { return GetToken(vhdl2008Parser.COMPONENT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LABEL() { return GetToken(vhdl2008Parser.LABEL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LITERAL() { return GetToken(vhdl2008Parser.LITERAL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode UNITS() { return GetToken(vhdl2008Parser.UNITS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode GROUP() { return GetToken(vhdl2008Parser.GROUP, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FILE() { return GetToken(vhdl2008Parser.FILE, 0); } + public Entity_classContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_entity_class; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitEntity_class(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Entity_classContext entity_class() { + Entity_classContext _localctx = new Entity_classContext(Context, State); + EnterRule(_localctx, 170, RULE_entity_class); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1224; + _la = TokenStream.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 598291229704448L) != 0) || ((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & 20345293635617L) != 0)) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Entity_class_entryContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Entity_classContext entity_class() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BOX() { return GetToken(vhdl2008Parser.BOX, 0); } + public Entity_class_entryContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_entity_class_entry; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitEntity_class_entry(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Entity_class_entryContext entity_class_entry() { + Entity_class_entryContext _localctx = new Entity_class_entryContext(Context, State); + EnterRule(_localctx, 172, RULE_entity_class_entry); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1226; + entity_class(); + State = 1228; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BOX) { + { + State = 1227; + Match(BOX); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Entity_class_entry_listContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Entity_class_entryContext[] entity_class_entry() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Entity_class_entryContext entity_class_entry(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(vhdl2008Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(vhdl2008Parser.COMMA, i); + } + public Entity_class_entry_listContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_entity_class_entry_list; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitEntity_class_entry_list(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Entity_class_entry_listContext entity_class_entry_list() { + Entity_class_entry_listContext _localctx = new Entity_class_entry_listContext(Context, State); + EnterRule(_localctx, 174, RULE_entity_class_entry_list); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1230; + entity_class_entry(); + State = 1235; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 1231; + Match(COMMA); + State = 1232; + entity_class_entry(); + } + } + State = 1237; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Entity_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] ENTITY() { return GetTokens(vhdl2008Parser.ENTITY); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ENTITY(int i) { + return GetToken(vhdl2008Parser.ENTITY, i); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext[] identifier() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IS() { return GetToken(vhdl2008Parser.IS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Entity_headerContext entity_header() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Entity_declarative_partContext entity_declarative_part() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode END() { return GetToken(vhdl2008Parser.END, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BEGIN() { return GetToken(vhdl2008Parser.BEGIN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Entity_statement_partContext entity_statement_part() { + return GetRuleContext(0); + } + public Entity_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_entity_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitEntity_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Entity_declarationContext entity_declaration() { + Entity_declarationContext _localctx = new Entity_declarationContext(Context, State); + EnterRule(_localctx, 176, RULE_entity_declaration); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1238; + Match(ENTITY); + State = 1239; + identifier(); + State = 1240; + Match(IS); + State = 1241; + entity_header(); + State = 1242; + entity_declarative_part(); + State = 1245; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BEGIN) { + { + State = 1243; + Match(BEGIN); + State = 1244; + entity_statement_part(); + } + } + + State = 1247; + Match(END); + State = 1249; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==ENTITY) { + { + State = 1248; + Match(ENTITY); + } + } + + State = 1252; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER) { + { + State = 1251; + identifier(); + } + } + + State = 1254; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Entity_declarative_itemContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Subprogram_declarationContext subprogram_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Subprogram_bodyContext subprogram_body() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Subprogram_instantiation_declarationContext subprogram_instantiation_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Package_declarationContext package_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Package_bodyContext package_body() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Package_instantiation_declarationContext package_instantiation_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Type_declarationContext type_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Subtype_declarationContext subtype_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Constant_declarationContext constant_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Signal_declarationContext signal_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Variable_declarationContext variable_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public File_declarationContext file_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Alias_declarationContext alias_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Attribute_declarationContext attribute_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Attribute_specificationContext attribute_specification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Disconnection_specificationContext disconnection_specification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Use_clauseContext use_clause() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Group_template_declarationContext group_template_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Group_declarationContext group_declaration() { + return GetRuleContext(0); + } + public Entity_declarative_itemContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_entity_declarative_item; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitEntity_declarative_item(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Entity_declarative_itemContext entity_declarative_item() { + Entity_declarative_itemContext _localctx = new Entity_declarative_itemContext(Context, State); + EnterRule(_localctx, 178, RULE_entity_declarative_item); + try { + State = 1275; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,105,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 1256; + subprogram_declaration(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1257; + subprogram_body(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 1258; + subprogram_instantiation_declaration(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 1259; + package_declaration(); + } + break; + case 5: + EnterOuterAlt(_localctx, 5); + { + State = 1260; + package_body(); + } + break; + case 6: + EnterOuterAlt(_localctx, 6); + { + State = 1261; + package_instantiation_declaration(); + } + break; + case 7: + EnterOuterAlt(_localctx, 7); + { + State = 1262; + type_declaration(); + } + break; + case 8: + EnterOuterAlt(_localctx, 8); + { + State = 1263; + subtype_declaration(); + } + break; + case 9: + EnterOuterAlt(_localctx, 9); + { + State = 1264; + constant_declaration(); + } + break; + case 10: + EnterOuterAlt(_localctx, 10); + { + State = 1265; + signal_declaration(); + } + break; + case 11: + EnterOuterAlt(_localctx, 11); + { + State = 1266; + variable_declaration(); + } + break; + case 12: + EnterOuterAlt(_localctx, 12); + { + State = 1267; + file_declaration(); + } + break; + case 13: + EnterOuterAlt(_localctx, 13); + { + State = 1268; + alias_declaration(); + } + break; + case 14: + EnterOuterAlt(_localctx, 14); + { + State = 1269; + attribute_declaration(); + } + break; + case 15: + EnterOuterAlt(_localctx, 15); + { + State = 1270; + attribute_specification(); + } + break; + case 16: + EnterOuterAlt(_localctx, 16); + { + State = 1271; + disconnection_specification(); + } + break; + case 17: + EnterOuterAlt(_localctx, 17); + { + State = 1272; + use_clause(); + } + break; + case 18: + EnterOuterAlt(_localctx, 18); + { + State = 1273; + group_template_declaration(); + } + break; + case 19: + EnterOuterAlt(_localctx, 19); + { + State = 1274; + group_declaration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Entity_declarative_partContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Entity_declarative_itemContext[] entity_declarative_item() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Entity_declarative_itemContext entity_declarative_item(int i) { + return GetRuleContext(i); + } + public Entity_declarative_partContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_entity_declarative_part; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitEntity_declarative_part(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Entity_declarative_partContext entity_declarative_part() { + Entity_declarative_partContext _localctx = new Entity_declarative_partContext(Context, State); + EnterRule(_localctx, 180, RULE_entity_declarative_part); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1280; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 1256296810528L) != 0) || ((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & 26942380179745L) != 0)) { + { + { + State = 1277; + entity_declarative_item(); + } + } + State = 1282; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Entity_designatorContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Entity_tagContext entity_tag() { + return GetRuleContext(0); + } + public Entity_designatorContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_entity_designator; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitEntity_designator(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Entity_designatorContext entity_designator() { + Entity_designatorContext _localctx = new Entity_designatorContext(Context, State); + EnterRule(_localctx, 182, RULE_entity_designator); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1283; + entity_tag(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Entity_headerContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Generic_clauseContext generic_clause() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Port_clauseContext port_clause() { + return GetRuleContext(0); + } + public Entity_headerContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_entity_header; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitEntity_header(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Entity_headerContext entity_header() { + Entity_headerContext _localctx = new Entity_headerContext(Context, State); + EnterRule(_localctx, 184, RULE_entity_header); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1286; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==GENERIC) { + { + State = 1285; + generic_clause(); + } + } + + State = 1289; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==PORT) { + { + State = 1288; + port_clause(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Entity_name_listContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Entity_designatorContext[] entity_designator() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Entity_designatorContext entity_designator(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(vhdl2008Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(vhdl2008Parser.COMMA, i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OTHERS() { return GetToken(vhdl2008Parser.OTHERS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ALL() { return GetToken(vhdl2008Parser.ALL, 0); } + public Entity_name_listContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_entity_name_list; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitEntity_name_list(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Entity_name_listContext entity_name_list() { + Entity_name_listContext _localctx = new Entity_name_listContext(Context, State); + EnterRule(_localctx, 186, RULE_entity_name_list); + int _la; + try { + State = 1301; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case STRING_LITERAL: + case BASIC_IDENTIFIER: + case EXTENDED_IDENTIFIER: + case CHARACTER_LITERAL: + EnterOuterAlt(_localctx, 1); + { + State = 1291; + entity_designator(); + State = 1296; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 1292; + Match(COMMA); + State = 1293; + entity_designator(); + } + } + State = 1298; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + break; + case OTHERS: + EnterOuterAlt(_localctx, 2); + { + State = 1299; + Match(OTHERS); + } + break; + case ALL: + EnterOuterAlt(_localctx, 3); + { + State = 1300; + Match(ALL); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Entity_specificationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Entity_name_listContext entity_name_list() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON() { return GetToken(vhdl2008Parser.COLON, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Entity_classContext entity_class() { + return GetRuleContext(0); + } + public Entity_specificationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_entity_specification; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitEntity_specification(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Entity_specificationContext entity_specification() { + Entity_specificationContext _localctx = new Entity_specificationContext(Context, State); + EnterRule(_localctx, 188, RULE_entity_specification); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1303; + entity_name_list(); + State = 1304; + Match(COLON); + State = 1305; + entity_class(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Entity_statementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Concurrent_assertion_statementContext concurrent_assertion_statement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Process_statementContext process_statement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Concurrent_procedure_call_statementContext concurrent_procedure_call_statement() { + return GetRuleContext(0); + } + public Entity_statementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_entity_statement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitEntity_statement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Entity_statementContext entity_statement() { + Entity_statementContext _localctx = new Entity_statementContext(Context, State); + EnterRule(_localctx, 190, RULE_entity_statement); + try { + State = 1310; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,111,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 1307; + concurrent_assertion_statement(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1308; + process_statement(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 1309; + concurrent_procedure_call_statement(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Entity_statement_partContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Entity_statementContext[] entity_statement() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Entity_statementContext entity_statement(int i) { + return GetRuleContext(i); + } + public Entity_statement_partContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_entity_statement_part; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitEntity_statement_part(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Entity_statement_partContext entity_statement_part() { + Entity_statement_partContext _localctx = new Entity_statement_partContext(Context, State); + EnterRule(_localctx, 192, RULE_entity_statement_part); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1315; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (((((_la - 10)) & ~0x3f) == 0 && ((1L << (_la - 10)) & 3458764513820540929L) != 0) || ((((_la - 119)) & ~0x3f) == 0 && ((1L << (_la - 119)) & 32961L) != 0)) { + { + { + State = 1312; + entity_statement(); + } + } + State = 1317; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Entity_tagContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CHARACTER_LITERAL() { return GetToken(vhdl2008Parser.CHARACTER_LITERAL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode STRING_LITERAL() { return GetToken(vhdl2008Parser.STRING_LITERAL, 0); } + public Entity_tagContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_entity_tag; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitEntity_tag(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Entity_tagContext entity_tag() { + Entity_tagContext _localctx = new Entity_tagContext(Context, State); + EnterRule(_localctx, 194, RULE_entity_tag); + try { + State = 1321; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case BASIC_IDENTIFIER: + case EXTENDED_IDENTIFIER: + EnterOuterAlt(_localctx, 1); + { + State = 1318; + identifier(); + } + break; + case CHARACTER_LITERAL: + EnterOuterAlt(_localctx, 2); + { + State = 1319; + Match(CHARACTER_LITERAL); + } + break; + case STRING_LITERAL: + EnterOuterAlt(_localctx, 3); + { + State = 1320; + Match(STRING_LITERAL); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Enumeration_literalContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CHARACTER_LITERAL() { return GetToken(vhdl2008Parser.CHARACTER_LITERAL, 0); } + public Enumeration_literalContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_enumeration_literal; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitEnumeration_literal(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Enumeration_literalContext enumeration_literal() { + Enumeration_literalContext _localctx = new Enumeration_literalContext(Context, State); + EnterRule(_localctx, 196, RULE_enumeration_literal); + try { + State = 1325; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case BASIC_IDENTIFIER: + case EXTENDED_IDENTIFIER: + EnterOuterAlt(_localctx, 1); + { + State = 1323; + identifier(); + } + break; + case CHARACTER_LITERAL: + EnterOuterAlt(_localctx, 2); + { + State = 1324; + Match(CHARACTER_LITERAL); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Enumeration_type_definitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Enumeration_literalContext[] enumeration_literal() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Enumeration_literalContext enumeration_literal(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(vhdl2008Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(vhdl2008Parser.COMMA, i); + } + public Enumeration_type_definitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_enumeration_type_definition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitEnumeration_type_definition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Enumeration_type_definitionContext enumeration_type_definition() { + Enumeration_type_definitionContext _localctx = new Enumeration_type_definitionContext(Context, State); + EnterRule(_localctx, 198, RULE_enumeration_type_definition); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1327; + Match(LPAREN); + State = 1328; + enumeration_literal(); + State = 1333; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 1329; + Match(COMMA); + State = 1330; + enumeration_literal(); + } + } + State = 1335; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 1336; + Match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Exit_statementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode EXIT() { return GetToken(vhdl2008Parser.EXIT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Label_colonContext label_colon() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode WHEN() { return GetToken(vhdl2008Parser.WHEN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ConditionContext condition() { + return GetRuleContext(0); + } + public Exit_statementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_exit_statement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitExit_statement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Exit_statementContext exit_statement() { + Exit_statementContext _localctx = new Exit_statementContext(Context, State); + EnterRule(_localctx, 200, RULE_exit_statement); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1339; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER) { + { + State = 1338; + label_colon(); + } + } + + State = 1341; + Match(EXIT); + State = 1343; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER) { + { + State = 1342; + identifier(); + } + } + + State = 1347; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==WHEN) { + { + State = 1345; + Match(WHEN); + State = 1346; + condition(); + } + } + + State = 1349; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ExpressionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONDITION_OPERATOR() { return GetToken(vhdl2008Parser.CONDITION_OPERATOR, 0); } + [System.Diagnostics.DebuggerNonUserCode] public PrimaryContext primary() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public RelationContext[] relation() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public RelationContext relation(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public Logical_operatorContext[] logical_operator() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Logical_operatorContext logical_operator(int i) { + return GetRuleContext(i); + } + public ExpressionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_expression; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitExpression(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ExpressionContext expression() { + ExpressionContext _localctx = new ExpressionContext(Context, State); + EnterRule(_localctx, 202, RULE_expression); + int _la; + try { + State = 1362; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case CONDITION_OPERATOR: + EnterOuterAlt(_localctx, 1); + { + { + State = 1351; + Match(CONDITION_OPERATOR); + State = 1352; + primary(); + } + } + break; + case ABS: + case AND: + case NAND: + case NEW: + case NOR: + case NOT: + case NULL_: + case OR: + case XNOR: + case XOR: + case DECIMAL_LITERAL: + case STRING_LITERAL: + case BASED_LITERAL: + case BIT_STRING_LITERAL: + case BASIC_IDENTIFIER: + case EXTENDED_IDENTIFIER: + case CHARACTER_LITERAL: + case LPAREN: + case PLUS: + case MINUS: + EnterOuterAlt(_localctx, 2); + { + { + State = 1353; + relation(); + State = 1359; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 297237575406452864L) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & 13510798882111489L) != 0)) { + { + { + State = 1354; + logical_operator(); + State = 1355; + relation(); + } + } + State = 1361; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FactorContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public PrimaryContext[] primary() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public PrimaryContext primary(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOUBLESTAR() { return GetToken(vhdl2008Parser.DOUBLESTAR, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ABS() { return GetToken(vhdl2008Parser.ABS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode NOT() { return GetToken(vhdl2008Parser.NOT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Logical_operatorContext logical_operator() { + return GetRuleContext(0); + } + public FactorContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_factor; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitFactor(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FactorContext factor() { + FactorContext _localctx = new FactorContext(Context, State); + EnterRule(_localctx, 204, RULE_factor); + try { + State = 1376; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case NEW: + case NULL_: + case DECIMAL_LITERAL: + case STRING_LITERAL: + case BASED_LITERAL: + case BIT_STRING_LITERAL: + case BASIC_IDENTIFIER: + case EXTENDED_IDENTIFIER: + case CHARACTER_LITERAL: + case LPAREN: + EnterOuterAlt(_localctx, 1); + { + State = 1364; + primary(); + State = 1367; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,121,Context) ) { + case 1: + { + State = 1365; + Match(DOUBLESTAR); + State = 1366; + primary(); + } + break; + } + } + break; + case ABS: + EnterOuterAlt(_localctx, 2); + { + State = 1369; + Match(ABS); + State = 1370; + primary(); + } + break; + case NOT: + EnterOuterAlt(_localctx, 3); + { + State = 1371; + Match(NOT); + State = 1372; + primary(); + } + break; + case AND: + case NAND: + case NOR: + case OR: + case XNOR: + case XOR: + EnterOuterAlt(_localctx, 4); + { + State = 1373; + logical_operator(); + State = 1374; + primary(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class File_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FILE() { return GetToken(vhdl2008Parser.FILE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Identifier_listContext identifier_list() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON() { return GetToken(vhdl2008Parser.COLON, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Subtype_indicationContext subtype_indication() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public File_open_informationContext file_open_information() { + return GetRuleContext(0); + } + public File_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_file_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitFile_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public File_declarationContext file_declaration() { + File_declarationContext _localctx = new File_declarationContext(Context, State); + EnterRule(_localctx, 206, RULE_file_declaration); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1378; + Match(FILE); + State = 1379; + identifier_list(); + State = 1380; + Match(COLON); + State = 1381; + subtype_indication(); + State = 1383; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==IS || _la==OPEN) { + { + State = 1382; + file_open_information(); + } + } + + State = 1385; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class File_logical_nameContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression() { + return GetRuleContext(0); + } + public File_logical_nameContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_file_logical_name; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitFile_logical_name(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public File_logical_nameContext file_logical_name() { + File_logical_nameContext _localctx = new File_logical_nameContext(Context, State); + EnterRule(_localctx, 208, RULE_file_logical_name); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1387; + expression(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class File_open_informationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IS() { return GetToken(vhdl2008Parser.IS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public File_logical_nameContext file_logical_name() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OPEN() { return GetToken(vhdl2008Parser.OPEN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression() { + return GetRuleContext(0); + } + public File_open_informationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_file_open_information; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitFile_open_information(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public File_open_informationContext file_open_information() { + File_open_informationContext _localctx = new File_open_informationContext(Context, State); + EnterRule(_localctx, 210, RULE_file_open_information); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1391; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==OPEN) { + { + State = 1389; + Match(OPEN); + State = 1390; + expression(); + } + } + + State = 1393; + Match(IS); + State = 1394; + file_logical_name(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class File_type_definitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FILE() { return GetToken(vhdl2008Parser.FILE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OF() { return GetToken(vhdl2008Parser.OF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Subtype_indicationContext subtype_indication() { + return GetRuleContext(0); + } + public File_type_definitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_file_type_definition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitFile_type_definition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public File_type_definitionContext file_type_definition() { + File_type_definitionContext _localctx = new File_type_definitionContext(Context, State); + EnterRule(_localctx, 212, RULE_file_type_definition); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1396; + Match(FILE); + State = 1397; + Match(OF); + State = 1398; + subtype_indication(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Floating_type_definitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Range_constraintContext range_constraint() { + return GetRuleContext(0); + } + public Floating_type_definitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_floating_type_definition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitFloating_type_definition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Floating_type_definitionContext floating_type_definition() { + Floating_type_definitionContext _localctx = new Floating_type_definitionContext(Context, State); + EnterRule(_localctx, 214, RULE_floating_type_definition); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1400; + range_constraint(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class For_generate_statementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FOR() { return GetToken(vhdl2008Parser.FOR, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Parameter_specificationContext parameter_specification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode GENERATE() { return GetToken(vhdl2008Parser.GENERATE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Generate_statement_bodyContext generate_statement_body() { + return GetRuleContext(0); + } + public For_generate_statementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_for_generate_statement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitFor_generate_statement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public For_generate_statementContext for_generate_statement() { + For_generate_statementContext _localctx = new For_generate_statementContext(Context, State); + EnterRule(_localctx, 216, RULE_for_generate_statement); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1402; + Match(FOR); + State = 1403; + parameter_specification(); + State = 1404; + Match(GENERATE); + State = 1405; + generate_statement_body(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Force_modeContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IN() { return GetToken(vhdl2008Parser.IN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OUT() { return GetToken(vhdl2008Parser.OUT, 0); } + public Force_modeContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_force_mode; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitForce_mode(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Force_modeContext force_mode() { + Force_modeContext _localctx = new Force_modeContext(Context, State); + EnterRule(_localctx, 218, RULE_force_mode); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1407; + _la = TokenStream.LA(1); + if ( !(_la==IN || _la==OUT) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Formal_parameter_listContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Interface_listContext interface_list() { + return GetRuleContext(0); + } + public Formal_parameter_listContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_formal_parameter_list; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitFormal_parameter_list(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Formal_parameter_listContext formal_parameter_list() { + Formal_parameter_listContext _localctx = new Formal_parameter_listContext(Context, State); + EnterRule(_localctx, 220, RULE_formal_parameter_list); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1409; + interface_list(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Formal_partContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public NameContext[] name() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public NameContext name(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + public Formal_partContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_formal_part; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitFormal_part(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Formal_partContext formal_part() { + Formal_partContext _localctx = new Formal_partContext(Context, State); + EnterRule(_localctx, 222, RULE_formal_part); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1411; + name(); + State = 1416; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==LPAREN) { + { + State = 1412; + Match(LPAREN); + State = 1413; + name(); + State = 1414; + Match(RPAREN); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Full_type_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TYPE() { return GetToken(vhdl2008Parser.TYPE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IS() { return GetToken(vhdl2008Parser.IS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Type_definitionContext type_definition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + public Full_type_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_full_type_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitFull_type_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Full_type_declarationContext full_type_declaration() { + Full_type_declarationContext _localctx = new Full_type_declarationContext(Context, State); + EnterRule(_localctx, 224, RULE_full_type_declaration); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1418; + Match(TYPE); + State = 1419; + identifier(); + State = 1420; + Match(IS); + State = 1421; + type_definition(); + State = 1422; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Function_callContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public NameContext name() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Actual_parameter_partContext actual_parameter_part() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + public Function_callContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_function_call; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitFunction_call(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Function_callContext function_call() { + Function_callContext _localctx = new Function_callContext(Context, State); + EnterRule(_localctx, 226, RULE_function_call); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1424; + name(); + State = 1429; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,126,Context) ) { + case 1: + { + State = 1425; + Match(LPAREN); + State = 1426; + actual_parameter_part(); + State = 1427; + Match(RPAREN); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Function_specificationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FUNCTION() { return GetToken(vhdl2008Parser.FUNCTION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DesignatorContext designator() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Subprogram_headerContext subprogram_header() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RETURN() { return GetToken(vhdl2008Parser.RETURN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public NameContext name() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Formal_parameter_listContext formal_parameter_list() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PURE() { return GetToken(vhdl2008Parser.PURE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IMPURE() { return GetToken(vhdl2008Parser.IMPURE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PARAMETER() { return GetToken(vhdl2008Parser.PARAMETER, 0); } + public Function_specificationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_function_specification; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitFunction_specification(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Function_specificationContext function_specification() { + Function_specificationContext _localctx = new Function_specificationContext(Context, State); + EnterRule(_localctx, 228, RULE_function_specification); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1432; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==IMPURE || _la==PURE) { + { + State = 1431; + _la = TokenStream.LA(1); + if ( !(_la==IMPURE || _la==PURE) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + } + + State = 1434; + Match(FUNCTION); + State = 1435; + designator(); + State = 1436; + subprogram_header(); + State = 1444; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==LPAREN) { + { + State = 1437; + Match(LPAREN); + State = 1439; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==PARAMETER) { + { + State = 1438; + Match(PARAMETER); + } + } + + State = 1441; + formal_parameter_list(); + State = 1442; + Match(RPAREN); + } + } + + State = 1446; + Match(RETURN); + State = 1447; + name(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Generate_specificationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Discrete_rangeContext discrete_range() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + public Generate_specificationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_generate_specification; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitGenerate_specification(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Generate_specificationContext generate_specification() { + Generate_specificationContext _localctx = new Generate_specificationContext(Context, State); + EnterRule(_localctx, 230, RULE_generate_specification); + try { + State = 1452; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,130,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 1449; + discrete_range(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1450; + expression(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 1451; + identifier(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Generate_statementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode END() { return GetToken(vhdl2008Parser.END, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode GENERATE() { return GetToken(vhdl2008Parser.GENERATE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public For_generate_statementContext for_generate_statement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public If_generate_statementContext if_generate_statement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Case_generate_statementContext case_generate_statement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Label_colonContext label_colon() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + public Generate_statementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_generate_statement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitGenerate_statement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Generate_statementContext generate_statement() { + Generate_statementContext _localctx = new Generate_statementContext(Context, State); + EnterRule(_localctx, 232, RULE_generate_statement); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1455; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER) { + { + State = 1454; + label_colon(); + } + } + + State = 1460; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case FOR: + { + State = 1457; + for_generate_statement(); + } + break; + case IF: + { + State = 1458; + if_generate_statement(); + } + break; + case CASE: + { + State = 1459; + case_generate_statement(); + } + break; + default: + throw new NoViableAltException(this); + } + State = 1462; + Match(END); + State = 1463; + Match(GENERATE); + State = 1465; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER) { + { + State = 1464; + identifier(); + } + } + + State = 1467; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Generate_statement_bodyContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Block_declarative_partContext block_declarative_part() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BEGIN() { return GetToken(vhdl2008Parser.BEGIN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Concurrent_statementContext[] concurrent_statement() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Concurrent_statementContext concurrent_statement(int i) { + return GetRuleContext(i); + } + public Generate_statement_bodyContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_generate_statement_body; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitGenerate_statement_body(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Generate_statement_bodyContext generate_statement_body() { + Generate_statement_bodyContext _localctx = new Generate_statement_bodyContext(Context, State); + EnterRule(_localctx, 234, RULE_generate_statement_body); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1472; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,134,Context) ) { + case 1: + { + State = 1469; + block_declarative_part(); + State = 1470; + Match(BEGIN); + } + break; + } + State = 1477; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (((((_la - 10)) & ~0x3f) == 0 && ((1L << (_la - 10)) & 3458764514361606401L) != 0) || ((((_la - 113)) & ~0x3f) == 0 && ((1L << (_la - 113)) & 17592188153921L) != 0)) { + { + { + State = 1474; + concurrent_statement(); + } + } + State = 1479; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Generic_clauseContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode GENERIC() { return GetToken(vhdl2008Parser.GENERIC, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Generic_listContext generic_list() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + public Generic_clauseContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_generic_clause; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitGeneric_clause(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Generic_clauseContext generic_clause() { + Generic_clauseContext _localctx = new Generic_clauseContext(Context, State); + EnterRule(_localctx, 236, RULE_generic_clause); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1480; + Match(GENERIC); + State = 1481; + Match(LPAREN); + State = 1482; + generic_list(); + State = 1483; + Match(RPAREN); + State = 1484; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Generic_listContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Interface_listContext interface_list() { + return GetRuleContext(0); + } + public Generic_listContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_generic_list; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitGeneric_list(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Generic_listContext generic_list() { + Generic_listContext _localctx = new Generic_listContext(Context, State); + EnterRule(_localctx, 238, RULE_generic_list); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1486; + interface_list(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Generic_map_aspectContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode GENERIC() { return GetToken(vhdl2008Parser.GENERIC, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode MAP() { return GetToken(vhdl2008Parser.MAP, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Association_listContext association_list() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + public Generic_map_aspectContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_generic_map_aspect; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitGeneric_map_aspect(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Generic_map_aspectContext generic_map_aspect() { + Generic_map_aspectContext _localctx = new Generic_map_aspectContext(Context, State); + EnterRule(_localctx, 240, RULE_generic_map_aspect); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1488; + Match(GENERIC); + State = 1489; + Match(MAP); + State = 1490; + Match(LPAREN); + State = 1491; + association_list(); + State = 1492; + Match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Graphic_characterContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode EXTENDED_IDENTIFIER() { return GetToken(vhdl2008Parser.EXTENDED_IDENTIFIER, 0); } + public Graphic_characterContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_graphic_character; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitGraphic_character(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Graphic_characterContext graphic_character() { + Graphic_characterContext _localctx = new Graphic_characterContext(Context, State); + EnterRule(_localctx, 242, RULE_graphic_character); + try { + EnterOuterAlt(_localctx, 1); + { + { + State = 1494; + Match(EXTENDED_IDENTIFIER); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Group_constituentContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public NameContext name() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CHARACTER_LITERAL() { return GetToken(vhdl2008Parser.CHARACTER_LITERAL, 0); } + public Group_constituentContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_group_constituent; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitGroup_constituent(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Group_constituentContext group_constituent() { + Group_constituentContext _localctx = new Group_constituentContext(Context, State); + EnterRule(_localctx, 244, RULE_group_constituent); + try { + State = 1498; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,136,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 1496; + name(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1497; + Match(CHARACTER_LITERAL); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Group_constituent_listContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Group_constituentContext[] group_constituent() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Group_constituentContext group_constituent(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(vhdl2008Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(vhdl2008Parser.COMMA, i); + } + public Group_constituent_listContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_group_constituent_list; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitGroup_constituent_list(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Group_constituent_listContext group_constituent_list() { + Group_constituent_listContext _localctx = new Group_constituent_listContext(Context, State); + EnterRule(_localctx, 246, RULE_group_constituent_list); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1500; + group_constituent(); + State = 1505; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 1501; + Match(COMMA); + State = 1502; + group_constituent(); + } + } + State = 1507; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Group_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode GROUP() { return GetToken(vhdl2008Parser.GROUP, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Label_colonContext label_colon() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public NameContext name() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Group_constituent_listContext group_constituent_list() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + public Group_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_group_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitGroup_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Group_declarationContext group_declaration() { + Group_declarationContext _localctx = new Group_declarationContext(Context, State); + EnterRule(_localctx, 248, RULE_group_declaration); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1508; + Match(GROUP); + State = 1509; + label_colon(); + State = 1510; + name(); + State = 1511; + Match(LPAREN); + State = 1512; + group_constituent_list(); + State = 1513; + Match(RPAREN); + State = 1514; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Group_template_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode GROUP() { return GetToken(vhdl2008Parser.GROUP, 0); } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IS() { return GetToken(vhdl2008Parser.IS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Entity_class_entry_listContext entity_class_entry_list() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + public Group_template_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_group_template_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitGroup_template_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Group_template_declarationContext group_template_declaration() { + Group_template_declarationContext _localctx = new Group_template_declarationContext(Context, State); + EnterRule(_localctx, 250, RULE_group_template_declaration); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1516; + Match(GROUP); + State = 1517; + identifier(); + State = 1518; + Match(IS); + State = 1519; + Match(LPAREN); + State = 1520; + entity_class_entry_list(); + State = 1521; + Match(RPAREN); + State = 1522; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Guarded_signal_specificationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Signal_listContext signal_list() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON() { return GetToken(vhdl2008Parser.COLON, 0); } + [System.Diagnostics.DebuggerNonUserCode] public NameContext name() { + return GetRuleContext(0); + } + public Guarded_signal_specificationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_guarded_signal_specification; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitGuarded_signal_specification(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Guarded_signal_specificationContext guarded_signal_specification() { + Guarded_signal_specificationContext _localctx = new Guarded_signal_specificationContext(Context, State); + EnterRule(_localctx, 252, RULE_guarded_signal_specification); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1524; + signal_list(); + State = 1525; + Match(COLON); + State = 1526; + name(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class IdentifierContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BASIC_IDENTIFIER() { return GetToken(vhdl2008Parser.BASIC_IDENTIFIER, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode EXTENDED_IDENTIFIER() { return GetToken(vhdl2008Parser.EXTENDED_IDENTIFIER, 0); } + public IdentifierContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_identifier; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitIdentifier(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public IdentifierContext identifier() { + IdentifierContext _localctx = new IdentifierContext(Context, State); + EnterRule(_localctx, 254, RULE_identifier); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1528; + _la = TokenStream.LA(1); + if ( !(_la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Identifier_listContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext[] identifier() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(vhdl2008Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(vhdl2008Parser.COMMA, i); + } + public Identifier_listContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_identifier_list; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitIdentifier_list(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Identifier_listContext identifier_list() { + Identifier_listContext _localctx = new Identifier_listContext(Context, State); + EnterRule(_localctx, 256, RULE_identifier_list); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1530; + identifier(); + State = 1535; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 1531; + Match(COMMA); + State = 1532; + identifier(); + } + } + State = 1537; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class If_generate_statementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IF() { return GetToken(vhdl2008Parser.IF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ConditionContext[] condition() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ConditionContext condition(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] GENERATE() { return GetTokens(vhdl2008Parser.GENERATE); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode GENERATE(int i) { + return GetToken(vhdl2008Parser.GENERATE, i); + } + [System.Diagnostics.DebuggerNonUserCode] public Generate_statement_bodyContext[] generate_statement_body() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Generate_statement_bodyContext generate_statement_body(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] ELSIF() { return GetTokens(vhdl2008Parser.ELSIF); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ELSIF(int i) { + return GetToken(vhdl2008Parser.ELSIF, i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ELSE() { return GetToken(vhdl2008Parser.ELSE, 0); } + public If_generate_statementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_if_generate_statement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitIf_generate_statement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public If_generate_statementContext if_generate_statement() { + If_generate_statementContext _localctx = new If_generate_statementContext(Context, State); + EnterRule(_localctx, 258, RULE_if_generate_statement); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1538; + Match(IF); + State = 1539; + condition(); + State = 1540; + Match(GENERATE); + State = 1541; + generate_statement_body(); + State = 1549; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==ELSIF) { + { + { + State = 1542; + Match(ELSIF); + State = 1543; + condition(); + State = 1544; + Match(GENERATE); + State = 1545; + generate_statement_body(); + } + } + State = 1551; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 1555; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==ELSE) { + { + State = 1552; + Match(ELSE); + State = 1553; + Match(GENERATE); + State = 1554; + generate_statement_body(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class If_statementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] IF() { return GetTokens(vhdl2008Parser.IF); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IF(int i) { + return GetToken(vhdl2008Parser.IF, i); + } + [System.Diagnostics.DebuggerNonUserCode] public ConditionContext[] condition() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ConditionContext condition(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] THEN() { return GetTokens(vhdl2008Parser.THEN); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode THEN(int i) { + return GetToken(vhdl2008Parser.THEN, i); + } + [System.Diagnostics.DebuggerNonUserCode] public Sequence_of_statementsContext[] sequence_of_statements() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Sequence_of_statementsContext sequence_of_statements(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode END() { return GetToken(vhdl2008Parser.END, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Label_colonContext label_colon() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] ELSIF() { return GetTokens(vhdl2008Parser.ELSIF); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ELSIF(int i) { + return GetToken(vhdl2008Parser.ELSIF, i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ELSE() { return GetToken(vhdl2008Parser.ELSE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + public If_statementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_if_statement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitIf_statement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public If_statementContext if_statement() { + If_statementContext _localctx = new If_statementContext(Context, State); + EnterRule(_localctx, 260, RULE_if_statement); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1558; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER) { + { + State = 1557; + label_colon(); + } + } + + State = 1560; + Match(IF); + State = 1561; + condition(); + State = 1562; + Match(THEN); + State = 1563; + sequence_of_statements(); + State = 1571; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==ELSIF) { + { + { + State = 1564; + Match(ELSIF); + State = 1565; + condition(); + State = 1566; + Match(THEN); + State = 1567; + sequence_of_statements(); + } + } + State = 1573; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 1576; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==ELSE) { + { + State = 1574; + Match(ELSE); + State = 1575; + sequence_of_statements(); + } + } + + State = 1578; + Match(END); + State = 1579; + Match(IF); + State = 1581; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER) { + { + State = 1580; + identifier(); + } + } + + State = 1583; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Incomplete_type_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TYPE() { return GetToken(vhdl2008Parser.TYPE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + public Incomplete_type_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_incomplete_type_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitIncomplete_type_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Incomplete_type_declarationContext incomplete_type_declaration() { + Incomplete_type_declarationContext _localctx = new Incomplete_type_declarationContext(Context, State); + EnterRule(_localctx, 262, RULE_incomplete_type_declaration); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1585; + Match(TYPE); + State = 1586; + identifier(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Index_constraintContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Discrete_rangeContext[] discrete_range() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Discrete_rangeContext discrete_range(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(vhdl2008Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(vhdl2008Parser.COMMA, i); + } + public Index_constraintContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_index_constraint; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitIndex_constraint(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Index_constraintContext index_constraint() { + Index_constraintContext _localctx = new Index_constraintContext(Context, State); + EnterRule(_localctx, 264, RULE_index_constraint); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1588; + Match(LPAREN); + State = 1589; + discrete_range(); + State = 1594; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 1590; + Match(COMMA); + State = 1591; + discrete_range(); + } + } + State = 1596; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 1597; + Match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Index_subtype_definitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public NameContext name() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RANGE() { return GetToken(vhdl2008Parser.RANGE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BOX() { return GetToken(vhdl2008Parser.BOX, 0); } + public Index_subtype_definitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_index_subtype_definition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitIndex_subtype_definition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Index_subtype_definitionContext index_subtype_definition() { + Index_subtype_definitionContext _localctx = new Index_subtype_definitionContext(Context, State); + EnterRule(_localctx, 266, RULE_index_subtype_definition); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1599; + name(); + State = 1600; + Match(RANGE); + State = 1601; + Match(BOX); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Indexed_nameContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public PrefixContext prefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext[] expression() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(vhdl2008Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(vhdl2008Parser.COMMA, i); + } + public Indexed_nameContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_indexed_name; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitIndexed_name(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Indexed_nameContext indexed_name() { + Indexed_nameContext _localctx = new Indexed_nameContext(Context, State); + EnterRule(_localctx, 268, RULE_indexed_name); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1603; + prefix(); + State = 1604; + Match(LPAREN); + State = 1605; + expression(); + State = 1610; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 1606; + Match(COMMA); + State = 1607; + expression(); + } + } + State = 1612; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 1613; + Match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Instantiated_unitContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public NameContext name() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMPONENT() { return GetToken(vhdl2008Parser.COMPONENT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ENTITY() { return GetToken(vhdl2008Parser.ENTITY, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONFIGURATION() { return GetToken(vhdl2008Parser.CONFIGURATION, 0); } + public Instantiated_unitContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_instantiated_unit; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitInstantiated_unit(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Instantiated_unitContext instantiated_unit() { + Instantiated_unitContext _localctx = new Instantiated_unitContext(Context, State); + EnterRule(_localctx, 270, RULE_instantiated_unit); + int _la; + try { + State = 1629; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case COMPONENT: + case STRING_LITERAL: + case BASIC_IDENTIFIER: + case EXTENDED_IDENTIFIER: + case CHARACTER_LITERAL: + EnterOuterAlt(_localctx, 1); + { + State = 1616; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==COMPONENT) { + { + State = 1615; + Match(COMPONENT); + } + } + + State = 1618; + name(); + } + break; + case ENTITY: + EnterOuterAlt(_localctx, 2); + { + State = 1619; + Match(ENTITY); + State = 1620; + name(); + State = 1625; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==LPAREN) { + { + State = 1621; + Match(LPAREN); + State = 1622; + identifier(); + State = 1623; + Match(RPAREN); + } + } + + } + break; + case CONFIGURATION: + EnterOuterAlt(_localctx, 3); + { + State = 1627; + Match(CONFIGURATION); + State = 1628; + name(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Instantiation_listContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext[] identifier() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(vhdl2008Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(vhdl2008Parser.COMMA, i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OTHERS() { return GetToken(vhdl2008Parser.OTHERS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ALL() { return GetToken(vhdl2008Parser.ALL, 0); } + public Instantiation_listContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_instantiation_list; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitInstantiation_list(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Instantiation_listContext instantiation_list() { + Instantiation_listContext _localctx = new Instantiation_listContext(Context, State); + EnterRule(_localctx, 272, RULE_instantiation_list); + int _la; + try { + State = 1641; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case BASIC_IDENTIFIER: + case EXTENDED_IDENTIFIER: + EnterOuterAlt(_localctx, 1); + { + State = 1631; + identifier(); + State = 1636; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 1632; + Match(COMMA); + State = 1633; + identifier(); + } + } + State = 1638; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + break; + case OTHERS: + EnterOuterAlt(_localctx, 2); + { + State = 1639; + Match(OTHERS); + } + break; + case ALL: + EnterOuterAlt(_localctx, 3); + { + State = 1640; + Match(ALL); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Interface_constant_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Identifier_listContext identifier_list() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON() { return GetToken(vhdl2008Parser.COLON, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Subtype_indicationContext subtype_indication() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONSTANT() { return GetToken(vhdl2008Parser.CONSTANT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IN() { return GetToken(vhdl2008Parser.IN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode WALRUS() { return GetToken(vhdl2008Parser.WALRUS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression() { + return GetRuleContext(0); + } + public Interface_constant_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_interface_constant_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitInterface_constant_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Interface_constant_declarationContext interface_constant_declaration() { + Interface_constant_declarationContext _localctx = new Interface_constant_declarationContext(Context, State); + EnterRule(_localctx, 274, RULE_interface_constant_declaration); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1644; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==CONSTANT) { + { + State = 1643; + Match(CONSTANT); + } + } + + State = 1646; + identifier_list(); + State = 1647; + Match(COLON); + State = 1649; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==IN) { + { + State = 1648; + Match(IN); + } + } + + State = 1651; + subtype_indication(); + State = 1654; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==WALRUS) { + { + State = 1652; + Match(WALRUS); + State = 1653; + expression(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Interface_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Interface_object_declarationContext interface_object_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Interface_type_declarationContext interface_type_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Interface_subprogram_declarationContext interface_subprogram_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Interface_package_declarationContext interface_package_declaration() { + return GetRuleContext(0); + } + public Interface_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_interface_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitInterface_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Interface_declarationContext interface_declaration() { + Interface_declarationContext _localctx = new Interface_declarationContext(Context, State); + EnterRule(_localctx, 276, RULE_interface_declaration); + try { + State = 1660; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case CONSTANT: + case FILE: + case SIGNAL: + case VARIABLE: + case BASIC_IDENTIFIER: + case EXTENDED_IDENTIFIER: + EnterOuterAlt(_localctx, 1); + { + State = 1656; + interface_object_declaration(); + } + break; + case TYPE: + EnterOuterAlt(_localctx, 2); + { + State = 1657; + interface_type_declaration(); + } + break; + case FUNCTION: + case IMPURE: + case PROCEDURE: + case PURE: + EnterOuterAlt(_localctx, 3); + { + State = 1658; + interface_subprogram_declaration(); + } + break; + case PACKAGE: + EnterOuterAlt(_localctx, 4); + { + State = 1659; + interface_package_declaration(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Interface_file_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FILE() { return GetToken(vhdl2008Parser.FILE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Identifier_listContext identifier_list() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON() { return GetToken(vhdl2008Parser.COLON, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Subtype_indicationContext subtype_indication() { + return GetRuleContext(0); + } + public Interface_file_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_interface_file_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitInterface_file_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Interface_file_declarationContext interface_file_declaration() { + Interface_file_declarationContext _localctx = new Interface_file_declarationContext(Context, State); + EnterRule(_localctx, 278, RULE_interface_file_declaration); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1662; + Match(FILE); + State = 1663; + identifier_list(); + State = 1664; + Match(COLON); + State = 1665; + subtype_indication(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Interface_function_specificationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FUNCTION() { return GetToken(vhdl2008Parser.FUNCTION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DesignatorContext designator() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RETURN() { return GetToken(vhdl2008Parser.RETURN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public NameContext name() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Formal_parameter_listContext formal_parameter_list() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PURE() { return GetToken(vhdl2008Parser.PURE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IMPURE() { return GetToken(vhdl2008Parser.IMPURE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PARAMETER() { return GetToken(vhdl2008Parser.PARAMETER, 0); } + public Interface_function_specificationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_interface_function_specification; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitInterface_function_specification(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Interface_function_specificationContext interface_function_specification() { + Interface_function_specificationContext _localctx = new Interface_function_specificationContext(Context, State); + EnterRule(_localctx, 280, RULE_interface_function_specification); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1668; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==IMPURE || _la==PURE) { + { + State = 1667; + _la = TokenStream.LA(1); + if ( !(_la==IMPURE || _la==PURE) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + } + + State = 1670; + Match(FUNCTION); + State = 1671; + designator(); + State = 1679; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==PARAMETER || _la==LPAREN) { + { + State = 1673; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==PARAMETER) { + { + State = 1672; + Match(PARAMETER); + } + } + + State = 1675; + Match(LPAREN); + State = 1676; + formal_parameter_list(); + State = 1677; + Match(RPAREN); + } + } + + State = 1681; + Match(RETURN); + State = 1682; + name(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Interface_incomplete_type_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TYPE() { return GetToken(vhdl2008Parser.TYPE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + public Interface_incomplete_type_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_interface_incomplete_type_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitInterface_incomplete_type_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Interface_incomplete_type_declarationContext interface_incomplete_type_declaration() { + Interface_incomplete_type_declarationContext _localctx = new Interface_incomplete_type_declarationContext(Context, State); + EnterRule(_localctx, 282, RULE_interface_incomplete_type_declaration); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1684; + Match(TYPE); + State = 1685; + identifier(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Interface_listContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Interface_declarationContext[] interface_declaration() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Interface_declarationContext interface_declaration(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] SEMI() { return GetTokens(vhdl2008Parser.SEMI); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI(int i) { + return GetToken(vhdl2008Parser.SEMI, i); + } + public Interface_listContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_interface_list; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitInterface_list(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Interface_listContext interface_list() { + Interface_listContext _localctx = new Interface_listContext(Context, State); + EnterRule(_localctx, 284, RULE_interface_list); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1687; + interface_declaration(); + State = 1692; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==SEMI) { + { + { + State = 1688; + Match(SEMI); + State = 1689; + interface_declaration(); + } + } + State = 1694; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Interface_object_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Interface_constant_declarationContext interface_constant_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Interface_signal_declarationContext interface_signal_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Interface_variable_declarationContext interface_variable_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Interface_file_declarationContext interface_file_declaration() { + return GetRuleContext(0); + } + public Interface_object_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_interface_object_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitInterface_object_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Interface_object_declarationContext interface_object_declaration() { + Interface_object_declarationContext _localctx = new Interface_object_declarationContext(Context, State); + EnterRule(_localctx, 286, RULE_interface_object_declaration); + try { + State = 1699; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,160,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 1695; + interface_constant_declaration(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1696; + interface_signal_declaration(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 1697; + interface_variable_declaration(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 1698; + interface_file_declaration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Interface_package_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PACKAGE() { return GetToken(vhdl2008Parser.PACKAGE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IS() { return GetToken(vhdl2008Parser.IS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode NEW() { return GetToken(vhdl2008Parser.NEW, 0); } + [System.Diagnostics.DebuggerNonUserCode] public NameContext name() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Interface_package_generic_map_aspectContext interface_package_generic_map_aspect() { + return GetRuleContext(0); + } + public Interface_package_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_interface_package_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitInterface_package_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Interface_package_declarationContext interface_package_declaration() { + Interface_package_declarationContext _localctx = new Interface_package_declarationContext(Context, State); + EnterRule(_localctx, 288, RULE_interface_package_declaration); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1701; + Match(PACKAGE); + State = 1702; + identifier(); + State = 1703; + Match(IS); + State = 1704; + Match(NEW); + State = 1705; + name(); + State = 1706; + interface_package_generic_map_aspect(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Interface_package_generic_map_aspectContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Generic_map_aspectContext generic_map_aspect() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode GENERIC() { return GetToken(vhdl2008Parser.GENERIC, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode MAP() { return GetToken(vhdl2008Parser.MAP, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BOX() { return GetToken(vhdl2008Parser.BOX, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DEFAULT() { return GetToken(vhdl2008Parser.DEFAULT, 0); } + public Interface_package_generic_map_aspectContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_interface_package_generic_map_aspect; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitInterface_package_generic_map_aspect(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Interface_package_generic_map_aspectContext interface_package_generic_map_aspect() { + Interface_package_generic_map_aspectContext _localctx = new Interface_package_generic_map_aspectContext(Context, State); + EnterRule(_localctx, 290, RULE_interface_package_generic_map_aspect); + int _la; + try { + State = 1714; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,161,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 1708; + generic_map_aspect(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1709; + Match(GENERIC); + State = 1710; + Match(MAP); + State = 1711; + Match(LPAREN); + State = 1712; + _la = TokenStream.LA(1); + if ( !(_la==DEFAULT || _la==BOX) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + State = 1713; + Match(RPAREN); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Interface_procedure_specificationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PROCEDURE() { return GetToken(vhdl2008Parser.PROCEDURE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DesignatorContext designator() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Formal_parameter_listContext formal_parameter_list() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PARAMETER() { return GetToken(vhdl2008Parser.PARAMETER, 0); } + public Interface_procedure_specificationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_interface_procedure_specification; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitInterface_procedure_specification(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Interface_procedure_specificationContext interface_procedure_specification() { + Interface_procedure_specificationContext _localctx = new Interface_procedure_specificationContext(Context, State); + EnterRule(_localctx, 292, RULE_interface_procedure_specification); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1716; + Match(PROCEDURE); + State = 1717; + designator(); + State = 1725; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==PARAMETER || _la==LPAREN) { + { + { + State = 1719; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==PARAMETER) { + { + State = 1718; + Match(PARAMETER); + } + } + + State = 1721; + Match(LPAREN); + State = 1722; + formal_parameter_list(); + State = 1723; + Match(RPAREN); + } + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Interface_signal_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Identifier_listContext identifier_list() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON() { return GetToken(vhdl2008Parser.COLON, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Subtype_indicationContext subtype_indication() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SIGNAL() { return GetToken(vhdl2008Parser.SIGNAL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Mode_ruleContext mode_rule() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BUS() { return GetToken(vhdl2008Parser.BUS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode WALRUS() { return GetToken(vhdl2008Parser.WALRUS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression() { + return GetRuleContext(0); + } + public Interface_signal_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_interface_signal_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitInterface_signal_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Interface_signal_declarationContext interface_signal_declaration() { + Interface_signal_declarationContext _localctx = new Interface_signal_declarationContext(Context, State); + EnterRule(_localctx, 294, RULE_interface_signal_declaration); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1728; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==SIGNAL) { + { + State = 1727; + Match(SIGNAL); + } + } + + State = 1730; + identifier_list(); + State = 1731; + Match(COLON); + State = 1733; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 16)) & ~0x3f) == 0 && ((1L << (_la - 16)) & 1125904369582081L) != 0)) { + { + State = 1732; + mode_rule(); + } + } + + State = 1735; + subtype_indication(); + State = 1737; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BUS) { + { + State = 1736; + Match(BUS); + } + } + + State = 1741; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==WALRUS) { + { + State = 1739; + Match(WALRUS); + State = 1740; + expression(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Interface_subprogram_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Interface_subprogram_specificationContext interface_subprogram_specification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IS() { return GetToken(vhdl2008Parser.IS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Interface_subprogram_defaultContext interface_subprogram_default() { + return GetRuleContext(0); + } + public Interface_subprogram_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_interface_subprogram_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitInterface_subprogram_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Interface_subprogram_declarationContext interface_subprogram_declaration() { + Interface_subprogram_declarationContext _localctx = new Interface_subprogram_declarationContext(Context, State); + EnterRule(_localctx, 296, RULE_interface_subprogram_declaration); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1743; + interface_subprogram_specification(); + { + State = 1744; + Match(IS); + State = 1745; + interface_subprogram_default(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Interface_subprogram_defaultContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public NameContext name() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BOX() { return GetToken(vhdl2008Parser.BOX, 0); } + public Interface_subprogram_defaultContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_interface_subprogram_default; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitInterface_subprogram_default(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Interface_subprogram_defaultContext interface_subprogram_default() { + Interface_subprogram_defaultContext _localctx = new Interface_subprogram_defaultContext(Context, State); + EnterRule(_localctx, 298, RULE_interface_subprogram_default); + try { + State = 1749; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case STRING_LITERAL: + case BASIC_IDENTIFIER: + case EXTENDED_IDENTIFIER: + case CHARACTER_LITERAL: + EnterOuterAlt(_localctx, 1); + { + State = 1747; + name(); + } + break; + case BOX: + EnterOuterAlt(_localctx, 2); + { + State = 1748; + Match(BOX); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Interface_subprogram_specificationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Interface_procedure_specificationContext interface_procedure_specification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Interface_function_specificationContext interface_function_specification() { + return GetRuleContext(0); + } + public Interface_subprogram_specificationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_interface_subprogram_specification; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitInterface_subprogram_specification(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Interface_subprogram_specificationContext interface_subprogram_specification() { + Interface_subprogram_specificationContext _localctx = new Interface_subprogram_specificationContext(Context, State); + EnterRule(_localctx, 300, RULE_interface_subprogram_specification); + try { + State = 1753; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case PROCEDURE: + EnterOuterAlt(_localctx, 1); + { + State = 1751; + interface_procedure_specification(); + } + break; + case FUNCTION: + case IMPURE: + case PURE: + EnterOuterAlt(_localctx, 2); + { + State = 1752; + interface_function_specification(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Interface_type_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Interface_incomplete_type_declarationContext interface_incomplete_type_declaration() { + return GetRuleContext(0); + } + public Interface_type_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_interface_type_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitInterface_type_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Interface_type_declarationContext interface_type_declaration() { + Interface_type_declarationContext _localctx = new Interface_type_declarationContext(Context, State); + EnterRule(_localctx, 302, RULE_interface_type_declaration); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1755; + interface_incomplete_type_declaration(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Interface_variable_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Identifier_listContext identifier_list() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON() { return GetToken(vhdl2008Parser.COLON, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Subtype_indicationContext subtype_indication() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode VARIABLE() { return GetToken(vhdl2008Parser.VARIABLE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Mode_ruleContext mode_rule() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode WALRUS() { return GetToken(vhdl2008Parser.WALRUS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression() { + return GetRuleContext(0); + } + public Interface_variable_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_interface_variable_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitInterface_variable_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Interface_variable_declarationContext interface_variable_declaration() { + Interface_variable_declarationContext _localctx = new Interface_variable_declarationContext(Context, State); + EnterRule(_localctx, 304, RULE_interface_variable_declaration); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1758; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==VARIABLE) { + { + State = 1757; + Match(VARIABLE); + } + } + + State = 1760; + identifier_list(); + State = 1761; + Match(COLON); + State = 1763; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 16)) & ~0x3f) == 0 && ((1L << (_la - 16)) & 1125904369582081L) != 0)) { + { + State = 1762; + mode_rule(); + } + } + + State = 1765; + subtype_indication(); + State = 1768; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==WALRUS) { + { + State = 1766; + Match(WALRUS); + State = 1767; + expression(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Iteration_schemeContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode WHILE() { return GetToken(vhdl2008Parser.WHILE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ConditionContext condition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FOR() { return GetToken(vhdl2008Parser.FOR, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Parameter_specificationContext parameter_specification() { + return GetRuleContext(0); + } + public Iteration_schemeContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_iteration_scheme; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitIteration_scheme(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Iteration_schemeContext iteration_scheme() { + Iteration_schemeContext _localctx = new Iteration_schemeContext(Context, State); + EnterRule(_localctx, 306, RULE_iteration_scheme); + try { + State = 1774; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case WHILE: + EnterOuterAlt(_localctx, 1); + { + State = 1770; + Match(WHILE); + State = 1771; + condition(); + } + break; + case FOR: + EnterOuterAlt(_localctx, 2); + { + State = 1772; + Match(FOR); + State = 1773; + parameter_specification(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Label_colonContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON() { return GetToken(vhdl2008Parser.COLON, 0); } + public Label_colonContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_label_colon; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitLabel_colon(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Label_colonContext label_colon() { + Label_colonContext _localctx = new Label_colonContext(Context, State); + EnterRule(_localctx, 308, RULE_label_colon); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1776; + identifier(); + State = 1777; + Match(COLON); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Library_clauseContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LIBRARY() { return GetToken(vhdl2008Parser.LIBRARY, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Identifier_listContext identifier_list() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + public Library_clauseContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_library_clause; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitLibrary_clause(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Library_clauseContext library_clause() { + Library_clauseContext _localctx = new Library_clauseContext(Context, State); + EnterRule(_localctx, 310, RULE_library_clause); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1779; + Match(LIBRARY); + State = 1780; + identifier_list(); + State = 1781; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Library_unitContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Primary_unitContext primary_unit() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Secondary_unitContext secondary_unit() { + return GetRuleContext(0); + } + public Library_unitContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_library_unit; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitLibrary_unit(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Library_unitContext library_unit() { + Library_unitContext _localctx = new Library_unitContext(Context, State); + EnterRule(_localctx, 312, RULE_library_unit); + try { + State = 1785; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,174,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 1783; + primary_unit(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1784; + secondary_unit(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class LiteralContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Numeric_literalContext numeric_literal() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Enumeration_literalContext enumeration_literal() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode STRING_LITERAL() { return GetToken(vhdl2008Parser.STRING_LITERAL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BIT_STRING_LITERAL() { return GetToken(vhdl2008Parser.BIT_STRING_LITERAL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode NULL_() { return GetToken(vhdl2008Parser.NULL_, 0); } + public LiteralContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_literal; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitLiteral(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public LiteralContext literal() { + LiteralContext _localctx = new LiteralContext(Context, State); + EnterRule(_localctx, 314, RULE_literal); + try { + State = 1792; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case DECIMAL_LITERAL: + case BASED_LITERAL: + EnterOuterAlt(_localctx, 1); + { + State = 1787; + numeric_literal(); + } + break; + case BASIC_IDENTIFIER: + case EXTENDED_IDENTIFIER: + case CHARACTER_LITERAL: + EnterOuterAlt(_localctx, 2); + { + State = 1788; + enumeration_literal(); + } + break; + case STRING_LITERAL: + EnterOuterAlt(_localctx, 3); + { + State = 1789; + Match(STRING_LITERAL); + } + break; + case BIT_STRING_LITERAL: + EnterOuterAlt(_localctx, 4); + { + State = 1790; + Match(BIT_STRING_LITERAL); + } + break; + case NULL_: + EnterOuterAlt(_localctx, 5); + { + State = 1791; + Match(NULL_); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Logical_operatorContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode AND() { return GetToken(vhdl2008Parser.AND, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OR() { return GetToken(vhdl2008Parser.OR, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode NAND() { return GetToken(vhdl2008Parser.NAND, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode NOR() { return GetToken(vhdl2008Parser.NOR, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode XOR() { return GetToken(vhdl2008Parser.XOR, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode XNOR() { return GetToken(vhdl2008Parser.XNOR, 0); } + public Logical_operatorContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_logical_operator; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitLogical_operator(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Logical_operatorContext logical_operator() { + Logical_operatorContext _localctx = new Logical_operatorContext(Context, State); + EnterRule(_localctx, 316, RULE_logical_operator); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1794; + _la = TokenStream.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 297237575406452864L) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & 13510798882111489L) != 0)) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Loop_statementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] LOOP() { return GetTokens(vhdl2008Parser.LOOP); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LOOP(int i) { + return GetToken(vhdl2008Parser.LOOP, i); + } + [System.Diagnostics.DebuggerNonUserCode] public Sequence_of_statementsContext sequence_of_statements() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode END() { return GetToken(vhdl2008Parser.END, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Label_colonContext label_colon() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Iteration_schemeContext iteration_scheme() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + public Loop_statementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_loop_statement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitLoop_statement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Loop_statementContext loop_statement() { + Loop_statementContext _localctx = new Loop_statementContext(Context, State); + EnterRule(_localctx, 318, RULE_loop_statement); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1797; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER) { + { + State = 1796; + label_colon(); + } + } + + State = 1800; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==FOR || _la==WHILE) { + { + State = 1799; + iteration_scheme(); + } + } + + State = 1802; + Match(LOOP); + State = 1803; + sequence_of_statements(); + State = 1804; + Match(END); + State = 1805; + Match(LOOP); + State = 1807; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER) { + { + State = 1806; + identifier(); + } + } + + State = 1809; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Mode_ruleContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IN() { return GetToken(vhdl2008Parser.IN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OUT() { return GetToken(vhdl2008Parser.OUT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode INOUT() { return GetToken(vhdl2008Parser.INOUT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BUFFER() { return GetToken(vhdl2008Parser.BUFFER, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LINKAGE() { return GetToken(vhdl2008Parser.LINKAGE, 0); } + public Mode_ruleContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_mode_rule; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitMode_rule(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Mode_ruleContext mode_rule() { + Mode_ruleContext _localctx = new Mode_ruleContext(Context, State); + EnterRule(_localctx, 320, RULE_mode_rule); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1811; + _la = TokenStream.LA(1); + if ( !(((((_la - 16)) & ~0x3f) == 0 && ((1L << (_la - 16)) & 1125904369582081L) != 0)) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Multiplying_operatorContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode MUL() { return GetToken(vhdl2008Parser.MUL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DIV() { return GetToken(vhdl2008Parser.DIV, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode MOD() { return GetToken(vhdl2008Parser.MOD, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode REM() { return GetToken(vhdl2008Parser.REM, 0); } + public Multiplying_operatorContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_multiplying_operator; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitMultiplying_operator(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Multiplying_operatorContext multiplying_operator() { + Multiplying_operatorContext _localctx = new Multiplying_operatorContext(Context, State); + EnterRule(_localctx, 322, RULE_multiplying_operator); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1813; + _la = TokenStream.LA(1); + if ( !(_la==MOD || _la==REM || _la==MUL || _la==DIV) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class NameContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode STRING_LITERAL() { return GetToken(vhdl2008Parser.STRING_LITERAL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CHARACTER_LITERAL() { return GetToken(vhdl2008Parser.CHARACTER_LITERAL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Name_partContext[] name_part() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Name_partContext name_part(int i) { + return GetRuleContext(i); + } + public NameContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_name; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitName(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public NameContext name() { + NameContext _localctx = new NameContext(Context, State); + EnterRule(_localctx, 324, RULE_name); + try { + int _alt; + EnterOuterAlt(_localctx, 1); + { + State = 1818; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case BASIC_IDENTIFIER: + case EXTENDED_IDENTIFIER: + { + State = 1815; + identifier(); + } + break; + case STRING_LITERAL: + { + State = 1816; + Match(STRING_LITERAL); + } + break; + case CHARACTER_LITERAL: + { + State = 1817; + Match(CHARACTER_LITERAL); + } + break; + default: + throw new NoViableAltException(this); + } + State = 1823; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,180,Context); + while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + State = 1820; + name_part(); + } + } + } + State = 1825; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,180,Context); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Name_partContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] DOT() { return GetTokens(vhdl2008Parser.DOT); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOT(int i) { + return GetToken(vhdl2008Parser.DOT, i); + } + [System.Diagnostics.DebuggerNonUserCode] public SuffixContext[] suffix() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public SuffixContext suffix(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Actual_parameter_partContext actual_parameter_part() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Discrete_rangeContext discrete_range() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode APOSTROPHE() { return GetToken(vhdl2008Parser.APOSTROPHE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Attribute_designatorContext attribute_designator() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression() { + return GetRuleContext(0); + } + public Name_partContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_name_part; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitName_part(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Name_partContext name_part() { + Name_partContext _localctx = new Name_partContext(Context, State); + EnterRule(_localctx, 326, RULE_name_part); + try { + int _alt; + State = 1848; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,183,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 1828; + ErrorHandler.Sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + State = 1826; + Match(DOT); + State = 1827; + suffix(); + } + } + break; + default: + throw new NoViableAltException(this); + } + State = 1830; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,181,Context); + } while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1832; + Match(LPAREN); + State = 1833; + actual_parameter_part(); + State = 1834; + Match(RPAREN); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 1836; + Match(LPAREN); + State = 1837; + discrete_range(); + State = 1838; + Match(RPAREN); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 1840; + Match(APOSTROPHE); + State = 1841; + attribute_designator(); + State = 1846; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,182,Context) ) { + case 1: + { + State = 1842; + Match(LPAREN); + State = 1843; + expression(); + State = 1844; + Match(RPAREN); + } + break; + } + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Next_statementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode NEXT() { return GetToken(vhdl2008Parser.NEXT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Label_colonContext label_colon() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode WHEN() { return GetToken(vhdl2008Parser.WHEN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ConditionContext condition() { + return GetRuleContext(0); + } + public Next_statementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_next_statement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitNext_statement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Next_statementContext next_statement() { + Next_statementContext _localctx = new Next_statementContext(Context, State); + EnterRule(_localctx, 328, RULE_next_statement); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1851; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER) { + { + State = 1850; + label_colon(); + } + } + + State = 1853; + Match(NEXT); + State = 1855; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER) { + { + State = 1854; + identifier(); + } + } + + State = 1859; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==WHEN) { + { + State = 1857; + Match(WHEN); + State = 1858; + condition(); + } + } + + State = 1861; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Null_statementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode NULL_() { return GetToken(vhdl2008Parser.NULL_, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Label_colonContext label_colon() { + return GetRuleContext(0); + } + public Null_statementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_null_statement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitNull_statement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Null_statementContext null_statement() { + Null_statementContext _localctx = new Null_statementContext(Context, State); + EnterRule(_localctx, 330, RULE_null_statement); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1864; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER) { + { + State = 1863; + label_colon(); + } + } + + State = 1866; + Match(NULL_); + State = 1867; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Numeric_literalContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Abstract_literalContext abstract_literal() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Physical_literalContext physical_literal() { + return GetRuleContext(0); + } + public Numeric_literalContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_numeric_literal; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitNumeric_literal(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Numeric_literalContext numeric_literal() { + Numeric_literalContext _localctx = new Numeric_literalContext(Context, State); + EnterRule(_localctx, 332, RULE_numeric_literal); + try { + State = 1871; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,188,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 1869; + abstract_literal(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1870; + physical_literal(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Object_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Constant_declarationContext constant_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Signal_declarationContext signal_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Variable_declarationContext variable_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public File_declarationContext file_declaration() { + return GetRuleContext(0); + } + public Object_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_object_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitObject_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Object_declarationContext object_declaration() { + Object_declarationContext _localctx = new Object_declarationContext(Context, State); + EnterRule(_localctx, 334, RULE_object_declaration); + try { + State = 1877; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case CONSTANT: + EnterOuterAlt(_localctx, 1); + { + State = 1873; + constant_declaration(); + } + break; + case SIGNAL: + EnterOuterAlt(_localctx, 2); + { + State = 1874; + signal_declaration(); + } + break; + case SHARED: + case VARIABLE: + EnterOuterAlt(_localctx, 3); + { + State = 1875; + variable_declaration(); + } + break; + case FILE: + EnterOuterAlt(_localctx, 4); + { + State = 1876; + file_declaration(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Package_bodyContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] PACKAGE() { return GetTokens(vhdl2008Parser.PACKAGE); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PACKAGE(int i) { + return GetToken(vhdl2008Parser.PACKAGE, i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] BODY() { return GetTokens(vhdl2008Parser.BODY); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BODY(int i) { + return GetToken(vhdl2008Parser.BODY, i); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext[] identifier() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IS() { return GetToken(vhdl2008Parser.IS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Package_body_declarative_partContext package_body_declarative_part() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode END() { return GetToken(vhdl2008Parser.END, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + public Package_bodyContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_package_body; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitPackage_body(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Package_bodyContext package_body() { + Package_bodyContext _localctx = new Package_bodyContext(Context, State); + EnterRule(_localctx, 336, RULE_package_body); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1879; + Match(PACKAGE); + State = 1880; + Match(BODY); + State = 1881; + identifier(); + State = 1882; + Match(IS); + State = 1883; + package_body_declarative_part(); + State = 1884; + Match(END); + State = 1887; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==PACKAGE) { + { + State = 1885; + Match(PACKAGE); + State = 1886; + Match(BODY); + } + } + + State = 1890; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER) { + { + State = 1889; + identifier(); + } + } + + State = 1892; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Package_body_declarative_itemContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Subprogram_declarationContext subprogram_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Subprogram_bodyContext subprogram_body() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Subprogram_instantiation_declarationContext subprogram_instantiation_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Package_declarationContext package_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Package_bodyContext package_body() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Package_instantiation_declarationContext package_instantiation_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Type_declarationContext type_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Subtype_declarationContext subtype_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Constant_declarationContext constant_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Variable_declarationContext variable_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public File_declarationContext file_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Alias_declarationContext alias_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Attribute_declarationContext attribute_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Attribute_specificationContext attribute_specification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Use_clauseContext use_clause() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Group_template_declarationContext group_template_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Group_declarationContext group_declaration() { + return GetRuleContext(0); + } + public Package_body_declarative_itemContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_package_body_declarative_item; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitPackage_body_declarative_item(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Package_body_declarative_itemContext package_body_declarative_item() { + Package_body_declarative_itemContext _localctx = new Package_body_declarative_itemContext(Context, State); + EnterRule(_localctx, 338, RULE_package_body_declarative_item); + try { + State = 1911; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,192,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 1894; + subprogram_declaration(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1895; + subprogram_body(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 1896; + subprogram_instantiation_declaration(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 1897; + package_declaration(); + } + break; + case 5: + EnterOuterAlt(_localctx, 5); + { + State = 1898; + package_body(); + } + break; + case 6: + EnterOuterAlt(_localctx, 6); + { + State = 1899; + package_instantiation_declaration(); + } + break; + case 7: + EnterOuterAlt(_localctx, 7); + { + State = 1900; + type_declaration(); + } + break; + case 8: + EnterOuterAlt(_localctx, 8); + { + State = 1901; + subtype_declaration(); + } + break; + case 9: + EnterOuterAlt(_localctx, 9); + { + State = 1902; + constant_declaration(); + } + break; + case 10: + EnterOuterAlt(_localctx, 10); + { + State = 1903; + variable_declaration(); + } + break; + case 11: + EnterOuterAlt(_localctx, 11); + { + State = 1904; + file_declaration(); + } + break; + case 12: + EnterOuterAlt(_localctx, 12); + { + State = 1905; + alias_declaration(); + } + break; + case 13: + EnterOuterAlt(_localctx, 13); + { + State = 1906; + attribute_declaration(); + } + break; + case 14: + EnterOuterAlt(_localctx, 14); + { + State = 1907; + attribute_specification(); + } + break; + case 15: + EnterOuterAlt(_localctx, 15); + { + State = 1908; + use_clause(); + } + break; + case 16: + EnterOuterAlt(_localctx, 16); + { + State = 1909; + group_template_declaration(); + } + break; + case 17: + EnterOuterAlt(_localctx, 17); + { + State = 1910; + group_declaration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Package_body_declarative_partContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Package_body_declarative_itemContext[] package_body_declarative_item() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Package_body_declarative_itemContext package_body_declarative_item(int i) { + return GetRuleContext(i); + } + public Package_body_declarative_partContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_package_body_declarative_part; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitPackage_body_declarative_part(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Package_body_declarative_partContext package_body_declarative_part() { + Package_body_declarative_partContext _localctx = new Package_body_declarative_partContext(Context, State); + EnterRule(_localctx, 340, RULE_package_body_declarative_part); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1916; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 1256280033312L) != 0) || ((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & 26942346625313L) != 0)) { + { + { + State = 1913; + package_body_declarative_item(); + } + } + State = 1918; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Package_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] PACKAGE() { return GetTokens(vhdl2008Parser.PACKAGE); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PACKAGE(int i) { + return GetToken(vhdl2008Parser.PACKAGE, i); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext[] identifier() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IS() { return GetToken(vhdl2008Parser.IS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Package_headerContext package_header() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Package_declarative_partContext package_declarative_part() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode END() { return GetToken(vhdl2008Parser.END, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + public Package_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_package_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitPackage_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Package_declarationContext package_declaration() { + Package_declarationContext _localctx = new Package_declarationContext(Context, State); + EnterRule(_localctx, 342, RULE_package_declaration); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1919; + Match(PACKAGE); + State = 1920; + identifier(); + State = 1921; + Match(IS); + State = 1922; + package_header(); + State = 1923; + package_declarative_part(); + State = 1924; + Match(END); + State = 1926; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==PACKAGE) { + { + State = 1925; + Match(PACKAGE); + } + } + + State = 1929; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER) { + { + State = 1928; + identifier(); + } + } + + State = 1931; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Package_declarative_itemContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Subprogram_declarationContext subprogram_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Subprogram_instantiation_declarationContext subprogram_instantiation_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Package_declarationContext package_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Package_instantiation_declarationContext package_instantiation_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Type_declarationContext type_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Subtype_declarationContext subtype_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Constant_declarationContext constant_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Signal_declarationContext signal_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Variable_declarationContext variable_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public File_declarationContext file_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Alias_declarationContext alias_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Component_declarationContext component_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Attribute_declarationContext attribute_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Attribute_specificationContext attribute_specification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Disconnection_specificationContext disconnection_specification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Use_clauseContext use_clause() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Group_template_declarationContext group_template_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Group_declarationContext group_declaration() { + return GetRuleContext(0); + } + public Package_declarative_itemContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_package_declarative_item; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitPackage_declarative_item(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Package_declarative_itemContext package_declarative_item() { + Package_declarative_itemContext _localctx = new Package_declarative_itemContext(Context, State); + EnterRule(_localctx, 344, RULE_package_declarative_item); + try { + State = 1951; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,196,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 1933; + subprogram_declaration(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1934; + subprogram_instantiation_declaration(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 1935; + package_declaration(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 1936; + package_instantiation_declaration(); + } + break; + case 5: + EnterOuterAlt(_localctx, 5); + { + State = 1937; + type_declaration(); + } + break; + case 6: + EnterOuterAlt(_localctx, 6); + { + State = 1938; + subtype_declaration(); + } + break; + case 7: + EnterOuterAlt(_localctx, 7); + { + State = 1939; + constant_declaration(); + } + break; + case 8: + EnterOuterAlt(_localctx, 8); + { + State = 1940; + signal_declaration(); + } + break; + case 9: + EnterOuterAlt(_localctx, 9); + { + State = 1941; + variable_declaration(); + } + break; + case 10: + EnterOuterAlt(_localctx, 10); + { + State = 1942; + file_declaration(); + } + break; + case 11: + EnterOuterAlt(_localctx, 11); + { + State = 1943; + alias_declaration(); + } + break; + case 12: + EnterOuterAlt(_localctx, 12); + { + State = 1944; + component_declaration(); + } + break; + case 13: + EnterOuterAlt(_localctx, 13); + { + State = 1945; + attribute_declaration(); + } + break; + case 14: + EnterOuterAlt(_localctx, 14); + { + State = 1946; + attribute_specification(); + } + break; + case 15: + EnterOuterAlt(_localctx, 15); + { + State = 1947; + disconnection_specification(); + } + break; + case 16: + EnterOuterAlt(_localctx, 16); + { + State = 1948; + use_clause(); + } + break; + case 17: + EnterOuterAlt(_localctx, 17); + { + State = 1949; + group_template_declaration(); + } + break; + case 18: + EnterOuterAlt(_localctx, 18); + { + State = 1950; + group_declaration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Package_declarative_partContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Package_declarative_itemContext[] package_declarative_item() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Package_declarative_itemContext package_declarative_item(int i) { + return GetRuleContext(i); + } + public Package_declarative_partContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_package_declarative_part; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitPackage_declarative_part(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Package_declarative_partContext package_declarative_part() { + Package_declarative_partContext _localctx = new Package_declarative_partContext(Context, State); + EnterRule(_localctx, 346, RULE_package_declarative_part); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1956; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 1256297334816L) != 0) || ((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & 26942380179745L) != 0)) { + { + { + State = 1953; + package_declarative_item(); + } + } + State = 1958; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Package_headerContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Generic_clauseContext generic_clause() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Generic_map_aspectContext generic_map_aspect() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + public Package_headerContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_package_header; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitPackage_header(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Package_headerContext package_header() { + Package_headerContext _localctx = new Package_headerContext(Context, State); + EnterRule(_localctx, 348, RULE_package_header); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1965; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==GENERIC) { + { + State = 1959; + generic_clause(); + State = 1963; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==GENERIC) { + { + State = 1960; + generic_map_aspect(); + State = 1961; + Match(SEMI); + } + } + + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Package_instantiation_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PACKAGE() { return GetToken(vhdl2008Parser.PACKAGE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IS() { return GetToken(vhdl2008Parser.IS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode NEW() { return GetToken(vhdl2008Parser.NEW, 0); } + [System.Diagnostics.DebuggerNonUserCode] public NameContext name() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Generic_map_aspectContext generic_map_aspect() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + public Package_instantiation_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_package_instantiation_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitPackage_instantiation_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Package_instantiation_declarationContext package_instantiation_declaration() { + Package_instantiation_declarationContext _localctx = new Package_instantiation_declarationContext(Context, State); + EnterRule(_localctx, 350, RULE_package_instantiation_declaration); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1967; + Match(PACKAGE); + State = 1968; + identifier(); + State = 1969; + Match(IS); + State = 1970; + Match(NEW); + State = 1971; + name(); + { + State = 1972; + Match(LPAREN); + State = 1973; + generic_map_aspect(); + State = 1974; + Match(RPAREN); + } + State = 1976; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Parameter_specificationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IN() { return GetToken(vhdl2008Parser.IN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Discrete_rangeContext discrete_range() { + return GetRuleContext(0); + } + public Parameter_specificationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_parameter_specification; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitParameter_specification(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Parameter_specificationContext parameter_specification() { + Parameter_specificationContext _localctx = new Parameter_specificationContext(Context, State); + EnterRule(_localctx, 352, RULE_parameter_specification); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1978; + identifier(); + State = 1979; + Match(IN); + State = 1980; + discrete_range(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Physical_literalContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Abstract_literalContext abstract_literal() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + public Physical_literalContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_physical_literal; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitPhysical_literal(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Physical_literalContext physical_literal() { + Physical_literalContext _localctx = new Physical_literalContext(Context, State); + EnterRule(_localctx, 354, RULE_physical_literal); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1982; + abstract_literal(); + { + State = 1983; + identifier(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Physical_type_definitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Range_constraintContext range_constraint() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] UNITS() { return GetTokens(vhdl2008Parser.UNITS); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode UNITS(int i) { + return GetToken(vhdl2008Parser.UNITS, i); + } + [System.Diagnostics.DebuggerNonUserCode] public Primary_unit_declarationContext primary_unit_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode END() { return GetToken(vhdl2008Parser.END, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Secondary_unit_declarationContext[] secondary_unit_declaration() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Secondary_unit_declarationContext secondary_unit_declaration(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + public Physical_type_definitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_physical_type_definition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitPhysical_type_definition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Physical_type_definitionContext physical_type_definition() { + Physical_type_definitionContext _localctx = new Physical_type_definitionContext(Context, State); + EnterRule(_localctx, 356, RULE_physical_type_definition); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1985; + range_constraint(); + State = 1986; + Match(UNITS); + State = 1987; + primary_unit_declaration(); + State = 1991; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER) { + { + { + State = 1988; + secondary_unit_declaration(); + } + } + State = 1993; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 1994; + Match(END); + State = 1995; + Match(UNITS); + State = 1997; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER) { + { + State = 1996; + identifier(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Port_clauseContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PORT() { return GetToken(vhdl2008Parser.PORT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Port_listContext port_list() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + public Port_clauseContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_port_clause; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitPort_clause(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Port_clauseContext port_clause() { + Port_clauseContext _localctx = new Port_clauseContext(Context, State); + EnterRule(_localctx, 358, RULE_port_clause); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1999; + Match(PORT); + State = 2000; + Match(LPAREN); + State = 2001; + port_list(); + State = 2002; + Match(RPAREN); + State = 2003; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Port_listContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Interface_listContext interface_list() { + return GetRuleContext(0); + } + public Port_listContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_port_list; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitPort_list(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Port_listContext port_list() { + Port_listContext _localctx = new Port_listContext(Context, State); + EnterRule(_localctx, 360, RULE_port_list); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2005; + interface_list(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Port_map_aspectContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PORT() { return GetToken(vhdl2008Parser.PORT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode MAP() { return GetToken(vhdl2008Parser.MAP, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Association_listContext association_list() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + public Port_map_aspectContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_port_map_aspect; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitPort_map_aspect(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Port_map_aspectContext port_map_aspect() { + Port_map_aspectContext _localctx = new Port_map_aspectContext(Context, State); + EnterRule(_localctx, 362, RULE_port_map_aspect); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2007; + Match(PORT); + State = 2008; + Match(MAP); + State = 2009; + Match(LPAREN); + State = 2010; + association_list(); + State = 2011; + Match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class PrefixContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public NameContext name() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Function_callContext function_call() { + return GetRuleContext(0); + } + public PrefixContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_prefix; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitPrefix(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public PrefixContext prefix() { + PrefixContext _localctx = new PrefixContext(Context, State); + EnterRule(_localctx, 364, RULE_prefix); + try { + State = 2015; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,202,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2013; + name(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2014; + function_call(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class PrimaryContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public NameContext name() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public LiteralContext literal() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public AggregateContext aggregate() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Function_callContext function_call() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Qualified_expressionContext qualified_expression() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Type_conversionContext type_conversion() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public AllocatorContext allocator() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + public PrimaryContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_primary; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitPrimary(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public PrimaryContext primary() { + PrimaryContext _localctx = new PrimaryContext(Context, State); + EnterRule(_localctx, 366, RULE_primary); + try { + State = 2028; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,203,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2017; + name(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2018; + literal(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 2019; + aggregate(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 2020; + function_call(); + } + break; + case 5: + EnterOuterAlt(_localctx, 5); + { + State = 2021; + qualified_expression(); + } + break; + case 6: + EnterOuterAlt(_localctx, 6); + { + State = 2022; + type_conversion(); + } + break; + case 7: + EnterOuterAlt(_localctx, 7); + { + State = 2023; + allocator(); + } + break; + case 8: + EnterOuterAlt(_localctx, 8); + { + State = 2024; + Match(LPAREN); + State = 2025; + expression(); + State = 2026; + Match(RPAREN); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Primary_unitContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Entity_declarationContext entity_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Configuration_declarationContext configuration_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Package_declarationContext package_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Package_instantiation_declarationContext package_instantiation_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Context_declarationContext context_declaration() { + return GetRuleContext(0); + } + public Primary_unitContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_primary_unit; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitPrimary_unit(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Primary_unitContext primary_unit() { + Primary_unitContext _localctx = new Primary_unitContext(Context, State); + EnterRule(_localctx, 368, RULE_primary_unit); + try { + State = 2035; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,204,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2030; + entity_declaration(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2031; + configuration_declaration(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 2032; + package_declaration(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 2033; + package_instantiation_declaration(); + } + break; + case 5: + EnterOuterAlt(_localctx, 5); + { + State = 2034; + context_declaration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Primary_unit_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + public Primary_unit_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_primary_unit_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitPrimary_unit_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Primary_unit_declarationContext primary_unit_declaration() { + Primary_unit_declarationContext _localctx = new Primary_unit_declarationContext(Context, State); + EnterRule(_localctx, 370, RULE_primary_unit_declaration); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2037; + identifier(); + State = 2038; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Procedure_callContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public NameContext name() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Actual_parameter_partContext actual_parameter_part() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + public Procedure_callContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_procedure_call; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitProcedure_call(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Procedure_callContext procedure_call() { + Procedure_callContext _localctx = new Procedure_callContext(Context, State); + EnterRule(_localctx, 372, RULE_procedure_call); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2040; + name(); + State = 2045; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==LPAREN) { + { + State = 2041; + Match(LPAREN); + State = 2042; + actual_parameter_part(); + State = 2043; + Match(RPAREN); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Procedure_call_statementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Procedure_callContext procedure_call() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Label_colonContext label_colon() { + return GetRuleContext(0); + } + public Procedure_call_statementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_procedure_call_statement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitProcedure_call_statement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Procedure_call_statementContext procedure_call_statement() { + Procedure_call_statementContext _localctx = new Procedure_call_statementContext(Context, State); + EnterRule(_localctx, 374, RULE_procedure_call_statement); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2048; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,206,Context) ) { + case 1: + { + State = 2047; + label_colon(); + } + break; + } + State = 2050; + procedure_call(); + State = 2051; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Procedure_specificationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PROCEDURE() { return GetToken(vhdl2008Parser.PROCEDURE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DesignatorContext designator() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Subprogram_headerContext subprogram_header() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Formal_parameter_listContext formal_parameter_list() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PARAMETER() { return GetToken(vhdl2008Parser.PARAMETER, 0); } + public Procedure_specificationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_procedure_specification; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitProcedure_specification(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Procedure_specificationContext procedure_specification() { + Procedure_specificationContext _localctx = new Procedure_specificationContext(Context, State); + EnterRule(_localctx, 376, RULE_procedure_specification); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2053; + Match(PROCEDURE); + State = 2054; + designator(); + State = 2055; + subprogram_header(); + State = 2063; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==PARAMETER || _la==LPAREN) { + { + State = 2057; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==PARAMETER) { + { + State = 2056; + Match(PARAMETER); + } + } + + State = 2059; + Match(LPAREN); + State = 2060; + formal_parameter_list(); + State = 2061; + Match(RPAREN); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Procedural_declarative_itemContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Subprogram_declarationContext subprogram_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Subprogram_bodyContext subprogram_body() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Subprogram_instantiation_declarationContext subprogram_instantiation_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Package_declarationContext package_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Package_bodyContext package_body() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Package_instantiation_declarationContext package_instantiation_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Type_declarationContext type_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Subtype_declarationContext subtype_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Constant_declarationContext constant_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Variable_declarationContext variable_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public File_declarationContext file_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Alias_declarationContext alias_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Attribute_declarationContext attribute_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Attribute_specificationContext attribute_specification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Use_clauseContext use_clause() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Group_template_declarationContext group_template_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Group_declarationContext group_declaration() { + return GetRuleContext(0); + } + public Procedural_declarative_itemContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_procedural_declarative_item; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitProcedural_declarative_item(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Procedural_declarative_itemContext procedural_declarative_item() { + Procedural_declarative_itemContext _localctx = new Procedural_declarative_itemContext(Context, State); + EnterRule(_localctx, 378, RULE_procedural_declarative_item); + try { + State = 2082; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,209,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2065; + subprogram_declaration(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2066; + subprogram_body(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 2067; + subprogram_instantiation_declaration(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 2068; + package_declaration(); + } + break; + case 5: + EnterOuterAlt(_localctx, 5); + { + State = 2069; + package_body(); + } + break; + case 6: + EnterOuterAlt(_localctx, 6); + { + State = 2070; + package_instantiation_declaration(); + } + break; + case 7: + EnterOuterAlt(_localctx, 7); + { + State = 2071; + type_declaration(); + } + break; + case 8: + EnterOuterAlt(_localctx, 8); + { + State = 2072; + subtype_declaration(); + } + break; + case 9: + EnterOuterAlt(_localctx, 9); + { + State = 2073; + constant_declaration(); + } + break; + case 10: + EnterOuterAlt(_localctx, 10); + { + State = 2074; + variable_declaration(); + } + break; + case 11: + EnterOuterAlt(_localctx, 11); + { + State = 2075; + file_declaration(); + } + break; + case 12: + EnterOuterAlt(_localctx, 12); + { + State = 2076; + alias_declaration(); + } + break; + case 13: + EnterOuterAlt(_localctx, 13); + { + State = 2077; + attribute_declaration(); + } + break; + case 14: + EnterOuterAlt(_localctx, 14); + { + State = 2078; + attribute_specification(); + } + break; + case 15: + EnterOuterAlt(_localctx, 15); + { + State = 2079; + use_clause(); + } + break; + case 16: + EnterOuterAlt(_localctx, 16); + { + State = 2080; + group_template_declaration(); + } + break; + case 17: + EnterOuterAlt(_localctx, 17); + { + State = 2081; + group_declaration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Procedural_statement_partContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Sequential_statementContext[] sequential_statement() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Sequential_statementContext sequential_statement(int i) { + return GetRuleContext(i); + } + public Procedural_statement_partContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_procedural_statement_part; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitProcedural_statement_part(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Procedural_statement_partContext procedural_statement_part() { + Procedural_statement_partContext _localctx = new Procedural_statement_partContext(Context, State); + EnterRule(_localctx, 380, RULE_procedural_statement_part); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2087; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 1226105553676403712L) != 0) || ((((_la - 85)) & ~0x3f) == 0 && ((1L << (_la - 85)) & 566267144568835L) != 0) || _la==LPAREN) { + { + { + State = 2084; + sequential_statement(); + } + } + State = 2089; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Process_declarative_itemContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Subprogram_declarationContext subprogram_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Subprogram_bodyContext subprogram_body() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Type_declarationContext type_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Subtype_declarationContext subtype_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Constant_declarationContext constant_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Variable_declarationContext variable_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public File_declarationContext file_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Alias_declarationContext alias_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Attribute_declarationContext attribute_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Attribute_specificationContext attribute_specification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Use_clauseContext use_clause() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Group_template_declarationContext group_template_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Group_declarationContext group_declaration() { + return GetRuleContext(0); + } + public Process_declarative_itemContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_process_declarative_item; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitProcess_declarative_item(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Process_declarative_itemContext process_declarative_item() { + Process_declarative_itemContext _localctx = new Process_declarative_itemContext(Context, State); + EnterRule(_localctx, 382, RULE_process_declarative_item); + try { + State = 2103; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,211,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2090; + subprogram_declaration(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2091; + subprogram_body(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 2092; + type_declaration(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 2093; + subtype_declaration(); + } + break; + case 5: + EnterOuterAlt(_localctx, 5); + { + State = 2094; + constant_declaration(); + } + break; + case 6: + EnterOuterAlt(_localctx, 6); + { + State = 2095; + variable_declaration(); + } + break; + case 7: + EnterOuterAlt(_localctx, 7); + { + State = 2096; + file_declaration(); + } + break; + case 8: + EnterOuterAlt(_localctx, 8); + { + State = 2097; + alias_declaration(); + } + break; + case 9: + EnterOuterAlt(_localctx, 9); + { + State = 2098; + attribute_declaration(); + } + break; + case 10: + EnterOuterAlt(_localctx, 10); + { + State = 2099; + attribute_specification(); + } + break; + case 11: + EnterOuterAlt(_localctx, 11); + { + State = 2100; + use_clause(); + } + break; + case 12: + EnterOuterAlt(_localctx, 12); + { + State = 2101; + group_template_declaration(); + } + break; + case 13: + EnterOuterAlt(_localctx, 13); + { + State = 2102; + group_declaration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Process_declarative_partContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Process_declarative_itemContext[] process_declarative_item() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Process_declarative_itemContext process_declarative_item(int i) { + return GetRuleContext(i); + } + public Process_declarative_partContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_process_declarative_part; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitProcess_declarative_part(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Process_declarative_partContext process_declarative_part() { + Process_declarative_partContext _localctx = new Process_declarative_partContext(Context, State); + EnterRule(_localctx, 384, RULE_process_declarative_part); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2108; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 1256280033312L) != 0) || ((((_la - 72)) & ~0x3f) == 0 && ((1L << (_la - 72)) & 841948332041L) != 0)) { + { + { + State = 2105; + process_declarative_item(); + } + } + State = 2110; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Process_sensitivity_listContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ALL() { return GetToken(vhdl2008Parser.ALL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Sensitivity_listContext sensitivity_list() { + return GetRuleContext(0); + } + public Process_sensitivity_listContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_process_sensitivity_list; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitProcess_sensitivity_list(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Process_sensitivity_listContext process_sensitivity_list() { + Process_sensitivity_listContext _localctx = new Process_sensitivity_listContext(Context, State); + EnterRule(_localctx, 386, RULE_process_sensitivity_list); + try { + State = 2113; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case ALL: + EnterOuterAlt(_localctx, 1); + { + State = 2111; + Match(ALL); + } + break; + case STRING_LITERAL: + case BASIC_IDENTIFIER: + case EXTENDED_IDENTIFIER: + case CHARACTER_LITERAL: + EnterOuterAlt(_localctx, 2); + { + State = 2112; + sensitivity_list(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Process_statementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] PROCESS() { return GetTokens(vhdl2008Parser.PROCESS); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PROCESS(int i) { + return GetToken(vhdl2008Parser.PROCESS, i); + } + [System.Diagnostics.DebuggerNonUserCode] public Process_declarative_partContext process_declarative_part() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BEGIN() { return GetToken(vhdl2008Parser.BEGIN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Process_statement_partContext process_statement_part() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode END() { return GetToken(vhdl2008Parser.END, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Label_colonContext label_colon() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] POSTPONED() { return GetTokens(vhdl2008Parser.POSTPONED); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode POSTPONED(int i) { + return GetToken(vhdl2008Parser.POSTPONED, i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Process_sensitivity_listContext process_sensitivity_list() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IS() { return GetToken(vhdl2008Parser.IS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + public Process_statementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_process_statement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitProcess_statement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Process_statementContext process_statement() { + Process_statementContext _localctx = new Process_statementContext(Context, State); + EnterRule(_localctx, 388, RULE_process_statement); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2116; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER) { + { + State = 2115; + label_colon(); + } + } + + State = 2119; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==POSTPONED) { + { + State = 2118; + Match(POSTPONED); + } + } + + State = 2121; + Match(PROCESS); + State = 2126; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==LPAREN) { + { + State = 2122; + Match(LPAREN); + State = 2123; + process_sensitivity_list(); + State = 2124; + Match(RPAREN); + } + } + + State = 2129; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==IS) { + { + State = 2128; + Match(IS); + } + } + + State = 2131; + process_declarative_part(); + State = 2132; + Match(BEGIN); + State = 2133; + process_statement_part(); + State = 2134; + Match(END); + State = 2136; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==POSTPONED) { + { + State = 2135; + Match(POSTPONED); + } + } + + State = 2138; + Match(PROCESS); + State = 2140; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER) { + { + State = 2139; + identifier(); + } + } + + State = 2142; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Process_statement_partContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Sequential_statementContext[] sequential_statement() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Sequential_statementContext sequential_statement(int i) { + return GetRuleContext(i); + } + public Process_statement_partContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_process_statement_part; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitProcess_statement_part(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Process_statement_partContext process_statement_part() { + Process_statement_partContext _localctx = new Process_statement_partContext(Context, State); + EnterRule(_localctx, 390, RULE_process_statement_part); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2147; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 1226105553676403712L) != 0) || ((((_la - 85)) & ~0x3f) == 0 && ((1L << (_la - 85)) & 566267144568835L) != 0) || _la==LPAREN) { + { + { + State = 2144; + sequential_statement(); + } + } + State = 2149; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Protected_type_bodyContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] PROTECTED() { return GetTokens(vhdl2008Parser.PROTECTED); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PROTECTED(int i) { + return GetToken(vhdl2008Parser.PROTECTED, i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] BODY() { return GetTokens(vhdl2008Parser.BODY); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BODY(int i) { + return GetToken(vhdl2008Parser.BODY, i); + } + [System.Diagnostics.DebuggerNonUserCode] public Protected_type_body_declarative_partContext protected_type_body_declarative_part() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode END() { return GetToken(vhdl2008Parser.END, 0); } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + public Protected_type_bodyContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_protected_type_body; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitProtected_type_body(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Protected_type_bodyContext protected_type_body() { + Protected_type_bodyContext _localctx = new Protected_type_bodyContext(Context, State); + EnterRule(_localctx, 392, RULE_protected_type_body); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2150; + Match(PROTECTED); + State = 2151; + Match(BODY); + State = 2152; + protected_type_body_declarative_part(); + State = 2153; + Match(END); + State = 2154; + Match(PROTECTED); + State = 2155; + Match(BODY); + State = 2157; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER) { + { + State = 2156; + identifier(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Protected_type_body_declarative_itemContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Subprogram_declarationContext subprogram_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Subprogram_bodyContext subprogram_body() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Subprogram_instantiation_declarationContext subprogram_instantiation_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Package_declarationContext package_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Package_bodyContext package_body() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Package_instantiation_declarationContext package_instantiation_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Type_declarationContext type_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Subtype_declarationContext subtype_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Constant_declarationContext constant_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Variable_declarationContext variable_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public File_declarationContext file_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Alias_declarationContext alias_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Attribute_declarationContext attribute_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Attribute_specificationContext attribute_specification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Use_clauseContext use_clause() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Group_template_declarationContext group_template_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Group_declarationContext group_declaration() { + return GetRuleContext(0); + } + public Protected_type_body_declarative_itemContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_protected_type_body_declarative_item; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitProtected_type_body_declarative_item(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Protected_type_body_declarative_itemContext protected_type_body_declarative_item() { + Protected_type_body_declarative_itemContext _localctx = new Protected_type_body_declarative_itemContext(Context, State); + EnterRule(_localctx, 394, RULE_protected_type_body_declarative_item); + try { + State = 2176; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,222,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2159; + subprogram_declaration(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2160; + subprogram_body(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 2161; + subprogram_instantiation_declaration(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 2162; + package_declaration(); + } + break; + case 5: + EnterOuterAlt(_localctx, 5); + { + State = 2163; + package_body(); + } + break; + case 6: + EnterOuterAlt(_localctx, 6); + { + State = 2164; + package_instantiation_declaration(); + } + break; + case 7: + EnterOuterAlt(_localctx, 7); + { + State = 2165; + type_declaration(); + } + break; + case 8: + EnterOuterAlt(_localctx, 8); + { + State = 2166; + subtype_declaration(); + } + break; + case 9: + EnterOuterAlt(_localctx, 9); + { + State = 2167; + constant_declaration(); + } + break; + case 10: + EnterOuterAlt(_localctx, 10); + { + State = 2168; + variable_declaration(); + } + break; + case 11: + EnterOuterAlt(_localctx, 11); + { + State = 2169; + file_declaration(); + } + break; + case 12: + EnterOuterAlt(_localctx, 12); + { + State = 2170; + alias_declaration(); + } + break; + case 13: + EnterOuterAlt(_localctx, 13); + { + State = 2171; + attribute_declaration(); + } + break; + case 14: + EnterOuterAlt(_localctx, 14); + { + State = 2172; + attribute_specification(); + } + break; + case 15: + EnterOuterAlt(_localctx, 15); + { + State = 2173; + use_clause(); + } + break; + case 16: + EnterOuterAlt(_localctx, 16); + { + State = 2174; + group_template_declaration(); + } + break; + case 17: + EnterOuterAlt(_localctx, 17); + { + State = 2175; + group_declaration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Protected_type_body_declarative_partContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Protected_type_body_declarative_itemContext protected_type_body_declarative_item() { + return GetRuleContext(0); + } + public Protected_type_body_declarative_partContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_protected_type_body_declarative_part; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitProtected_type_body_declarative_part(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Protected_type_body_declarative_partContext protected_type_body_declarative_part() { + Protected_type_body_declarative_partContext _localctx = new Protected_type_body_declarative_partContext(Context, State); + EnterRule(_localctx, 396, RULE_protected_type_body_declarative_part); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2179; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 1256280033312L) != 0) || ((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & 26942346625313L) != 0)) { + { + State = 2178; + protected_type_body_declarative_item(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Protected_type_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] PROTECTED() { return GetTokens(vhdl2008Parser.PROTECTED); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PROTECTED(int i) { + return GetToken(vhdl2008Parser.PROTECTED, i); + } + [System.Diagnostics.DebuggerNonUserCode] public Protected_type_declarative_partContext protected_type_declarative_part() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode END() { return GetToken(vhdl2008Parser.END, 0); } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + public Protected_type_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_protected_type_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitProtected_type_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Protected_type_declarationContext protected_type_declaration() { + Protected_type_declarationContext _localctx = new Protected_type_declarationContext(Context, State); + EnterRule(_localctx, 398, RULE_protected_type_declaration); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2181; + Match(PROTECTED); + State = 2182; + protected_type_declarative_part(); + State = 2183; + Match(END); + State = 2184; + Match(PROTECTED); + State = 2186; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER) { + { + State = 2185; + identifier(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Protected_type_declarative_itemContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Subprogram_declarationContext subprogram_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Subprogram_instantiation_declarationContext subprogram_instantiation_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Attribute_specificationContext attribute_specification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Use_clauseContext use_clause() { + return GetRuleContext(0); + } + public Protected_type_declarative_itemContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_protected_type_declarative_item; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitProtected_type_declarative_item(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Protected_type_declarative_itemContext protected_type_declarative_item() { + Protected_type_declarative_itemContext _localctx = new Protected_type_declarative_itemContext(Context, State); + EnterRule(_localctx, 400, RULE_protected_type_declarative_item); + try { + State = 2192; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,225,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2188; + subprogram_declaration(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2189; + subprogram_instantiation_declaration(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 2190; + attribute_specification(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 2191; + use_clause(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Protected_type_declarative_partContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Protected_type_declarative_itemContext protected_type_declarative_item() { + return GetRuleContext(0); + } + public Protected_type_declarative_partContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_protected_type_declarative_part; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitProtected_type_declarative_part(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Protected_type_declarative_partContext protected_type_declarative_part() { + Protected_type_declarative_partContext _localctx = new Protected_type_declarative_partContext(Context, State); + EnterRule(_localctx, 402, RULE_protected_type_declarative_part); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2195; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 1116691499008L) != 0) || ((((_la - 72)) & ~0x3f) == 0 && ((1L << (_la - 72)) & 274877906953L) != 0)) { + { + State = 2194; + protected_type_declarative_item(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Protected_type_definitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Protected_type_declarationContext protected_type_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Protected_type_bodyContext protected_type_body() { + return GetRuleContext(0); + } + public Protected_type_definitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_protected_type_definition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitProtected_type_definition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Protected_type_definitionContext protected_type_definition() { + Protected_type_definitionContext _localctx = new Protected_type_definitionContext(Context, State); + EnterRule(_localctx, 404, RULE_protected_type_definition); + try { + State = 2199; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,227,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2197; + protected_type_declaration(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2198; + protected_type_body(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Qualified_expressionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public NameContext name() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode APOSTROPHE() { return GetToken(vhdl2008Parser.APOSTROPHE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public AggregateContext aggregate() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + public Qualified_expressionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_qualified_expression; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitQualified_expression(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Qualified_expressionContext qualified_expression() { + Qualified_expressionContext _localctx = new Qualified_expressionContext(Context, State); + EnterRule(_localctx, 406, RULE_qualified_expression); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2201; + name(); + State = 2202; + Match(APOSTROPHE); + State = 2208; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,228,Context) ) { + case 1: + { + State = 2203; + aggregate(); + } + break; + case 2: + { + State = 2204; + Match(LPAREN); + State = 2205; + expression(); + State = 2206; + Match(RPAREN); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Range_declContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Attribute_nameContext attribute_name() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Simple_expressionContext[] simple_expression() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Simple_expressionContext simple_expression(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public DirectionContext direction() { + return GetRuleContext(0); + } + public Range_declContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_range_decl; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitRange_decl(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Range_declContext range_decl() { + Range_declContext _localctx = new Range_declContext(Context, State); + EnterRule(_localctx, 408, RULE_range_decl); + try { + State = 2215; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,229,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2210; + attribute_name(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + { + State = 2211; + simple_expression(); + State = 2212; + direction(); + State = 2213; + simple_expression(); + } + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Range_constraintContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RANGE() { return GetToken(vhdl2008Parser.RANGE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Range_declContext range_decl() { + return GetRuleContext(0); + } + public Range_constraintContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_range_constraint; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitRange_constraint(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Range_constraintContext range_constraint() { + Range_constraintContext _localctx = new Range_constraintContext(Context, State); + EnterRule(_localctx, 410, RULE_range_constraint); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2217; + Match(RANGE); + State = 2218; + range_decl(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Record_constraintContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Record_element_constraintContext[] record_element_constraint() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Record_element_constraintContext record_element_constraint(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(vhdl2008Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(vhdl2008Parser.COMMA, i); + } + public Record_constraintContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_record_constraint; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitRecord_constraint(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Record_constraintContext record_constraint() { + Record_constraintContext _localctx = new Record_constraintContext(Context, State); + EnterRule(_localctx, 412, RULE_record_constraint); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2220; + Match(LPAREN); + State = 2221; + record_element_constraint(); + State = 2226; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 2222; + Match(COMMA); + State = 2223; + record_element_constraint(); + } + } + State = 2228; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 2229; + Match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Record_element_constraintContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Element_constraintContext element_constraint() { + return GetRuleContext(0); + } + public Record_element_constraintContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_record_element_constraint; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitRecord_element_constraint(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Record_element_constraintContext record_element_constraint() { + Record_element_constraintContext _localctx = new Record_element_constraintContext(Context, State); + EnterRule(_localctx, 414, RULE_record_element_constraint); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2231; + identifier(); + State = 2232; + element_constraint(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Record_element_resolutionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Resolution_indicationContext resolution_indication() { + return GetRuleContext(0); + } + public Record_element_resolutionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_record_element_resolution; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitRecord_element_resolution(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Record_element_resolutionContext record_element_resolution() { + Record_element_resolutionContext _localctx = new Record_element_resolutionContext(Context, State); + EnterRule(_localctx, 416, RULE_record_element_resolution); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2234; + identifier(); + State = 2235; + resolution_indication(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Record_resolutionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Record_element_resolutionContext[] record_element_resolution() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Record_element_resolutionContext record_element_resolution(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(vhdl2008Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(vhdl2008Parser.COMMA, i); + } + public Record_resolutionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_record_resolution; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitRecord_resolution(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Record_resolutionContext record_resolution() { + Record_resolutionContext _localctx = new Record_resolutionContext(Context, State); + EnterRule(_localctx, 418, RULE_record_resolution); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2237; + record_element_resolution(); + State = 2242; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 2238; + Match(COMMA); + State = 2239; + record_element_resolution(); + } + } + State = 2244; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Record_type_definitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] RECORD() { return GetTokens(vhdl2008Parser.RECORD); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RECORD(int i) { + return GetToken(vhdl2008Parser.RECORD, i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode END() { return GetToken(vhdl2008Parser.END, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Element_declarationContext[] element_declaration() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Element_declarationContext element_declaration(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + public Record_type_definitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_record_type_definition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitRecord_type_definition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Record_type_definitionContext record_type_definition() { + Record_type_definitionContext _localctx = new Record_type_definitionContext(Context, State); + EnterRule(_localctx, 420, RULE_record_type_definition); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2245; + Match(RECORD); + State = 2247; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + do { + { + { + State = 2246; + element_declaration(); + } + } + State = 2249; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } while ( _la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER ); + State = 2251; + Match(END); + State = 2252; + Match(RECORD); + State = 2254; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER) { + { + State = 2253; + identifier(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class RelationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Shift_expressionContext[] shift_expression() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Shift_expressionContext shift_expression(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public Relational_operatorContext relational_operator() { + return GetRuleContext(0); + } + public RelationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_relation; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitRelation(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public RelationContext relation() { + RelationContext _localctx = new RelationContext(Context, State); + EnterRule(_localctx, 422, RULE_relation); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2256; + shift_expression(); + State = 2260; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 138)) & ~0x3f) == 0 && ((1L << (_la - 138)) & 1879053119L) != 0)) { + { + State = 2257; + relational_operator(); + State = 2258; + shift_expression(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Relational_operatorContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode EQ() { return GetToken(vhdl2008Parser.EQ, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode NEQ() { return GetToken(vhdl2008Parser.NEQ, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LESSTHAN() { return GetToken(vhdl2008Parser.LESSTHAN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LEQ() { return GetToken(vhdl2008Parser.LEQ, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode GREATERTHAN() { return GetToken(vhdl2008Parser.GREATERTHAN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode GEQ() { return GetToken(vhdl2008Parser.GEQ, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONDITION_EQ() { return GetToken(vhdl2008Parser.CONDITION_EQ, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONDITION_NEQ() { return GetToken(vhdl2008Parser.CONDITION_NEQ, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONDITION_LESSTHAN() { return GetToken(vhdl2008Parser.CONDITION_LESSTHAN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONDITION_LEQ() { return GetToken(vhdl2008Parser.CONDITION_LEQ, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONDITION_GREATERTHAN() { return GetToken(vhdl2008Parser.CONDITION_GREATERTHAN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONDITION_GEQ() { return GetToken(vhdl2008Parser.CONDITION_GEQ, 0); } + public Relational_operatorContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_relational_operator; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitRelational_operator(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Relational_operatorContext relational_operator() { + Relational_operatorContext _localctx = new Relational_operatorContext(Context, State); + EnterRule(_localctx, 424, RULE_relational_operator); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2262; + _la = TokenStream.LA(1); + if ( !(((((_la - 138)) & ~0x3f) == 0 && ((1L << (_la - 138)) & 1879053119L) != 0)) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Report_statementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode REPORT() { return GetToken(vhdl2008Parser.REPORT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext[] expression() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Label_colonContext label_colon() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEVERITY() { return GetToken(vhdl2008Parser.SEVERITY, 0); } + public Report_statementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_report_statement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitReport_statement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Report_statementContext report_statement() { + Report_statementContext _localctx = new Report_statementContext(Context, State); + EnterRule(_localctx, 426, RULE_report_statement); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2265; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER) { + { + State = 2264; + label_colon(); + } + } + + State = 2267; + Match(REPORT); + State = 2268; + expression(); + State = 2271; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==SEVERITY) { + { + State = 2269; + Match(SEVERITY); + State = 2270; + expression(); + } + } + + State = 2273; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Resolution_indicationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public NameContext name() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Element_resolutionContext element_resolution() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + public Resolution_indicationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_resolution_indication; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitResolution_indication(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Resolution_indicationContext resolution_indication() { + Resolution_indicationContext _localctx = new Resolution_indicationContext(Context, State); + EnterRule(_localctx, 428, RULE_resolution_indication); + try { + State = 2280; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case STRING_LITERAL: + case BASIC_IDENTIFIER: + case EXTENDED_IDENTIFIER: + case CHARACTER_LITERAL: + EnterOuterAlt(_localctx, 1); + { + State = 2275; + name(); + } + break; + case LPAREN: + EnterOuterAlt(_localctx, 2); + { + { + State = 2276; + Match(LPAREN); + State = 2277; + element_resolution(); + State = 2278; + Match(RPAREN); + } + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Return_statementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RETURN() { return GetToken(vhdl2008Parser.RETURN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Label_colonContext label_colon() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression() { + return GetRuleContext(0); + } + public Return_statementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_return_statement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitReturn_statement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Return_statementContext return_statement() { + Return_statementContext _localctx = new Return_statementContext(Context, State); + EnterRule(_localctx, 430, RULE_return_statement); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2283; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER) { + { + State = 2282; + label_colon(); + } + } + + State = 2285; + Match(RETURN); + State = 2287; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 1)) & ~0x3f) == 0 && ((1L << (_la - 1)) & -8192047722186932159L) != 0) || ((((_la - 116)) & ~0x3f) == 0 && ((1L << (_la - 116)) & 846623955748415L) != 0)) { + { + State = 2286; + expression(); + } + } + + State = 2289; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Scalar_type_definitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Enumeration_type_definitionContext enumeration_type_definition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Range_constraintContext range_constraint() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Physical_type_definitionContext physical_type_definition() { + return GetRuleContext(0); + } + public Scalar_type_definitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_scalar_type_definition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitScalar_type_definition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Scalar_type_definitionContext scalar_type_definition() { + Scalar_type_definitionContext _localctx = new Scalar_type_definitionContext(Context, State); + EnterRule(_localctx, 432, RULE_scalar_type_definition); + try { + State = 2294; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,240,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2291; + enumeration_type_definition(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2292; + range_constraint(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 2293; + physical_type_definition(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Secondary_unitContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Architecture_bodyContext architecture_body() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Package_bodyContext package_body() { + return GetRuleContext(0); + } + public Secondary_unitContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_secondary_unit; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSecondary_unit(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Secondary_unitContext secondary_unit() { + Secondary_unitContext _localctx = new Secondary_unitContext(Context, State); + EnterRule(_localctx, 434, RULE_secondary_unit); + try { + State = 2298; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case ARCHITECTURE: + EnterOuterAlt(_localctx, 1); + { + State = 2296; + architecture_body(); + } + break; + case PACKAGE: + EnterOuterAlt(_localctx, 2); + { + State = 2297; + package_body(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Secondary_unit_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode EQ() { return GetToken(vhdl2008Parser.EQ, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Physical_literalContext physical_literal() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + public Secondary_unit_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_secondary_unit_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSecondary_unit_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Secondary_unit_declarationContext secondary_unit_declaration() { + Secondary_unit_declarationContext _localctx = new Secondary_unit_declarationContext(Context, State); + EnterRule(_localctx, 436, RULE_secondary_unit_declaration); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2300; + identifier(); + State = 2301; + Match(EQ); + State = 2302; + physical_literal(); + State = 2303; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Selected_expressionsContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext[] expression() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] WHEN() { return GetTokens(vhdl2008Parser.WHEN); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode WHEN(int i) { + return GetToken(vhdl2008Parser.WHEN, i); + } + [System.Diagnostics.DebuggerNonUserCode] public ChoicesContext[] choices() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ChoicesContext choices(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(vhdl2008Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(vhdl2008Parser.COMMA, i); + } + public Selected_expressionsContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_selected_expressions; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSelected_expressions(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Selected_expressionsContext selected_expressions() { + Selected_expressionsContext _localctx = new Selected_expressionsContext(Context, State); + EnterRule(_localctx, 438, RULE_selected_expressions); + try { + int _alt; + EnterOuterAlt(_localctx, 1); + { + State = 2312; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,242,Context); + while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + State = 2305; + expression(); + State = 2306; + Match(WHEN); + State = 2307; + choices(); + State = 2308; + Match(COMMA); + } + } + } + State = 2314; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,242,Context); + } + State = 2315; + expression(); + State = 2316; + Match(WHEN); + State = 2317; + choices(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Selected_force_assignmentContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode WITH() { return GetToken(vhdl2008Parser.WITH, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SELECT() { return GetToken(vhdl2008Parser.SELECT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public TargetContext target() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LEQ() { return GetToken(vhdl2008Parser.LEQ, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FORCE() { return GetToken(vhdl2008Parser.FORCE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Selected_expressionsContext selected_expressions() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode QUESTION() { return GetToken(vhdl2008Parser.QUESTION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Force_modeContext force_mode() { + return GetRuleContext(0); + } + public Selected_force_assignmentContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_selected_force_assignment; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSelected_force_assignment(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Selected_force_assignmentContext selected_force_assignment() { + Selected_force_assignmentContext _localctx = new Selected_force_assignmentContext(Context, State); + EnterRule(_localctx, 440, RULE_selected_force_assignment); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2319; + Match(WITH); + State = 2320; + expression(); + State = 2321; + Match(SELECT); + State = 2323; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==QUESTION) { + { + State = 2322; + Match(QUESTION); + } + } + + State = 2325; + target(); + State = 2326; + Match(LEQ); + State = 2327; + Match(FORCE); + State = 2329; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==IN || _la==OUT) { + { + State = 2328; + force_mode(); + } + } + + State = 2331; + selected_expressions(); + State = 2332; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Selected_nameContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public PrefixContext prefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOT() { return GetToken(vhdl2008Parser.DOT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public SuffixContext suffix() { + return GetRuleContext(0); + } + public Selected_nameContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_selected_name; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSelected_name(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Selected_nameContext selected_name() { + Selected_nameContext _localctx = new Selected_nameContext(Context, State); + EnterRule(_localctx, 442, RULE_selected_name); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2334; + prefix(); + State = 2335; + Match(DOT); + State = 2336; + suffix(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Selected_signal_assignmentContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Selected_waveform_assignmentContext selected_waveform_assignment() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Selected_force_assignmentContext selected_force_assignment() { + return GetRuleContext(0); + } + public Selected_signal_assignmentContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_selected_signal_assignment; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSelected_signal_assignment(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Selected_signal_assignmentContext selected_signal_assignment() { + Selected_signal_assignmentContext _localctx = new Selected_signal_assignmentContext(Context, State); + EnterRule(_localctx, 444, RULE_selected_signal_assignment); + try { + State = 2340; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,245,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2338; + selected_waveform_assignment(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2339; + selected_force_assignment(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Selected_variable_assignmentContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode WITH() { return GetToken(vhdl2008Parser.WITH, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SELECT() { return GetToken(vhdl2008Parser.SELECT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public TargetContext target() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode WALRUS() { return GetToken(vhdl2008Parser.WALRUS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Selected_expressionsContext selected_expressions() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode QUESTION() { return GetToken(vhdl2008Parser.QUESTION, 0); } + public Selected_variable_assignmentContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_selected_variable_assignment; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSelected_variable_assignment(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Selected_variable_assignmentContext selected_variable_assignment() { + Selected_variable_assignmentContext _localctx = new Selected_variable_assignmentContext(Context, State); + EnterRule(_localctx, 446, RULE_selected_variable_assignment); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2342; + Match(WITH); + State = 2343; + expression(); + State = 2344; + Match(SELECT); + State = 2346; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==QUESTION) { + { + State = 2345; + Match(QUESTION); + } + } + + State = 2348; + target(); + State = 2349; + Match(WALRUS); + State = 2350; + selected_expressions(); + State = 2351; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Selected_waveform_assignmentContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode WITH() { return GetToken(vhdl2008Parser.WITH, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SELECT() { return GetToken(vhdl2008Parser.SELECT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public TargetContext target() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LEQ() { return GetToken(vhdl2008Parser.LEQ, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Selected_waveformsContext selected_waveforms() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode QUESTION() { return GetToken(vhdl2008Parser.QUESTION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Delay_mechanismContext delay_mechanism() { + return GetRuleContext(0); + } + public Selected_waveform_assignmentContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_selected_waveform_assignment; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSelected_waveform_assignment(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Selected_waveform_assignmentContext selected_waveform_assignment() { + Selected_waveform_assignmentContext _localctx = new Selected_waveform_assignmentContext(Context, State); + EnterRule(_localctx, 448, RULE_selected_waveform_assignment); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2353; + Match(WITH); + State = 2354; + expression(); + State = 2355; + Match(SELECT); + State = 2357; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==QUESTION) { + { + State = 2356; + Match(QUESTION); + } + } + + State = 2359; + target(); + State = 2360; + Match(LEQ); + State = 2362; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 42)) & ~0x3f) == 0 && ((1L << (_la - 42)) & -9223371761976868863L) != 0)) { + { + State = 2361; + delay_mechanism(); + } + } + + State = 2364; + selected_waveforms(); + State = 2365; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Selected_waveformsContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public WaveformContext[] waveform() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public WaveformContext waveform(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] WHEN() { return GetTokens(vhdl2008Parser.WHEN); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode WHEN(int i) { + return GetToken(vhdl2008Parser.WHEN, i); + } + [System.Diagnostics.DebuggerNonUserCode] public ChoicesContext[] choices() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ChoicesContext choices(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(vhdl2008Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(vhdl2008Parser.COMMA, i); + } + public Selected_waveformsContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_selected_waveforms; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSelected_waveforms(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Selected_waveformsContext selected_waveforms() { + Selected_waveformsContext _localctx = new Selected_waveformsContext(Context, State); + EnterRule(_localctx, 450, RULE_selected_waveforms); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2367; + waveform(); + State = 2368; + Match(WHEN); + State = 2369; + choices(); + State = 2377; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 2370; + Match(COMMA); + State = 2371; + waveform(); + State = 2372; + Match(WHEN); + State = 2373; + choices(); + } + } + State = 2379; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Sensitivity_clauseContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ON() { return GetToken(vhdl2008Parser.ON, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Sensitivity_listContext sensitivity_list() { + return GetRuleContext(0); + } + public Sensitivity_clauseContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_sensitivity_clause; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSensitivity_clause(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Sensitivity_clauseContext sensitivity_clause() { + Sensitivity_clauseContext _localctx = new Sensitivity_clauseContext(Context, State); + EnterRule(_localctx, 452, RULE_sensitivity_clause); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2380; + Match(ON); + State = 2381; + sensitivity_list(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Sensitivity_listContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public NameContext[] name() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public NameContext name(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(vhdl2008Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(vhdl2008Parser.COMMA, i); + } + public Sensitivity_listContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_sensitivity_list; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSensitivity_list(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Sensitivity_listContext sensitivity_list() { + Sensitivity_listContext _localctx = new Sensitivity_listContext(Context, State); + EnterRule(_localctx, 454, RULE_sensitivity_list); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2383; + name(); + State = 2388; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 2384; + Match(COMMA); + State = 2385; + name(); + } + } + State = 2390; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Sequence_of_statementsContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Sequential_statementContext[] sequential_statement() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Sequential_statementContext sequential_statement(int i) { + return GetRuleContext(i); + } + public Sequence_of_statementsContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_sequence_of_statements; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSequence_of_statements(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Sequence_of_statementsContext sequence_of_statements() { + Sequence_of_statementsContext _localctx = new Sequence_of_statementsContext(Context, State); + EnterRule(_localctx, 456, RULE_sequence_of_statements); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2394; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 1226105553676403712L) != 0) || ((((_la - 85)) & ~0x3f) == 0 && ((1L << (_la - 85)) & 566267144568835L) != 0) || _la==LPAREN) { + { + { + State = 2391; + sequential_statement(); + } + } + State = 2396; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Sequential_statementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Wait_statementContext wait_statement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Assertion_statementContext assertion_statement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Report_statementContext report_statement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Signal_assignment_statementContext signal_assignment_statement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Variable_assignment_statementContext variable_assignment_statement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Procedure_call_statementContext procedure_call_statement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public If_statementContext if_statement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Case_statementContext case_statement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Loop_statementContext loop_statement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Next_statementContext next_statement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Exit_statementContext exit_statement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Return_statementContext return_statement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Null_statementContext null_statement() { + return GetRuleContext(0); + } + public Sequential_statementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_sequential_statement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSequential_statement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Sequential_statementContext sequential_statement() { + Sequential_statementContext _localctx = new Sequential_statementContext(Context, State); + EnterRule(_localctx, 458, RULE_sequential_statement); + try { + State = 2410; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,252,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2397; + wait_statement(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2398; + assertion_statement(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 2399; + report_statement(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 2400; + signal_assignment_statement(); + } + break; + case 5: + EnterOuterAlt(_localctx, 5); + { + State = 2401; + variable_assignment_statement(); + } + break; + case 6: + EnterOuterAlt(_localctx, 6); + { + State = 2402; + procedure_call_statement(); + } + break; + case 7: + EnterOuterAlt(_localctx, 7); + { + State = 2403; + if_statement(); + } + break; + case 8: + EnterOuterAlt(_localctx, 8); + { + State = 2404; + case_statement(); + } + break; + case 9: + EnterOuterAlt(_localctx, 9); + { + State = 2405; + loop_statement(); + } + break; + case 10: + EnterOuterAlt(_localctx, 10); + { + State = 2406; + next_statement(); + } + break; + case 11: + EnterOuterAlt(_localctx, 11); + { + State = 2407; + exit_statement(); + } + break; + case 12: + EnterOuterAlt(_localctx, 12); + { + State = 2408; + return_statement(); + } + break; + case 13: + EnterOuterAlt(_localctx, 13); + { + State = 2409; + null_statement(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Shift_expressionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Simple_expressionContext[] simple_expression() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Simple_expressionContext simple_expression(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public Shift_operatorContext shift_operator() { + return GetRuleContext(0); + } + public Shift_expressionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_shift_expression; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitShift_expression(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Shift_expressionContext shift_expression() { + Shift_expressionContext _localctx = new Shift_expressionContext(Context, State); + EnterRule(_localctx, 460, RULE_shift_expression); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2412; + simple_expression(); + State = 2416; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 87)) & ~0x3f) == 0 && ((1L << (_la - 87)) & 1731L) != 0)) { + { + State = 2413; + shift_operator(); + State = 2414; + simple_expression(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Shift_operatorContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SLL() { return GetToken(vhdl2008Parser.SLL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SRL() { return GetToken(vhdl2008Parser.SRL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SLA() { return GetToken(vhdl2008Parser.SLA, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SRA() { return GetToken(vhdl2008Parser.SRA, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ROL() { return GetToken(vhdl2008Parser.ROL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ROR() { return GetToken(vhdl2008Parser.ROR, 0); } + public Shift_operatorContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_shift_operator; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitShift_operator(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Shift_operatorContext shift_operator() { + Shift_operatorContext _localctx = new Shift_operatorContext(Context, State); + EnterRule(_localctx, 462, RULE_shift_operator); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2418; + _la = TokenStream.LA(1); + if ( !(((((_la - 87)) & ~0x3f) == 0 && ((1L << (_la - 87)) & 1731L) != 0)) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Signal_assignment_statementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Simple_signal_assignmentContext simple_signal_assignment() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Conditional_signal_assignmentContext conditional_signal_assignment() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Selected_signal_assignmentContext selected_signal_assignment() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Label_colonContext label_colon() { + return GetRuleContext(0); + } + public Signal_assignment_statementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_signal_assignment_statement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSignal_assignment_statement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Signal_assignment_statementContext signal_assignment_statement() { + Signal_assignment_statementContext _localctx = new Signal_assignment_statementContext(Context, State); + EnterRule(_localctx, 464, RULE_signal_assignment_statement); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2421; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,254,Context) ) { + case 1: + { + State = 2420; + label_colon(); + } + break; + } + State = 2426; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,255,Context) ) { + case 1: + { + State = 2423; + simple_signal_assignment(); + } + break; + case 2: + { + State = 2424; + conditional_signal_assignment(); + } + break; + case 3: + { + State = 2425; + selected_signal_assignment(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Signal_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SIGNAL() { return GetToken(vhdl2008Parser.SIGNAL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Identifier_listContext identifier_list() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON() { return GetToken(vhdl2008Parser.COLON, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Subtype_indicationContext subtype_indication() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Signal_kindContext signal_kind() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode WALRUS() { return GetToken(vhdl2008Parser.WALRUS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression() { + return GetRuleContext(0); + } + public Signal_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_signal_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSignal_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Signal_declarationContext signal_declaration() { + Signal_declarationContext _localctx = new Signal_declarationContext(Context, State); + EnterRule(_localctx, 466, RULE_signal_declaration); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2428; + Match(SIGNAL); + State = 2429; + identifier_list(); + State = 2430; + Match(COLON); + { + State = 2431; + subtype_indication(); + } + State = 2433; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BUS || _la==REGISTER) { + { + State = 2432; + signal_kind(); + } + } + + State = 2437; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==WALRUS) { + { + State = 2435; + Match(WALRUS); + State = 2436; + expression(); + } + } + + State = 2439; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Signal_kindContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode REGISTER() { return GetToken(vhdl2008Parser.REGISTER, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BUS() { return GetToken(vhdl2008Parser.BUS, 0); } + public Signal_kindContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_signal_kind; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSignal_kind(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Signal_kindContext signal_kind() { + Signal_kindContext _localctx = new Signal_kindContext(Context, State); + EnterRule(_localctx, 468, RULE_signal_kind); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2441; + _la = TokenStream.LA(1); + if ( !(_la==BUS || _la==REGISTER) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Signal_listContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public NameContext[] name() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public NameContext name(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(vhdl2008Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(vhdl2008Parser.COMMA, i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OTHERS() { return GetToken(vhdl2008Parser.OTHERS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ALL() { return GetToken(vhdl2008Parser.ALL, 0); } + public Signal_listContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_signal_list; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSignal_list(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Signal_listContext signal_list() { + Signal_listContext _localctx = new Signal_listContext(Context, State); + EnterRule(_localctx, 470, RULE_signal_list); + int _la; + try { + State = 2453; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case STRING_LITERAL: + case BASIC_IDENTIFIER: + case EXTENDED_IDENTIFIER: + case CHARACTER_LITERAL: + EnterOuterAlt(_localctx, 1); + { + State = 2443; + name(); + State = 2448; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 2444; + Match(COMMA); + State = 2445; + name(); + } + } + State = 2450; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + break; + case OTHERS: + EnterOuterAlt(_localctx, 2); + { + State = 2451; + Match(OTHERS); + } + break; + case ALL: + EnterOuterAlt(_localctx, 3); + { + State = 2452; + Match(ALL); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class SignatureContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LBRACKET() { return GetToken(vhdl2008Parser.LBRACKET, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RBRACKET() { return GetToken(vhdl2008Parser.RBRACKET, 0); } + [System.Diagnostics.DebuggerNonUserCode] public NameContext[] name() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public NameContext name(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RETURN() { return GetToken(vhdl2008Parser.RETURN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA() { return GetToken(vhdl2008Parser.COMMA, 0); } + public SignatureContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_signature; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSignature(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public SignatureContext signature() { + SignatureContext _localctx = new SignatureContext(Context, State); + EnterRule(_localctx, 472, RULE_signature); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2455; + Match(LBRACKET); + { + State = 2456; + name(); + State = 2459; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==COMMA) { + { + State = 2457; + Match(COMMA); + State = 2458; + name(); + } + } + + } + State = 2463; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==RETURN) { + { + State = 2461; + Match(RETURN); + State = 2462; + name(); + } + } + + State = 2465; + Match(RBRACKET); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Simple_expressionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public TermContext[] term() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public TermContext term(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public Adding_operatorContext[] adding_operator() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Adding_operatorContext adding_operator(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PLUS() { return GetToken(vhdl2008Parser.PLUS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode MINUS() { return GetToken(vhdl2008Parser.MINUS, 0); } + public Simple_expressionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_simple_expression; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSimple_expression(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Simple_expressionContext simple_expression() { + Simple_expressionContext _localctx = new Simple_expressionContext(Context, State); + EnterRule(_localctx, 474, RULE_simple_expression); + int _la; + try { + int _alt; + EnterOuterAlt(_localctx, 1); + { + State = 2468; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==PLUS || _la==MINUS) { + { + State = 2467; + _la = TokenStream.LA(1); + if ( !(_la==PLUS || _la==MINUS) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + } + + State = 2470; + term(); + State = 2476; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,263,Context); + while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + State = 2471; + adding_operator(); + State = 2472; + term(); + } + } + } + State = 2478; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,263,Context); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Simple_force_assignmentContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Force_modeContext force_mode() { + return GetRuleContext(0); + } + public Simple_force_assignmentContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_simple_force_assignment; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSimple_force_assignment(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Simple_force_assignmentContext simple_force_assignment() { + Simple_force_assignmentContext _localctx = new Simple_force_assignmentContext(Context, State); + EnterRule(_localctx, 476, RULE_simple_force_assignment); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2480; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==IN || _la==OUT) { + { + State = 2479; + force_mode(); + } + } + + State = 2482; + expression(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Simple_release_assignmentContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Force_modeContext force_mode() { + return GetRuleContext(0); + } + public Simple_release_assignmentContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_simple_release_assignment; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSimple_release_assignment(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Simple_release_assignmentContext simple_release_assignment() { + Simple_release_assignmentContext _localctx = new Simple_release_assignmentContext(Context, State); + EnterRule(_localctx, 478, RULE_simple_release_assignment); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2485; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==IN || _la==OUT) { + { + State = 2484; + force_mode(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Simple_signal_assignmentContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public TargetContext target() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LEQ() { return GetToken(vhdl2008Parser.LEQ, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Simple_waveform_assignmentContext simple_waveform_assignment() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Simple_force_assignmentContext simple_force_assignment() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Simple_release_assignmentContext simple_release_assignment() { + return GetRuleContext(0); + } + public Simple_signal_assignmentContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_simple_signal_assignment; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSimple_signal_assignment(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Simple_signal_assignmentContext simple_signal_assignment() { + Simple_signal_assignmentContext _localctx = new Simple_signal_assignmentContext(Context, State); + EnterRule(_localctx, 480, RULE_simple_signal_assignment); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2487; + target(); + State = 2488; + Match(LEQ); + State = 2492; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,266,Context) ) { + case 1: + { + State = 2489; + simple_waveform_assignment(); + } + break; + case 2: + { + State = 2490; + simple_force_assignment(); + } + break; + case 3: + { + State = 2491; + simple_release_assignment(); + } + break; + } + State = 2494; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Simple_waveform_assignmentContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public WaveformContext waveform() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Delay_mechanismContext delay_mechanism() { + return GetRuleContext(0); + } + public Simple_waveform_assignmentContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_simple_waveform_assignment; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSimple_waveform_assignment(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Simple_waveform_assignmentContext simple_waveform_assignment() { + Simple_waveform_assignmentContext _localctx = new Simple_waveform_assignmentContext(Context, State); + EnterRule(_localctx, 482, RULE_simple_waveform_assignment); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2497; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 42)) & ~0x3f) == 0 && ((1L << (_la - 42)) & -9223371761976868863L) != 0)) { + { + State = 2496; + delay_mechanism(); + } + } + + State = 2499; + waveform(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Simple_variable_assignmentContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public TargetContext target() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode WALRUS() { return GetToken(vhdl2008Parser.WALRUS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + public Simple_variable_assignmentContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_simple_variable_assignment; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSimple_variable_assignment(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Simple_variable_assignmentContext simple_variable_assignment() { + Simple_variable_assignmentContext _localctx = new Simple_variable_assignmentContext(Context, State); + EnterRule(_localctx, 484, RULE_simple_variable_assignment); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2501; + target(); + State = 2502; + Match(WALRUS); + State = 2503; + expression(); + State = 2504; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Slice_nameContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public PrefixContext prefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Discrete_rangeContext discrete_range() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + public Slice_nameContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_slice_name; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSlice_name(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Slice_nameContext slice_name() { + Slice_nameContext _localctx = new Slice_nameContext(Context, State); + EnterRule(_localctx, 486, RULE_slice_name); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2506; + prefix(); + State = 2507; + Match(LPAREN); + State = 2508; + discrete_range(); + State = 2509; + Match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Subprogram_bodyContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Subprogram_specificationContext subprogram_specification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IS() { return GetToken(vhdl2008Parser.IS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Subprogram_declarative_partContext subprogram_declarative_part() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BEGIN() { return GetToken(vhdl2008Parser.BEGIN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Subprogram_statement_partContext subprogram_statement_part() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode END() { return GetToken(vhdl2008Parser.END, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Subprogram_kindContext subprogram_kind() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public DesignatorContext designator() { + return GetRuleContext(0); + } + public Subprogram_bodyContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_subprogram_body; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSubprogram_body(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Subprogram_bodyContext subprogram_body() { + Subprogram_bodyContext _localctx = new Subprogram_bodyContext(Context, State); + EnterRule(_localctx, 488, RULE_subprogram_body); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2511; + subprogram_specification(); + State = 2512; + Match(IS); + State = 2513; + subprogram_declarative_part(); + State = 2514; + Match(BEGIN); + State = 2515; + subprogram_statement_part(); + State = 2516; + Match(END); + State = 2518; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==FUNCTION || _la==PROCEDURE) { + { + State = 2517; + subprogram_kind(); + } + } + + State = 2521; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 119)) & ~0x3f) == 0 && ((1L << (_la - 119)) & 193L) != 0)) { + { + State = 2520; + designator(); + } + } + + State = 2523; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Subprogram_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Subprogram_specificationContext subprogram_specification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + public Subprogram_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_subprogram_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSubprogram_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Subprogram_declarationContext subprogram_declaration() { + Subprogram_declarationContext _localctx = new Subprogram_declarationContext(Context, State); + EnterRule(_localctx, 490, RULE_subprogram_declaration); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2525; + subprogram_specification(); + State = 2526; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Subprogram_declarative_itemContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Subprogram_declarationContext subprogram_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Subprogram_bodyContext subprogram_body() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Subprogram_instantiation_declarationContext subprogram_instantiation_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Package_declarationContext package_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Package_bodyContext package_body() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Package_instantiation_declarationContext package_instantiation_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Type_declarationContext type_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Subtype_declarationContext subtype_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Constant_declarationContext constant_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Variable_declarationContext variable_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public File_declarationContext file_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Alias_declarationContext alias_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Attribute_declarationContext attribute_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Attribute_specificationContext attribute_specification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Use_clauseContext use_clause() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Group_template_declarationContext group_template_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Group_declarationContext group_declaration() { + return GetRuleContext(0); + } + public Subprogram_declarative_itemContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_subprogram_declarative_item; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSubprogram_declarative_item(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Subprogram_declarative_itemContext subprogram_declarative_item() { + Subprogram_declarative_itemContext _localctx = new Subprogram_declarative_itemContext(Context, State); + EnterRule(_localctx, 492, RULE_subprogram_declarative_item); + try { + State = 2545; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,270,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2528; + subprogram_declaration(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2529; + subprogram_body(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 2530; + subprogram_instantiation_declaration(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 2531; + package_declaration(); + } + break; + case 5: + EnterOuterAlt(_localctx, 5); + { + State = 2532; + package_body(); + } + break; + case 6: + EnterOuterAlt(_localctx, 6); + { + State = 2533; + package_instantiation_declaration(); + } + break; + case 7: + EnterOuterAlt(_localctx, 7); + { + State = 2534; + type_declaration(); + } + break; + case 8: + EnterOuterAlt(_localctx, 8); + { + State = 2535; + subtype_declaration(); + } + break; + case 9: + EnterOuterAlt(_localctx, 9); + { + State = 2536; + constant_declaration(); + } + break; + case 10: + EnterOuterAlt(_localctx, 10); + { + State = 2537; + variable_declaration(); + } + break; + case 11: + EnterOuterAlt(_localctx, 11); + { + State = 2538; + file_declaration(); + } + break; + case 12: + EnterOuterAlt(_localctx, 12); + { + State = 2539; + alias_declaration(); + } + break; + case 13: + EnterOuterAlt(_localctx, 13); + { + State = 2540; + attribute_declaration(); + } + break; + case 14: + EnterOuterAlt(_localctx, 14); + { + State = 2541; + attribute_specification(); + } + break; + case 15: + EnterOuterAlt(_localctx, 15); + { + State = 2542; + use_clause(); + } + break; + case 16: + EnterOuterAlt(_localctx, 16); + { + State = 2543; + group_template_declaration(); + } + break; + case 17: + EnterOuterAlt(_localctx, 17); + { + State = 2544; + group_declaration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Subprogram_declarative_partContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Subprogram_declarative_itemContext[] subprogram_declarative_item() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Subprogram_declarative_itemContext subprogram_declarative_item(int i) { + return GetRuleContext(i); + } + public Subprogram_declarative_partContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_subprogram_declarative_part; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSubprogram_declarative_part(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Subprogram_declarative_partContext subprogram_declarative_part() { + Subprogram_declarative_partContext _localctx = new Subprogram_declarative_partContext(Context, State); + EnterRule(_localctx, 494, RULE_subprogram_declarative_part); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2550; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 1256280033312L) != 0) || ((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & 26942346625313L) != 0)) { + { + { + State = 2547; + subprogram_declarative_item(); + } + } + State = 2552; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Subprogram_headerContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode GENERIC() { return GetToken(vhdl2008Parser.GENERIC, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Generic_listContext generic_list() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Generic_map_aspectContext generic_map_aspect() { + return GetRuleContext(0); + } + public Subprogram_headerContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_subprogram_header; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSubprogram_header(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Subprogram_headerContext subprogram_header() { + Subprogram_headerContext _localctx = new Subprogram_headerContext(Context, State); + EnterRule(_localctx, 496, RULE_subprogram_header); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2559; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==GENERIC) { + { + State = 2553; + Match(GENERIC); + State = 2554; + Match(LPAREN); + State = 2555; + generic_list(); + State = 2556; + Match(RPAREN); + { + State = 2557; + generic_map_aspect(); + } + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Subprogram_instantiation_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Subprogram_kindContext subprogram_kind() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IS() { return GetToken(vhdl2008Parser.IS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode NEW() { return GetToken(vhdl2008Parser.NEW, 0); } + [System.Diagnostics.DebuggerNonUserCode] public NameContext name() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Generic_map_aspectContext generic_map_aspect() { + return GetRuleContext(0); + } + public Subprogram_instantiation_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_subprogram_instantiation_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSubprogram_instantiation_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Subprogram_instantiation_declarationContext subprogram_instantiation_declaration() { + Subprogram_instantiation_declarationContext _localctx = new Subprogram_instantiation_declarationContext(Context, State); + EnterRule(_localctx, 498, RULE_subprogram_instantiation_declaration); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2561; + subprogram_kind(); + State = 2562; + identifier(); + State = 2563; + Match(IS); + State = 2564; + Match(NEW); + State = 2565; + name(); + { + State = 2566; + generic_map_aspect(); + } + State = 2567; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Subprogram_kindContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PROCEDURE() { return GetToken(vhdl2008Parser.PROCEDURE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FUNCTION() { return GetToken(vhdl2008Parser.FUNCTION, 0); } + public Subprogram_kindContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_subprogram_kind; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSubprogram_kind(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Subprogram_kindContext subprogram_kind() { + Subprogram_kindContext _localctx = new Subprogram_kindContext(Context, State); + EnterRule(_localctx, 500, RULE_subprogram_kind); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2569; + _la = TokenStream.LA(1); + if ( !(_la==FUNCTION || _la==PROCEDURE) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Subprogram_specificationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Procedure_specificationContext procedure_specification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Function_specificationContext function_specification() { + return GetRuleContext(0); + } + public Subprogram_specificationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_subprogram_specification; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSubprogram_specification(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Subprogram_specificationContext subprogram_specification() { + Subprogram_specificationContext _localctx = new Subprogram_specificationContext(Context, State); + EnterRule(_localctx, 502, RULE_subprogram_specification); + try { + State = 2573; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case PROCEDURE: + EnterOuterAlt(_localctx, 1); + { + State = 2571; + procedure_specification(); + } + break; + case FUNCTION: + case IMPURE: + case PURE: + EnterOuterAlt(_localctx, 2); + { + State = 2572; + function_specification(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Subprogram_statement_partContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Sequential_statementContext[] sequential_statement() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Sequential_statementContext sequential_statement(int i) { + return GetRuleContext(i); + } + public Subprogram_statement_partContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_subprogram_statement_part; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSubprogram_statement_part(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Subprogram_statement_partContext subprogram_statement_part() { + Subprogram_statement_partContext _localctx = new Subprogram_statement_partContext(Context, State); + EnterRule(_localctx, 504, RULE_subprogram_statement_part); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2578; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 1226105553676403712L) != 0) || ((((_la - 85)) & ~0x3f) == 0 && ((1L << (_la - 85)) & 566267144568835L) != 0) || _la==LPAREN) { + { + { + State = 2575; + sequential_statement(); + } + } + State = 2580; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Subtype_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SUBTYPE() { return GetToken(vhdl2008Parser.SUBTYPE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IS() { return GetToken(vhdl2008Parser.IS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Subtype_indicationContext subtype_indication() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + public Subtype_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_subtype_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSubtype_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Subtype_declarationContext subtype_declaration() { + Subtype_declarationContext _localctx = new Subtype_declarationContext(Context, State); + EnterRule(_localctx, 506, RULE_subtype_declaration); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2581; + Match(SUBTYPE); + State = 2582; + identifier(); + State = 2583; + Match(IS); + State = 2584; + subtype_indication(); + State = 2585; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Subtype_indicationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public NameContext name() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Resolution_indicationContext resolution_indication() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ConstraintContext constraint() { + return GetRuleContext(0); + } + public Subtype_indicationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_subtype_indication; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSubtype_indication(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Subtype_indicationContext subtype_indication() { + Subtype_indicationContext _localctx = new Subtype_indicationContext(Context, State); + EnterRule(_localctx, 508, RULE_subtype_indication); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2588; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,275,Context) ) { + case 1: + { + State = 2587; + resolution_indication(); + } + break; + } + State = 2590; + name(); + State = 2592; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,276,Context) ) { + case 1: + { + State = 2591; + constraint(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class SuffixContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CHARACTER_LITERAL() { return GetToken(vhdl2008Parser.CHARACTER_LITERAL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode STRING_LITERAL() { return GetToken(vhdl2008Parser.STRING_LITERAL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ALL() { return GetToken(vhdl2008Parser.ALL, 0); } + public SuffixContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_suffix; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitSuffix(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public SuffixContext suffix() { + SuffixContext _localctx = new SuffixContext(Context, State); + EnterRule(_localctx, 510, RULE_suffix); + try { + State = 2598; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case BASIC_IDENTIFIER: + case EXTENDED_IDENTIFIER: + EnterOuterAlt(_localctx, 1); + { + State = 2594; + identifier(); + } + break; + case CHARACTER_LITERAL: + EnterOuterAlt(_localctx, 2); + { + State = 2595; + Match(CHARACTER_LITERAL); + } + break; + case STRING_LITERAL: + EnterOuterAlt(_localctx, 3); + { + State = 2596; + Match(STRING_LITERAL); + } + break; + case ALL: + EnterOuterAlt(_localctx, 4); + { + State = 2597; + Match(ALL); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class TargetContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public NameContext name() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public AggregateContext aggregate() { + return GetRuleContext(0); + } + public TargetContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_target; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitTarget(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public TargetContext target() { + TargetContext _localctx = new TargetContext(Context, State); + EnterRule(_localctx, 512, RULE_target); + try { + State = 2602; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case STRING_LITERAL: + case BASIC_IDENTIFIER: + case EXTENDED_IDENTIFIER: + case CHARACTER_LITERAL: + EnterOuterAlt(_localctx, 1); + { + State = 2600; + name(); + } + break; + case LPAREN: + EnterOuterAlt(_localctx, 2); + { + State = 2601; + aggregate(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class TermContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public FactorContext[] factor() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public FactorContext factor(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public Multiplying_operatorContext[] multiplying_operator() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Multiplying_operatorContext multiplying_operator(int i) { + return GetRuleContext(i); + } + public TermContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_term; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitTerm(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public TermContext term() { + TermContext _localctx = new TermContext(Context, State); + EnterRule(_localctx, 514, RULE_term); + try { + int _alt; + EnterOuterAlt(_localctx, 1); + { + State = 2604; + factor(); + State = 2610; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,279,Context); + while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + State = 2605; + multiplying_operator(); + State = 2606; + factor(); + } + } + } + State = 2612; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,279,Context); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Timeout_clauseContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FOR() { return GetToken(vhdl2008Parser.FOR, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression() { + return GetRuleContext(0); + } + public Timeout_clauseContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_timeout_clause; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitTimeout_clause(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Timeout_clauseContext timeout_clause() { + Timeout_clauseContext _localctx = new Timeout_clauseContext(Context, State); + EnterRule(_localctx, 516, RULE_timeout_clause); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2613; + Match(FOR); + State = 2614; + expression(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Tool_directiveContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BACKTICK() { return GetToken(vhdl2008Parser.BACKTICK, 0); } + [System.Diagnostics.DebuggerNonUserCode] public IdentifierContext identifier() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Graphic_characterContext[] graphic_character() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Graphic_characterContext graphic_character(int i) { + return GetRuleContext(i); + } + public Tool_directiveContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_tool_directive; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitTool_directive(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Tool_directiveContext tool_directive() { + Tool_directiveContext _localctx = new Tool_directiveContext(Context, State); + EnterRule(_localctx, 518, RULE_tool_directive); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2616; + Match(BACKTICK); + State = 2617; + identifier(); + State = 2621; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==EXTENDED_IDENTIFIER) { + { + { + State = 2618; + graphic_character(); + } + } + State = 2623; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Type_conversionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public NameContext name() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + public Type_conversionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_type_conversion; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitType_conversion(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Type_conversionContext type_conversion() { + Type_conversionContext _localctx = new Type_conversionContext(Context, State); + EnterRule(_localctx, 520, RULE_type_conversion); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2624; + name(); + State = 2625; + Match(LPAREN); + State = 2626; + expression(); + State = 2627; + Match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Type_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Full_type_declarationContext full_type_declaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Incomplete_type_declarationContext incomplete_type_declaration() { + return GetRuleContext(0); + } + public Type_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_type_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitType_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Type_declarationContext type_declaration() { + Type_declarationContext _localctx = new Type_declarationContext(Context, State); + EnterRule(_localctx, 522, RULE_type_declaration); + try { + State = 2631; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,281,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2629; + full_type_declaration(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2630; + incomplete_type_declaration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Type_definitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Scalar_type_definitionContext scalar_type_definition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Composite_type_definitionContext composite_type_definition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Access_type_definitionContext access_type_definition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public File_type_definitionContext file_type_definition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Protected_type_definitionContext protected_type_definition() { + return GetRuleContext(0); + } + public Type_definitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_type_definition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitType_definition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Type_definitionContext type_definition() { + Type_definitionContext _localctx = new Type_definitionContext(Context, State); + EnterRule(_localctx, 524, RULE_type_definition); + try { + State = 2638; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case RANGE: + case LPAREN: + EnterOuterAlt(_localctx, 1); + { + State = 2633; + scalar_type_definition(); + } + break; + case ARRAY: + case RECORD: + EnterOuterAlt(_localctx, 2); + { + State = 2634; + composite_type_definition(); + } + break; + case ACCESS: + EnterOuterAlt(_localctx, 3); + { + State = 2635; + access_type_definition(); + } + break; + case FILE: + EnterOuterAlt(_localctx, 4); + { + State = 2636; + file_type_definition(); + } + break; + case PROTECTED: + EnterOuterAlt(_localctx, 5); + { + State = 2637; + protected_type_definition(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Unbounded_array_definitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ARRAY() { return GetToken(vhdl2008Parser.ARRAY, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(vhdl2008Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Index_subtype_definitionContext[] index_subtype_definition() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Index_subtype_definitionContext index_subtype_definition(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(vhdl2008Parser.RPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OF() { return GetToken(vhdl2008Parser.OF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Subtype_indicationContext subtype_indication() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(vhdl2008Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(vhdl2008Parser.COMMA, i); + } + public Unbounded_array_definitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_unbounded_array_definition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitUnbounded_array_definition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Unbounded_array_definitionContext unbounded_array_definition() { + Unbounded_array_definitionContext _localctx = new Unbounded_array_definitionContext(Context, State); + EnterRule(_localctx, 526, RULE_unbounded_array_definition); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2640; + Match(ARRAY); + State = 2641; + Match(LPAREN); + State = 2642; + index_subtype_definition(); + State = 2647; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 2643; + Match(COMMA); + State = 2644; + index_subtype_definition(); + } + } + State = 2649; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 2650; + Match(RPAREN); + State = 2651; + Match(OF); + State = 2652; + subtype_indication(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Use_clauseContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode USE() { return GetToken(vhdl2008Parser.USE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Selected_nameContext[] selected_name() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Selected_nameContext selected_name(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(vhdl2008Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(vhdl2008Parser.COMMA, i); + } + public Use_clauseContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_use_clause; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitUse_clause(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Use_clauseContext use_clause() { + Use_clauseContext _localctx = new Use_clauseContext(Context, State); + EnterRule(_localctx, 528, RULE_use_clause); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2654; + Match(USE); + State = 2655; + selected_name(); + State = 2660; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 2656; + Match(COMMA); + State = 2657; + selected_name(); + } + } + State = 2662; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 2663; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Variable_assignment_statementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Simple_variable_assignmentContext simple_variable_assignment() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Conditional_variable_assignmentContext conditional_variable_assignment() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Selected_variable_assignmentContext selected_variable_assignment() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Label_colonContext label_colon() { + return GetRuleContext(0); + } + public Variable_assignment_statementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_variable_assignment_statement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitVariable_assignment_statement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Variable_assignment_statementContext variable_assignment_statement() { + Variable_assignment_statementContext _localctx = new Variable_assignment_statementContext(Context, State); + EnterRule(_localctx, 530, RULE_variable_assignment_statement); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2666; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,285,Context) ) { + case 1: + { + State = 2665; + label_colon(); + } + break; + } + State = 2671; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,286,Context) ) { + case 1: + { + State = 2668; + simple_variable_assignment(); + } + break; + case 2: + { + State = 2669; + conditional_variable_assignment(); + } + break; + case 3: + { + State = 2670; + selected_variable_assignment(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Variable_declarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode VARIABLE() { return GetToken(vhdl2008Parser.VARIABLE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Identifier_listContext identifier_list() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON() { return GetToken(vhdl2008Parser.COLON, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Subtype_indicationContext subtype_indication() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SHARED() { return GetToken(vhdl2008Parser.SHARED, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode WALRUS() { return GetToken(vhdl2008Parser.WALRUS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression() { + return GetRuleContext(0); + } + public Variable_declarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_variable_declaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitVariable_declaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Variable_declarationContext variable_declaration() { + Variable_declarationContext _localctx = new Variable_declarationContext(Context, State); + EnterRule(_localctx, 532, RULE_variable_declaration); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2674; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==SHARED) { + { + State = 2673; + Match(SHARED); + } + } + + State = 2676; + Match(VARIABLE); + State = 2677; + identifier_list(); + State = 2678; + Match(COLON); + State = 2679; + subtype_indication(); + State = 2682; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==WALRUS) { + { + State = 2680; + Match(WALRUS); + State = 2681; + expression(); + } + } + + State = 2684; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Wait_statementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode WAIT() { return GetToken(vhdl2008Parser.WAIT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(vhdl2008Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Label_colonContext label_colon() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Sensitivity_clauseContext sensitivity_clause() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Condition_clauseContext condition_clause() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Timeout_clauseContext timeout_clause() { + return GetRuleContext(0); + } + public Wait_statementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_wait_statement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitWait_statement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Wait_statementContext wait_statement() { + Wait_statementContext _localctx = new Wait_statementContext(Context, State); + EnterRule(_localctx, 534, RULE_wait_statement); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2687; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BASIC_IDENTIFIER || _la==EXTENDED_IDENTIFIER) { + { + State = 2686; + label_colon(); + } + } + + State = 2689; + Match(WAIT); + State = 2691; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==ON) { + { + State = 2690; + sensitivity_clause(); + } + } + + State = 2694; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==UNTIL) { + { + State = 2693; + condition_clause(); + } + } + + State = 2697; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==FOR) { + { + State = 2696; + timeout_clause(); + } + } + + State = 2699; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class WaveformContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Waveform_elementContext[] waveform_element() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Waveform_elementContext waveform_element(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(vhdl2008Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(vhdl2008Parser.COMMA, i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode UNAFFECTED() { return GetToken(vhdl2008Parser.UNAFFECTED, 0); } + public WaveformContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_waveform; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitWaveform(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public WaveformContext waveform() { + WaveformContext _localctx = new WaveformContext(Context, State); + EnterRule(_localctx, 536, RULE_waveform); + int _la; + try { + State = 2710; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case ABS: + case AND: + case NAND: + case NEW: + case NOR: + case NOT: + case NULL_: + case OR: + case XNOR: + case XOR: + case DECIMAL_LITERAL: + case STRING_LITERAL: + case BASED_LITERAL: + case BIT_STRING_LITERAL: + case BASIC_IDENTIFIER: + case EXTENDED_IDENTIFIER: + case CHARACTER_LITERAL: + case CONDITION_OPERATOR: + case LPAREN: + case PLUS: + case MINUS: + EnterOuterAlt(_localctx, 1); + { + State = 2701; + waveform_element(); + State = 2706; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 2702; + Match(COMMA); + State = 2703; + waveform_element(); + } + } + State = 2708; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + break; + case UNAFFECTED: + EnterOuterAlt(_localctx, 2); + { + State = 2709; + Match(UNAFFECTED); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Waveform_elementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext[] expression() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode AFTER() { return GetToken(vhdl2008Parser.AFTER, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode NULL_() { return GetToken(vhdl2008Parser.NULL_, 0); } + public Waveform_elementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_waveform_element; } } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + Ivhdl2008Visitor typedVisitor = visitor as Ivhdl2008Visitor; + if (typedVisitor != null) return typedVisitor.VisitWaveform_element(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Waveform_elementContext waveform_element() { + Waveform_elementContext _localctx = new Waveform_elementContext(Context, State); + EnterRule(_localctx, 538, RULE_waveform_element); + int _la; + try { + State = 2722; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,297,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2712; + expression(); + State = 2715; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==AFTER) { + { + State = 2713; + Match(AFTER); + State = 2714; + expression(); + } + } + + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2717; + Match(NULL_); + State = 2720; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==AFTER) { + { + State = 2718; + Match(AFTER); + State = 2719; + expression(); + } + } + + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + private static int[] _serializedATN = { + 4,1,180,2725,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2, + 7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14, + 2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,7,21, + 2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28,7,28, + 2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,2,34,7,34,2,35,7,35, + 2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39,2,40,7,40,2,41,7,41,2,42,7,42, + 2,43,7,43,2,44,7,44,2,45,7,45,2,46,7,46,2,47,7,47,2,48,7,48,2,49,7,49, + 2,50,7,50,2,51,7,51,2,52,7,52,2,53,7,53,2,54,7,54,2,55,7,55,2,56,7,56, + 2,57,7,57,2,58,7,58,2,59,7,59,2,60,7,60,2,61,7,61,2,62,7,62,2,63,7,63, + 2,64,7,64,2,65,7,65,2,66,7,66,2,67,7,67,2,68,7,68,2,69,7,69,2,70,7,70, + 2,71,7,71,2,72,7,72,2,73,7,73,2,74,7,74,2,75,7,75,2,76,7,76,2,77,7,77, + 2,78,7,78,2,79,7,79,2,80,7,80,2,81,7,81,2,82,7,82,2,83,7,83,2,84,7,84, + 2,85,7,85,2,86,7,86,2,87,7,87,2,88,7,88,2,89,7,89,2,90,7,90,2,91,7,91, + 2,92,7,92,2,93,7,93,2,94,7,94,2,95,7,95,2,96,7,96,2,97,7,97,2,98,7,98, + 2,99,7,99,2,100,7,100,2,101,7,101,2,102,7,102,2,103,7,103,2,104,7,104, + 2,105,7,105,2,106,7,106,2,107,7,107,2,108,7,108,2,109,7,109,2,110,7,110, + 2,111,7,111,2,112,7,112,2,113,7,113,2,114,7,114,2,115,7,115,2,116,7,116, + 2,117,7,117,2,118,7,118,2,119,7,119,2,120,7,120,2,121,7,121,2,122,7,122, + 2,123,7,123,2,124,7,124,2,125,7,125,2,126,7,126,2,127,7,127,2,128,7,128, + 2,129,7,129,2,130,7,130,2,131,7,131,2,132,7,132,2,133,7,133,2,134,7,134, + 2,135,7,135,2,136,7,136,2,137,7,137,2,138,7,138,2,139,7,139,2,140,7,140, + 2,141,7,141,2,142,7,142,2,143,7,143,2,144,7,144,2,145,7,145,2,146,7,146, + 2,147,7,147,2,148,7,148,2,149,7,149,2,150,7,150,2,151,7,151,2,152,7,152, + 2,153,7,153,2,154,7,154,2,155,7,155,2,156,7,156,2,157,7,157,2,158,7,158, + 2,159,7,159,2,160,7,160,2,161,7,161,2,162,7,162,2,163,7,163,2,164,7,164, + 2,165,7,165,2,166,7,166,2,167,7,167,2,168,7,168,2,169,7,169,2,170,7,170, + 2,171,7,171,2,172,7,172,2,173,7,173,2,174,7,174,2,175,7,175,2,176,7,176, + 2,177,7,177,2,178,7,178,2,179,7,179,2,180,7,180,2,181,7,181,2,182,7,182, + 2,183,7,183,2,184,7,184,2,185,7,185,2,186,7,186,2,187,7,187,2,188,7,188, + 2,189,7,189,2,190,7,190,2,191,7,191,2,192,7,192,2,193,7,193,2,194,7,194, + 2,195,7,195,2,196,7,196,2,197,7,197,2,198,7,198,2,199,7,199,2,200,7,200, + 2,201,7,201,2,202,7,202,2,203,7,203,2,204,7,204,2,205,7,205,2,206,7,206, + 2,207,7,207,2,208,7,208,2,209,7,209,2,210,7,210,2,211,7,211,2,212,7,212, + 2,213,7,213,2,214,7,214,2,215,7,215,2,216,7,216,2,217,7,217,2,218,7,218, + 2,219,7,219,2,220,7,220,2,221,7,221,2,222,7,222,2,223,7,223,2,224,7,224, + 2,225,7,225,2,226,7,226,2,227,7,227,2,228,7,228,2,229,7,229,2,230,7,230, + 2,231,7,231,2,232,7,232,2,233,7,233,2,234,7,234,2,235,7,235,2,236,7,236, + 2,237,7,237,2,238,7,238,2,239,7,239,2,240,7,240,2,241,7,241,2,242,7,242, + 2,243,7,243,2,244,7,244,2,245,7,245,2,246,7,246,2,247,7,247,2,248,7,248, + 2,249,7,249,2,250,7,250,2,251,7,251,2,252,7,252,2,253,7,253,2,254,7,254, + 2,255,7,255,2,256,7,256,2,257,7,257,2,258,7,258,2,259,7,259,2,260,7,260, + 2,261,7,261,2,262,7,262,2,263,7,263,2,264,7,264,2,265,7,265,2,266,7,266, + 2,267,7,267,2,268,7,268,2,269,7,269,1,0,1,0,1,1,1,1,1,1,1,2,3,2,547,8, + 2,1,2,1,2,1,2,1,2,3,2,553,8,2,1,3,1,3,1,4,1,4,1,4,1,4,1,4,1,4,3,4,563, + 8,4,1,5,1,5,1,6,1,6,1,6,1,6,5,6,571,8,6,10,6,12,6,574,9,6,1,6,1,6,1,7, + 1,7,1,7,1,7,3,7,582,8,7,1,7,1,7,1,7,3,7,587,8,7,1,7,1,7,1,8,1,8,1,8,3, + 8,594,8,8,1,9,1,9,1,9,1,9,3,9,600,8,9,1,10,1,10,1,10,1,10,1,10,1,10,1, + 10,1,10,1,10,1,10,3,10,612,8,10,1,10,3,10,615,8,10,1,10,1,10,1,11,5,11, + 620,8,11,10,11,12,11,623,9,11,1,12,5,12,626,8,12,10,12,12,12,629,9,12, + 1,13,1,13,3,13,633,8,13,1,13,1,13,3,13,637,8,13,1,14,1,14,1,15,1,15,1, + 16,1,16,3,16,645,8,16,1,17,1,17,1,17,1,17,3,17,651,8,17,1,17,1,17,3,17, + 655,8,17,1,18,3,18,658,8,18,1,18,1,18,1,18,1,19,1,19,1,19,3,19,666,8,19, + 1,19,1,19,1,20,1,20,1,20,5,20,673,8,20,10,20,12,20,676,9,20,1,21,1,21, + 1,21,1,21,1,21,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,3,22,691,8,22,1, + 23,1,23,1,23,1,23,1,23,1,23,1,23,3,23,700,8,23,1,24,1,24,1,24,1,24,1,24, + 1,24,1,24,1,24,1,25,1,25,1,26,1,26,3,26,714,8,26,1,26,3,26,717,8,26,1, + 26,3,26,720,8,26,1,27,1,27,1,27,5,27,725,8,27,10,27,12,27,728,9,27,1,27, + 5,27,731,8,27,10,27,12,27,734,9,27,1,27,1,27,1,27,1,27,1,28,1,28,1,28, + 1,28,1,28,1,28,1,28,1,28,1,28,1,28,1,28,1,28,1,28,1,28,1,28,1,28,1,28, + 1,28,1,28,1,28,1,28,3,28,761,8,28,1,29,5,29,764,8,29,10,29,12,29,767,9, + 29,1,30,1,30,1,30,1,30,3,30,773,8,30,3,30,775,8,30,1,30,1,30,1,30,1,30, + 3,30,781,8,30,3,30,783,8,30,1,31,1,31,1,31,1,31,1,31,1,31,3,31,791,8,31, + 1,32,1,32,1,32,1,32,1,32,1,32,3,32,799,8,32,1,32,3,32,802,8,32,1,32,1, + 32,1,32,1,32,1,32,1,32,1,32,3,32,811,8,32,1,32,1,32,1,33,5,33,816,8,33, + 10,33,12,33,819,9,33,1,34,1,34,3,34,823,8,34,1,34,1,34,1,34,1,34,1,35, + 1,35,1,35,1,35,1,35,5,35,834,8,35,10,35,12,35,837,9,35,1,36,3,36,840,8, + 36,1,36,1,36,3,36,844,8,36,1,36,1,36,1,36,4,36,849,8,36,11,36,12,36,850, + 1,36,1,36,1,36,3,36,856,8,36,1,36,3,36,859,8,36,1,36,1,36,1,37,1,37,1, + 37,1,37,1,37,1,38,1,38,1,38,1,38,3,38,872,8,38,1,39,1,39,1,39,5,39,877, + 8,39,10,39,12,39,880,9,39,1,40,1,40,1,40,1,40,1,40,3,40,887,8,40,1,40, + 3,40,890,8,40,1,40,1,40,1,40,1,40,1,41,1,41,1,41,3,41,899,8,41,1,41,3, + 41,902,8,41,1,41,3,41,905,8,41,1,41,1,41,1,41,3,41,910,8,41,1,41,1,41, + 1,42,1,42,1,42,3,42,917,8,42,1,42,3,42,920,8,42,1,42,1,42,1,43,1,43,1, + 43,1,43,1,44,1,44,3,44,930,8,44,1,45,3,45,933,8,45,1,45,3,45,936,8,45, + 1,45,1,45,1,45,1,46,1,46,1,46,3,46,944,8,46,1,46,3,46,947,8,46,1,46,1, + 46,1,46,1,47,3,47,953,8,47,1,47,3,47,956,8,47,1,47,1,47,1,47,1,48,1,48, + 1,48,1,48,3,48,965,8,48,1,48,1,48,1,48,3,48,970,8,48,1,48,3,48,973,8,48, + 1,48,1,48,1,48,1,49,3,49,979,8,49,1,49,3,49,982,8,49,1,49,1,49,1,49,3, + 49,987,8,49,1,50,1,50,1,50,3,50,992,8,50,1,50,3,50,995,8,50,1,50,1,50, + 1,50,1,51,1,51,1,51,1,51,1,51,1,51,1,51,3,51,1007,8,51,1,52,1,52,1,53, + 1,53,1,53,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,5,54,1022,8,54,10,54, + 12,54,1025,9,54,1,54,1,54,3,54,1029,8,54,1,55,1,55,1,55,1,55,3,55,1035, + 8,55,1,55,1,55,1,55,1,56,1,56,3,56,1042,8,56,1,57,1,57,1,57,1,57,1,58, + 1,58,1,58,3,58,1051,8,58,1,58,1,58,1,58,1,59,1,59,1,59,1,59,1,59,3,59, + 1061,8,59,3,59,1063,8,59,1,60,1,60,1,60,1,60,1,60,1,60,1,60,1,60,1,60, + 3,60,1074,8,60,1,60,3,60,1077,8,60,1,60,1,60,1,61,1,61,1,61,3,61,1084, + 8,61,1,62,5,62,1087,8,62,10,62,12,62,1090,9,62,1,63,1,63,3,63,1094,8,63, + 1,64,1,64,1,64,1,64,1,64,1,65,1,65,1,65,1,65,1,65,1,65,3,65,1107,8,65, + 1,65,1,65,1,66,1,66,1,66,1,66,1,66,1,67,1,67,1,67,3,67,1119,8,67,1,68, + 5,68,1122,8,68,10,68,12,68,1125,9,68,1,69,1,69,1,69,1,69,1,69,1,69,3,69, + 1133,8,69,1,69,3,69,1136,8,69,1,69,1,69,1,70,1,70,1,70,3,70,1143,8,70, + 1,71,1,71,1,71,1,71,5,71,1149,8,71,10,71,12,71,1152,9,71,1,71,1,71,1,72, + 1,72,1,72,3,72,1159,8,72,1,72,3,72,1162,8,72,1,73,4,73,1165,8,73,11,73, + 12,73,1166,1,73,1,73,1,74,1,74,1,74,1,75,1,75,3,75,1176,8,75,1,76,1,76, + 1,77,1,77,1,77,1,77,1,77,1,77,1,78,1,78,3,78,1188,8,78,1,79,1,79,1,79, + 3,79,1193,8,79,1,79,1,79,1,80,1,80,3,80,1199,8,80,1,81,1,81,1,81,1,81, + 1,81,1,82,1,82,3,82,1208,8,82,1,83,1,83,1,84,1,84,1,84,1,84,1,84,1,84, + 3,84,1218,8,84,1,84,1,84,1,84,3,84,1223,8,84,1,85,1,85,1,86,1,86,3,86, + 1229,8,86,1,87,1,87,1,87,5,87,1234,8,87,10,87,12,87,1237,9,87,1,88,1,88, + 1,88,1,88,1,88,1,88,1,88,3,88,1246,8,88,1,88,1,88,3,88,1250,8,88,1,88, + 3,88,1253,8,88,1,88,1,88,1,89,1,89,1,89,1,89,1,89,1,89,1,89,1,89,1,89, + 1,89,1,89,1,89,1,89,1,89,1,89,1,89,1,89,1,89,1,89,3,89,1276,8,89,1,90, + 5,90,1279,8,90,10,90,12,90,1282,9,90,1,91,1,91,1,92,3,92,1287,8,92,1,92, + 3,92,1290,8,92,1,93,1,93,1,93,5,93,1295,8,93,10,93,12,93,1298,9,93,1,93, + 1,93,3,93,1302,8,93,1,94,1,94,1,94,1,94,1,95,1,95,1,95,3,95,1311,8,95, + 1,96,5,96,1314,8,96,10,96,12,96,1317,9,96,1,97,1,97,1,97,3,97,1322,8,97, + 1,98,1,98,3,98,1326,8,98,1,99,1,99,1,99,1,99,5,99,1332,8,99,10,99,12,99, + 1335,9,99,1,99,1,99,1,100,3,100,1340,8,100,1,100,1,100,3,100,1344,8,100, + 1,100,1,100,3,100,1348,8,100,1,100,1,100,1,101,1,101,1,101,1,101,1,101, + 1,101,5,101,1358,8,101,10,101,12,101,1361,9,101,3,101,1363,8,101,1,102, + 1,102,1,102,3,102,1368,8,102,1,102,1,102,1,102,1,102,1,102,1,102,1,102, + 3,102,1377,8,102,1,103,1,103,1,103,1,103,1,103,3,103,1384,8,103,1,103, + 1,103,1,104,1,104,1,105,1,105,3,105,1392,8,105,1,105,1,105,1,105,1,106, + 1,106,1,106,1,106,1,107,1,107,1,108,1,108,1,108,1,108,1,108,1,109,1,109, + 1,110,1,110,1,111,1,111,1,111,1,111,1,111,3,111,1417,8,111,1,112,1,112, + 1,112,1,112,1,112,1,112,1,113,1,113,1,113,1,113,1,113,3,113,1430,8,113, + 1,114,3,114,1433,8,114,1,114,1,114,1,114,1,114,1,114,3,114,1440,8,114, + 1,114,1,114,1,114,3,114,1445,8,114,1,114,1,114,1,114,1,115,1,115,1,115, + 3,115,1453,8,115,1,116,3,116,1456,8,116,1,116,1,116,1,116,3,116,1461,8, + 116,1,116,1,116,1,116,3,116,1466,8,116,1,116,1,116,1,117,1,117,1,117,3, + 117,1473,8,117,1,117,5,117,1476,8,117,10,117,12,117,1479,9,117,1,118,1, + 118,1,118,1,118,1,118,1,118,1,119,1,119,1,120,1,120,1,120,1,120,1,120, + 1,120,1,121,1,121,1,122,1,122,3,122,1499,8,122,1,123,1,123,1,123,5,123, + 1504,8,123,10,123,12,123,1507,9,123,1,124,1,124,1,124,1,124,1,124,1,124, + 1,124,1,124,1,125,1,125,1,125,1,125,1,125,1,125,1,125,1,125,1,126,1,126, + 1,126,1,126,1,127,1,127,1,128,1,128,1,128,5,128,1534,8,128,10,128,12,128, + 1537,9,128,1,129,1,129,1,129,1,129,1,129,1,129,1,129,1,129,1,129,5,129, + 1548,8,129,10,129,12,129,1551,9,129,1,129,1,129,1,129,3,129,1556,8,129, + 1,130,3,130,1559,8,130,1,130,1,130,1,130,1,130,1,130,1,130,1,130,1,130, + 1,130,5,130,1570,8,130,10,130,12,130,1573,9,130,1,130,1,130,3,130,1577, + 8,130,1,130,1,130,1,130,3,130,1582,8,130,1,130,1,130,1,131,1,131,1,131, + 1,132,1,132,1,132,1,132,5,132,1593,8,132,10,132,12,132,1596,9,132,1,132, + 1,132,1,133,1,133,1,133,1,133,1,134,1,134,1,134,1,134,1,134,5,134,1609, + 8,134,10,134,12,134,1612,9,134,1,134,1,134,1,135,3,135,1617,8,135,1,135, + 1,135,1,135,1,135,1,135,1,135,1,135,3,135,1626,8,135,1,135,1,135,3,135, + 1630,8,135,1,136,1,136,1,136,5,136,1635,8,136,10,136,12,136,1638,9,136, + 1,136,1,136,3,136,1642,8,136,1,137,3,137,1645,8,137,1,137,1,137,1,137, + 3,137,1650,8,137,1,137,1,137,1,137,3,137,1655,8,137,1,138,1,138,1,138, + 1,138,3,138,1661,8,138,1,139,1,139,1,139,1,139,1,139,1,140,3,140,1669, + 8,140,1,140,1,140,1,140,3,140,1674,8,140,1,140,1,140,1,140,1,140,3,140, + 1680,8,140,1,140,1,140,1,140,1,141,1,141,1,141,1,142,1,142,1,142,5,142, + 1691,8,142,10,142,12,142,1694,9,142,1,143,1,143,1,143,1,143,3,143,1700, + 8,143,1,144,1,144,1,144,1,144,1,144,1,144,1,144,1,145,1,145,1,145,1,145, + 1,145,1,145,3,145,1715,8,145,1,146,1,146,1,146,3,146,1720,8,146,1,146, + 1,146,1,146,1,146,3,146,1726,8,146,1,147,3,147,1729,8,147,1,147,1,147, + 1,147,3,147,1734,8,147,1,147,1,147,3,147,1738,8,147,1,147,1,147,3,147, + 1742,8,147,1,148,1,148,1,148,1,148,1,149,1,149,3,149,1750,8,149,1,150, + 1,150,3,150,1754,8,150,1,151,1,151,1,152,3,152,1759,8,152,1,152,1,152, + 1,152,3,152,1764,8,152,1,152,1,152,1,152,3,152,1769,8,152,1,153,1,153, + 1,153,1,153,3,153,1775,8,153,1,154,1,154,1,154,1,155,1,155,1,155,1,155, + 1,156,1,156,3,156,1786,8,156,1,157,1,157,1,157,1,157,1,157,3,157,1793, + 8,157,1,158,1,158,1,159,3,159,1798,8,159,1,159,3,159,1801,8,159,1,159, + 1,159,1,159,1,159,1,159,3,159,1808,8,159,1,159,1,159,1,160,1,160,1,161, + 1,161,1,162,1,162,1,162,3,162,1819,8,162,1,162,5,162,1822,8,162,10,162, + 12,162,1825,9,162,1,163,1,163,4,163,1829,8,163,11,163,12,163,1830,1,163, + 1,163,1,163,1,163,1,163,1,163,1,163,1,163,1,163,1,163,1,163,1,163,1,163, + 1,163,3,163,1847,8,163,3,163,1849,8,163,1,164,3,164,1852,8,164,1,164,1, + 164,3,164,1856,8,164,1,164,1,164,3,164,1860,8,164,1,164,1,164,1,165,3, + 165,1865,8,165,1,165,1,165,1,165,1,166,1,166,3,166,1872,8,166,1,167,1, + 167,1,167,1,167,3,167,1878,8,167,1,168,1,168,1,168,1,168,1,168,1,168,1, + 168,1,168,3,168,1888,8,168,1,168,3,168,1891,8,168,1,168,1,168,1,169,1, + 169,1,169,1,169,1,169,1,169,1,169,1,169,1,169,1,169,1,169,1,169,1,169, + 1,169,1,169,1,169,1,169,3,169,1912,8,169,1,170,5,170,1915,8,170,10,170, + 12,170,1918,9,170,1,171,1,171,1,171,1,171,1,171,1,171,1,171,3,171,1927, + 8,171,1,171,3,171,1930,8,171,1,171,1,171,1,172,1,172,1,172,1,172,1,172, + 1,172,1,172,1,172,1,172,1,172,1,172,1,172,1,172,1,172,1,172,1,172,1,172, + 1,172,3,172,1952,8,172,1,173,5,173,1955,8,173,10,173,12,173,1958,9,173, + 1,174,1,174,1,174,1,174,3,174,1964,8,174,3,174,1966,8,174,1,175,1,175, + 1,175,1,175,1,175,1,175,1,175,1,175,1,175,1,175,1,175,1,176,1,176,1,176, + 1,176,1,177,1,177,1,177,1,178,1,178,1,178,1,178,5,178,1990,8,178,10,178, + 12,178,1993,9,178,1,178,1,178,1,178,3,178,1998,8,178,1,179,1,179,1,179, + 1,179,1,179,1,179,1,180,1,180,1,181,1,181,1,181,1,181,1,181,1,181,1,182, + 1,182,3,182,2016,8,182,1,183,1,183,1,183,1,183,1,183,1,183,1,183,1,183, + 1,183,1,183,1,183,3,183,2029,8,183,1,184,1,184,1,184,1,184,1,184,3,184, + 2036,8,184,1,185,1,185,1,185,1,186,1,186,1,186,1,186,1,186,3,186,2046, + 8,186,1,187,3,187,2049,8,187,1,187,1,187,1,187,1,188,1,188,1,188,1,188, + 3,188,2058,8,188,1,188,1,188,1,188,1,188,3,188,2064,8,188,1,189,1,189, + 1,189,1,189,1,189,1,189,1,189,1,189,1,189,1,189,1,189,1,189,1,189,1,189, + 1,189,1,189,1,189,3,189,2083,8,189,1,190,5,190,2086,8,190,10,190,12,190, + 2089,9,190,1,191,1,191,1,191,1,191,1,191,1,191,1,191,1,191,1,191,1,191, + 1,191,1,191,1,191,3,191,2104,8,191,1,192,5,192,2107,8,192,10,192,12,192, + 2110,9,192,1,193,1,193,3,193,2114,8,193,1,194,3,194,2117,8,194,1,194,3, + 194,2120,8,194,1,194,1,194,1,194,1,194,1,194,3,194,2127,8,194,1,194,3, + 194,2130,8,194,1,194,1,194,1,194,1,194,1,194,3,194,2137,8,194,1,194,1, + 194,3,194,2141,8,194,1,194,1,194,1,195,5,195,2146,8,195,10,195,12,195, + 2149,9,195,1,196,1,196,1,196,1,196,1,196,1,196,1,196,3,196,2158,8,196, + 1,197,1,197,1,197,1,197,1,197,1,197,1,197,1,197,1,197,1,197,1,197,1,197, + 1,197,1,197,1,197,1,197,1,197,3,197,2177,8,197,1,198,3,198,2180,8,198, + 1,199,1,199,1,199,1,199,1,199,3,199,2187,8,199,1,200,1,200,1,200,1,200, + 3,200,2193,8,200,1,201,3,201,2196,8,201,1,202,1,202,3,202,2200,8,202,1, + 203,1,203,1,203,1,203,1,203,1,203,1,203,3,203,2209,8,203,1,204,1,204,1, + 204,1,204,1,204,3,204,2216,8,204,1,205,1,205,1,205,1,206,1,206,1,206,1, + 206,5,206,2225,8,206,10,206,12,206,2228,9,206,1,206,1,206,1,207,1,207, + 1,207,1,208,1,208,1,208,1,209,1,209,1,209,5,209,2241,8,209,10,209,12,209, + 2244,9,209,1,210,1,210,4,210,2248,8,210,11,210,12,210,2249,1,210,1,210, + 1,210,3,210,2255,8,210,1,211,1,211,1,211,1,211,3,211,2261,8,211,1,212, + 1,212,1,213,3,213,2266,8,213,1,213,1,213,1,213,1,213,3,213,2272,8,213, + 1,213,1,213,1,214,1,214,1,214,1,214,1,214,3,214,2281,8,214,1,215,3,215, + 2284,8,215,1,215,1,215,3,215,2288,8,215,1,215,1,215,1,216,1,216,1,216, + 3,216,2295,8,216,1,217,1,217,3,217,2299,8,217,1,218,1,218,1,218,1,218, + 1,218,1,219,1,219,1,219,1,219,1,219,5,219,2311,8,219,10,219,12,219,2314, + 9,219,1,219,1,219,1,219,1,219,1,220,1,220,1,220,1,220,3,220,2324,8,220, + 1,220,1,220,1,220,1,220,3,220,2330,8,220,1,220,1,220,1,220,1,221,1,221, + 1,221,1,221,1,222,1,222,3,222,2341,8,222,1,223,1,223,1,223,1,223,3,223, + 2347,8,223,1,223,1,223,1,223,1,223,1,223,1,224,1,224,1,224,1,224,3,224, + 2358,8,224,1,224,1,224,1,224,3,224,2363,8,224,1,224,1,224,1,224,1,225, + 1,225,1,225,1,225,1,225,1,225,1,225,1,225,5,225,2376,8,225,10,225,12,225, + 2379,9,225,1,226,1,226,1,226,1,227,1,227,1,227,5,227,2387,8,227,10,227, + 12,227,2390,9,227,1,228,5,228,2393,8,228,10,228,12,228,2396,9,228,1,229, + 1,229,1,229,1,229,1,229,1,229,1,229,1,229,1,229,1,229,1,229,1,229,1,229, + 3,229,2411,8,229,1,230,1,230,1,230,1,230,3,230,2417,8,230,1,231,1,231, + 1,232,3,232,2422,8,232,1,232,1,232,1,232,3,232,2427,8,232,1,233,1,233, + 1,233,1,233,1,233,3,233,2434,8,233,1,233,1,233,3,233,2438,8,233,1,233, + 1,233,1,234,1,234,1,235,1,235,1,235,5,235,2447,8,235,10,235,12,235,2450, + 9,235,1,235,1,235,3,235,2454,8,235,1,236,1,236,1,236,1,236,3,236,2460, + 8,236,1,236,1,236,3,236,2464,8,236,1,236,1,236,1,237,3,237,2469,8,237, + 1,237,1,237,1,237,1,237,5,237,2475,8,237,10,237,12,237,2478,9,237,1,238, + 3,238,2481,8,238,1,238,1,238,1,239,3,239,2486,8,239,1,240,1,240,1,240, + 1,240,1,240,3,240,2493,8,240,1,240,1,240,1,241,3,241,2498,8,241,1,241, + 1,241,1,242,1,242,1,242,1,242,1,242,1,243,1,243,1,243,1,243,1,243,1,244, + 1,244,1,244,1,244,1,244,1,244,1,244,3,244,2519,8,244,1,244,3,244,2522, + 8,244,1,244,1,244,1,245,1,245,1,245,1,246,1,246,1,246,1,246,1,246,1,246, + 1,246,1,246,1,246,1,246,1,246,1,246,1,246,1,246,1,246,1,246,1,246,3,246, + 2546,8,246,1,247,5,247,2549,8,247,10,247,12,247,2552,9,247,1,248,1,248, + 1,248,1,248,1,248,1,248,3,248,2560,8,248,1,249,1,249,1,249,1,249,1,249, + 1,249,1,249,1,249,1,250,1,250,1,251,1,251,3,251,2574,8,251,1,252,5,252, + 2577,8,252,10,252,12,252,2580,9,252,1,253,1,253,1,253,1,253,1,253,1,253, + 1,254,3,254,2589,8,254,1,254,1,254,3,254,2593,8,254,1,255,1,255,1,255, + 1,255,3,255,2599,8,255,1,256,1,256,3,256,2603,8,256,1,257,1,257,1,257, + 1,257,5,257,2609,8,257,10,257,12,257,2612,9,257,1,258,1,258,1,258,1,259, + 1,259,1,259,5,259,2620,8,259,10,259,12,259,2623,9,259,1,260,1,260,1,260, + 1,260,1,260,1,261,1,261,3,261,2632,8,261,1,262,1,262,1,262,1,262,1,262, + 3,262,2639,8,262,1,263,1,263,1,263,1,263,1,263,5,263,2646,8,263,10,263, + 12,263,2649,9,263,1,263,1,263,1,263,1,263,1,264,1,264,1,264,1,264,5,264, + 2659,8,264,10,264,12,264,2662,9,264,1,264,1,264,1,265,3,265,2667,8,265, + 1,265,1,265,1,265,3,265,2672,8,265,1,266,3,266,2675,8,266,1,266,1,266, + 1,266,1,266,1,266,1,266,3,266,2683,8,266,1,266,1,266,1,267,3,267,2688, + 8,267,1,267,1,267,3,267,2692,8,267,1,267,3,267,2695,8,267,1,267,3,267, + 2698,8,267,1,267,1,267,1,268,1,268,1,268,5,268,2705,8,268,10,268,12,268, + 2708,9,268,1,268,3,268,2711,8,268,1,269,1,269,1,269,3,269,2716,8,269,1, + 269,1,269,1,269,3,269,2721,8,269,3,269,2723,8,269,1,269,0,0,270,0,2,4, + 6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52, + 54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100, + 102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136, + 138,140,142,144,146,148,150,152,154,156,158,160,162,164,166,168,170,172, + 174,176,178,180,182,184,186,188,190,192,194,196,198,200,202,204,206,208, + 210,212,214,216,218,220,222,224,226,228,230,232,234,236,238,240,242,244, + 246,248,250,252,254,256,258,260,262,264,266,268,270,272,274,276,278,280, + 282,284,286,288,290,292,294,296,298,300,302,304,306,308,310,312,314,316, + 318,320,322,324,326,328,330,332,334,336,338,340,342,344,346,348,350,352, + 354,356,358,360,362,364,366,368,370,372,374,376,378,380,382,384,386,388, + 390,392,394,396,398,400,402,404,406,408,410,412,414,416,418,420,422,424, + 426,428,430,432,434,436,438,440,442,444,446,448,450,452,454,456,458,460, + 462,464,466,468,470,472,474,476,478,480,482,484,486,488,490,492,494,496, + 498,500,502,504,506,508,510,512,514,516,518,520,522,524,526,528,530,532, + 534,536,538,0,16,2,0,118,118,120,120,2,0,156,156,164,165,2,0,25,25,103, + 103,15,0,8,8,19,21,27,27,31,31,34,34,37,37,45,45,49,49,67,67,72,72,92, + 92,99,99,106,106,108,108,111,111,2,0,41,41,66,66,2,0,40,40,75,75,1,0,125, + 126,2,0,23,23,152,152,5,0,7,7,53,53,58,58,64,64,116,117,5,0,16,16,41,41, + 43,43,48,48,66,66,3,0,52,52,81,81,162,163,4,0,138,143,146,147,150,150, + 166,168,3,0,87,88,93,94,96,97,2,0,17,17,84,84,1,0,164,165,2,0,34,34,72, + 72,2949,0,540,1,0,0,0,2,542,1,0,0,0,4,552,1,0,0,0,6,554,1,0,0,0,8,562, + 1,0,0,0,10,564,1,0,0,0,12,566,1,0,0,0,14,577,1,0,0,0,16,593,1,0,0,0,18, + 599,1,0,0,0,20,601,1,0,0,0,22,621,1,0,0,0,24,627,1,0,0,0,26,636,1,0,0, + 0,28,638,1,0,0,0,30,640,1,0,0,0,32,644,1,0,0,0,34,646,1,0,0,0,36,657,1, + 0,0,0,38,665,1,0,0,0,40,669,1,0,0,0,42,677,1,0,0,0,44,690,1,0,0,0,46,692, + 1,0,0,0,48,701,1,0,0,0,50,709,1,0,0,0,52,713,1,0,0,0,54,721,1,0,0,0,56, + 760,1,0,0,0,58,765,1,0,0,0,60,774,1,0,0,0,62,784,1,0,0,0,64,792,1,0,0, + 0,66,817,1,0,0,0,68,820,1,0,0,0,70,828,1,0,0,0,72,839,1,0,0,0,74,862,1, + 0,0,0,76,871,1,0,0,0,78,873,1,0,0,0,80,881,1,0,0,0,82,895,1,0,0,0,84,913, + 1,0,0,0,86,923,1,0,0,0,88,929,1,0,0,0,90,932,1,0,0,0,92,940,1,0,0,0,94, + 952,1,0,0,0,96,960,1,0,0,0,98,978,1,0,0,0,100,988,1,0,0,0,102,1006,1,0, + 0,0,104,1008,1,0,0,0,106,1010,1,0,0,0,108,1013,1,0,0,0,110,1030,1,0,0, + 0,112,1041,1,0,0,0,114,1043,1,0,0,0,116,1047,1,0,0,0,118,1055,1,0,0,0, + 120,1064,1,0,0,0,122,1083,1,0,0,0,124,1088,1,0,0,0,126,1093,1,0,0,0,128, + 1095,1,0,0,0,130,1100,1,0,0,0,132,1110,1,0,0,0,134,1118,1,0,0,0,136,1123, + 1,0,0,0,138,1126,1,0,0,0,140,1142,1,0,0,0,142,1144,1,0,0,0,144,1161,1, + 0,0,0,146,1164,1,0,0,0,148,1170,1,0,0,0,150,1175,1,0,0,0,152,1177,1,0, + 0,0,154,1179,1,0,0,0,156,1187,1,0,0,0,158,1192,1,0,0,0,160,1198,1,0,0, + 0,162,1200,1,0,0,0,164,1207,1,0,0,0,166,1209,1,0,0,0,168,1222,1,0,0,0, + 170,1224,1,0,0,0,172,1226,1,0,0,0,174,1230,1,0,0,0,176,1238,1,0,0,0,178, + 1275,1,0,0,0,180,1280,1,0,0,0,182,1283,1,0,0,0,184,1286,1,0,0,0,186,1301, + 1,0,0,0,188,1303,1,0,0,0,190,1310,1,0,0,0,192,1315,1,0,0,0,194,1321,1, + 0,0,0,196,1325,1,0,0,0,198,1327,1,0,0,0,200,1339,1,0,0,0,202,1362,1,0, + 0,0,204,1376,1,0,0,0,206,1378,1,0,0,0,208,1387,1,0,0,0,210,1391,1,0,0, + 0,212,1396,1,0,0,0,214,1400,1,0,0,0,216,1402,1,0,0,0,218,1407,1,0,0,0, + 220,1409,1,0,0,0,222,1411,1,0,0,0,224,1418,1,0,0,0,226,1424,1,0,0,0,228, + 1432,1,0,0,0,230,1452,1,0,0,0,232,1455,1,0,0,0,234,1472,1,0,0,0,236,1480, + 1,0,0,0,238,1486,1,0,0,0,240,1488,1,0,0,0,242,1494,1,0,0,0,244,1498,1, + 0,0,0,246,1500,1,0,0,0,248,1508,1,0,0,0,250,1516,1,0,0,0,252,1524,1,0, + 0,0,254,1528,1,0,0,0,256,1530,1,0,0,0,258,1538,1,0,0,0,260,1558,1,0,0, + 0,262,1585,1,0,0,0,264,1588,1,0,0,0,266,1599,1,0,0,0,268,1603,1,0,0,0, + 270,1629,1,0,0,0,272,1641,1,0,0,0,274,1644,1,0,0,0,276,1660,1,0,0,0,278, + 1662,1,0,0,0,280,1668,1,0,0,0,282,1684,1,0,0,0,284,1687,1,0,0,0,286,1699, + 1,0,0,0,288,1701,1,0,0,0,290,1714,1,0,0,0,292,1716,1,0,0,0,294,1728,1, + 0,0,0,296,1743,1,0,0,0,298,1749,1,0,0,0,300,1753,1,0,0,0,302,1755,1,0, + 0,0,304,1758,1,0,0,0,306,1774,1,0,0,0,308,1776,1,0,0,0,310,1779,1,0,0, + 0,312,1785,1,0,0,0,314,1792,1,0,0,0,316,1794,1,0,0,0,318,1797,1,0,0,0, + 320,1811,1,0,0,0,322,1813,1,0,0,0,324,1818,1,0,0,0,326,1848,1,0,0,0,328, + 1851,1,0,0,0,330,1864,1,0,0,0,332,1871,1,0,0,0,334,1877,1,0,0,0,336,1879, + 1,0,0,0,338,1911,1,0,0,0,340,1916,1,0,0,0,342,1919,1,0,0,0,344,1951,1, + 0,0,0,346,1956,1,0,0,0,348,1965,1,0,0,0,350,1967,1,0,0,0,352,1978,1,0, + 0,0,354,1982,1,0,0,0,356,1985,1,0,0,0,358,1999,1,0,0,0,360,2005,1,0,0, + 0,362,2007,1,0,0,0,364,2015,1,0,0,0,366,2028,1,0,0,0,368,2035,1,0,0,0, + 370,2037,1,0,0,0,372,2040,1,0,0,0,374,2048,1,0,0,0,376,2053,1,0,0,0,378, + 2082,1,0,0,0,380,2087,1,0,0,0,382,2103,1,0,0,0,384,2108,1,0,0,0,386,2113, + 1,0,0,0,388,2116,1,0,0,0,390,2147,1,0,0,0,392,2150,1,0,0,0,394,2176,1, + 0,0,0,396,2179,1,0,0,0,398,2181,1,0,0,0,400,2192,1,0,0,0,402,2195,1,0, + 0,0,404,2199,1,0,0,0,406,2201,1,0,0,0,408,2215,1,0,0,0,410,2217,1,0,0, + 0,412,2220,1,0,0,0,414,2231,1,0,0,0,416,2234,1,0,0,0,418,2237,1,0,0,0, + 420,2245,1,0,0,0,422,2256,1,0,0,0,424,2262,1,0,0,0,426,2265,1,0,0,0,428, + 2280,1,0,0,0,430,2283,1,0,0,0,432,2294,1,0,0,0,434,2298,1,0,0,0,436,2300, + 1,0,0,0,438,2312,1,0,0,0,440,2319,1,0,0,0,442,2334,1,0,0,0,444,2340,1, + 0,0,0,446,2342,1,0,0,0,448,2353,1,0,0,0,450,2367,1,0,0,0,452,2380,1,0, + 0,0,454,2383,1,0,0,0,456,2394,1,0,0,0,458,2410,1,0,0,0,460,2412,1,0,0, + 0,462,2418,1,0,0,0,464,2421,1,0,0,0,466,2428,1,0,0,0,468,2441,1,0,0,0, + 470,2453,1,0,0,0,472,2455,1,0,0,0,474,2468,1,0,0,0,476,2480,1,0,0,0,478, + 2485,1,0,0,0,480,2487,1,0,0,0,482,2497,1,0,0,0,484,2501,1,0,0,0,486,2506, + 1,0,0,0,488,2511,1,0,0,0,490,2525,1,0,0,0,492,2545,1,0,0,0,494,2550,1, + 0,0,0,496,2559,1,0,0,0,498,2561,1,0,0,0,500,2569,1,0,0,0,502,2573,1,0, + 0,0,504,2578,1,0,0,0,506,2581,1,0,0,0,508,2588,1,0,0,0,510,2598,1,0,0, + 0,512,2602,1,0,0,0,514,2604,1,0,0,0,516,2613,1,0,0,0,518,2616,1,0,0,0, + 520,2624,1,0,0,0,522,2631,1,0,0,0,524,2638,1,0,0,0,526,2640,1,0,0,0,528, + 2654,1,0,0,0,530,2666,1,0,0,0,532,2674,1,0,0,0,534,2687,1,0,0,0,536,2710, + 1,0,0,0,538,2722,1,0,0,0,540,541,7,0,0,0,541,1,1,0,0,0,542,543,5,2,0,0, + 543,544,3,508,254,0,544,3,1,0,0,0,545,547,5,42,0,0,546,545,1,0,0,0,546, + 547,1,0,0,0,547,548,1,0,0,0,548,553,3,202,101,0,549,553,3,324,162,0,550, + 553,3,508,254,0,551,553,5,63,0,0,552,546,1,0,0,0,552,549,1,0,0,0,552,550, + 1,0,0,0,552,551,1,0,0,0,553,5,1,0,0,0,554,555,3,40,20,0,555,7,1,0,0,0, + 556,563,3,4,2,0,557,558,3,324,162,0,558,559,5,157,0,0,559,560,3,4,2,0, + 560,561,5,158,0,0,561,563,1,0,0,0,562,556,1,0,0,0,562,557,1,0,0,0,563, + 9,1,0,0,0,564,565,7,1,0,0,565,11,1,0,0,0,566,567,5,157,0,0,567,572,3,158, + 79,0,568,569,5,155,0,0,569,571,3,158,79,0,570,568,1,0,0,0,571,574,1,0, + 0,0,572,570,1,0,0,0,572,573,1,0,0,0,573,575,1,0,0,0,574,572,1,0,0,0,575, + 576,5,158,0,0,576,13,1,0,0,0,577,578,5,5,0,0,578,581,3,16,8,0,579,580, + 5,161,0,0,580,582,3,508,254,0,581,579,1,0,0,0,581,582,1,0,0,0,582,583, + 1,0,0,0,583,584,5,44,0,0,584,586,3,324,162,0,585,587,3,472,236,0,586,585, + 1,0,0,0,586,587,1,0,0,0,587,588,1,0,0,0,588,589,5,154,0,0,589,15,1,0,0, + 0,590,594,3,254,127,0,591,594,5,134,0,0,592,594,5,119,0,0,593,590,1,0, + 0,0,593,591,1,0,0,0,593,592,1,0,0,0,594,17,1,0,0,0,595,596,5,55,0,0,596, + 600,3,508,254,0,597,598,5,55,0,0,598,600,3,406,203,0,599,595,1,0,0,0,599, + 597,1,0,0,0,600,19,1,0,0,0,601,602,5,8,0,0,602,603,3,254,127,0,603,604, + 5,61,0,0,604,605,3,324,162,0,605,606,5,44,0,0,606,607,3,22,11,0,607,608, + 5,12,0,0,608,609,3,24,12,0,609,611,5,26,0,0,610,612,5,8,0,0,611,610,1, + 0,0,0,611,612,1,0,0,0,612,614,1,0,0,0,613,615,3,254,127,0,614,613,1,0, + 0,0,614,615,1,0,0,0,615,616,1,0,0,0,616,617,5,154,0,0,617,21,1,0,0,0,618, + 620,3,56,28,0,619,618,1,0,0,0,620,623,1,0,0,0,621,619,1,0,0,0,621,622, + 1,0,0,0,622,23,1,0,0,0,623,621,1,0,0,0,624,626,3,102,51,0,625,624,1,0, + 0,0,626,629,1,0,0,0,627,625,1,0,0,0,627,628,1,0,0,0,628,25,1,0,0,0,629, + 627,1,0,0,0,630,632,3,264,132,0,631,633,3,28,14,0,632,631,1,0,0,0,632, + 633,1,0,0,0,633,637,1,0,0,0,634,635,5,63,0,0,635,637,3,28,14,0,636,630, + 1,0,0,0,636,634,1,0,0,0,637,27,1,0,0,0,638,639,3,160,80,0,639,29,1,0,0, + 0,640,641,3,428,214,0,641,31,1,0,0,0,642,645,3,526,263,0,643,645,3,132, + 66,0,644,642,1,0,0,0,644,643,1,0,0,0,645,33,1,0,0,0,646,647,5,10,0,0,647, + 650,3,104,52,0,648,649,5,85,0,0,649,651,3,202,101,0,650,648,1,0,0,0,650, + 651,1,0,0,0,651,654,1,0,0,0,652,653,5,90,0,0,653,655,3,202,101,0,654,652, + 1,0,0,0,654,655,1,0,0,0,655,35,1,0,0,0,656,658,3,308,154,0,657,656,1,0, + 0,0,657,658,1,0,0,0,658,659,1,0,0,0,659,660,3,34,17,0,660,661,5,154,0, + 0,661,37,1,0,0,0,662,663,3,222,111,0,663,664,5,148,0,0,664,666,1,0,0,0, + 665,662,1,0,0,0,665,666,1,0,0,0,666,667,1,0,0,0,667,668,3,8,4,0,668,39, + 1,0,0,0,669,674,3,38,19,0,670,671,5,155,0,0,671,673,3,38,19,0,672,670, + 1,0,0,0,673,676,1,0,0,0,674,672,1,0,0,0,674,675,1,0,0,0,675,41,1,0,0,0, + 676,674,1,0,0,0,677,678,5,11,0,0,678,679,3,308,154,0,679,680,3,324,162, + 0,680,681,5,154,0,0,681,43,1,0,0,0,682,691,3,254,127,0,683,691,5,77,0, + 0,684,691,5,79,0,0,685,691,5,3,0,0,686,691,5,102,0,0,687,691,5,83,0,0, + 688,691,5,104,0,0,689,691,5,99,0,0,690,682,1,0,0,0,690,683,1,0,0,0,690, + 684,1,0,0,0,690,685,1,0,0,0,690,686,1,0,0,0,690,687,1,0,0,0,690,688,1, + 0,0,0,690,689,1,0,0,0,691,45,1,0,0,0,692,693,3,364,182,0,693,694,5,179, + 0,0,694,699,3,44,22,0,695,696,5,157,0,0,696,697,3,202,101,0,697,698,5, + 158,0,0,698,700,1,0,0,0,699,695,1,0,0,0,699,700,1,0,0,0,700,47,1,0,0,0, + 701,702,5,11,0,0,702,703,3,44,22,0,703,704,5,61,0,0,704,705,3,188,94,0, + 705,706,5,44,0,0,706,707,3,202,101,0,707,708,5,154,0,0,708,49,1,0,0,0, + 709,710,5,175,0,0,710,51,1,0,0,0,711,712,5,110,0,0,712,714,3,168,84,0, + 713,711,1,0,0,0,713,714,1,0,0,0,714,716,1,0,0,0,715,717,3,240,120,0,716, + 715,1,0,0,0,716,717,1,0,0,0,717,719,1,0,0,0,718,720,3,362,181,0,719,718, + 1,0,0,0,719,720,1,0,0,0,720,53,1,0,0,0,721,722,5,32,0,0,722,726,3,62,31, + 0,723,725,3,528,264,0,724,723,1,0,0,0,725,728,1,0,0,0,726,724,1,0,0,0, + 726,727,1,0,0,0,727,732,1,0,0,0,728,726,1,0,0,0,729,731,3,126,63,0,730, + 729,1,0,0,0,731,734,1,0,0,0,732,730,1,0,0,0,732,733,1,0,0,0,733,735,1, + 0,0,0,734,732,1,0,0,0,735,736,5,26,0,0,736,737,5,32,0,0,737,738,5,154, + 0,0,738,55,1,0,0,0,739,761,3,490,245,0,740,761,3,488,244,0,741,761,3,498, + 249,0,742,761,3,342,171,0,743,761,3,336,168,0,744,761,3,350,175,0,745, + 761,3,522,261,0,746,761,3,506,253,0,747,761,3,130,65,0,748,761,3,466,233, + 0,749,761,3,532,266,0,750,761,3,206,103,0,751,761,3,14,7,0,752,761,3,82, + 41,0,753,761,3,42,21,0,754,761,3,48,24,0,755,761,3,128,64,0,756,761,3, + 154,77,0,757,761,3,528,264,0,758,761,3,250,125,0,759,761,3,248,124,0,760, + 739,1,0,0,0,760,740,1,0,0,0,760,741,1,0,0,0,760,742,1,0,0,0,760,743,1, + 0,0,0,760,744,1,0,0,0,760,745,1,0,0,0,760,746,1,0,0,0,760,747,1,0,0,0, + 760,748,1,0,0,0,760,749,1,0,0,0,760,750,1,0,0,0,760,751,1,0,0,0,760,752, + 1,0,0,0,760,753,1,0,0,0,760,754,1,0,0,0,760,755,1,0,0,0,760,756,1,0,0, + 0,760,757,1,0,0,0,760,758,1,0,0,0,760,759,1,0,0,0,761,57,1,0,0,0,762,764, + 3,56,28,0,763,762,1,0,0,0,764,767,1,0,0,0,765,763,1,0,0,0,765,766,1,0, + 0,0,766,59,1,0,0,0,767,765,1,0,0,0,768,772,3,236,118,0,769,770,3,240,120, + 0,770,771,5,154,0,0,771,773,1,0,0,0,772,769,1,0,0,0,772,773,1,0,0,0,773, + 775,1,0,0,0,774,768,1,0,0,0,774,775,1,0,0,0,775,782,1,0,0,0,776,780,3, + 358,179,0,777,778,3,362,181,0,778,779,5,154,0,0,779,781,1,0,0,0,780,777, + 1,0,0,0,780,781,1,0,0,0,781,783,1,0,0,0,782,776,1,0,0,0,782,783,1,0,0, + 0,783,61,1,0,0,0,784,785,3,324,162,0,785,790,3,254,127,0,786,787,5,157, + 0,0,787,788,3,230,115,0,788,789,5,158,0,0,789,791,1,0,0,0,790,786,1,0, + 0,0,790,791,1,0,0,0,791,63,1,0,0,0,792,793,3,308,154,0,793,798,5,13,0, + 0,794,795,5,157,0,0,795,796,3,202,101,0,796,797,5,158,0,0,797,799,1,0, + 0,0,798,794,1,0,0,0,798,799,1,0,0,0,799,801,1,0,0,0,800,802,5,44,0,0,801, + 800,1,0,0,0,801,802,1,0,0,0,802,803,1,0,0,0,803,804,3,60,30,0,804,805, + 3,58,29,0,805,806,5,12,0,0,806,807,3,66,33,0,807,808,5,26,0,0,808,810, + 5,13,0,0,809,811,3,254,127,0,810,809,1,0,0,0,810,811,1,0,0,0,811,812,1, + 0,0,0,812,813,5,154,0,0,813,65,1,0,0,0,814,816,3,102,51,0,815,814,1,0, + 0,0,816,819,1,0,0,0,817,815,1,0,0,0,817,818,1,0,0,0,818,67,1,0,0,0,819, + 817,1,0,0,0,820,822,5,114,0,0,821,823,3,308,154,0,822,821,1,0,0,0,822, + 823,1,0,0,0,823,824,1,0,0,0,824,825,3,78,39,0,825,826,5,148,0,0,826,827, + 3,234,117,0,827,69,1,0,0,0,828,829,5,18,0,0,829,830,3,202,101,0,830,831, + 5,35,0,0,831,835,3,68,34,0,832,834,3,68,34,0,833,832,1,0,0,0,834,837,1, + 0,0,0,835,833,1,0,0,0,835,836,1,0,0,0,836,71,1,0,0,0,837,835,1,0,0,0,838, + 840,3,308,154,0,839,838,1,0,0,0,839,840,1,0,0,0,840,841,1,0,0,0,841,843, + 5,18,0,0,842,844,5,180,0,0,843,842,1,0,0,0,843,844,1,0,0,0,844,845,1,0, + 0,0,845,846,3,202,101,0,846,848,5,44,0,0,847,849,3,74,37,0,848,847,1,0, + 0,0,849,850,1,0,0,0,850,848,1,0,0,0,850,851,1,0,0,0,851,852,1,0,0,0,852, + 853,5,26,0,0,853,855,5,18,0,0,854,856,5,180,0,0,855,854,1,0,0,0,855,856, + 1,0,0,0,856,858,1,0,0,0,857,859,3,254,127,0,858,857,1,0,0,0,858,859,1, + 0,0,0,859,860,1,0,0,0,860,861,5,154,0,0,861,73,1,0,0,0,862,863,5,114,0, + 0,863,864,3,78,39,0,864,865,5,148,0,0,865,866,3,456,228,0,866,75,1,0,0, + 0,867,872,3,474,237,0,868,872,3,156,78,0,869,872,3,254,127,0,870,872,5, + 65,0,0,871,867,1,0,0,0,871,868,1,0,0,0,871,869,1,0,0,0,871,870,1,0,0,0, + 872,77,1,0,0,0,873,878,3,76,38,0,874,875,5,169,0,0,875,877,3,76,38,0,876, + 874,1,0,0,0,877,880,1,0,0,0,878,876,1,0,0,0,878,879,1,0,0,0,879,79,1,0, + 0,0,880,878,1,0,0,0,881,882,5,32,0,0,882,886,3,86,43,0,883,884,3,52,26, + 0,884,885,5,154,0,0,885,887,1,0,0,0,886,883,1,0,0,0,886,887,1,0,0,0,887, + 889,1,0,0,0,888,890,3,54,27,0,889,888,1,0,0,0,889,890,1,0,0,0,890,891, + 1,0,0,0,891,892,5,26,0,0,892,893,5,32,0,0,893,894,5,154,0,0,894,81,1,0, + 0,0,895,896,5,19,0,0,896,898,3,254,127,0,897,899,5,44,0,0,898,897,1,0, + 0,0,898,899,1,0,0,0,899,901,1,0,0,0,900,902,3,236,118,0,901,900,1,0,0, + 0,901,902,1,0,0,0,902,904,1,0,0,0,903,905,3,358,179,0,904,903,1,0,0,0, + 904,905,1,0,0,0,905,906,1,0,0,0,906,907,5,26,0,0,907,909,5,19,0,0,908, + 910,3,254,127,0,909,908,1,0,0,0,909,910,1,0,0,0,910,911,1,0,0,0,911,912, + 5,154,0,0,912,83,1,0,0,0,913,914,3,308,154,0,914,916,3,270,135,0,915,917, + 3,240,120,0,916,915,1,0,0,0,916,917,1,0,0,0,917,919,1,0,0,0,918,920,3, + 362,181,0,919,918,1,0,0,0,919,920,1,0,0,0,920,921,1,0,0,0,921,922,5,154, + 0,0,922,85,1,0,0,0,923,924,3,272,136,0,924,925,5,161,0,0,925,926,3,324, + 162,0,926,87,1,0,0,0,927,930,3,32,16,0,928,930,3,420,210,0,929,927,1,0, + 0,0,929,928,1,0,0,0,930,89,1,0,0,0,931,933,3,308,154,0,932,931,1,0,0,0, + 932,933,1,0,0,0,933,935,1,0,0,0,934,936,5,70,0,0,935,934,1,0,0,0,935,936, + 1,0,0,0,936,937,1,0,0,0,937,938,3,34,17,0,938,939,5,154,0,0,939,91,1,0, + 0,0,940,941,3,512,256,0,941,943,5,146,0,0,942,944,5,38,0,0,943,942,1,0, + 0,0,943,944,1,0,0,0,944,946,1,0,0,0,945,947,3,144,72,0,946,945,1,0,0,0, + 946,947,1,0,0,0,947,948,1,0,0,0,948,949,3,118,59,0,949,950,5,154,0,0,950, + 93,1,0,0,0,951,953,3,308,154,0,952,951,1,0,0,0,952,953,1,0,0,0,953,955, + 1,0,0,0,954,956,5,70,0,0,955,954,1,0,0,0,955,956,1,0,0,0,956,957,1,0,0, + 0,957,958,3,372,186,0,958,959,5,154,0,0,959,95,1,0,0,0,960,961,5,113,0, + 0,961,962,3,202,101,0,962,964,5,89,0,0,963,965,5,180,0,0,964,963,1,0,0, + 0,964,965,1,0,0,0,965,966,1,0,0,0,966,967,3,512,256,0,967,969,5,146,0, + 0,968,970,5,38,0,0,969,968,1,0,0,0,969,970,1,0,0,0,970,972,1,0,0,0,971, + 973,3,144,72,0,972,971,1,0,0,0,972,973,1,0,0,0,973,974,1,0,0,0,974,975, + 3,450,225,0,975,976,5,154,0,0,976,97,1,0,0,0,977,979,3,308,154,0,978,977, + 1,0,0,0,978,979,1,0,0,0,979,981,1,0,0,0,980,982,5,70,0,0,981,980,1,0,0, + 0,981,982,1,0,0,0,982,986,1,0,0,0,983,987,3,112,56,0,984,987,3,444,222, + 0,985,987,3,96,48,0,986,983,1,0,0,0,986,984,1,0,0,0,986,985,1,0,0,0,987, + 99,1,0,0,0,988,989,3,512,256,0,989,991,5,146,0,0,990,992,5,38,0,0,991, + 990,1,0,0,0,991,992,1,0,0,0,992,994,1,0,0,0,993,995,3,144,72,0,994,993, + 1,0,0,0,994,995,1,0,0,0,995,996,1,0,0,0,996,997,3,536,268,0,997,998,5, + 154,0,0,998,101,1,0,0,0,999,1007,3,64,32,0,1000,1007,3,388,194,0,1001, + 1007,3,94,47,0,1002,1007,3,90,45,0,1003,1007,3,98,49,0,1004,1007,3,84, + 42,0,1005,1007,3,232,116,0,1006,999,1,0,0,0,1006,1000,1,0,0,0,1006,1001, + 1,0,0,0,1006,1002,1,0,0,0,1006,1003,1,0,0,0,1006,1004,1,0,0,0,1006,1005, + 1,0,0,0,1007,103,1,0,0,0,1008,1009,3,202,101,0,1009,105,1,0,0,0,1010,1011, + 5,109,0,0,1011,1012,3,104,52,0,1012,107,1,0,0,0,1013,1014,3,202,101,0, + 1014,1015,5,114,0,0,1015,1023,3,104,52,0,1016,1017,5,28,0,0,1017,1018, + 3,202,101,0,1018,1019,5,114,0,0,1019,1020,3,104,52,0,1020,1022,1,0,0,0, + 1021,1016,1,0,0,0,1022,1025,1,0,0,0,1023,1021,1,0,0,0,1023,1024,1,0,0, + 0,1024,1028,1,0,0,0,1025,1023,1,0,0,0,1026,1027,5,28,0,0,1027,1029,3,202, + 101,0,1028,1026,1,0,0,0,1028,1029,1,0,0,0,1029,109,1,0,0,0,1030,1031,3, + 512,256,0,1031,1032,5,146,0,0,1032,1034,5,33,0,0,1033,1035,3,218,109,0, + 1034,1033,1,0,0,0,1034,1035,1,0,0,0,1035,1036,1,0,0,0,1036,1037,3,108, + 54,0,1037,1038,5,154,0,0,1038,111,1,0,0,0,1039,1042,3,116,58,0,1040,1042, + 3,110,55,0,1041,1039,1,0,0,0,1041,1040,1,0,0,0,1042,113,1,0,0,0,1043,1044, + 3,512,256,0,1044,1045,5,151,0,0,1045,1046,3,108,54,0,1046,115,1,0,0,0, + 1047,1048,3,512,256,0,1048,1050,5,146,0,0,1049,1051,3,144,72,0,1050,1049, + 1,0,0,0,1050,1051,1,0,0,0,1051,1052,1,0,0,0,1052,1053,3,118,59,0,1053, + 1054,5,154,0,0,1054,117,1,0,0,0,1055,1062,3,536,268,0,1056,1057,5,114, + 0,0,1057,1060,3,104,52,0,1058,1059,5,28,0,0,1059,1061,3,118,59,0,1060, + 1058,1,0,0,0,1060,1061,1,0,0,0,1061,1063,1,0,0,0,1062,1056,1,0,0,0,1062, + 1063,1,0,0,0,1063,119,1,0,0,0,1064,1065,5,20,0,0,1065,1066,3,254,127,0, + 1066,1067,5,61,0,0,1067,1068,3,324,162,0,1068,1069,5,44,0,0,1069,1070, + 3,124,62,0,1070,1071,3,54,27,0,1071,1073,5,26,0,0,1072,1074,5,20,0,0,1073, + 1072,1,0,0,0,1073,1074,1,0,0,0,1074,1076,1,0,0,0,1075,1077,3,254,127,0, + 1076,1075,1,0,0,0,1076,1077,1,0,0,0,1077,1078,1,0,0,0,1078,1079,5,154, + 0,0,1079,121,1,0,0,0,1080,1084,3,528,264,0,1081,1084,3,48,24,0,1082,1084, + 3,248,124,0,1083,1080,1,0,0,0,1083,1081,1,0,0,0,1083,1082,1,0,0,0,1084, + 123,1,0,0,0,1085,1087,3,122,61,0,1086,1085,1,0,0,0,1087,1090,1,0,0,0,1088, + 1086,1,0,0,0,1088,1089,1,0,0,0,1089,125,1,0,0,0,1090,1088,1,0,0,0,1091, + 1094,3,54,27,0,1092,1094,3,80,40,0,1093,1091,1,0,0,0,1093,1092,1,0,0,0, + 1094,127,1,0,0,0,1095,1096,5,32,0,0,1096,1097,3,86,43,0,1097,1098,3,52, + 26,0,1098,1099,5,154,0,0,1099,129,1,0,0,0,1100,1101,5,21,0,0,1101,1102, + 3,256,128,0,1102,1103,5,161,0,0,1103,1106,3,508,254,0,1104,1105,5,151, + 0,0,1105,1107,3,202,101,0,1106,1104,1,0,0,0,1106,1107,1,0,0,0,1107,1108, + 1,0,0,0,1108,1109,5,154,0,0,1109,131,1,0,0,0,1110,1111,5,9,0,0,1111,1112, + 3,264,132,0,1112,1113,5,61,0,0,1113,1114,3,508,254,0,1114,133,1,0,0,0, + 1115,1119,3,410,205,0,1116,1119,3,264,132,0,1117,1119,3,412,206,0,1118, + 1115,1,0,0,0,1118,1116,1,0,0,0,1118,1117,1,0,0,0,1119,135,1,0,0,0,1120, + 1122,3,140,70,0,1121,1120,1,0,0,0,1122,1125,1,0,0,0,1123,1121,1,0,0,0, + 1123,1124,1,0,0,0,1124,137,1,0,0,0,1125,1123,1,0,0,0,1126,1127,5,22,0, + 0,1127,1128,3,254,127,0,1128,1129,5,44,0,0,1129,1130,3,136,68,0,1130,1132, + 5,26,0,0,1131,1133,5,22,0,0,1132,1131,1,0,0,0,1132,1133,1,0,0,0,1133,1135, + 1,0,0,0,1134,1136,3,254,127,0,1135,1134,1,0,0,0,1135,1136,1,0,0,0,1136, + 1137,1,0,0,0,1137,1138,5,154,0,0,1138,139,1,0,0,0,1139,1143,3,310,155, + 0,1140,1143,3,528,264,0,1141,1143,3,142,71,0,1142,1139,1,0,0,0,1142,1140, + 1,0,0,0,1142,1141,1,0,0,0,1143,141,1,0,0,0,1144,1145,5,22,0,0,1145,1150, + 3,442,221,0,1146,1147,5,155,0,0,1147,1149,3,442,221,0,1148,1146,1,0,0, + 0,1149,1152,1,0,0,0,1150,1148,1,0,0,0,1150,1151,1,0,0,0,1151,1153,1,0, + 0,0,1152,1150,1,0,0,0,1153,1154,5,154,0,0,1154,143,1,0,0,0,1155,1162,5, + 105,0,0,1156,1157,5,80,0,0,1157,1159,3,202,101,0,1158,1156,1,0,0,0,1158, + 1159,1,0,0,0,1159,1160,1,0,0,0,1160,1162,5,42,0,0,1161,1155,1,0,0,0,1161, + 1158,1,0,0,0,1162,145,1,0,0,0,1163,1165,3,148,74,0,1164,1163,1,0,0,0,1165, + 1166,1,0,0,0,1166,1164,1,0,0,0,1166,1167,1,0,0,0,1167,1168,1,0,0,0,1168, + 1169,5,0,0,1,1169,147,1,0,0,0,1170,1171,3,136,68,0,1171,1172,3,312,156, + 0,1172,149,1,0,0,0,1173,1176,3,254,127,0,1174,1176,5,119,0,0,1175,1173, + 1,0,0,0,1175,1174,1,0,0,0,1176,151,1,0,0,0,1177,1178,7,2,0,0,1178,153, + 1,0,0,0,1179,1180,5,24,0,0,1180,1181,3,252,126,0,1181,1182,5,4,0,0,1182, + 1183,3,202,101,0,1183,1184,5,154,0,0,1184,155,1,0,0,0,1185,1188,3,508, + 254,0,1186,1188,3,408,204,0,1187,1185,1,0,0,0,1187,1186,1,0,0,0,1188,157, + 1,0,0,0,1189,1190,3,78,39,0,1190,1191,5,148,0,0,1191,1193,1,0,0,0,1192, + 1189,1,0,0,0,1192,1193,1,0,0,0,1193,1194,1,0,0,0,1194,1195,3,202,101,0, + 1195,159,1,0,0,0,1196,1199,3,26,13,0,1197,1199,3,412,206,0,1198,1196,1, + 0,0,0,1198,1197,1,0,0,0,1199,161,1,0,0,0,1200,1201,3,256,128,0,1201,1202, + 5,161,0,0,1202,1203,3,166,83,0,1203,1204,5,154,0,0,1204,163,1,0,0,0,1205, + 1208,3,30,15,0,1206,1208,3,418,209,0,1207,1205,1,0,0,0,1207,1206,1,0,0, + 0,1208,165,1,0,0,0,1209,1210,3,508,254,0,1210,167,1,0,0,0,1211,1212,5, + 27,0,0,1212,1217,3,324,162,0,1213,1214,5,157,0,0,1214,1215,3,254,127,0, + 1215,1216,5,158,0,0,1216,1218,1,0,0,0,1217,1213,1,0,0,0,1217,1218,1,0, + 0,0,1218,1223,1,0,0,0,1219,1220,5,20,0,0,1220,1223,3,324,162,0,1221,1223, + 5,63,0,0,1222,1211,1,0,0,0,1222,1219,1,0,0,0,1222,1221,1,0,0,0,1223,169, + 1,0,0,0,1224,1225,7,3,0,0,1225,171,1,0,0,0,1226,1228,3,170,85,0,1227,1229, + 5,152,0,0,1228,1227,1,0,0,0,1228,1229,1,0,0,0,1229,173,1,0,0,0,1230,1235, + 3,172,86,0,1231,1232,5,155,0,0,1232,1234,3,172,86,0,1233,1231,1,0,0,0, + 1234,1237,1,0,0,0,1235,1233,1,0,0,0,1235,1236,1,0,0,0,1236,175,1,0,0,0, + 1237,1235,1,0,0,0,1238,1239,5,27,0,0,1239,1240,3,254,127,0,1240,1241,5, + 44,0,0,1241,1242,3,184,92,0,1242,1245,3,180,90,0,1243,1244,5,12,0,0,1244, + 1246,3,192,96,0,1245,1243,1,0,0,0,1245,1246,1,0,0,0,1246,1247,1,0,0,0, + 1247,1249,5,26,0,0,1248,1250,5,27,0,0,1249,1248,1,0,0,0,1249,1250,1,0, + 0,0,1250,1252,1,0,0,0,1251,1253,3,254,127,0,1252,1251,1,0,0,0,1252,1253, + 1,0,0,0,1253,1254,1,0,0,0,1254,1255,5,154,0,0,1255,177,1,0,0,0,1256,1276, + 3,490,245,0,1257,1276,3,488,244,0,1258,1276,3,498,249,0,1259,1276,3,342, + 171,0,1260,1276,3,336,168,0,1261,1276,3,350,175,0,1262,1276,3,522,261, + 0,1263,1276,3,506,253,0,1264,1276,3,130,65,0,1265,1276,3,466,233,0,1266, + 1276,3,532,266,0,1267,1276,3,206,103,0,1268,1276,3,14,7,0,1269,1276,3, + 42,21,0,1270,1276,3,48,24,0,1271,1276,3,154,77,0,1272,1276,3,528,264,0, + 1273,1276,3,250,125,0,1274,1276,3,248,124,0,1275,1256,1,0,0,0,1275,1257, + 1,0,0,0,1275,1258,1,0,0,0,1275,1259,1,0,0,0,1275,1260,1,0,0,0,1275,1261, + 1,0,0,0,1275,1262,1,0,0,0,1275,1263,1,0,0,0,1275,1264,1,0,0,0,1275,1265, + 1,0,0,0,1275,1266,1,0,0,0,1275,1267,1,0,0,0,1275,1268,1,0,0,0,1275,1269, + 1,0,0,0,1275,1270,1,0,0,0,1275,1271,1,0,0,0,1275,1272,1,0,0,0,1275,1273, + 1,0,0,0,1275,1274,1,0,0,0,1276,179,1,0,0,0,1277,1279,3,178,89,0,1278,1277, + 1,0,0,0,1279,1282,1,0,0,0,1280,1278,1,0,0,0,1280,1281,1,0,0,0,1281,181, + 1,0,0,0,1282,1280,1,0,0,0,1283,1284,3,194,97,0,1284,183,1,0,0,0,1285,1287, + 3,236,118,0,1286,1285,1,0,0,0,1286,1287,1,0,0,0,1287,1289,1,0,0,0,1288, + 1290,3,358,179,0,1289,1288,1,0,0,0,1289,1290,1,0,0,0,1290,185,1,0,0,0, + 1291,1296,3,182,91,0,1292,1293,5,155,0,0,1293,1295,3,182,91,0,1294,1292, + 1,0,0,0,1295,1298,1,0,0,0,1296,1294,1,0,0,0,1296,1297,1,0,0,0,1297,1302, + 1,0,0,0,1298,1296,1,0,0,0,1299,1302,5,65,0,0,1300,1302,5,6,0,0,1301,1291, + 1,0,0,0,1301,1299,1,0,0,0,1301,1300,1,0,0,0,1302,187,1,0,0,0,1303,1304, + 3,186,93,0,1304,1305,5,161,0,0,1305,1306,3,170,85,0,1306,189,1,0,0,0,1307, + 1311,3,90,45,0,1308,1311,3,388,194,0,1309,1311,3,94,47,0,1310,1307,1,0, + 0,0,1310,1308,1,0,0,0,1310,1309,1,0,0,0,1311,191,1,0,0,0,1312,1314,3,190, + 95,0,1313,1312,1,0,0,0,1314,1317,1,0,0,0,1315,1313,1,0,0,0,1315,1316,1, + 0,0,0,1316,193,1,0,0,0,1317,1315,1,0,0,0,1318,1322,3,254,127,0,1319,1322, + 5,134,0,0,1320,1322,5,119,0,0,1321,1318,1,0,0,0,1321,1319,1,0,0,0,1321, + 1320,1,0,0,0,1322,195,1,0,0,0,1323,1326,3,254,127,0,1324,1326,5,134,0, + 0,1325,1323,1,0,0,0,1325,1324,1,0,0,0,1326,197,1,0,0,0,1327,1328,5,157, + 0,0,1328,1333,3,196,98,0,1329,1330,5,155,0,0,1330,1332,3,196,98,0,1331, + 1329,1,0,0,0,1332,1335,1,0,0,0,1333,1331,1,0,0,0,1333,1334,1,0,0,0,1334, + 1336,1,0,0,0,1335,1333,1,0,0,0,1336,1337,5,158,0,0,1337,199,1,0,0,0,1338, + 1340,3,308,154,0,1339,1338,1,0,0,0,1339,1340,1,0,0,0,1340,1341,1,0,0,0, + 1341,1343,5,30,0,0,1342,1344,3,254,127,0,1343,1342,1,0,0,0,1343,1344,1, + 0,0,0,1344,1347,1,0,0,0,1345,1346,5,114,0,0,1346,1348,3,104,52,0,1347, + 1345,1,0,0,0,1347,1348,1,0,0,0,1348,1349,1,0,0,0,1349,1350,5,154,0,0,1350, + 201,1,0,0,0,1351,1352,5,137,0,0,1352,1363,3,366,183,0,1353,1359,3,422, + 211,0,1354,1355,3,316,158,0,1355,1356,3,422,211,0,1356,1358,1,0,0,0,1357, + 1354,1,0,0,0,1358,1361,1,0,0,0,1359,1357,1,0,0,0,1359,1360,1,0,0,0,1360, + 1363,1,0,0,0,1361,1359,1,0,0,0,1362,1351,1,0,0,0,1362,1353,1,0,0,0,1363, + 203,1,0,0,0,1364,1367,3,366,183,0,1365,1366,5,136,0,0,1366,1368,3,366, + 183,0,1367,1365,1,0,0,0,1367,1368,1,0,0,0,1368,1377,1,0,0,0,1369,1370, + 5,1,0,0,1370,1377,3,366,183,0,1371,1372,5,59,0,0,1372,1377,3,366,183,0, + 1373,1374,3,316,158,0,1374,1375,3,366,183,0,1375,1377,1,0,0,0,1376,1364, + 1,0,0,0,1376,1369,1,0,0,0,1376,1371,1,0,0,0,1376,1373,1,0,0,0,1377,205, + 1,0,0,0,1378,1379,5,31,0,0,1379,1380,3,256,128,0,1380,1381,5,161,0,0,1381, + 1383,3,508,254,0,1382,1384,3,210,105,0,1383,1382,1,0,0,0,1383,1384,1,0, + 0,0,1384,1385,1,0,0,0,1385,1386,5,154,0,0,1386,207,1,0,0,0,1387,1388,3, + 202,101,0,1388,209,1,0,0,0,1389,1390,5,63,0,0,1390,1392,3,202,101,0,1391, + 1389,1,0,0,0,1391,1392,1,0,0,0,1392,1393,1,0,0,0,1393,1394,5,44,0,0,1394, + 1395,3,208,104,0,1395,211,1,0,0,0,1396,1397,5,31,0,0,1397,1398,5,61,0, + 0,1398,1399,3,508,254,0,1399,213,1,0,0,0,1400,1401,3,410,205,0,1401,215, + 1,0,0,0,1402,1403,5,32,0,0,1403,1404,3,352,176,0,1404,1405,5,35,0,0,1405, + 1406,3,234,117,0,1406,217,1,0,0,0,1407,1408,7,4,0,0,1408,219,1,0,0,0,1409, + 1410,3,284,142,0,1410,221,1,0,0,0,1411,1416,3,324,162,0,1412,1413,5,157, + 0,0,1413,1414,3,324,162,0,1414,1415,5,158,0,0,1415,1417,1,0,0,0,1416,1412, + 1,0,0,0,1416,1417,1,0,0,0,1417,223,1,0,0,0,1418,1419,5,106,0,0,1419,1420, + 3,254,127,0,1420,1421,5,44,0,0,1421,1422,3,524,262,0,1422,1423,5,154,0, + 0,1423,225,1,0,0,0,1424,1429,3,324,162,0,1425,1426,5,157,0,0,1426,1427, + 3,6,3,0,1427,1428,5,158,0,0,1428,1430,1,0,0,0,1429,1425,1,0,0,0,1429,1430, + 1,0,0,0,1430,227,1,0,0,0,1431,1433,7,5,0,0,1432,1431,1,0,0,0,1432,1433, + 1,0,0,0,1433,1434,1,0,0,0,1434,1435,5,34,0,0,1435,1436,3,150,75,0,1436, + 1444,3,496,248,0,1437,1439,5,157,0,0,1438,1440,5,68,0,0,1439,1438,1,0, + 0,0,1439,1440,1,0,0,0,1440,1441,1,0,0,0,1441,1442,3,220,110,0,1442,1443, + 5,158,0,0,1443,1445,1,0,0,0,1444,1437,1,0,0,0,1444,1445,1,0,0,0,1445,1446, + 1,0,0,0,1446,1447,5,86,0,0,1447,1448,3,324,162,0,1448,229,1,0,0,0,1449, + 1453,3,156,78,0,1450,1453,3,202,101,0,1451,1453,3,254,127,0,1452,1449, + 1,0,0,0,1452,1450,1,0,0,0,1452,1451,1,0,0,0,1453,231,1,0,0,0,1454,1456, + 3,308,154,0,1455,1454,1,0,0,0,1455,1456,1,0,0,0,1456,1460,1,0,0,0,1457, + 1461,3,216,108,0,1458,1461,3,258,129,0,1459,1461,3,70,35,0,1460,1457,1, + 0,0,0,1460,1458,1,0,0,0,1460,1459,1,0,0,0,1461,1462,1,0,0,0,1462,1463, + 5,26,0,0,1463,1465,5,35,0,0,1464,1466,3,254,127,0,1465,1464,1,0,0,0,1465, + 1466,1,0,0,0,1466,1467,1,0,0,0,1467,1468,5,154,0,0,1468,233,1,0,0,0,1469, + 1470,3,58,29,0,1470,1471,5,12,0,0,1471,1473,1,0,0,0,1472,1469,1,0,0,0, + 1472,1473,1,0,0,0,1473,1477,1,0,0,0,1474,1476,3,102,51,0,1475,1474,1,0, + 0,0,1476,1479,1,0,0,0,1477,1475,1,0,0,0,1477,1478,1,0,0,0,1478,235,1,0, + 0,0,1479,1477,1,0,0,0,1480,1481,5,36,0,0,1481,1482,5,157,0,0,1482,1483, + 3,238,119,0,1483,1484,5,158,0,0,1484,1485,5,154,0,0,1485,237,1,0,0,0,1486, + 1487,3,284,142,0,1487,239,1,0,0,0,1488,1489,5,36,0,0,1489,1490,5,51,0, + 0,1490,1491,5,157,0,0,1491,1492,3,40,20,0,1492,1493,5,158,0,0,1493,241, + 1,0,0,0,1494,1495,5,126,0,0,1495,243,1,0,0,0,1496,1499,3,324,162,0,1497, + 1499,5,134,0,0,1498,1496,1,0,0,0,1498,1497,1,0,0,0,1499,245,1,0,0,0,1500, + 1505,3,244,122,0,1501,1502,5,155,0,0,1502,1504,3,244,122,0,1503,1501,1, + 0,0,0,1504,1507,1,0,0,0,1505,1503,1,0,0,0,1505,1506,1,0,0,0,1506,247,1, + 0,0,0,1507,1505,1,0,0,0,1508,1509,5,37,0,0,1509,1510,3,308,154,0,1510, + 1511,3,324,162,0,1511,1512,5,157,0,0,1512,1513,3,246,123,0,1513,1514,5, + 158,0,0,1514,1515,5,154,0,0,1515,249,1,0,0,0,1516,1517,5,37,0,0,1517,1518, + 3,254,127,0,1518,1519,5,44,0,0,1519,1520,5,157,0,0,1520,1521,3,174,87, + 0,1521,1522,5,158,0,0,1522,1523,5,154,0,0,1523,251,1,0,0,0,1524,1525,3, + 470,235,0,1525,1526,5,161,0,0,1526,1527,3,324,162,0,1527,253,1,0,0,0,1528, + 1529,7,6,0,0,1529,255,1,0,0,0,1530,1535,3,254,127,0,1531,1532,5,155,0, + 0,1532,1534,3,254,127,0,1533,1531,1,0,0,0,1534,1537,1,0,0,0,1535,1533, + 1,0,0,0,1535,1536,1,0,0,0,1536,257,1,0,0,0,1537,1535,1,0,0,0,1538,1539, + 5,39,0,0,1539,1540,3,104,52,0,1540,1541,5,35,0,0,1541,1549,3,234,117,0, + 1542,1543,5,29,0,0,1543,1544,3,104,52,0,1544,1545,5,35,0,0,1545,1546,3, + 234,117,0,1546,1548,1,0,0,0,1547,1542,1,0,0,0,1548,1551,1,0,0,0,1549,1547, + 1,0,0,0,1549,1550,1,0,0,0,1550,1555,1,0,0,0,1551,1549,1,0,0,0,1552,1553, + 5,28,0,0,1553,1554,5,35,0,0,1554,1556,3,234,117,0,1555,1552,1,0,0,0,1555, + 1556,1,0,0,0,1556,259,1,0,0,0,1557,1559,3,308,154,0,1558,1557,1,0,0,0, + 1558,1559,1,0,0,0,1559,1560,1,0,0,0,1560,1561,5,39,0,0,1561,1562,3,104, + 52,0,1562,1563,5,101,0,0,1563,1571,3,456,228,0,1564,1565,5,29,0,0,1565, + 1566,3,104,52,0,1566,1567,5,101,0,0,1567,1568,3,456,228,0,1568,1570,1, + 0,0,0,1569,1564,1,0,0,0,1570,1573,1,0,0,0,1571,1569,1,0,0,0,1571,1572, + 1,0,0,0,1572,1576,1,0,0,0,1573,1571,1,0,0,0,1574,1575,5,28,0,0,1575,1577, + 3,456,228,0,1576,1574,1,0,0,0,1576,1577,1,0,0,0,1577,1578,1,0,0,0,1578, + 1579,5,26,0,0,1579,1581,5,39,0,0,1580,1582,3,254,127,0,1581,1580,1,0,0, + 0,1581,1582,1,0,0,0,1582,1583,1,0,0,0,1583,1584,5,154,0,0,1584,261,1,0, + 0,0,1585,1586,5,106,0,0,1586,1587,3,254,127,0,1587,263,1,0,0,0,1588,1589, + 5,157,0,0,1589,1594,3,156,78,0,1590,1591,5,155,0,0,1591,1593,3,156,78, + 0,1592,1590,1,0,0,0,1593,1596,1,0,0,0,1594,1592,1,0,0,0,1594,1595,1,0, + 0,0,1595,1597,1,0,0,0,1596,1594,1,0,0,0,1597,1598,5,158,0,0,1598,265,1, + 0,0,0,1599,1600,3,324,162,0,1600,1601,5,77,0,0,1601,1602,5,152,0,0,1602, + 267,1,0,0,0,1603,1604,3,364,182,0,1604,1605,5,157,0,0,1605,1610,3,202, + 101,0,1606,1607,5,155,0,0,1607,1609,3,202,101,0,1608,1606,1,0,0,0,1609, + 1612,1,0,0,0,1610,1608,1,0,0,0,1610,1611,1,0,0,0,1611,1613,1,0,0,0,1612, + 1610,1,0,0,0,1613,1614,5,158,0,0,1614,269,1,0,0,0,1615,1617,5,19,0,0,1616, + 1615,1,0,0,0,1616,1617,1,0,0,0,1617,1618,1,0,0,0,1618,1630,3,324,162,0, + 1619,1620,5,27,0,0,1620,1625,3,324,162,0,1621,1622,5,157,0,0,1622,1623, + 3,254,127,0,1623,1624,5,158,0,0,1624,1626,1,0,0,0,1625,1621,1,0,0,0,1625, + 1626,1,0,0,0,1626,1630,1,0,0,0,1627,1628,5,20,0,0,1628,1630,3,324,162, + 0,1629,1616,1,0,0,0,1629,1619,1,0,0,0,1629,1627,1,0,0,0,1630,271,1,0,0, + 0,1631,1636,3,254,127,0,1632,1633,5,155,0,0,1633,1635,3,254,127,0,1634, + 1632,1,0,0,0,1635,1638,1,0,0,0,1636,1634,1,0,0,0,1636,1637,1,0,0,0,1637, + 1642,1,0,0,0,1638,1636,1,0,0,0,1639,1642,5,65,0,0,1640,1642,5,6,0,0,1641, + 1631,1,0,0,0,1641,1639,1,0,0,0,1641,1640,1,0,0,0,1642,273,1,0,0,0,1643, + 1645,5,21,0,0,1644,1643,1,0,0,0,1644,1645,1,0,0,0,1645,1646,1,0,0,0,1646, + 1647,3,256,128,0,1647,1649,5,161,0,0,1648,1650,5,41,0,0,1649,1648,1,0, + 0,0,1649,1650,1,0,0,0,1650,1651,1,0,0,0,1651,1654,3,508,254,0,1652,1653, + 5,151,0,0,1653,1655,3,202,101,0,1654,1652,1,0,0,0,1654,1655,1,0,0,0,1655, + 275,1,0,0,0,1656,1661,3,286,143,0,1657,1661,3,302,151,0,1658,1661,3,296, + 148,0,1659,1661,3,288,144,0,1660,1656,1,0,0,0,1660,1657,1,0,0,0,1660,1658, + 1,0,0,0,1660,1659,1,0,0,0,1661,277,1,0,0,0,1662,1663,5,31,0,0,1663,1664, + 3,256,128,0,1664,1665,5,161,0,0,1665,1666,3,508,254,0,1666,279,1,0,0,0, + 1667,1669,7,5,0,0,1668,1667,1,0,0,0,1668,1669,1,0,0,0,1669,1670,1,0,0, + 0,1670,1671,5,34,0,0,1671,1679,3,150,75,0,1672,1674,5,68,0,0,1673,1672, + 1,0,0,0,1673,1674,1,0,0,0,1674,1675,1,0,0,0,1675,1676,5,157,0,0,1676,1677, + 3,220,110,0,1677,1678,5,158,0,0,1678,1680,1,0,0,0,1679,1673,1,0,0,0,1679, + 1680,1,0,0,0,1680,1681,1,0,0,0,1681,1682,5,86,0,0,1682,1683,3,324,162, + 0,1683,281,1,0,0,0,1684,1685,5,106,0,0,1685,1686,3,254,127,0,1686,283, + 1,0,0,0,1687,1692,3,276,138,0,1688,1689,5,154,0,0,1689,1691,3,276,138, + 0,1690,1688,1,0,0,0,1691,1694,1,0,0,0,1692,1690,1,0,0,0,1692,1693,1,0, + 0,0,1693,285,1,0,0,0,1694,1692,1,0,0,0,1695,1700,3,274,137,0,1696,1700, + 3,294,147,0,1697,1700,3,304,152,0,1698,1700,3,278,139,0,1699,1695,1,0, + 0,0,1699,1696,1,0,0,0,1699,1697,1,0,0,0,1699,1698,1,0,0,0,1700,287,1,0, + 0,0,1701,1702,5,67,0,0,1702,1703,3,254,127,0,1703,1704,5,44,0,0,1704,1705, + 5,55,0,0,1705,1706,3,324,162,0,1706,1707,3,290,145,0,1707,289,1,0,0,0, + 1708,1715,3,240,120,0,1709,1710,5,36,0,0,1710,1711,5,51,0,0,1711,1712, + 5,157,0,0,1712,1713,7,7,0,0,1713,1715,5,158,0,0,1714,1708,1,0,0,0,1714, + 1709,1,0,0,0,1715,291,1,0,0,0,1716,1717,5,72,0,0,1717,1725,3,150,75,0, + 1718,1720,5,68,0,0,1719,1718,1,0,0,0,1719,1720,1,0,0,0,1720,1721,1,0,0, + 0,1721,1722,5,157,0,0,1722,1723,3,220,110,0,1723,1724,5,158,0,0,1724,1726, + 1,0,0,0,1725,1719,1,0,0,0,1725,1726,1,0,0,0,1726,293,1,0,0,0,1727,1729, + 5,92,0,0,1728,1727,1,0,0,0,1728,1729,1,0,0,0,1729,1730,1,0,0,0,1730,1731, + 3,256,128,0,1731,1733,5,161,0,0,1732,1734,3,320,160,0,1733,1732,1,0,0, + 0,1733,1734,1,0,0,0,1734,1735,1,0,0,0,1735,1737,3,508,254,0,1736,1738, + 5,17,0,0,1737,1736,1,0,0,0,1737,1738,1,0,0,0,1738,1741,1,0,0,0,1739,1740, + 5,151,0,0,1740,1742,3,202,101,0,1741,1739,1,0,0,0,1741,1742,1,0,0,0,1742, + 295,1,0,0,0,1743,1744,3,300,150,0,1744,1745,5,44,0,0,1745,1746,3,298,149, + 0,1746,297,1,0,0,0,1747,1750,3,324,162,0,1748,1750,5,152,0,0,1749,1747, + 1,0,0,0,1749,1748,1,0,0,0,1750,299,1,0,0,0,1751,1754,3,292,146,0,1752, + 1754,3,280,140,0,1753,1751,1,0,0,0,1753,1752,1,0,0,0,1754,301,1,0,0,0, + 1755,1756,3,282,141,0,1756,303,1,0,0,0,1757,1759,5,111,0,0,1758,1757,1, + 0,0,0,1758,1759,1,0,0,0,1759,1760,1,0,0,0,1760,1761,3,256,128,0,1761,1763, + 5,161,0,0,1762,1764,3,320,160,0,1763,1762,1,0,0,0,1763,1764,1,0,0,0,1764, + 1765,1,0,0,0,1765,1768,3,508,254,0,1766,1767,5,151,0,0,1767,1769,3,202, + 101,0,1768,1766,1,0,0,0,1768,1769,1,0,0,0,1769,305,1,0,0,0,1770,1771,5, + 115,0,0,1771,1775,3,104,52,0,1772,1773,5,32,0,0,1773,1775,3,352,176,0, + 1774,1770,1,0,0,0,1774,1772,1,0,0,0,1775,307,1,0,0,0,1776,1777,3,254,127, + 0,1777,1778,5,161,0,0,1778,309,1,0,0,0,1779,1780,5,46,0,0,1780,1781,3, + 256,128,0,1781,1782,5,154,0,0,1782,311,1,0,0,0,1783,1786,3,368,184,0,1784, + 1786,3,434,217,0,1785,1783,1,0,0,0,1785,1784,1,0,0,0,1786,313,1,0,0,0, + 1787,1793,3,332,166,0,1788,1793,3,196,98,0,1789,1793,5,119,0,0,1790,1793, + 5,121,0,0,1791,1793,5,60,0,0,1792,1787,1,0,0,0,1792,1788,1,0,0,0,1792, + 1789,1,0,0,0,1792,1790,1,0,0,0,1792,1791,1,0,0,0,1793,315,1,0,0,0,1794, + 1795,7,8,0,0,1795,317,1,0,0,0,1796,1798,3,308,154,0,1797,1796,1,0,0,0, + 1797,1798,1,0,0,0,1798,1800,1,0,0,0,1799,1801,3,306,153,0,1800,1799,1, + 0,0,0,1800,1801,1,0,0,0,1801,1802,1,0,0,0,1802,1803,5,50,0,0,1803,1804, + 3,456,228,0,1804,1805,5,26,0,0,1805,1807,5,50,0,0,1806,1808,3,254,127, + 0,1807,1806,1,0,0,0,1807,1808,1,0,0,0,1808,1809,1,0,0,0,1809,1810,5,154, + 0,0,1810,319,1,0,0,0,1811,1812,7,9,0,0,1812,321,1,0,0,0,1813,1814,7,10, + 0,0,1814,323,1,0,0,0,1815,1819,3,254,127,0,1816,1819,5,119,0,0,1817,1819, + 5,134,0,0,1818,1815,1,0,0,0,1818,1816,1,0,0,0,1818,1817,1,0,0,0,1819,1823, + 1,0,0,0,1820,1822,3,326,163,0,1821,1820,1,0,0,0,1822,1825,1,0,0,0,1823, + 1821,1,0,0,0,1823,1824,1,0,0,0,1824,325,1,0,0,0,1825,1823,1,0,0,0,1826, + 1827,5,170,0,0,1827,1829,3,510,255,0,1828,1826,1,0,0,0,1829,1830,1,0,0, + 0,1830,1828,1,0,0,0,1830,1831,1,0,0,0,1831,1849,1,0,0,0,1832,1833,5,157, + 0,0,1833,1834,3,6,3,0,1834,1835,5,158,0,0,1835,1849,1,0,0,0,1836,1837, + 5,157,0,0,1837,1838,3,156,78,0,1838,1839,5,158,0,0,1839,1849,1,0,0,0,1840, + 1841,5,179,0,0,1841,1846,3,44,22,0,1842,1843,5,157,0,0,1843,1844,3,202, + 101,0,1844,1845,5,158,0,0,1845,1847,1,0,0,0,1846,1842,1,0,0,0,1846,1847, + 1,0,0,0,1847,1849,1,0,0,0,1848,1828,1,0,0,0,1848,1832,1,0,0,0,1848,1836, + 1,0,0,0,1848,1840,1,0,0,0,1849,327,1,0,0,0,1850,1852,3,308,154,0,1851, + 1850,1,0,0,0,1851,1852,1,0,0,0,1852,1853,1,0,0,0,1853,1855,5,56,0,0,1854, + 1856,3,254,127,0,1855,1854,1,0,0,0,1855,1856,1,0,0,0,1856,1859,1,0,0,0, + 1857,1858,5,114,0,0,1858,1860,3,104,52,0,1859,1857,1,0,0,0,1859,1860,1, + 0,0,0,1860,1861,1,0,0,0,1861,1862,5,154,0,0,1862,329,1,0,0,0,1863,1865, + 3,308,154,0,1864,1863,1,0,0,0,1864,1865,1,0,0,0,1865,1866,1,0,0,0,1866, + 1867,5,60,0,0,1867,1868,5,154,0,0,1868,331,1,0,0,0,1869,1872,3,0,0,0,1870, + 1872,3,354,177,0,1871,1869,1,0,0,0,1871,1870,1,0,0,0,1872,333,1,0,0,0, + 1873,1878,3,130,65,0,1874,1878,3,466,233,0,1875,1878,3,532,266,0,1876, + 1878,3,206,103,0,1877,1873,1,0,0,0,1877,1874,1,0,0,0,1877,1875,1,0,0,0, + 1877,1876,1,0,0,0,1878,335,1,0,0,0,1879,1880,5,67,0,0,1880,1881,5,14,0, + 0,1881,1882,3,254,127,0,1882,1883,5,44,0,0,1883,1884,3,340,170,0,1884, + 1887,5,26,0,0,1885,1886,5,67,0,0,1886,1888,5,14,0,0,1887,1885,1,0,0,0, + 1887,1888,1,0,0,0,1888,1890,1,0,0,0,1889,1891,3,254,127,0,1890,1889,1, + 0,0,0,1890,1891,1,0,0,0,1891,1892,1,0,0,0,1892,1893,5,154,0,0,1893,337, + 1,0,0,0,1894,1912,3,490,245,0,1895,1912,3,488,244,0,1896,1912,3,498,249, + 0,1897,1912,3,342,171,0,1898,1912,3,336,168,0,1899,1912,3,350,175,0,1900, + 1912,3,522,261,0,1901,1912,3,506,253,0,1902,1912,3,130,65,0,1903,1912, + 3,532,266,0,1904,1912,3,206,103,0,1905,1912,3,14,7,0,1906,1912,3,42,21, + 0,1907,1912,3,48,24,0,1908,1912,3,528,264,0,1909,1912,3,250,125,0,1910, + 1912,3,248,124,0,1911,1894,1,0,0,0,1911,1895,1,0,0,0,1911,1896,1,0,0,0, + 1911,1897,1,0,0,0,1911,1898,1,0,0,0,1911,1899,1,0,0,0,1911,1900,1,0,0, + 0,1911,1901,1,0,0,0,1911,1902,1,0,0,0,1911,1903,1,0,0,0,1911,1904,1,0, + 0,0,1911,1905,1,0,0,0,1911,1906,1,0,0,0,1911,1907,1,0,0,0,1911,1908,1, + 0,0,0,1911,1909,1,0,0,0,1911,1910,1,0,0,0,1912,339,1,0,0,0,1913,1915,3, + 338,169,0,1914,1913,1,0,0,0,1915,1918,1,0,0,0,1916,1914,1,0,0,0,1916,1917, + 1,0,0,0,1917,341,1,0,0,0,1918,1916,1,0,0,0,1919,1920,5,67,0,0,1920,1921, + 3,254,127,0,1921,1922,5,44,0,0,1922,1923,3,348,174,0,1923,1924,3,346,173, + 0,1924,1926,5,26,0,0,1925,1927,5,67,0,0,1926,1925,1,0,0,0,1926,1927,1, + 0,0,0,1927,1929,1,0,0,0,1928,1930,3,254,127,0,1929,1928,1,0,0,0,1929,1930, + 1,0,0,0,1930,1931,1,0,0,0,1931,1932,5,154,0,0,1932,343,1,0,0,0,1933,1952, + 3,490,245,0,1934,1952,3,498,249,0,1935,1952,3,342,171,0,1936,1952,3,350, + 175,0,1937,1952,3,522,261,0,1938,1952,3,506,253,0,1939,1952,3,130,65,0, + 1940,1952,3,466,233,0,1941,1952,3,532,266,0,1942,1952,3,206,103,0,1943, + 1952,3,14,7,0,1944,1952,3,82,41,0,1945,1952,3,42,21,0,1946,1952,3,48,24, + 0,1947,1952,3,154,77,0,1948,1952,3,528,264,0,1949,1952,3,250,125,0,1950, + 1952,3,248,124,0,1951,1933,1,0,0,0,1951,1934,1,0,0,0,1951,1935,1,0,0,0, + 1951,1936,1,0,0,0,1951,1937,1,0,0,0,1951,1938,1,0,0,0,1951,1939,1,0,0, + 0,1951,1940,1,0,0,0,1951,1941,1,0,0,0,1951,1942,1,0,0,0,1951,1943,1,0, + 0,0,1951,1944,1,0,0,0,1951,1945,1,0,0,0,1951,1946,1,0,0,0,1951,1947,1, + 0,0,0,1951,1948,1,0,0,0,1951,1949,1,0,0,0,1951,1950,1,0,0,0,1952,345,1, + 0,0,0,1953,1955,3,344,172,0,1954,1953,1,0,0,0,1955,1958,1,0,0,0,1956,1954, + 1,0,0,0,1956,1957,1,0,0,0,1957,347,1,0,0,0,1958,1956,1,0,0,0,1959,1963, + 3,236,118,0,1960,1961,3,240,120,0,1961,1962,5,154,0,0,1962,1964,1,0,0, + 0,1963,1960,1,0,0,0,1963,1964,1,0,0,0,1964,1966,1,0,0,0,1965,1959,1,0, + 0,0,1965,1966,1,0,0,0,1966,349,1,0,0,0,1967,1968,5,67,0,0,1968,1969,3, + 254,127,0,1969,1970,5,44,0,0,1970,1971,5,55,0,0,1971,1972,3,324,162,0, + 1972,1973,5,157,0,0,1973,1974,3,240,120,0,1974,1975,5,158,0,0,1975,1976, + 1,0,0,0,1976,1977,5,154,0,0,1977,351,1,0,0,0,1978,1979,3,254,127,0,1979, + 1980,5,41,0,0,1980,1981,3,156,78,0,1981,353,1,0,0,0,1982,1983,3,0,0,0, + 1983,1984,3,254,127,0,1984,355,1,0,0,0,1985,1986,3,410,205,0,1986,1987, + 5,108,0,0,1987,1991,3,370,185,0,1988,1990,3,436,218,0,1989,1988,1,0,0, + 0,1990,1993,1,0,0,0,1991,1989,1,0,0,0,1991,1992,1,0,0,0,1992,1994,1,0, + 0,0,1993,1991,1,0,0,0,1994,1995,5,26,0,0,1995,1997,5,108,0,0,1996,1998, + 3,254,127,0,1997,1996,1,0,0,0,1997,1998,1,0,0,0,1998,357,1,0,0,0,1999, + 2000,5,69,0,0,2000,2001,5,157,0,0,2001,2002,3,360,180,0,2002,2003,5,158, + 0,0,2003,2004,5,154,0,0,2004,359,1,0,0,0,2005,2006,3,284,142,0,2006,361, + 1,0,0,0,2007,2008,5,69,0,0,2008,2009,5,51,0,0,2009,2010,5,157,0,0,2010, + 2011,3,40,20,0,2011,2012,5,158,0,0,2012,363,1,0,0,0,2013,2016,3,324,162, + 0,2014,2016,3,226,113,0,2015,2013,1,0,0,0,2015,2014,1,0,0,0,2016,365,1, + 0,0,0,2017,2029,3,324,162,0,2018,2029,3,314,157,0,2019,2029,3,12,6,0,2020, + 2029,3,226,113,0,2021,2029,3,406,203,0,2022,2029,3,520,260,0,2023,2029, + 3,18,9,0,2024,2025,5,157,0,0,2025,2026,3,202,101,0,2026,2027,5,158,0,0, + 2027,2029,1,0,0,0,2028,2017,1,0,0,0,2028,2018,1,0,0,0,2028,2019,1,0,0, + 0,2028,2020,1,0,0,0,2028,2021,1,0,0,0,2028,2022,1,0,0,0,2028,2023,1,0, + 0,0,2028,2024,1,0,0,0,2029,367,1,0,0,0,2030,2036,3,176,88,0,2031,2036, + 3,120,60,0,2032,2036,3,342,171,0,2033,2036,3,350,175,0,2034,2036,3,138, + 69,0,2035,2030,1,0,0,0,2035,2031,1,0,0,0,2035,2032,1,0,0,0,2035,2033,1, + 0,0,0,2035,2034,1,0,0,0,2036,369,1,0,0,0,2037,2038,3,254,127,0,2038,2039, + 5,154,0,0,2039,371,1,0,0,0,2040,2045,3,324,162,0,2041,2042,5,157,0,0,2042, + 2043,3,6,3,0,2043,2044,5,158,0,0,2044,2046,1,0,0,0,2045,2041,1,0,0,0,2045, + 2046,1,0,0,0,2046,373,1,0,0,0,2047,2049,3,308,154,0,2048,2047,1,0,0,0, + 2048,2049,1,0,0,0,2049,2050,1,0,0,0,2050,2051,3,372,186,0,2051,2052,5, + 154,0,0,2052,375,1,0,0,0,2053,2054,5,72,0,0,2054,2055,3,150,75,0,2055, + 2063,3,496,248,0,2056,2058,5,68,0,0,2057,2056,1,0,0,0,2057,2058,1,0,0, + 0,2058,2059,1,0,0,0,2059,2060,5,157,0,0,2060,2061,3,220,110,0,2061,2062, + 5,158,0,0,2062,2064,1,0,0,0,2063,2057,1,0,0,0,2063,2064,1,0,0,0,2064,377, + 1,0,0,0,2065,2083,3,490,245,0,2066,2083,3,488,244,0,2067,2083,3,498,249, + 0,2068,2083,3,342,171,0,2069,2083,3,336,168,0,2070,2083,3,350,175,0,2071, + 2083,3,522,261,0,2072,2083,3,506,253,0,2073,2083,3,130,65,0,2074,2083, + 3,532,266,0,2075,2083,3,206,103,0,2076,2083,3,14,7,0,2077,2083,3,42,21, + 0,2078,2083,3,48,24,0,2079,2083,3,528,264,0,2080,2083,3,250,125,0,2081, + 2083,3,248,124,0,2082,2065,1,0,0,0,2082,2066,1,0,0,0,2082,2067,1,0,0,0, + 2082,2068,1,0,0,0,2082,2069,1,0,0,0,2082,2070,1,0,0,0,2082,2071,1,0,0, + 0,2082,2072,1,0,0,0,2082,2073,1,0,0,0,2082,2074,1,0,0,0,2082,2075,1,0, + 0,0,2082,2076,1,0,0,0,2082,2077,1,0,0,0,2082,2078,1,0,0,0,2082,2079,1, + 0,0,0,2082,2080,1,0,0,0,2082,2081,1,0,0,0,2083,379,1,0,0,0,2084,2086,3, + 458,229,0,2085,2084,1,0,0,0,2086,2089,1,0,0,0,2087,2085,1,0,0,0,2087,2088, + 1,0,0,0,2088,381,1,0,0,0,2089,2087,1,0,0,0,2090,2104,3,490,245,0,2091, + 2104,3,488,244,0,2092,2104,3,522,261,0,2093,2104,3,506,253,0,2094,2104, + 3,130,65,0,2095,2104,3,532,266,0,2096,2104,3,206,103,0,2097,2104,3,14, + 7,0,2098,2104,3,42,21,0,2099,2104,3,48,24,0,2100,2104,3,528,264,0,2101, + 2104,3,250,125,0,2102,2104,3,248,124,0,2103,2090,1,0,0,0,2103,2091,1,0, + 0,0,2103,2092,1,0,0,0,2103,2093,1,0,0,0,2103,2094,1,0,0,0,2103,2095,1, + 0,0,0,2103,2096,1,0,0,0,2103,2097,1,0,0,0,2103,2098,1,0,0,0,2103,2099, + 1,0,0,0,2103,2100,1,0,0,0,2103,2101,1,0,0,0,2103,2102,1,0,0,0,2104,383, + 1,0,0,0,2105,2107,3,382,191,0,2106,2105,1,0,0,0,2107,2110,1,0,0,0,2108, + 2106,1,0,0,0,2108,2109,1,0,0,0,2109,385,1,0,0,0,2110,2108,1,0,0,0,2111, + 2114,5,6,0,0,2112,2114,3,454,227,0,2113,2111,1,0,0,0,2113,2112,1,0,0,0, + 2114,387,1,0,0,0,2115,2117,3,308,154,0,2116,2115,1,0,0,0,2116,2117,1,0, + 0,0,2117,2119,1,0,0,0,2118,2120,5,70,0,0,2119,2118,1,0,0,0,2119,2120,1, + 0,0,0,2120,2121,1,0,0,0,2121,2126,5,71,0,0,2122,2123,5,157,0,0,2123,2124, + 3,386,193,0,2124,2125,5,158,0,0,2125,2127,1,0,0,0,2126,2122,1,0,0,0,2126, + 2127,1,0,0,0,2127,2129,1,0,0,0,2128,2130,5,44,0,0,2129,2128,1,0,0,0,2129, + 2130,1,0,0,0,2130,2131,1,0,0,0,2131,2132,3,384,192,0,2132,2133,5,12,0, + 0,2133,2134,3,390,195,0,2134,2136,5,26,0,0,2135,2137,5,70,0,0,2136,2135, + 1,0,0,0,2136,2137,1,0,0,0,2137,2138,1,0,0,0,2138,2140,5,71,0,0,2139,2141, + 3,254,127,0,2140,2139,1,0,0,0,2140,2141,1,0,0,0,2141,2142,1,0,0,0,2142, + 2143,5,154,0,0,2143,389,1,0,0,0,2144,2146,3,458,229,0,2145,2144,1,0,0, + 0,2146,2149,1,0,0,0,2147,2145,1,0,0,0,2147,2148,1,0,0,0,2148,391,1,0,0, + 0,2149,2147,1,0,0,0,2150,2151,5,74,0,0,2151,2152,5,14,0,0,2152,2153,3, + 396,198,0,2153,2154,5,26,0,0,2154,2155,5,74,0,0,2155,2157,5,14,0,0,2156, + 2158,3,254,127,0,2157,2156,1,0,0,0,2157,2158,1,0,0,0,2158,393,1,0,0,0, + 2159,2177,3,490,245,0,2160,2177,3,488,244,0,2161,2177,3,498,249,0,2162, + 2177,3,342,171,0,2163,2177,3,336,168,0,2164,2177,3,350,175,0,2165,2177, + 3,522,261,0,2166,2177,3,506,253,0,2167,2177,3,130,65,0,2168,2177,3,532, + 266,0,2169,2177,3,206,103,0,2170,2177,3,14,7,0,2171,2177,3,42,21,0,2172, + 2177,3,48,24,0,2173,2177,3,528,264,0,2174,2177,3,250,125,0,2175,2177,3, + 248,124,0,2176,2159,1,0,0,0,2176,2160,1,0,0,0,2176,2161,1,0,0,0,2176,2162, + 1,0,0,0,2176,2163,1,0,0,0,2176,2164,1,0,0,0,2176,2165,1,0,0,0,2176,2166, + 1,0,0,0,2176,2167,1,0,0,0,2176,2168,1,0,0,0,2176,2169,1,0,0,0,2176,2170, + 1,0,0,0,2176,2171,1,0,0,0,2176,2172,1,0,0,0,2176,2173,1,0,0,0,2176,2174, + 1,0,0,0,2176,2175,1,0,0,0,2177,395,1,0,0,0,2178,2180,3,394,197,0,2179, + 2178,1,0,0,0,2179,2180,1,0,0,0,2180,397,1,0,0,0,2181,2182,5,74,0,0,2182, + 2183,3,402,201,0,2183,2184,5,26,0,0,2184,2186,5,74,0,0,2185,2187,3,254, + 127,0,2186,2185,1,0,0,0,2186,2187,1,0,0,0,2187,399,1,0,0,0,2188,2193,3, + 490,245,0,2189,2193,3,498,249,0,2190,2193,3,48,24,0,2191,2193,3,528,264, + 0,2192,2188,1,0,0,0,2192,2189,1,0,0,0,2192,2190,1,0,0,0,2192,2191,1,0, + 0,0,2193,401,1,0,0,0,2194,2196,3,400,200,0,2195,2194,1,0,0,0,2195,2196, + 1,0,0,0,2196,403,1,0,0,0,2197,2200,3,398,199,0,2198,2200,3,392,196,0,2199, + 2197,1,0,0,0,2199,2198,1,0,0,0,2200,405,1,0,0,0,2201,2202,3,324,162,0, + 2202,2208,5,179,0,0,2203,2209,3,12,6,0,2204,2205,5,157,0,0,2205,2206,3, + 202,101,0,2206,2207,5,158,0,0,2207,2209,1,0,0,0,2208,2203,1,0,0,0,2208, + 2204,1,0,0,0,2209,407,1,0,0,0,2210,2216,3,46,23,0,2211,2212,3,474,237, + 0,2212,2213,3,152,76,0,2213,2214,3,474,237,0,2214,2216,1,0,0,0,2215,2210, + 1,0,0,0,2215,2211,1,0,0,0,2216,409,1,0,0,0,2217,2218,5,77,0,0,2218,2219, + 3,408,204,0,2219,411,1,0,0,0,2220,2221,5,157,0,0,2221,2226,3,414,207,0, + 2222,2223,5,155,0,0,2223,2225,3,414,207,0,2224,2222,1,0,0,0,2225,2228, + 1,0,0,0,2226,2224,1,0,0,0,2226,2227,1,0,0,0,2227,2229,1,0,0,0,2228,2226, + 1,0,0,0,2229,2230,5,158,0,0,2230,413,1,0,0,0,2231,2232,3,254,127,0,2232, + 2233,3,160,80,0,2233,415,1,0,0,0,2234,2235,3,254,127,0,2235,2236,3,428, + 214,0,2236,417,1,0,0,0,2237,2242,3,416,208,0,2238,2239,5,155,0,0,2239, + 2241,3,416,208,0,2240,2238,1,0,0,0,2241,2244,1,0,0,0,2242,2240,1,0,0,0, + 2242,2243,1,0,0,0,2243,419,1,0,0,0,2244,2242,1,0,0,0,2245,2247,5,82,0, + 0,2246,2248,3,162,81,0,2247,2246,1,0,0,0,2248,2249,1,0,0,0,2249,2247,1, + 0,0,0,2249,2250,1,0,0,0,2250,2251,1,0,0,0,2251,2252,5,26,0,0,2252,2254, + 5,82,0,0,2253,2255,3,254,127,0,2254,2253,1,0,0,0,2254,2255,1,0,0,0,2255, + 421,1,0,0,0,2256,2260,3,460,230,0,2257,2258,3,424,212,0,2258,2259,3,460, + 230,0,2259,2261,1,0,0,0,2260,2257,1,0,0,0,2260,2261,1,0,0,0,2261,423,1, + 0,0,0,2262,2263,7,11,0,0,2263,425,1,0,0,0,2264,2266,3,308,154,0,2265,2264, + 1,0,0,0,2265,2266,1,0,0,0,2266,2267,1,0,0,0,2267,2268,5,85,0,0,2268,2271, + 3,202,101,0,2269,2270,5,90,0,0,2270,2272,3,202,101,0,2271,2269,1,0,0,0, + 2271,2272,1,0,0,0,2272,2273,1,0,0,0,2273,2274,5,154,0,0,2274,427,1,0,0, + 0,2275,2281,3,324,162,0,2276,2277,5,157,0,0,2277,2278,3,164,82,0,2278, + 2279,5,158,0,0,2279,2281,1,0,0,0,2280,2275,1,0,0,0,2280,2276,1,0,0,0,2281, + 429,1,0,0,0,2282,2284,3,308,154,0,2283,2282,1,0,0,0,2283,2284,1,0,0,0, + 2284,2285,1,0,0,0,2285,2287,5,86,0,0,2286,2288,3,202,101,0,2287,2286,1, + 0,0,0,2287,2288,1,0,0,0,2288,2289,1,0,0,0,2289,2290,5,154,0,0,2290,431, + 1,0,0,0,2291,2295,3,198,99,0,2292,2295,3,410,205,0,2293,2295,3,356,178, + 0,2294,2291,1,0,0,0,2294,2292,1,0,0,0,2294,2293,1,0,0,0,2295,433,1,0,0, + 0,2296,2299,3,20,10,0,2297,2299,3,336,168,0,2298,2296,1,0,0,0,2298,2297, + 1,0,0,0,2299,435,1,0,0,0,2300,2301,3,254,127,0,2301,2302,5,168,0,0,2302, + 2303,3,354,177,0,2303,2304,5,154,0,0,2304,437,1,0,0,0,2305,2306,3,202, + 101,0,2306,2307,5,114,0,0,2307,2308,3,78,39,0,2308,2309,5,155,0,0,2309, + 2311,1,0,0,0,2310,2305,1,0,0,0,2311,2314,1,0,0,0,2312,2310,1,0,0,0,2312, + 2313,1,0,0,0,2313,2315,1,0,0,0,2314,2312,1,0,0,0,2315,2316,3,202,101,0, + 2316,2317,5,114,0,0,2317,2318,3,78,39,0,2318,439,1,0,0,0,2319,2320,5,113, + 0,0,2320,2321,3,202,101,0,2321,2323,5,89,0,0,2322,2324,5,180,0,0,2323, + 2322,1,0,0,0,2323,2324,1,0,0,0,2324,2325,1,0,0,0,2325,2326,3,512,256,0, + 2326,2327,5,146,0,0,2327,2329,5,33,0,0,2328,2330,3,218,109,0,2329,2328, + 1,0,0,0,2329,2330,1,0,0,0,2330,2331,1,0,0,0,2331,2332,3,438,219,0,2332, + 2333,5,154,0,0,2333,441,1,0,0,0,2334,2335,3,364,182,0,2335,2336,5,170, + 0,0,2336,2337,3,510,255,0,2337,443,1,0,0,0,2338,2341,3,448,224,0,2339, + 2341,3,440,220,0,2340,2338,1,0,0,0,2340,2339,1,0,0,0,2341,445,1,0,0,0, + 2342,2343,5,113,0,0,2343,2344,3,202,101,0,2344,2346,5,89,0,0,2345,2347, + 5,180,0,0,2346,2345,1,0,0,0,2346,2347,1,0,0,0,2347,2348,1,0,0,0,2348,2349, + 3,512,256,0,2349,2350,5,151,0,0,2350,2351,3,438,219,0,2351,2352,5,154, + 0,0,2352,447,1,0,0,0,2353,2354,5,113,0,0,2354,2355,3,202,101,0,2355,2357, + 5,89,0,0,2356,2358,5,180,0,0,2357,2356,1,0,0,0,2357,2358,1,0,0,0,2358, + 2359,1,0,0,0,2359,2360,3,512,256,0,2360,2362,5,146,0,0,2361,2363,3,144, + 72,0,2362,2361,1,0,0,0,2362,2363,1,0,0,0,2363,2364,1,0,0,0,2364,2365,3, + 450,225,0,2365,2366,5,154,0,0,2366,449,1,0,0,0,2367,2368,3,536,268,0,2368, + 2369,5,114,0,0,2369,2377,3,78,39,0,2370,2371,5,155,0,0,2371,2372,3,536, + 268,0,2372,2373,5,114,0,0,2373,2374,3,78,39,0,2374,2376,1,0,0,0,2375,2370, + 1,0,0,0,2376,2379,1,0,0,0,2377,2375,1,0,0,0,2377,2378,1,0,0,0,2378,451, + 1,0,0,0,2379,2377,1,0,0,0,2380,2381,5,62,0,0,2381,2382,3,454,227,0,2382, + 453,1,0,0,0,2383,2388,3,324,162,0,2384,2385,5,155,0,0,2385,2387,3,324, + 162,0,2386,2384,1,0,0,0,2387,2390,1,0,0,0,2388,2386,1,0,0,0,2388,2389, + 1,0,0,0,2389,455,1,0,0,0,2390,2388,1,0,0,0,2391,2393,3,458,229,0,2392, + 2391,1,0,0,0,2393,2396,1,0,0,0,2394,2392,1,0,0,0,2394,2395,1,0,0,0,2395, + 457,1,0,0,0,2396,2394,1,0,0,0,2397,2411,3,534,267,0,2398,2411,3,36,18, + 0,2399,2411,3,426,213,0,2400,2411,3,464,232,0,2401,2411,3,530,265,0,2402, + 2411,3,374,187,0,2403,2411,3,260,130,0,2404,2411,3,72,36,0,2405,2411,3, + 318,159,0,2406,2411,3,328,164,0,2407,2411,3,200,100,0,2408,2411,3,430, + 215,0,2409,2411,3,330,165,0,2410,2397,1,0,0,0,2410,2398,1,0,0,0,2410,2399, + 1,0,0,0,2410,2400,1,0,0,0,2410,2401,1,0,0,0,2410,2402,1,0,0,0,2410,2403, + 1,0,0,0,2410,2404,1,0,0,0,2410,2405,1,0,0,0,2410,2406,1,0,0,0,2410,2407, + 1,0,0,0,2410,2408,1,0,0,0,2410,2409,1,0,0,0,2411,459,1,0,0,0,2412,2416, + 3,474,237,0,2413,2414,3,462,231,0,2414,2415,3,474,237,0,2415,2417,1,0, + 0,0,2416,2413,1,0,0,0,2416,2417,1,0,0,0,2417,461,1,0,0,0,2418,2419,7,12, + 0,0,2419,463,1,0,0,0,2420,2422,3,308,154,0,2421,2420,1,0,0,0,2421,2422, + 1,0,0,0,2422,2426,1,0,0,0,2423,2427,3,480,240,0,2424,2427,3,112,56,0,2425, + 2427,3,444,222,0,2426,2423,1,0,0,0,2426,2424,1,0,0,0,2426,2425,1,0,0,0, + 2427,465,1,0,0,0,2428,2429,5,92,0,0,2429,2430,3,256,128,0,2430,2431,5, + 161,0,0,2431,2433,3,508,254,0,2432,2434,3,468,234,0,2433,2432,1,0,0,0, + 2433,2434,1,0,0,0,2434,2437,1,0,0,0,2435,2436,5,151,0,0,2436,2438,3,202, + 101,0,2437,2435,1,0,0,0,2437,2438,1,0,0,0,2438,2439,1,0,0,0,2439,2440, + 5,154,0,0,2440,467,1,0,0,0,2441,2442,7,13,0,0,2442,469,1,0,0,0,2443,2448, + 3,324,162,0,2444,2445,5,155,0,0,2445,2447,3,324,162,0,2446,2444,1,0,0, + 0,2447,2450,1,0,0,0,2448,2446,1,0,0,0,2448,2449,1,0,0,0,2449,2454,1,0, + 0,0,2450,2448,1,0,0,0,2451,2454,5,65,0,0,2452,2454,5,6,0,0,2453,2443,1, + 0,0,0,2453,2451,1,0,0,0,2453,2452,1,0,0,0,2454,471,1,0,0,0,2455,2456,5, + 159,0,0,2456,2459,3,324,162,0,2457,2458,5,155,0,0,2458,2460,3,324,162, + 0,2459,2457,1,0,0,0,2459,2460,1,0,0,0,2460,2463,1,0,0,0,2461,2462,5,86, + 0,0,2462,2464,3,324,162,0,2463,2461,1,0,0,0,2463,2464,1,0,0,0,2464,2465, + 1,0,0,0,2465,2466,5,160,0,0,2466,473,1,0,0,0,2467,2469,7,14,0,0,2468,2467, + 1,0,0,0,2468,2469,1,0,0,0,2469,2470,1,0,0,0,2470,2476,3,514,257,0,2471, + 2472,3,10,5,0,2472,2473,3,514,257,0,2473,2475,1,0,0,0,2474,2471,1,0,0, + 0,2475,2478,1,0,0,0,2476,2474,1,0,0,0,2476,2477,1,0,0,0,2477,475,1,0,0, + 0,2478,2476,1,0,0,0,2479,2481,3,218,109,0,2480,2479,1,0,0,0,2480,2481, + 1,0,0,0,2481,2482,1,0,0,0,2482,2483,3,202,101,0,2483,477,1,0,0,0,2484, + 2486,3,218,109,0,2485,2484,1,0,0,0,2485,2486,1,0,0,0,2486,479,1,0,0,0, + 2487,2488,3,512,256,0,2488,2492,5,146,0,0,2489,2493,3,482,241,0,2490,2493, + 3,476,238,0,2491,2493,3,478,239,0,2492,2489,1,0,0,0,2492,2490,1,0,0,0, + 2492,2491,1,0,0,0,2493,2494,1,0,0,0,2494,2495,5,154,0,0,2495,481,1,0,0, + 0,2496,2498,3,144,72,0,2497,2496,1,0,0,0,2497,2498,1,0,0,0,2498,2499,1, + 0,0,0,2499,2500,3,536,268,0,2500,483,1,0,0,0,2501,2502,3,512,256,0,2502, + 2503,5,151,0,0,2503,2504,3,202,101,0,2504,2505,5,154,0,0,2505,485,1,0, + 0,0,2506,2507,3,364,182,0,2507,2508,5,157,0,0,2508,2509,3,156,78,0,2509, + 2510,5,158,0,0,2510,487,1,0,0,0,2511,2512,3,502,251,0,2512,2513,5,44,0, + 0,2513,2514,3,494,247,0,2514,2515,5,12,0,0,2515,2516,3,504,252,0,2516, + 2518,5,26,0,0,2517,2519,3,500,250,0,2518,2517,1,0,0,0,2518,2519,1,0,0, + 0,2519,2521,1,0,0,0,2520,2522,3,150,75,0,2521,2520,1,0,0,0,2521,2522,1, + 0,0,0,2522,2523,1,0,0,0,2523,2524,5,154,0,0,2524,489,1,0,0,0,2525,2526, + 3,502,251,0,2526,2527,5,154,0,0,2527,491,1,0,0,0,2528,2546,3,490,245,0, + 2529,2546,3,488,244,0,2530,2546,3,498,249,0,2531,2546,3,342,171,0,2532, + 2546,3,336,168,0,2533,2546,3,350,175,0,2534,2546,3,522,261,0,2535,2546, + 3,506,253,0,2536,2546,3,130,65,0,2537,2546,3,532,266,0,2538,2546,3,206, + 103,0,2539,2546,3,14,7,0,2540,2546,3,42,21,0,2541,2546,3,48,24,0,2542, + 2546,3,528,264,0,2543,2546,3,250,125,0,2544,2546,3,248,124,0,2545,2528, + 1,0,0,0,2545,2529,1,0,0,0,2545,2530,1,0,0,0,2545,2531,1,0,0,0,2545,2532, + 1,0,0,0,2545,2533,1,0,0,0,2545,2534,1,0,0,0,2545,2535,1,0,0,0,2545,2536, + 1,0,0,0,2545,2537,1,0,0,0,2545,2538,1,0,0,0,2545,2539,1,0,0,0,2545,2540, + 1,0,0,0,2545,2541,1,0,0,0,2545,2542,1,0,0,0,2545,2543,1,0,0,0,2545,2544, + 1,0,0,0,2546,493,1,0,0,0,2547,2549,3,492,246,0,2548,2547,1,0,0,0,2549, + 2552,1,0,0,0,2550,2548,1,0,0,0,2550,2551,1,0,0,0,2551,495,1,0,0,0,2552, + 2550,1,0,0,0,2553,2554,5,36,0,0,2554,2555,5,157,0,0,2555,2556,3,238,119, + 0,2556,2557,5,158,0,0,2557,2558,3,240,120,0,2558,2560,1,0,0,0,2559,2553, + 1,0,0,0,2559,2560,1,0,0,0,2560,497,1,0,0,0,2561,2562,3,500,250,0,2562, + 2563,3,254,127,0,2563,2564,5,44,0,0,2564,2565,5,55,0,0,2565,2566,3,324, + 162,0,2566,2567,3,240,120,0,2567,2568,5,154,0,0,2568,499,1,0,0,0,2569, + 2570,7,15,0,0,2570,501,1,0,0,0,2571,2574,3,376,188,0,2572,2574,3,228,114, + 0,2573,2571,1,0,0,0,2573,2572,1,0,0,0,2574,503,1,0,0,0,2575,2577,3,458, + 229,0,2576,2575,1,0,0,0,2577,2580,1,0,0,0,2578,2576,1,0,0,0,2578,2579, + 1,0,0,0,2579,505,1,0,0,0,2580,2578,1,0,0,0,2581,2582,5,99,0,0,2582,2583, + 3,254,127,0,2583,2584,5,44,0,0,2584,2585,3,508,254,0,2585,2586,5,154,0, + 0,2586,507,1,0,0,0,2587,2589,3,428,214,0,2588,2587,1,0,0,0,2588,2589,1, + 0,0,0,2589,2590,1,0,0,0,2590,2592,3,324,162,0,2591,2593,3,134,67,0,2592, + 2591,1,0,0,0,2592,2593,1,0,0,0,2593,509,1,0,0,0,2594,2599,3,254,127,0, + 2595,2599,5,134,0,0,2596,2599,5,119,0,0,2597,2599,5,6,0,0,2598,2594,1, + 0,0,0,2598,2595,1,0,0,0,2598,2596,1,0,0,0,2598,2597,1,0,0,0,2599,511,1, + 0,0,0,2600,2603,3,324,162,0,2601,2603,3,12,6,0,2602,2600,1,0,0,0,2602, + 2601,1,0,0,0,2603,513,1,0,0,0,2604,2610,3,204,102,0,2605,2606,3,322,161, + 0,2606,2607,3,204,102,0,2607,2609,1,0,0,0,2608,2605,1,0,0,0,2609,2612, + 1,0,0,0,2610,2608,1,0,0,0,2610,2611,1,0,0,0,2611,515,1,0,0,0,2612,2610, + 1,0,0,0,2613,2614,5,32,0,0,2614,2615,3,202,101,0,2615,517,1,0,0,0,2616, + 2617,5,172,0,0,2617,2621,3,254,127,0,2618,2620,3,242,121,0,2619,2618,1, + 0,0,0,2620,2623,1,0,0,0,2621,2619,1,0,0,0,2621,2622,1,0,0,0,2622,519,1, + 0,0,0,2623,2621,1,0,0,0,2624,2625,3,324,162,0,2625,2626,5,157,0,0,2626, + 2627,3,202,101,0,2627,2628,5,158,0,0,2628,521,1,0,0,0,2629,2632,3,224, + 112,0,2630,2632,3,262,131,0,2631,2629,1,0,0,0,2631,2630,1,0,0,0,2632,523, + 1,0,0,0,2633,2639,3,432,216,0,2634,2639,3,88,44,0,2635,2639,3,2,1,0,2636, + 2639,3,212,106,0,2637,2639,3,404,202,0,2638,2633,1,0,0,0,2638,2634,1,0, + 0,0,2638,2635,1,0,0,0,2638,2636,1,0,0,0,2638,2637,1,0,0,0,2639,525,1,0, + 0,0,2640,2641,5,9,0,0,2641,2642,5,157,0,0,2642,2647,3,266,133,0,2643,2644, + 5,155,0,0,2644,2646,3,266,133,0,2645,2643,1,0,0,0,2646,2649,1,0,0,0,2647, + 2645,1,0,0,0,2647,2648,1,0,0,0,2648,2650,1,0,0,0,2649,2647,1,0,0,0,2650, + 2651,5,158,0,0,2651,2652,5,61,0,0,2652,2653,3,508,254,0,2653,527,1,0,0, + 0,2654,2655,5,110,0,0,2655,2660,3,442,221,0,2656,2657,5,155,0,0,2657,2659, + 3,442,221,0,2658,2656,1,0,0,0,2659,2662,1,0,0,0,2660,2658,1,0,0,0,2660, + 2661,1,0,0,0,2661,2663,1,0,0,0,2662,2660,1,0,0,0,2663,2664,5,154,0,0,2664, + 529,1,0,0,0,2665,2667,3,308,154,0,2666,2665,1,0,0,0,2666,2667,1,0,0,0, + 2667,2671,1,0,0,0,2668,2672,3,484,242,0,2669,2672,3,114,57,0,2670,2672, + 3,446,223,0,2671,2668,1,0,0,0,2671,2669,1,0,0,0,2671,2670,1,0,0,0,2672, + 531,1,0,0,0,2673,2675,5,91,0,0,2674,2673,1,0,0,0,2674,2675,1,0,0,0,2675, + 2676,1,0,0,0,2676,2677,5,111,0,0,2677,2678,3,256,128,0,2678,2679,5,161, + 0,0,2679,2682,3,508,254,0,2680,2681,5,151,0,0,2681,2683,3,202,101,0,2682, + 2680,1,0,0,0,2682,2683,1,0,0,0,2683,2684,1,0,0,0,2684,2685,5,154,0,0,2685, + 533,1,0,0,0,2686,2688,3,308,154,0,2687,2686,1,0,0,0,2687,2688,1,0,0,0, + 2688,2689,1,0,0,0,2689,2691,5,112,0,0,2690,2692,3,452,226,0,2691,2690, + 1,0,0,0,2691,2692,1,0,0,0,2692,2694,1,0,0,0,2693,2695,3,106,53,0,2694, + 2693,1,0,0,0,2694,2695,1,0,0,0,2695,2697,1,0,0,0,2696,2698,3,516,258,0, + 2697,2696,1,0,0,0,2697,2698,1,0,0,0,2698,2699,1,0,0,0,2699,2700,5,154, + 0,0,2700,535,1,0,0,0,2701,2706,3,538,269,0,2702,2703,5,155,0,0,2703,2705, + 3,538,269,0,2704,2702,1,0,0,0,2705,2708,1,0,0,0,2706,2704,1,0,0,0,2706, + 2707,1,0,0,0,2707,2711,1,0,0,0,2708,2706,1,0,0,0,2709,2711,5,107,0,0,2710, + 2701,1,0,0,0,2710,2709,1,0,0,0,2711,537,1,0,0,0,2712,2715,3,202,101,0, + 2713,2714,5,4,0,0,2714,2716,3,202,101,0,2715,2713,1,0,0,0,2715,2716,1, + 0,0,0,2716,2723,1,0,0,0,2717,2720,5,60,0,0,2718,2719,5,4,0,0,2719,2721, + 3,202,101,0,2720,2718,1,0,0,0,2720,2721,1,0,0,0,2721,2723,1,0,0,0,2722, + 2712,1,0,0,0,2722,2717,1,0,0,0,2723,539,1,0,0,0,298,546,552,562,572,581, + 586,593,599,611,614,621,627,632,636,644,650,654,657,665,674,690,699,713, + 716,719,726,732,760,765,772,774,780,782,790,798,801,810,817,822,835,839, + 843,850,855,858,871,878,886,889,898,901,904,909,916,919,929,932,935,943, + 946,952,955,964,969,972,978,981,986,991,994,1006,1023,1028,1034,1041,1050, + 1060,1062,1073,1076,1083,1088,1093,1106,1118,1123,1132,1135,1142,1150, + 1158,1161,1166,1175,1187,1192,1198,1207,1217,1222,1228,1235,1245,1249, + 1252,1275,1280,1286,1289,1296,1301,1310,1315,1321,1325,1333,1339,1343, + 1347,1359,1362,1367,1376,1383,1391,1416,1429,1432,1439,1444,1452,1455, + 1460,1465,1472,1477,1498,1505,1535,1549,1555,1558,1571,1576,1581,1594, + 1610,1616,1625,1629,1636,1641,1644,1649,1654,1660,1668,1673,1679,1692, + 1699,1714,1719,1725,1728,1733,1737,1741,1749,1753,1758,1763,1768,1774, + 1785,1792,1797,1800,1807,1818,1823,1830,1846,1848,1851,1855,1859,1864, + 1871,1877,1887,1890,1911,1916,1926,1929,1951,1956,1963,1965,1991,1997, + 2015,2028,2035,2045,2048,2057,2063,2082,2087,2103,2108,2113,2116,2119, + 2126,2129,2136,2140,2147,2157,2176,2179,2186,2192,2195,2199,2208,2215, + 2226,2242,2249,2254,2260,2265,2271,2280,2283,2287,2294,2298,2312,2323, + 2329,2340,2346,2357,2362,2377,2388,2394,2410,2416,2421,2426,2433,2437, + 2448,2453,2459,2463,2468,2476,2480,2485,2492,2497,2518,2521,2545,2550, + 2559,2573,2578,2588,2592,2598,2602,2610,2621,2631,2638,2647,2660,2666, + 2671,2674,2682,2687,2691,2694,2697,2706,2710,2715,2720,2722 + }; + + public static readonly ATN _ATN = + new ATNDeserializer().Deserialize(_serializedATN); + + +} +} // namespace ApiMark.Vhdl.VhdlAst.Antlr diff --git a/src/ApiMark.Vhdl/VhdlAst/Antlr/vhdl2008Visitor.cs b/src/ApiMark.Vhdl/VhdlAst/Antlr/vhdl2008Visitor.cs new file mode 100644 index 0000000..05adce0 --- /dev/null +++ b/src/ApiMark.Vhdl/VhdlAst/Antlr/vhdl2008Visitor.cs @@ -0,0 +1,1656 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// ANTLR Version: 4.13.1 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// Generated from vhdl2008.g4 by ANTLR 4.13.1 + +// Unreachable code detected +#pragma warning disable 0162 +// The variable '...' is assigned but its value is never used +#pragma warning disable 0219 +// Missing XML comment for publicly visible type or member '...' +#pragma warning disable 1591 +// Ambiguous reference in cref attribute +#pragma warning disable 419 + +namespace ApiMark.Vhdl.VhdlAst.Antlr { +using Antlr4.Runtime.Misc; +using Antlr4.Runtime.Tree; +using IToken = Antlr4.Runtime.IToken; + +/// +/// This interface defines a complete generic visitor for a parse tree produced +/// by . +/// +/// The return type of the visit operation. +[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.1")] +[System.CLSCompliant(false)] +public interface Ivhdl2008Visitor : IParseTreeVisitor { + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAbstract_literal([NotNull] vhdl2008Parser.Abstract_literalContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAccess_type_definition([NotNull] vhdl2008Parser.Access_type_definitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitActual_designator([NotNull] vhdl2008Parser.Actual_designatorContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitActual_parameter_part([NotNull] vhdl2008Parser.Actual_parameter_partContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitActual_part([NotNull] vhdl2008Parser.Actual_partContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAdding_operator([NotNull] vhdl2008Parser.Adding_operatorContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAggregate([NotNull] vhdl2008Parser.AggregateContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAlias_declaration([NotNull] vhdl2008Parser.Alias_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAlias_designator([NotNull] vhdl2008Parser.Alias_designatorContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAllocator([NotNull] vhdl2008Parser.AllocatorContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitArchitecture_body([NotNull] vhdl2008Parser.Architecture_bodyContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitArchitecture_declarative_part([NotNull] vhdl2008Parser.Architecture_declarative_partContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitArchitecture_statement_part([NotNull] vhdl2008Parser.Architecture_statement_partContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitArray_constraint([NotNull] vhdl2008Parser.Array_constraintContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitArray_element_constraint([NotNull] vhdl2008Parser.Array_element_constraintContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitArray_element_resolution([NotNull] vhdl2008Parser.Array_element_resolutionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitArray_type_definition([NotNull] vhdl2008Parser.Array_type_definitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAssertion([NotNull] vhdl2008Parser.AssertionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAssertion_statement([NotNull] vhdl2008Parser.Assertion_statementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAssociation_element([NotNull] vhdl2008Parser.Association_elementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAssociation_list([NotNull] vhdl2008Parser.Association_listContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAttribute_declaration([NotNull] vhdl2008Parser.Attribute_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAttribute_designator([NotNull] vhdl2008Parser.Attribute_designatorContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAttribute_name([NotNull] vhdl2008Parser.Attribute_nameContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAttribute_specification([NotNull] vhdl2008Parser.Attribute_specificationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitBase([NotNull] vhdl2008Parser.BaseContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitBinding_indication([NotNull] vhdl2008Parser.Binding_indicationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitBlock_configuration([NotNull] vhdl2008Parser.Block_configurationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitBlock_declarative_item([NotNull] vhdl2008Parser.Block_declarative_itemContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitBlock_declarative_part([NotNull] vhdl2008Parser.Block_declarative_partContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitBlock_header([NotNull] vhdl2008Parser.Block_headerContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitBlock_specification([NotNull] vhdl2008Parser.Block_specificationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitBlock_statement([NotNull] vhdl2008Parser.Block_statementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitBlock_statement_part([NotNull] vhdl2008Parser.Block_statement_partContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitCase_generate_alternative([NotNull] vhdl2008Parser.Case_generate_alternativeContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitCase_generate_statement([NotNull] vhdl2008Parser.Case_generate_statementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitCase_statement([NotNull] vhdl2008Parser.Case_statementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitCase_statement_alternative([NotNull] vhdl2008Parser.Case_statement_alternativeContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitChoice([NotNull] vhdl2008Parser.ChoiceContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitChoices([NotNull] vhdl2008Parser.ChoicesContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitComponent_configuration([NotNull] vhdl2008Parser.Component_configurationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitComponent_declaration([NotNull] vhdl2008Parser.Component_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitComponent_instantiation_statement([NotNull] vhdl2008Parser.Component_instantiation_statementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitComponent_specification([NotNull] vhdl2008Parser.Component_specificationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitComposite_type_definition([NotNull] vhdl2008Parser.Composite_type_definitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConcurrent_assertion_statement([NotNull] vhdl2008Parser.Concurrent_assertion_statementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConcurrent_conditional_signal_assignment([NotNull] vhdl2008Parser.Concurrent_conditional_signal_assignmentContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConcurrent_procedure_call_statement([NotNull] vhdl2008Parser.Concurrent_procedure_call_statementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConcurrent_selected_signal_assignment([NotNull] vhdl2008Parser.Concurrent_selected_signal_assignmentContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConcurrent_signal_assignment_statement([NotNull] vhdl2008Parser.Concurrent_signal_assignment_statementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConcurrent_simple_signal_assignment([NotNull] vhdl2008Parser.Concurrent_simple_signal_assignmentContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConcurrent_statement([NotNull] vhdl2008Parser.Concurrent_statementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitCondition([NotNull] vhdl2008Parser.ConditionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitCondition_clause([NotNull] vhdl2008Parser.Condition_clauseContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConditional_expression([NotNull] vhdl2008Parser.Conditional_expressionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConditional_force_assignment([NotNull] vhdl2008Parser.Conditional_force_assignmentContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConditional_signal_assignment([NotNull] vhdl2008Parser.Conditional_signal_assignmentContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConditional_variable_assignment([NotNull] vhdl2008Parser.Conditional_variable_assignmentContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConditional_waveform_assignment([NotNull] vhdl2008Parser.Conditional_waveform_assignmentContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConditional_waveforms([NotNull] vhdl2008Parser.Conditional_waveformsContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConfiguration_declaration([NotNull] vhdl2008Parser.Configuration_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConfiguration_declarative_item([NotNull] vhdl2008Parser.Configuration_declarative_itemContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConfiguration_declarative_part([NotNull] vhdl2008Parser.Configuration_declarative_partContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConfiguration_item([NotNull] vhdl2008Parser.Configuration_itemContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConfiguration_specification([NotNull] vhdl2008Parser.Configuration_specificationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConstant_declaration([NotNull] vhdl2008Parser.Constant_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConstrained_array_definition([NotNull] vhdl2008Parser.Constrained_array_definitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConstraint([NotNull] vhdl2008Parser.ConstraintContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitContext_clause([NotNull] vhdl2008Parser.Context_clauseContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitContext_declaration([NotNull] vhdl2008Parser.Context_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitContext_item([NotNull] vhdl2008Parser.Context_itemContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitContext_reference([NotNull] vhdl2008Parser.Context_referenceContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitDelay_mechanism([NotNull] vhdl2008Parser.Delay_mechanismContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitDesign_file([NotNull] vhdl2008Parser.Design_fileContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitDesign_unit([NotNull] vhdl2008Parser.Design_unitContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitDesignator([NotNull] vhdl2008Parser.DesignatorContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitDirection([NotNull] vhdl2008Parser.DirectionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitDisconnection_specification([NotNull] vhdl2008Parser.Disconnection_specificationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitDiscrete_range([NotNull] vhdl2008Parser.Discrete_rangeContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitElement_association([NotNull] vhdl2008Parser.Element_associationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitElement_constraint([NotNull] vhdl2008Parser.Element_constraintContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitElement_declaration([NotNull] vhdl2008Parser.Element_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitElement_resolution([NotNull] vhdl2008Parser.Element_resolutionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitElement_subtype_definition([NotNull] vhdl2008Parser.Element_subtype_definitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEntity_aspect([NotNull] vhdl2008Parser.Entity_aspectContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEntity_class([NotNull] vhdl2008Parser.Entity_classContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEntity_class_entry([NotNull] vhdl2008Parser.Entity_class_entryContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEntity_class_entry_list([NotNull] vhdl2008Parser.Entity_class_entry_listContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEntity_declaration([NotNull] vhdl2008Parser.Entity_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEntity_declarative_item([NotNull] vhdl2008Parser.Entity_declarative_itemContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEntity_declarative_part([NotNull] vhdl2008Parser.Entity_declarative_partContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEntity_designator([NotNull] vhdl2008Parser.Entity_designatorContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEntity_header([NotNull] vhdl2008Parser.Entity_headerContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEntity_name_list([NotNull] vhdl2008Parser.Entity_name_listContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEntity_specification([NotNull] vhdl2008Parser.Entity_specificationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEntity_statement([NotNull] vhdl2008Parser.Entity_statementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEntity_statement_part([NotNull] vhdl2008Parser.Entity_statement_partContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEntity_tag([NotNull] vhdl2008Parser.Entity_tagContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEnumeration_literal([NotNull] vhdl2008Parser.Enumeration_literalContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEnumeration_type_definition([NotNull] vhdl2008Parser.Enumeration_type_definitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitExit_statement([NotNull] vhdl2008Parser.Exit_statementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitExpression([NotNull] vhdl2008Parser.ExpressionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFactor([NotNull] vhdl2008Parser.FactorContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFile_declaration([NotNull] vhdl2008Parser.File_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFile_logical_name([NotNull] vhdl2008Parser.File_logical_nameContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFile_open_information([NotNull] vhdl2008Parser.File_open_informationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFile_type_definition([NotNull] vhdl2008Parser.File_type_definitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFloating_type_definition([NotNull] vhdl2008Parser.Floating_type_definitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFor_generate_statement([NotNull] vhdl2008Parser.For_generate_statementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitForce_mode([NotNull] vhdl2008Parser.Force_modeContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFormal_parameter_list([NotNull] vhdl2008Parser.Formal_parameter_listContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFormal_part([NotNull] vhdl2008Parser.Formal_partContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFull_type_declaration([NotNull] vhdl2008Parser.Full_type_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFunction_call([NotNull] vhdl2008Parser.Function_callContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFunction_specification([NotNull] vhdl2008Parser.Function_specificationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitGenerate_specification([NotNull] vhdl2008Parser.Generate_specificationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitGenerate_statement([NotNull] vhdl2008Parser.Generate_statementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitGenerate_statement_body([NotNull] vhdl2008Parser.Generate_statement_bodyContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitGeneric_clause([NotNull] vhdl2008Parser.Generic_clauseContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitGeneric_list([NotNull] vhdl2008Parser.Generic_listContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitGeneric_map_aspect([NotNull] vhdl2008Parser.Generic_map_aspectContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitGraphic_character([NotNull] vhdl2008Parser.Graphic_characterContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitGroup_constituent([NotNull] vhdl2008Parser.Group_constituentContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitGroup_constituent_list([NotNull] vhdl2008Parser.Group_constituent_listContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitGroup_declaration([NotNull] vhdl2008Parser.Group_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitGroup_template_declaration([NotNull] vhdl2008Parser.Group_template_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitGuarded_signal_specification([NotNull] vhdl2008Parser.Guarded_signal_specificationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitIdentifier([NotNull] vhdl2008Parser.IdentifierContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitIdentifier_list([NotNull] vhdl2008Parser.Identifier_listContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitIf_generate_statement([NotNull] vhdl2008Parser.If_generate_statementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitIf_statement([NotNull] vhdl2008Parser.If_statementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitIncomplete_type_declaration([NotNull] vhdl2008Parser.Incomplete_type_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitIndex_constraint([NotNull] vhdl2008Parser.Index_constraintContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitIndex_subtype_definition([NotNull] vhdl2008Parser.Index_subtype_definitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitIndexed_name([NotNull] vhdl2008Parser.Indexed_nameContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitInstantiated_unit([NotNull] vhdl2008Parser.Instantiated_unitContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitInstantiation_list([NotNull] vhdl2008Parser.Instantiation_listContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitInterface_constant_declaration([NotNull] vhdl2008Parser.Interface_constant_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitInterface_declaration([NotNull] vhdl2008Parser.Interface_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitInterface_file_declaration([NotNull] vhdl2008Parser.Interface_file_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitInterface_function_specification([NotNull] vhdl2008Parser.Interface_function_specificationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitInterface_incomplete_type_declaration([NotNull] vhdl2008Parser.Interface_incomplete_type_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitInterface_list([NotNull] vhdl2008Parser.Interface_listContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitInterface_object_declaration([NotNull] vhdl2008Parser.Interface_object_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitInterface_package_declaration([NotNull] vhdl2008Parser.Interface_package_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitInterface_package_generic_map_aspect([NotNull] vhdl2008Parser.Interface_package_generic_map_aspectContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitInterface_procedure_specification([NotNull] vhdl2008Parser.Interface_procedure_specificationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitInterface_signal_declaration([NotNull] vhdl2008Parser.Interface_signal_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitInterface_subprogram_declaration([NotNull] vhdl2008Parser.Interface_subprogram_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitInterface_subprogram_default([NotNull] vhdl2008Parser.Interface_subprogram_defaultContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitInterface_subprogram_specification([NotNull] vhdl2008Parser.Interface_subprogram_specificationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitInterface_type_declaration([NotNull] vhdl2008Parser.Interface_type_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitInterface_variable_declaration([NotNull] vhdl2008Parser.Interface_variable_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitIteration_scheme([NotNull] vhdl2008Parser.Iteration_schemeContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitLabel_colon([NotNull] vhdl2008Parser.Label_colonContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitLibrary_clause([NotNull] vhdl2008Parser.Library_clauseContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitLibrary_unit([NotNull] vhdl2008Parser.Library_unitContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitLiteral([NotNull] vhdl2008Parser.LiteralContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitLogical_operator([NotNull] vhdl2008Parser.Logical_operatorContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitLoop_statement([NotNull] vhdl2008Parser.Loop_statementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitMode_rule([NotNull] vhdl2008Parser.Mode_ruleContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitMultiplying_operator([NotNull] vhdl2008Parser.Multiplying_operatorContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitName([NotNull] vhdl2008Parser.NameContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitName_part([NotNull] vhdl2008Parser.Name_partContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitNext_statement([NotNull] vhdl2008Parser.Next_statementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitNull_statement([NotNull] vhdl2008Parser.Null_statementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitNumeric_literal([NotNull] vhdl2008Parser.Numeric_literalContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitObject_declaration([NotNull] vhdl2008Parser.Object_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPackage_body([NotNull] vhdl2008Parser.Package_bodyContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPackage_body_declarative_item([NotNull] vhdl2008Parser.Package_body_declarative_itemContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPackage_body_declarative_part([NotNull] vhdl2008Parser.Package_body_declarative_partContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPackage_declaration([NotNull] vhdl2008Parser.Package_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPackage_declarative_item([NotNull] vhdl2008Parser.Package_declarative_itemContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPackage_declarative_part([NotNull] vhdl2008Parser.Package_declarative_partContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPackage_header([NotNull] vhdl2008Parser.Package_headerContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPackage_instantiation_declaration([NotNull] vhdl2008Parser.Package_instantiation_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitParameter_specification([NotNull] vhdl2008Parser.Parameter_specificationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPhysical_literal([NotNull] vhdl2008Parser.Physical_literalContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPhysical_type_definition([NotNull] vhdl2008Parser.Physical_type_definitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPort_clause([NotNull] vhdl2008Parser.Port_clauseContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPort_list([NotNull] vhdl2008Parser.Port_listContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPort_map_aspect([NotNull] vhdl2008Parser.Port_map_aspectContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPrefix([NotNull] vhdl2008Parser.PrefixContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPrimary([NotNull] vhdl2008Parser.PrimaryContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPrimary_unit([NotNull] vhdl2008Parser.Primary_unitContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPrimary_unit_declaration([NotNull] vhdl2008Parser.Primary_unit_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitProcedure_call([NotNull] vhdl2008Parser.Procedure_callContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitProcedure_call_statement([NotNull] vhdl2008Parser.Procedure_call_statementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitProcedure_specification([NotNull] vhdl2008Parser.Procedure_specificationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitProcedural_declarative_item([NotNull] vhdl2008Parser.Procedural_declarative_itemContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitProcedural_statement_part([NotNull] vhdl2008Parser.Procedural_statement_partContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitProcess_declarative_item([NotNull] vhdl2008Parser.Process_declarative_itemContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitProcess_declarative_part([NotNull] vhdl2008Parser.Process_declarative_partContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitProcess_sensitivity_list([NotNull] vhdl2008Parser.Process_sensitivity_listContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitProcess_statement([NotNull] vhdl2008Parser.Process_statementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitProcess_statement_part([NotNull] vhdl2008Parser.Process_statement_partContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitProtected_type_body([NotNull] vhdl2008Parser.Protected_type_bodyContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitProtected_type_body_declarative_item([NotNull] vhdl2008Parser.Protected_type_body_declarative_itemContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitProtected_type_body_declarative_part([NotNull] vhdl2008Parser.Protected_type_body_declarative_partContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitProtected_type_declaration([NotNull] vhdl2008Parser.Protected_type_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitProtected_type_declarative_item([NotNull] vhdl2008Parser.Protected_type_declarative_itemContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitProtected_type_declarative_part([NotNull] vhdl2008Parser.Protected_type_declarative_partContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitProtected_type_definition([NotNull] vhdl2008Parser.Protected_type_definitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitQualified_expression([NotNull] vhdl2008Parser.Qualified_expressionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitRange_decl([NotNull] vhdl2008Parser.Range_declContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitRange_constraint([NotNull] vhdl2008Parser.Range_constraintContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitRecord_constraint([NotNull] vhdl2008Parser.Record_constraintContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitRecord_element_constraint([NotNull] vhdl2008Parser.Record_element_constraintContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitRecord_element_resolution([NotNull] vhdl2008Parser.Record_element_resolutionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitRecord_resolution([NotNull] vhdl2008Parser.Record_resolutionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitRecord_type_definition([NotNull] vhdl2008Parser.Record_type_definitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitRelation([NotNull] vhdl2008Parser.RelationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitRelational_operator([NotNull] vhdl2008Parser.Relational_operatorContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitReport_statement([NotNull] vhdl2008Parser.Report_statementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitResolution_indication([NotNull] vhdl2008Parser.Resolution_indicationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitReturn_statement([NotNull] vhdl2008Parser.Return_statementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitScalar_type_definition([NotNull] vhdl2008Parser.Scalar_type_definitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSecondary_unit([NotNull] vhdl2008Parser.Secondary_unitContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSecondary_unit_declaration([NotNull] vhdl2008Parser.Secondary_unit_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSelected_expressions([NotNull] vhdl2008Parser.Selected_expressionsContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSelected_force_assignment([NotNull] vhdl2008Parser.Selected_force_assignmentContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSelected_name([NotNull] vhdl2008Parser.Selected_nameContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSelected_signal_assignment([NotNull] vhdl2008Parser.Selected_signal_assignmentContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSelected_variable_assignment([NotNull] vhdl2008Parser.Selected_variable_assignmentContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSelected_waveform_assignment([NotNull] vhdl2008Parser.Selected_waveform_assignmentContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSelected_waveforms([NotNull] vhdl2008Parser.Selected_waveformsContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSensitivity_clause([NotNull] vhdl2008Parser.Sensitivity_clauseContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSensitivity_list([NotNull] vhdl2008Parser.Sensitivity_listContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSequence_of_statements([NotNull] vhdl2008Parser.Sequence_of_statementsContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSequential_statement([NotNull] vhdl2008Parser.Sequential_statementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitShift_expression([NotNull] vhdl2008Parser.Shift_expressionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitShift_operator([NotNull] vhdl2008Parser.Shift_operatorContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSignal_assignment_statement([NotNull] vhdl2008Parser.Signal_assignment_statementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSignal_declaration([NotNull] vhdl2008Parser.Signal_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSignal_kind([NotNull] vhdl2008Parser.Signal_kindContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSignal_list([NotNull] vhdl2008Parser.Signal_listContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSignature([NotNull] vhdl2008Parser.SignatureContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSimple_expression([NotNull] vhdl2008Parser.Simple_expressionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSimple_force_assignment([NotNull] vhdl2008Parser.Simple_force_assignmentContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSimple_release_assignment([NotNull] vhdl2008Parser.Simple_release_assignmentContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSimple_signal_assignment([NotNull] vhdl2008Parser.Simple_signal_assignmentContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSimple_waveform_assignment([NotNull] vhdl2008Parser.Simple_waveform_assignmentContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSimple_variable_assignment([NotNull] vhdl2008Parser.Simple_variable_assignmentContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSlice_name([NotNull] vhdl2008Parser.Slice_nameContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSubprogram_body([NotNull] vhdl2008Parser.Subprogram_bodyContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSubprogram_declaration([NotNull] vhdl2008Parser.Subprogram_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSubprogram_declarative_item([NotNull] vhdl2008Parser.Subprogram_declarative_itemContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSubprogram_declarative_part([NotNull] vhdl2008Parser.Subprogram_declarative_partContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSubprogram_header([NotNull] vhdl2008Parser.Subprogram_headerContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSubprogram_instantiation_declaration([NotNull] vhdl2008Parser.Subprogram_instantiation_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSubprogram_kind([NotNull] vhdl2008Parser.Subprogram_kindContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSubprogram_specification([NotNull] vhdl2008Parser.Subprogram_specificationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSubprogram_statement_part([NotNull] vhdl2008Parser.Subprogram_statement_partContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSubtype_declaration([NotNull] vhdl2008Parser.Subtype_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSubtype_indication([NotNull] vhdl2008Parser.Subtype_indicationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSuffix([NotNull] vhdl2008Parser.SuffixContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTarget([NotNull] vhdl2008Parser.TargetContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTerm([NotNull] vhdl2008Parser.TermContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTimeout_clause([NotNull] vhdl2008Parser.Timeout_clauseContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTool_directive([NotNull] vhdl2008Parser.Tool_directiveContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitType_conversion([NotNull] vhdl2008Parser.Type_conversionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitType_declaration([NotNull] vhdl2008Parser.Type_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitType_definition([NotNull] vhdl2008Parser.Type_definitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitUnbounded_array_definition([NotNull] vhdl2008Parser.Unbounded_array_definitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitUse_clause([NotNull] vhdl2008Parser.Use_clauseContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitVariable_assignment_statement([NotNull] vhdl2008Parser.Variable_assignment_statementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitVariable_declaration([NotNull] vhdl2008Parser.Variable_declarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitWait_statement([NotNull] vhdl2008Parser.Wait_statementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitWaveform([NotNull] vhdl2008Parser.WaveformContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitWaveform_element([NotNull] vhdl2008Parser.Waveform_elementContext context); +} +} // namespace ApiMark.Vhdl.VhdlAst.Antlr diff --git a/src/ApiMark.Vhdl/VhdlAst/VhdlAstModel.cs b/src/ApiMark.Vhdl/VhdlAst/VhdlAstModel.cs new file mode 100644 index 0000000..35bec1c --- /dev/null +++ b/src/ApiMark.Vhdl/VhdlAst/VhdlAstModel.cs @@ -0,0 +1,109 @@ +namespace ApiMark.Vhdl.VhdlAst; + +/// Holds a parameter name and its documentation text from a --! doc comment. +/// Parameter name as it appears in the @param tag. +/// Trimmed description text from the @param tag. +public record VhdlParamDoc(string Name, string Description); + +/// Holds structured documentation extracted from a VHDL --! doc comment block. +/// Brief description from @brief or first plain paragraph. +/// Extended description body text. +/// One entry per @param tag. +/// Return description from @return tag, or null. +public record VhdlDocComment(string? Summary, string? Details, IReadOnlyList Params, string? Returns = null); + +/// Represents a port in a VHDL entity declaration. +/// Port name. +/// Port direction: IN, OUT, INOUT, BUFFER, or in (default). +/// Port type as declared in source. +/// Documentation extracted from inline --! comment, or null. +public record VhdlPortDoc(string Name, string Direction, string TypeName, VhdlDocComment? Doc); + +/// Represents a generic parameter in a VHDL entity declaration. +/// Generic name. +/// Generic type as declared in source. +/// Default value expression text, or null. +/// Documentation extracted from inline --! comment, or null. +public record VhdlGenericDoc(string Name, string TypeName, string? DefaultValue, VhdlDocComment? Doc); + +/// Represents a VHDL entity declaration with its generics and ports. +/// Entity name. +/// List of generic parameters. +/// List of ports. +/// Documentation from preceding --! block comment, or null. +public record VhdlEntityDecl(string Name, IReadOnlyList Generics, IReadOnlyList Ports, VhdlDocComment? Doc); + +/// Represents a VHDL architecture body declaration. +/// Architecture name. +/// Name of the entity this architecture implements. +/// Documentation from preceding --! block comment, or null. +public record VhdlArchitectureDecl(string Name, string EntityName, VhdlDocComment? Doc); + +/// Represents a type or subtype declaration in a VHDL package. +/// Type name. +/// Type definition text as declared in source. +/// Documentation from preceding --! block comment, or null. +public record VhdlTypeDecl(string Name, string Definition, VhdlDocComment? Doc); + +/// Represents a constant declaration in a VHDL package. +/// Constant name. +/// Constant type as declared in source. +/// Default value expression text, or null. +/// Documentation from inline --! comment, or null. +public record VhdlConstantDecl(string Name, string TypeName, string? Value, VhdlDocComment? Doc); + +/// Represents a component declaration in a VHDL package. +/// Component name. +/// Documentation from preceding --! block comment, or null. +public record VhdlComponentDecl(string Name, VhdlDocComment? Doc); + +/// Specifies whether a subprogram declaration is a function or procedure. +public enum VhdlSubprogramKind +{ + /// Indicates a function subprogram. + Function, + + /// Indicates a procedure subprogram. + Procedure, +} + +/// Represents a parameter in a VHDL subprogram declaration. +/// Parameter name. +/// Parameter mode: IN, OUT, INOUT, BUFFER, SIGNAL, VARIABLE, CONSTANT, or empty. +/// Parameter type as declared in source. +public record VhdlParamDecl(string Name, string Mode, string TypeName); + +/// Represents a subprogram (function or procedure) declaration in a VHDL package. +/// Subprogram name. +/// Whether this is a function or procedure. +/// Full signature text as declared in source. +/// List of formal parameters. +/// Return type for functions, or null for procedures. +/// Documentation from preceding --! block comment, or null. +public record VhdlSubprogramDecl(string Name, VhdlSubprogramKind Kind, string Signature, IReadOnlyList Parameters, string? ReturnType, VhdlDocComment? Doc); + +/// Represents a VHDL package declaration. +/// Package name. +/// Documentation from preceding --! block comment, or null. +/// Type and subtype declarations in the package. +/// Constant declarations in the package. +/// Component declarations in the package. +/// Subprogram (function/procedure) declarations in the package. +public record VhdlPackageDecl( + string Name, + VhdlDocComment? Doc, + IReadOnlyList Types, + IReadOnlyList Constants, + IReadOnlyList Components, + IReadOnlyList Subprograms); + +/// Represents all VHDL declarations parsed from a single source file. +/// Absolute path to the source file. +/// All entity declarations found in this file. +/// All architecture body declarations found in this file. +/// All package declarations found in this file. +public record VhdlFileModel( + string FilePath, + IReadOnlyList Entities, + IReadOnlyList Architectures, + IReadOnlyList Packages); diff --git a/src/ApiMark.Vhdl/VhdlAst/VhdlAstParser.cs b/src/ApiMark.Vhdl/VhdlAst/VhdlAstParser.cs new file mode 100644 index 0000000..61585c9 --- /dev/null +++ b/src/ApiMark.Vhdl/VhdlAst/VhdlAstParser.cs @@ -0,0 +1,787 @@ +using Antlr4.Runtime; +using ApiMark.Vhdl.VhdlAst.Antlr; + +namespace ApiMark.Vhdl.VhdlAst; + +/// +/// Parses a VHDL source file into a using the ANTLR4 vhdl2008 grammar. +/// +internal static class VhdlAstParser +{ + /// + /// Parses the specified VHDL file and returns a containing + /// all entity, architecture, and package declarations found. + /// + /// Absolute path to the .vhd source file. + /// A with all declarations and associated doc comments. + internal static VhdlFileModel Parse(string filePath) + { + var sourceText = File.ReadAllText(filePath); + var lines = File.ReadAllLines(filePath); + + var input = new AntlrInputStream(sourceText); + var lexer = new vhdl2008Lexer(input); + var stream = new CommonTokenStream(lexer); + var parser = new vhdl2008Parser(stream); + + // Replace default ConsoleErrorListener with a collecting listener so that + // syntax errors are thrown as exceptions rather than written to Console.Error. + var errorListener = new CollectingErrorListener(); + lexer.RemoveErrorListeners(); + lexer.AddErrorListener(errorListener); + parser.RemoveErrorListeners(); + parser.AddErrorListener(errorListener); + + var tree = parser.design_file(); + errorListener.ThrowIfErrors(filePath); + + var visitor = new VhdlVisitor(sourceText, lines); + visitor.Visit(tree); + + return new VhdlFileModel(filePath, visitor.Entities, visitor.Architectures, visitor.Packages); + } + + /// + /// Visitor that walks the ANTLR4 parse tree to collect VHDL declarations. + /// + private sealed class VhdlVisitor : vhdl2008BaseVisitor + { + private readonly string _sourceText; + private readonly string[] _lines; + + /// Gets the entity declarations collected during the tree walk. + public List Entities { get; } = []; + + /// Gets the architecture declarations collected during the tree walk. + public List Architectures { get; } = []; + + /// Gets the package declarations collected during the tree walk. + public List Packages { get; } = []; + + /// Initializes the visitor with the raw source text and split lines. + /// Full raw text of the file (used for range-based type extraction). + /// Source lines array (1-based via lines[lineNum - 1]). + public VhdlVisitor(string sourceText, string[] lines) + { + _sourceText = sourceText; + _lines = lines; + } + + /// + public override object? VisitEntity_declaration(vhdl2008Parser.Entity_declarationContext context) + { + // Extract entity name + var entityName = context.identifier(0).GetText(); + + // Extract preceding doc comment + var entityDoc = ExtractPrecedingDocComment(context.Start.Line); + + // Parse generics and ports via focused helpers to limit nesting depth + var generics = ParseEntityGenerics(context); + var ports = ParseEntityPorts(context); + + Entities.Add(new VhdlEntityDecl(entityName, generics, ports, entityDoc)); + + // Do not visit children of entity_declaration to avoid collecting nested declarations + return null; + } + + /// + /// Parses all generic interface declarations from an entity header into a list of + /// records, one per identifier. + /// + /// The entity declaration context whose generic clause to examine. + /// + /// A list of records extracted from the generic clause, + /// or an empty list when no generic clause is present. + /// + private List ParseEntityGenerics(vhdl2008Parser.Entity_declarationContext context) + { + var generics = new List(); + var genericDecls = context.entity_header() + ?.generic_clause() + ?.generic_list() + ?.interface_list() + ?.interface_declaration(); + if (genericDecls == null) + { + return generics; + } + + foreach (var iface in genericDecls) + { + var constDecl = iface.interface_object_declaration()?.interface_constant_declaration(); + if (constDecl == null) + { + continue; + } + + var identifiers = constDecl.identifier_list()?.identifier(); + if (identifiers == null) + { + continue; + } + + var typeName = GetSourceRange(constDecl.subtype_indication()); + var defaultValue = constDecl.expression() != null + ? GetSourceRange(constDecl.expression()) + : null; + + // Extract inline trailing comment from the line of the last token of this declaration + var inlineDoc = ExtractInlineTrailingComment(constDecl.Stop.Line); + + foreach (var ident in identifiers) + { + generics.Add(new VhdlGenericDoc(ident.GetText(), typeName, defaultValue, inlineDoc)); + } + } + + return generics; + } + + /// + /// Parses all port interface declarations from an entity header into a list of + /// records, one per identifier. + /// + /// The entity declaration context whose port clause to examine. + /// + /// A list of records extracted from the port clause, + /// or an empty list when no port clause is present. + /// + private List ParseEntityPorts(vhdl2008Parser.Entity_declarationContext context) + { + var ports = new List(); + var portDecls = context.entity_header() + ?.port_clause() + ?.port_list() + ?.interface_list() + ?.interface_declaration(); + if (portDecls == null) + { + return ports; + } + + foreach (var iface in portDecls) + { + ports.AddRange(ParsePortInterfaceDeclaration(iface)); + } + + return ports; + } + + /// + /// Parses a single interface declaration from a port clause into zero or more + /// records, handling both the signal and the constant + /// (fallback) declaration forms. + /// + /// + /// ANTLR may parse a plain name : IN type port as an + /// interface_constant_declaration rather than an + /// interface_signal_declaration; the fallback branch handles that case and + /// always assigns direction IN. + /// + /// The interface declaration context to parse. + /// + /// A sequence of records — one per identifier — or an + /// empty sequence when the declaration form is not recognized. + /// + private List ParsePortInterfaceDeclaration( + vhdl2008Parser.Interface_declarationContext iface) + { + var result = new List(); + var signalDecl = iface.interface_object_declaration()?.interface_signal_declaration(); + + if (signalDecl != null) + { + var identifiers = signalDecl.identifier_list()?.identifier(); + if (identifiers == null) + { + return result; + } + + // Extract direction — default is IN per VHDL-2008 §6.5.2 + var modeCtx = signalDecl.mode_rule(); + var direction = "IN"; + if (modeCtx != null) + { + if (modeCtx.OUT() != null) + { + direction = "OUT"; + } + else if (modeCtx.INOUT() != null) + { + direction = "INOUT"; + } + else if (modeCtx.BUFFER() != null) + { + direction = "BUFFER"; + } + else + { + direction = "IN"; + } + } + + var typeName = GetSourceRange(signalDecl.subtype_indication()); + var inlineDoc = ExtractInlineTrailingComment(signalDecl.Stop.Line); + foreach (var ident in identifiers) + { + result.Add(new VhdlPortDoc(ident.GetText(), direction, typeName, inlineDoc)); + } + + return result; + } + + // Fallback: ANTLR may parse `name : IN type` as interface_constant_declaration + var constDecl = iface.interface_object_declaration()?.interface_constant_declaration(); + if (constDecl == null) + { + return result; + } + + var constIdentifiers = constDecl.identifier_list()?.identifier(); + if (constIdentifiers == null) + { + return result; + } + + var constTypeName = GetSourceRange(constDecl.subtype_indication()); + var constInlineDoc = ExtractInlineTrailingComment(constDecl.Stop.Line); + foreach (var ident in constIdentifiers) + { + result.Add(new VhdlPortDoc(ident.GetText(), "IN", constTypeName, constInlineDoc)); + } + + return result; + } + + /// + public override object? VisitArchitecture_body(vhdl2008Parser.Architecture_bodyContext context) + { + var archName = context.identifier(0).GetText(); + var entityName = context.name().GetText(); + var doc = ExtractPrecedingDocComment(context.Start.Line); + + Architectures.Add(new VhdlArchitectureDecl(archName, entityName, doc)); + + // Do not visit children of architecture_body + return null; + } + + /// + public override object? VisitPackage_declaration(vhdl2008Parser.Package_declarationContext context) + { + var pkgName = context.identifier(0).GetText(); + var doc = ExtractPrecedingDocComment(context.Start.Line); + + var types = new List(); + var constants = new List(); + var components = new List(); + var subprograms = new List(); + + var items = context.package_declarative_part()?.package_declarative_item(); + if (items != null) + { + foreach (var item in items) + { + var fullTypeDecl = item.type_declaration()?.full_type_declaration(); + if (fullTypeDecl != null) + { + var typeName = fullTypeDecl.identifier().GetText(); + var definition = GetSourceRange(fullTypeDecl.type_definition()); + var typeDoc = ExtractPrecedingDocComment(item.Start.Line); + types.Add(new VhdlTypeDecl(typeName, definition, typeDoc)); + continue; + } + + var subtypeDecl = item.subtype_declaration(); + if (subtypeDecl != null) + { + var typeName = subtypeDecl.identifier().GetText(); + var definition = GetSourceRange(subtypeDecl.subtype_indication()); + var typeDoc = ExtractPrecedingDocComment(item.Start.Line); + types.Add(new VhdlTypeDecl(typeName, definition, typeDoc)); + continue; + } + + var constDecl = item.constant_declaration(); + if (constDecl != null) + { + var constTypeName = GetSourceRange(constDecl.subtype_indication()); + var value = constDecl.expression() != null ? GetSourceRange(constDecl.expression()) : null; + var constDoc = ExtractPrecedingDocComment(item.Start.Line); + var identifiers = constDecl.identifier_list()?.identifier(); + if (identifiers != null) + { + foreach (var ident in identifiers) + { + constants.Add(new VhdlConstantDecl(ident.GetText(), constTypeName, value, constDoc)); + } + } + continue; + } + + var compDecl = item.component_declaration(); + if (compDecl != null) + { + var compName = compDecl.identifier(0).GetText(); + var compDoc = ExtractPrecedingDocComment(item.Start.Line); + components.Add(new VhdlComponentDecl(compName, compDoc)); + continue; + } + + var subprogramDecl = item.subprogram_declaration(); + if (subprogramDecl != null) + { + var spec = subprogramDecl.subprogram_specification(); + if (spec != null) + { + var decl = ParseSubprogramDecl(item, spec); + if (decl != null) + { + subprograms.Add(decl); + } + } + } + } + } + + Packages.Add(new VhdlPackageDecl(pkgName, doc, types, constants, components, subprograms)); + + // Do not visit children of package_declaration + return null; + } + + /// + /// Parses a subprogram specification context into a , + /// handling both function and procedure forms. + /// + /// + /// Returns when the specification context contains neither a + /// function nor a procedure specification, which can occur with unusual grammar + /// productions that do not map to either recognized form. + /// + /// + /// The package declarative item that owns the subprogram; used to extract the + /// preceding doc comment from the source line preceding the declaration. + /// + /// The subprogram specification context to parse. + /// + /// A when the spec is a function or procedure; + /// otherwise. + /// + private VhdlSubprogramDecl? ParseSubprogramDecl( + vhdl2008Parser.Package_declarative_itemContext item, + vhdl2008Parser.Subprogram_specificationContext spec) + { + var funcSpec = spec.function_specification(); + var procSpec = spec.procedure_specification(); + + string subprogramName; + VhdlSubprogramKind kind; + IReadOnlyList parameters; + string? returnType; + + if (funcSpec != null) + { + subprogramName = funcSpec.designator().identifier()?.GetText() ?? funcSpec.designator().GetText(); + kind = VhdlSubprogramKind.Function; + parameters = ExtractFormalParameters(funcSpec.formal_parameter_list()); + + // Extract return type: the name() rule holds the type_mark after RETURN + returnType = funcSpec.name()?.GetText(); + } + else if (procSpec != null) + { + subprogramName = procSpec.designator().identifier()?.GetText() ?? procSpec.designator().GetText(); + kind = VhdlSubprogramKind.Procedure; + parameters = ExtractFormalParameters(procSpec.formal_parameter_list()); + returnType = null; + } + else + { + return null; + } + + var signature = GetSourceRange(spec); + var subprogramDoc = ExtractPrecedingDocComment(item.Start.Line); + return new VhdlSubprogramDecl(subprogramName, kind, signature, parameters, returnType, subprogramDoc); + } + + /// + /// Extracts the source text for an ANTLR parser rule context, preserving whitespace + /// that the grammar's skip rules would otherwise discard. + /// + /// The parser rule context whose source range to extract. + /// The raw source text spanning from the context's first to last token. + private string GetSourceRange(Antlr4.Runtime.ParserRuleContext ctx) => + _sourceText[ctx.Start.StartIndex..(ctx.Stop.StopIndex + 1)]; + + /// + /// Extracts structured parameter declarations from a formal parameter list context, + /// covering interface_signal_declaration, interface_variable_declaration, and + /// interface_constant_declaration (the last also matches undecorated parameters). + /// + /// The formal_parameter_list context, or null when there are no parameters. + /// A read-only list of records, one per identifier. + private List ExtractFormalParameters( + vhdl2008Parser.Formal_parameter_listContext? formalParams) + { + var parameters = new List(); + if (formalParams == null) + { + return parameters; + } + + var ifaceDecls = formalParams.interface_list()?.interface_declaration(); + if (ifaceDecls == null) + { + return parameters; + } + + foreach (var iface in ifaceDecls) + { + var objDecl = iface.interface_object_declaration(); + if (objDecl == null) + { + continue; + } + + // Try interface_signal_declaration first: `[SIGNAL] identifiers : [mode] subtype` + var signalDecl = objDecl.interface_signal_declaration(); + if (signalDecl != null) + { + parameters.AddRange(ExtractSignalParams(signalDecl)); + continue; + } + + // Try interface_variable_declaration: `[VARIABLE] identifiers : [mode] subtype` + var varDecl = objDecl.interface_variable_declaration(); + if (varDecl != null) + { + parameters.AddRange(ExtractVariableParams(varDecl)); + continue; + } + + // Fall back to interface_constant_declaration: `[CONSTANT] identifiers : [IN] subtype` + // This also matches undecorated parameters such as `v : STD_LOGIC_VECTOR` + var constDecl = objDecl.interface_constant_declaration(); + if (constDecl != null) + { + parameters.AddRange(ExtractConstantParams(constDecl)); + } + } + + return parameters; + } + + /// + /// Extracts records from an interface signal declaration, + /// preserving the optional SIGNAL class keyword and the port direction in the mode string. + /// + /// The interface signal declaration context to extract from. + /// + /// A sequence of records — one per identifier — or an + /// empty sequence when the identifier list is absent. + /// + private List ExtractSignalParams( + vhdl2008Parser.Interface_signal_declarationContext signalDecl) + { + var result = new List(); + var identifiers = signalDecl.identifier_list()?.identifier(); + if (identifiers == null) + { + return result; + } + + // Collect class keyword and direction into a combined mode string + var classKeyword = signalDecl.SIGNAL() != null ? "SIGNAL" : string.Empty; + var direction = ExtractModeText(signalDecl.mode_rule()); + var mode = string.Join(" ", new[] { classKeyword, direction }.Where(s => !string.IsNullOrEmpty(s))); + var typeName = GetSourceRange(signalDecl.subtype_indication()); + + foreach (var ident in identifiers) + { + result.Add(new VhdlParamDecl(ident.GetText(), mode, typeName)); + } + + return result; + } + + /// + /// Extracts records from an interface variable declaration, + /// preserving the optional VARIABLE class keyword and the port direction in the mode string. + /// + /// The interface variable declaration context to extract from. + /// + /// A sequence of records — one per identifier — or an + /// empty sequence when the identifier list is absent. + /// + private List ExtractVariableParams( + vhdl2008Parser.Interface_variable_declarationContext varDecl) + { + var result = new List(); + var identifiers = varDecl.identifier_list()?.identifier(); + if (identifiers == null) + { + return result; + } + + var classKeyword = varDecl.VARIABLE() != null ? "VARIABLE" : string.Empty; + var direction = ExtractModeText(varDecl.mode_rule()); + var mode = string.Join(" ", new[] { classKeyword, direction }.Where(s => !string.IsNullOrEmpty(s))); + var typeName = GetSourceRange(varDecl.subtype_indication()); + + foreach (var ident in identifiers) + { + result.Add(new VhdlParamDecl(ident.GetText(), mode, typeName)); + } + + return result; + } + + /// + /// Extracts records from an interface constant declaration, + /// preserving the optional CONSTANT class keyword and the explicit IN direction when + /// present. This form also matches undecorated parameters such as + /// v : STD_LOGIC_VECTOR. + /// + /// The interface constant declaration context to extract from. + /// + /// A sequence of records — one per identifier — or an + /// empty sequence when the identifier list is absent. + /// + private List ExtractConstantParams( + vhdl2008Parser.Interface_constant_declarationContext constDecl) + { + var result = new List(); + var identifiers = constDecl.identifier_list()?.identifier(); + if (identifiers == null) + { + return result; + } + + // CONSTANT keyword is optional; direction for constants is always IN when explicit + var classKeyword = constDecl.CONSTANT() != null ? "CONSTANT" : string.Empty; + var direction = constDecl.IN() != null ? "IN" : string.Empty; + var mode = string.Join(" ", new[] { classKeyword, direction }.Where(s => !string.IsNullOrEmpty(s))); + var typeName = GetSourceRange(constDecl.subtype_indication()); + + foreach (var ident in identifiers) + { + result.Add(new VhdlParamDecl(ident.GetText(), mode, typeName)); + } + + return result; + } + + /// + /// Converts a mode_rule context into a direction string (IN, OUT, INOUT, or BUFFER), + /// returning an empty string when the context is null. + /// + /// The mode_rule context, or null when no direction is specified. + /// Upper-case direction text, or an empty string. + private static string ExtractModeText(vhdl2008Parser.Mode_ruleContext? modeCtx) + { + if (modeCtx == null) + { + return string.Empty; + } + + if (modeCtx.OUT() != null) + { + return "OUT"; + } + + if (modeCtx.INOUT() != null) + { + return "INOUT"; + } + + if (modeCtx.BUFFER() != null) + { + return "BUFFER"; + } + + // IN is the default and seldom written explicitly; include it when present + if (modeCtx.IN() != null) + { + return "IN"; + } + + return string.Empty; + } + + /// + /// Walks backward from the line immediately preceding , + /// collecting consecutive lines that begin with --! (after trimming leading whitespace), + /// and parses them into a . + /// + /// 1-based line number of the declaration token. + /// Parsed doc comment, or null if no preceding --! lines are found. + private VhdlDocComment? ExtractPrecedingDocComment(int declarationLine) + { + var commentLines = new List(); + var line = declarationLine - 1; + while (line >= 1) + { + var rawLine = _lines[line - 1]; // 0-indexed array, 1-based line number + var trimmed = rawLine.TrimStart(); + if (trimmed.StartsWith("--!", StringComparison.Ordinal)) + { + var text = trimmed.Length > 3 ? trimmed[3..].TrimStart() : string.Empty; + commentLines.Add(text); + line--; + } + else + { + break; + } + } + + commentLines.Reverse(); + return ParseDocCommentLines(commentLines); + } + + /// + /// Scans the raw source line at for an inline --! + /// comment and returns a minimal from it. + /// + /// 1-based line number of the declaration token. + /// A doc comment whose Summary is the inline text, or null if none found. + private VhdlDocComment? ExtractInlineTrailingComment(int portLine) + { + if (portLine < 1 || portLine > _lines.Length) + { + return null; + } + + var rawLine = _lines[portLine - 1]; + var idx = rawLine.LastIndexOf("--!", StringComparison.Ordinal); + if (idx < 0) + { + return null; + } + + var text = rawLine[(idx + 3)..].TrimStart(); + if (string.IsNullOrEmpty(text)) + { + return null; + } + + return new VhdlDocComment(text, null, []); + } + + /// + /// Parses a list of --! comment lines into a structured , + /// recognizing @brief, @param, and @return tags. + /// + /// Pre-extracted comment line texts (without the --! prefix). + /// A or null when is empty. + private static VhdlDocComment? ParseDocCommentLines(List lines) + { + if (lines.Count == 0) + { + return null; + } + + string? summary = null; + string? returns = null; + var paramDocs = new List(); + var bodyLines = new List(); + + foreach (var line in lines) + { + if (line.StartsWith("@brief ", StringComparison.Ordinal)) + { + summary = line["@brief ".Length..].Trim(); + } + else if (line.StartsWith("@param ", StringComparison.Ordinal)) + { + var rest = line["@param ".Length..].Trim(); + var spaceIdx = rest.IndexOf(' '); + if (spaceIdx > 0) + { + var paramName = rest[..spaceIdx]; + var paramDesc = rest[(spaceIdx + 1)..].Trim(); + paramDocs.Add(new VhdlParamDoc(paramName, paramDesc)); + } + else if (rest.Length > 0) + { + // @param with name but no description — preserve the name with empty description + paramDocs.Add(new VhdlParamDoc(rest, string.Empty)); + } + } + else if (line.StartsWith("@return ", StringComparison.Ordinal)) + { + returns = line["@return ".Length..].Trim(); + } + else + { + bodyLines.Add(line); + } + } + + // If no @brief tag, use the first non-empty body line as the summary + if (summary == null) + { + var firstLine = bodyLines.FirstOrDefault(l => !string.IsNullOrWhiteSpace(l)); + if (firstLine != null) + { + summary = firstLine.Trim(); + bodyLines.Remove(firstLine); + } + } + + // Remaining body lines become the details text + var detailText = string.Join("\n", bodyLines.SkipWhile(l => string.IsNullOrWhiteSpace(l))).Trim(); + string? details = !string.IsNullOrEmpty(detailText) ? detailText : null; + + return new VhdlDocComment(summary, details, paramDocs, returns); + } + } + + /// + /// ANTLR4 error listener that collects syntax errors and can throw them as an + /// , preventing silent error recovery from + /// producing corrupt parse trees. + /// + private sealed class CollectingErrorListener : IAntlrErrorListener, IAntlrErrorListener + { + private readonly List _errors = []; + + // Called by the lexer (offending symbol is an int token type) + public void SyntaxError( + TextWriter output, + IRecognizer recognizer, + int offendingSymbol, + int line, + int charPositionInLine, + string msg, + RecognitionException e) => + _errors.Add($"line {line}:{charPositionInLine} {msg}"); + + // Called by the parser (offending symbol is an IToken) + public void SyntaxError( + TextWriter output, + IRecognizer recognizer, + IToken offendingSymbol, + int line, + int charPositionInLine, + string msg, + RecognitionException e) => + _errors.Add($"line {line}:{charPositionInLine} {msg}"); + + /// Throws if any syntax errors were collected. + /// Source file path included in the exception message. + /// Thrown when the file has syntax errors. + public void ThrowIfErrors(string filePath) + { + if (_errors.Count > 0) + { + throw new InvalidOperationException( + $"VHDL syntax errors in '{filePath}': {string.Join("; ", _errors)}"); + } + } + } +} diff --git a/src/ApiMark.Vhdl/VhdlEmitter.cs b/src/ApiMark.Vhdl/VhdlEmitter.cs new file mode 100644 index 0000000..dbaa74c --- /dev/null +++ b/src/ApiMark.Vhdl/VhdlEmitter.cs @@ -0,0 +1,98 @@ +using ApiMark.Core; +using ApiMark.Vhdl.VhdlAst; + +namespace ApiMark.Vhdl; + +/// IApiEmitter implementation that dispatches to format-specific VHDL emitters. +internal sealed class VhdlEmitter : IApiEmitter +{ + /// Column header for description columns in tables. + internal const string DescriptionColumnHeader = "Description"; + + /// Placeholder text for members without documentation. + internal const string NoDescriptionPlaceholder = "*No description provided.*"; + + /// Object-class keywords stripped from subprogram parameter types before display. + private static readonly HashSet ObjectClassKeywords = + new(StringComparer.OrdinalIgnoreCase) { "SIGNAL", "VARIABLE", "CONSTANT", "FILE" }; + + private readonly VhdlGeneratorOptions _options; + private readonly IReadOnlyList _fileModels; + + /// Initializes a new VhdlEmitter with the specified options and file models. + /// Generator options. + /// Parsed file models to emit. + internal VhdlEmitter(VhdlGeneratorOptions options, IReadOnlyList fileModels) + { + _options = options; + _fileModels = fileModels; + } + + /// Gets the generator options. + internal VhdlGeneratorOptions Options => _options; + + /// + public void Emit(IMarkdownWriterFactory factory, EmitConfig config, IContext context) + { + ArgumentNullException.ThrowIfNull(factory); + if (_fileModels.Count == 0) + { + return; + } + + if (config.Format == OutputFormat.SingleFile) + { + new VhdlEmitterSingleFile(this, _fileModels).Emit(factory, config, context); + } + else + { + new VhdlEmitterGradualDisclosure(this, _fileModels).Emit(factory, config, context); + } + } + + /// Gets the summary from a VhdlDocComment, or null. + /// The doc comment to extract from, or null. + /// The summary text, or null if doc is null. + internal static string? GetSummary(VhdlDocComment? doc) => + string.IsNullOrEmpty(doc?.Summary) ? null : doc!.Summary; + + /// + /// Formats a subprogram parameter type for display, combining direction and type name + /// while stripping object class keywords (SIGNAL, VARIABLE, CONSTANT, FILE) that are + /// implementation details not relevant to API consumers. + /// + /// The parameter declaration to format. + /// + /// The direction-prefixed type string (e.g. OUT STD_LOGIC_VECTOR), or just the + /// type name when no explicit direction is present. + /// + internal static string FormatParamType(VhdlParamDecl param) + { + var direction = string.Join( + " ", + param.Mode.Split(' ', StringSplitOptions.RemoveEmptyEntries) + .Where(t => !ObjectClassKeywords.Contains(t))); + return string.IsNullOrEmpty(direction) ? param.TypeName : $"{direction} {param.TypeName}"; + } + + /// + /// Returns a copy of with every character that is invalid + /// in a file name replaced by _. + /// + /// The raw declaration name to sanitize. + /// A filesystem-safe file name string. + internal static string SanitizeFileName(string name) + { + var invalidChars = Path.GetInvalidFileNameChars(); + var chars = name.ToCharArray(); + for (var i = 0; i < chars.Length; i++) + { + if (Array.IndexOf(invalidChars, chars[i]) >= 0) + { + chars[i] = '_'; + } + } + + return new string(chars); + } +} diff --git a/src/ApiMark.Vhdl/VhdlEmitterGradualDisclosure.cs b/src/ApiMark.Vhdl/VhdlEmitterGradualDisclosure.cs new file mode 100644 index 0000000..fe34bc7 --- /dev/null +++ b/src/ApiMark.Vhdl/VhdlEmitterGradualDisclosure.cs @@ -0,0 +1,340 @@ +using ApiMark.Core; +using ApiMark.Vhdl.VhdlAst; + +namespace ApiMark.Vhdl; + +/// Gradual-disclosure emitter for VHDL API documentation. +internal sealed class VhdlEmitterGradualDisclosure +{ + private readonly VhdlEmitter _emitter; + private readonly IReadOnlyList _fileModels; + + /// Initializes a new VhdlEmitterGradualDisclosure. + /// The parent VhdlEmitter providing shared options and helpers. + /// Parsed file models to emit. + internal VhdlEmitterGradualDisclosure(VhdlEmitter emitter, IReadOnlyList fileModels) + { + _emitter = emitter; + _fileModels = fileModels; + } + + /// Emits gradual-disclosure Markdown output: one file per entity/package plus an api index, with architectures rendered inline on entity pages. + /// Factory for creating per-file Markdown writers. + /// Emit configuration (format and heading depth). + /// Output channel for progress and error messages. + internal void Emit(IMarkdownWriterFactory factory, EmitConfig config, IContext context) + { + // Suppress unused parameter warning + _ = config; + _ = context; + + // Collect all entities, architectures, packages across all files + var allEntities = _fileModels.SelectMany(f => f.Entities).ToList(); + var allArchitectures = _fileModels.SelectMany(f => f.Architectures).ToList(); + var allPackages = _fileModels.SelectMany(f => f.Packages).ToList(); + + // Emit api.md index page + EmitApiIndexPage(factory, allEntities, allPackages); + + // Emit entity detail pages + foreach (var entity in allEntities) + { + EmitEntityPage(factory, entity, allArchitectures); + } + + // Emit package detail pages and per-subprogram detail files + foreach (var pkg in allPackages) + { + EmitPackagePage(factory, pkg); + } + } + + /// + /// Emits the api.md index page listing all entities and packages with navigation links + /// to their individual detail pages. + /// + /// Factory for creating the Markdown writer. + /// All entity declarations across all parsed files. + /// All package declarations across all parsed files. + private void EmitApiIndexPage( + IMarkdownWriterFactory factory, + List allEntities, + List allPackages) + { + using var writer = factory.CreateMarkdown("", "api"); + writer.WriteHeading(1, $"{_emitter.Options.LibraryName} API Reference"); + + if (!string.IsNullOrWhiteSpace(_emitter.Options.Description)) + { + writer.WriteParagraph(_emitter.Options.Description); + } + + if (allEntities.Count > 0) + { + writer.WriteHeading(2, "Entities"); + var headers = new[] { "Name", VhdlEmitter.DescriptionColumnHeader }; + var rows = allEntities.Select(e => + new[] { $"[{e.Name}]({VhdlEmitter.SanitizeFileName(e.Name)}.md)", VhdlEmitter.GetSummary(e.Doc) ?? VhdlEmitter.NoDescriptionPlaceholder }); + writer.WriteTable(headers, rows); + } + + if (allPackages.Count > 0) + { + writer.WriteHeading(2, "Packages"); + var headers = new[] { "Name", VhdlEmitter.DescriptionColumnHeader }; + var rows = allPackages.Select(p => + new[] { $"[{p.Name}]({VhdlEmitter.SanitizeFileName(p.Name)}.md)", VhdlEmitter.GetSummary(p.Doc) ?? VhdlEmitter.NoDescriptionPlaceholder }); + writer.WriteTable(headers, rows); + } + } + + /// + /// Emits the detail page for a single VHDL entity, including its summary, generics, + /// ports, and the architectures that implement it. + /// + /// Factory for creating the per-entity Markdown writer. + /// The entity declaration to emit. + /// + /// All architecture declarations across all parsed files; filtered to those + /// whose entity name matches . + /// + private static void EmitEntityPage( + IMarkdownWriterFactory factory, + VhdlEntityDecl entity, + List allArchitectures) + { + using var writer = factory.CreateMarkdown("", VhdlEmitter.SanitizeFileName(entity.Name)); + writer.WriteHeading(1, entity.Name); + + var summary = VhdlEmitter.GetSummary(entity.Doc) ?? VhdlEmitter.NoDescriptionPlaceholder; + writer.WriteParagraph(summary); + + var details = entity.Doc?.Details; + if (!string.IsNullOrEmpty(details)) + { + writer.WriteParagraph(details); + } + + if (entity.Generics.Count > 0) + { + writer.WriteHeading(2, "Generics"); + var headers = new[] { "Name", "Type", "Default", VhdlEmitter.DescriptionColumnHeader }; + var rows = entity.Generics.Select(g => new[] + { + g.Name, + g.TypeName, + g.DefaultValue ?? string.Empty, + VhdlEmitter.GetSummary(g.Doc) ?? VhdlEmitter.NoDescriptionPlaceholder, + }); + writer.WriteTable(headers, rows); + } + + if (entity.Ports.Count > 0) + { + writer.WriteHeading(2, "Ports"); + var headers = new[] { "Name", "Direction", "Type", VhdlEmitter.DescriptionColumnHeader }; + var rows = entity.Ports.Select(p => new[] + { + p.Name, + p.Direction, + p.TypeName, + VhdlEmitter.GetSummary(p.Doc) ?? VhdlEmitter.NoDescriptionPlaceholder, + }); + writer.WriteTable(headers, rows); + } + + // List architectures that implement this entity + var archsForEntity = allArchitectures + .Where(a => string.Equals(a.EntityName, entity.Name, StringComparison.OrdinalIgnoreCase)) + .ToList(); + if (archsForEntity.Count > 0) + { + writer.WriteHeading(2, "Architectures"); + foreach (var arch in archsForEntity) + { + // Emit architecture summary as bold-name paragraph + var archSummary = VhdlEmitter.GetSummary(arch.Doc); + writer.WriteParagraph(!string.IsNullOrEmpty(archSummary) + ? $"**{arch.Name}**: {archSummary}" + : $"**{arch.Name}**"); + + // Emit extended architecture details as a follow-on paragraph if present + var archDetails = arch.Doc?.Details; + if (!string.IsNullOrEmpty(archDetails)) + { + writer.WriteParagraph(archDetails); + } + } + } + } + + /// + /// Emits the package detail page for a single VHDL package and spawns a per-subprogram + /// detail file for each subprogram declared in the package. + /// + /// Factory for creating Markdown writers for the package page and subprogram pages. + /// The package declaration to emit. + private static void EmitPackagePage(IMarkdownWriterFactory factory, VhdlPackageDecl pkg) + { + using var writer = factory.CreateMarkdown("", VhdlEmitter.SanitizeFileName(pkg.Name)); + writer.WriteHeading(1, pkg.Name); + + // Emit package summary paragraph + var summary = VhdlEmitter.GetSummary(pkg.Doc); + writer.WriteParagraph(!string.IsNullOrEmpty(summary) ? summary : VhdlEmitter.NoDescriptionPlaceholder); + + // Emit extended package details as a second paragraph if present + var pkgDetails = pkg.Doc?.Details; + if (!string.IsNullOrEmpty(pkgDetails)) + { + writer.WriteParagraph(pkgDetails); + } + + // Emit types in paragraph-per-type format: bold name, em-dash, definition, then summary + if (pkg.Types.Count > 0) + { + writer.WriteHeading(2, "Types"); + foreach (var t in pkg.Types) + { + // First paragraph: bold name, em-dash, backtick-wrapped definition + writer.WriteParagraph($"**{t.Name}** — `{t.Definition}`"); + + // Second paragraph: summary or placeholder + var typeSummary = VhdlEmitter.GetSummary(t.Doc) ?? VhdlEmitter.NoDescriptionPlaceholder; + writer.WriteParagraph(typeSummary); + + // Optional extended details paragraph + var typeDetails = t.Doc?.Details; + if (!string.IsNullOrEmpty(typeDetails)) + { + writer.WriteParagraph(typeDetails); + } + } + } + + // Emit constants in paragraph-per-constant format: bold name, colon, type, optional value, then summary + if (pkg.Constants.Count > 0) + { + writer.WriteHeading(2, "Constants"); + foreach (var c in pkg.Constants) + { + // First paragraph: bold name, colon, backtick-wrapped type, equals and backtick-wrapped value if present + var constHeader = string.IsNullOrEmpty(c.Value) + ? $"**{c.Name}** : `{c.TypeName}`" + : $"**{c.Name}** : `{c.TypeName}` = `{c.Value}`"; + writer.WriteParagraph(constHeader); + + // Second paragraph: summary or placeholder + var constSummary = VhdlEmitter.GetSummary(c.Doc) ?? VhdlEmitter.NoDescriptionPlaceholder; + writer.WriteParagraph(constSummary); + + // Optional extended details paragraph + var constDetails = c.Doc?.Details; + if (!string.IsNullOrEmpty(constDetails)) + { + writer.WriteParagraph(constDetails); + } + } + } + + // Emit components in paragraph-per-component format: bold name followed by summary on same line + if (pkg.Components.Count > 0) + { + writer.WriteHeading(2, "Components"); + foreach (var c in pkg.Components) + { + // Single paragraph: bold component name em-dashed with summary to avoid standalone-bold MD036 + var compSummary = VhdlEmitter.GetSummary(c.Doc) ?? VhdlEmitter.NoDescriptionPlaceholder; + writer.WriteParagraph($"**{c.Name}** — {compSummary}"); + + // Optional extended details paragraph + var compDetails = c.Doc?.Details; + if (!string.IsNullOrEmpty(compDetails)) + { + writer.WriteParagraph(compDetails); + } + } + } + + // Emit subprograms as linked paragraphs pointing to per-subprogram detail files + if (pkg.Subprograms.Count > 0) + { + writer.WriteHeading(2, "Subprograms"); + foreach (var s in pkg.Subprograms) + { + // Paragraph: linked name and kind label — subfolder path so the reader can navigate + var detailFile = $"{VhdlEmitter.SanitizeFileName(pkg.Name)}/{VhdlEmitter.SanitizeFileName(s.Name)}.md"; + var kindText = s.Kind == VhdlSubprogramKind.Function ? "Function" : "Procedure"; + writer.WriteParagraph($"**[{s.Name}]({detailFile})** — *{kindText}*"); + + // Summary paragraph + var subSummary = VhdlEmitter.GetSummary(s.Doc) ?? VhdlEmitter.NoDescriptionPlaceholder; + writer.WriteParagraph(subSummary); + } + } + + // Emit one detail file per subprogram with full documentation — placed in a per-package subfolder + foreach (var s in pkg.Subprograms) + { + EmitSubprogramDetailPage(factory, pkg, s); + } + } + + /// + /// Emits the per-subprogram detail file for a single VHDL subprogram within a package, + /// including attribution, summary, parameters, return type, and signature. + /// + /// Factory for creating the per-subprogram Markdown writer. + /// The owning package declaration, used for attribution and folder naming. + /// The subprogram declaration to emit. + private static void EmitSubprogramDetailPage( + IMarkdownWriterFactory factory, + VhdlPackageDecl pkg, + VhdlSubprogramDecl s) + { + var pkgFolder = VhdlEmitter.SanitizeFileName(pkg.Name); + var subFileName = VhdlEmitter.SanitizeFileName(s.Name); + using var subWriter = factory.CreateMarkdown(pkgFolder, subFileName); + subWriter.WriteHeading(1, s.Name); + + // Attribution: kind and owning package name + var kindText = s.Kind == VhdlSubprogramKind.Function ? "Function" : "Procedure"; + subWriter.WriteParagraph($"*{kindText} in `{pkg.Name}`*"); + + // Summary paragraph + var subSummary = VhdlEmitter.GetSummary(s.Doc) ?? VhdlEmitter.NoDescriptionPlaceholder; + subWriter.WriteParagraph(subSummary); + + // Optional extended details paragraph + var subDetails = s.Doc?.Details; + if (!string.IsNullOrEmpty(subDetails)) + { + subWriter.WriteParagraph(subDetails); + } + + // Parameters table if the subprogram has parsed formal parameters + if (s.Parameters.Count > 0) + { + subWriter.WriteHeading(2, "Parameters"); + var headers = new[] { "Name", "Type", VhdlEmitter.DescriptionColumnHeader }; + var rows = s.Parameters.Select(p => new[] + { + p.Name, + VhdlEmitter.FormatParamType(p), + s.Doc?.Params.FirstOrDefault(pd => string.Equals(pd.Name, p.Name, StringComparison.OrdinalIgnoreCase))?.Description ?? VhdlEmitter.NoDescriptionPlaceholder, + }); + subWriter.WriteTable(headers, rows); + } + + // Returns section if this is a function (ReturnType is non-null) + if (s.ReturnType != null) + { + subWriter.WriteHeading(2, "Returns"); + subWriter.WriteParagraph(s.Doc?.Returns ?? VhdlEmitter.NoDescriptionPlaceholder); + } + + // Signature section is always emitted as a fenced vhdl code block + subWriter.WriteHeading(2, "Signature"); + subWriter.WriteSignature("vhdl", s.Signature); + } +} diff --git a/src/ApiMark.Vhdl/VhdlEmitterSingleFile.cs b/src/ApiMark.Vhdl/VhdlEmitterSingleFile.cs new file mode 100644 index 0000000..ad88719 --- /dev/null +++ b/src/ApiMark.Vhdl/VhdlEmitterSingleFile.cs @@ -0,0 +1,293 @@ +using ApiMark.Core; +using ApiMark.Vhdl.VhdlAst; + +namespace ApiMark.Vhdl; + +/// Single-file emitter for VHDL API documentation. +internal sealed class VhdlEmitterSingleFile +{ + private readonly VhdlEmitter _emitter; + private readonly IReadOnlyList _fileModels; + + /// Initializes a new VhdlEmitterSingleFile. + /// The parent VhdlEmitter providing shared options and helpers. + /// Parsed file models to emit. + internal VhdlEmitterSingleFile(VhdlEmitter emitter, IReadOnlyList fileModels) + { + _emitter = emitter; + _fileModels = fileModels; + } + + /// Emits all VHDL documentation into a single api.md file. + /// Factory for creating Markdown writers. + /// Emit configuration (format and heading depth). + /// Output channel for progress and error messages. + internal void Emit(IMarkdownWriterFactory factory, EmitConfig config, IContext context) + { + // Suppress unused parameter warning + _ = context; + + var depth = config.HeadingDepth; + + var allEntities = _fileModels.SelectMany(f => f.Entities).ToList(); + var allArchitectures = _fileModels.SelectMany(f => f.Architectures).ToList(); + var allPackages = _fileModels.SelectMany(f => f.Packages).ToList(); + + using var writer = factory.CreateMarkdown("", "api"); + + // Emit a markdownlint disable directive for MD024 (duplicate headings) because + // API documentation legitimately repeats section names such as "Ports", "Architectures", + // "Parameters", and "Signature" under each entity and subprogram respectively. + writer.WriteParagraph(""); + + writer.WriteHeading(depth, $"{_emitter.Options.LibraryName} API Reference"); + + if (!string.IsNullOrWhiteSpace(_emitter.Options.Description)) + { + writer.WriteParagraph(_emitter.Options.Description); + } + + // Entities section + if (allEntities.Count > 0) + { + writer.WriteHeading(depth + 1, "Entities"); + foreach (var entity in allEntities) + { + EmitEntitySection(writer, entity, allArchitectures, depth); + } + } + + // Packages section + if (allPackages.Count > 0) + { + writer.WriteHeading(depth + 1, "Packages"); + foreach (var pkg in allPackages) + { + EmitPackageSection(writer, pkg, depth); + } + } + } + + /// + /// Emits the heading, summary, generics, ports, and architectures for a single VHDL + /// entity into the shared single-file writer. + /// + /// Markdown writer to emit into. + /// The entity declaration to emit. + /// + /// All architecture declarations across all parsed files; filtered to those + /// whose entity name matches . + /// + /// Base heading depth for the library root; entity heading uses depth+2. + private static void EmitEntitySection( + IMarkdownWriter writer, + VhdlEntityDecl entity, + List allArchitectures, + int depth) + { + writer.WriteHeading(depth + 2, entity.Name); + + var summary = VhdlEmitter.GetSummary(entity.Doc); + writer.WriteParagraph(!string.IsNullOrEmpty(summary) ? summary : VhdlEmitter.NoDescriptionPlaceholder); + + var details = entity.Doc?.Details; + if (!string.IsNullOrEmpty(details)) + { + writer.WriteParagraph(details); + } + + if (entity.Generics.Count > 0) + { + writer.WriteHeading(depth + 3, "Generics"); + var headers = new[] { "Name", "Type", "Default", VhdlEmitter.DescriptionColumnHeader }; + var rows = entity.Generics.Select(g => new[] + { + g.Name, + g.TypeName, + g.DefaultValue ?? string.Empty, + VhdlEmitter.GetSummary(g.Doc) ?? VhdlEmitter.NoDescriptionPlaceholder, + }); + writer.WriteTable(headers, rows); + } + + if (entity.Ports.Count > 0) + { + writer.WriteHeading(depth + 3, "Ports"); + var headers = new[] { "Name", "Direction", "Type", VhdlEmitter.DescriptionColumnHeader }; + var rows = entity.Ports.Select(p => new[] + { + p.Name, + p.Direction, + p.TypeName, + VhdlEmitter.GetSummary(p.Doc) ?? VhdlEmitter.NoDescriptionPlaceholder, + }); + writer.WriteTable(headers, rows); + } + + var archsForEntity = allArchitectures + .Where(a => string.Equals(a.EntityName, entity.Name, StringComparison.OrdinalIgnoreCase)) + .ToList(); + if (archsForEntity.Count > 0) + { + writer.WriteHeading(depth + 3, "Architectures"); + foreach (var arch in archsForEntity) + { + // Emit architecture summary as bold-name paragraph + var archSummary = VhdlEmitter.GetSummary(arch.Doc); + writer.WriteParagraph(!string.IsNullOrEmpty(archSummary) + ? $"**{arch.Name}**: {archSummary}" + : $"**{arch.Name}**"); + + // Emit extended architecture details as a follow-on paragraph if present + var archDetails = arch.Doc?.Details; + if (!string.IsNullOrEmpty(archDetails)) + { + writer.WriteParagraph(archDetails); + } + } + } + } + + /// + /// Emits the heading, summary, types, constants, components, and subprograms for a + /// single VHDL package into the shared single-file writer. + /// + /// Markdown writer to emit into. + /// The package declaration to emit. + /// Base heading depth for the library root; package heading uses depth+2. + private static void EmitPackageSection(IMarkdownWriter writer, VhdlPackageDecl pkg, int depth) + { + writer.WriteHeading(depth + 2, pkg.Name); + + // Emit package summary paragraph + var summary = VhdlEmitter.GetSummary(pkg.Doc); + writer.WriteParagraph(!string.IsNullOrEmpty(summary) ? summary : VhdlEmitter.NoDescriptionPlaceholder); + + // Emit extended package details as a second paragraph if present + var pkgDetails = pkg.Doc?.Details; + if (!string.IsNullOrEmpty(pkgDetails)) + { + writer.WriteParagraph(pkgDetails); + } + + // Emit types in paragraph-per-type format: bold name, em-dash, definition, then summary + if (pkg.Types.Count > 0) + { + writer.WriteHeading(depth + 3, "Types"); + foreach (var t in pkg.Types) + { + // First paragraph: bold name, em-dash, backtick-wrapped definition + writer.WriteParagraph($"**{t.Name}** — `{t.Definition}`"); + + // Second paragraph: summary or placeholder + var typeSummary = VhdlEmitter.GetSummary(t.Doc) ?? VhdlEmitter.NoDescriptionPlaceholder; + writer.WriteParagraph(typeSummary); + + // Optional extended details paragraph + var typeDetails = t.Doc?.Details; + if (!string.IsNullOrEmpty(typeDetails)) + { + writer.WriteParagraph(typeDetails); + } + } + } + + // Emit constants in paragraph-per-constant format: bold name, colon, type, optional value, then summary + if (pkg.Constants.Count > 0) + { + writer.WriteHeading(depth + 3, "Constants"); + foreach (var c in pkg.Constants) + { + // First paragraph: bold name, colon, backtick-wrapped type, equals and backtick-wrapped value if present + var constHeader = string.IsNullOrEmpty(c.Value) + ? $"**{c.Name}** : `{c.TypeName}`" + : $"**{c.Name}** : `{c.TypeName}` = `{c.Value}`"; + writer.WriteParagraph(constHeader); + + // Second paragraph: summary or placeholder + var constSummary = VhdlEmitter.GetSummary(c.Doc) ?? VhdlEmitter.NoDescriptionPlaceholder; + writer.WriteParagraph(constSummary); + + // Optional extended details paragraph + var constDetails = c.Doc?.Details; + if (!string.IsNullOrEmpty(constDetails)) + { + writer.WriteParagraph(constDetails); + } + } + } + + // Emit components in paragraph-per-component format: bold name followed by summary on same line + if (pkg.Components.Count > 0) + { + writer.WriteHeading(depth + 3, "Components"); + foreach (var c in pkg.Components) + { + // Single paragraph: bold component name em-dashed with summary to avoid standalone-bold MD036 + var compSummary = VhdlEmitter.GetSummary(c.Doc) ?? VhdlEmitter.NoDescriptionPlaceholder; + writer.WriteParagraph($"**{c.Name}** — {compSummary}"); + + // Optional extended details paragraph + var compDetails = c.Doc?.Details; + if (!string.IsNullOrEmpty(compDetails)) + { + writer.WriteParagraph(compDetails); + } + } + } + + // Emit subprograms as individual sub-sections at depth+3 — each subprogram replaces the old table row + foreach (var s in pkg.Subprograms) + { + EmitSubprogramSection(writer, s, depth); + } + } + + /// + /// Emits a single subprogram sub-section within a package section, including summary, + /// optional details, parameters table, return type, and signature. + /// + /// Markdown writer to emit into. + /// The subprogram declaration to emit. + /// Base heading depth for the library root; subprogram heading uses depth+3. + private static void EmitSubprogramSection(IMarkdownWriter writer, VhdlSubprogramDecl s, int depth) + { + writer.WriteHeading(depth + 3, s.Name); + + // Summary paragraph + var subSummary = VhdlEmitter.GetSummary(s.Doc) ?? VhdlEmitter.NoDescriptionPlaceholder; + writer.WriteParagraph(subSummary); + + // Optional extended details paragraph + var subDetails = s.Doc?.Details; + if (!string.IsNullOrEmpty(subDetails)) + { + writer.WriteParagraph(subDetails); + } + + // Parameters table at depth+4 if the subprogram has parsed formal parameters + if (s.Parameters.Count > 0) + { + writer.WriteHeading(depth + 4, "Parameters"); + var headers = new[] { "Name", "Type", VhdlEmitter.DescriptionColumnHeader }; + var rows = s.Parameters.Select(p => new[] + { + p.Name, + VhdlEmitter.FormatParamType(p), + s.Doc?.Params.FirstOrDefault(pd => string.Equals(pd.Name, p.Name, StringComparison.OrdinalIgnoreCase))?.Description ?? VhdlEmitter.NoDescriptionPlaceholder, + }); + writer.WriteTable(headers, rows); + } + + // Returns section at depth+4 if this is a function (ReturnType is non-null) + if (s.ReturnType != null) + { + writer.WriteHeading(depth + 4, "Returns"); + writer.WriteParagraph(s.Doc?.Returns ?? VhdlEmitter.NoDescriptionPlaceholder); + } + + // Signature section at depth+4 is always emitted as a fenced vhdl code block + writer.WriteHeading(depth + 4, "Signature"); + writer.WriteSignature("vhdl", s.Signature); + } +} diff --git a/src/ApiMark.Vhdl/VhdlGenerator.cs b/src/ApiMark.Vhdl/VhdlGenerator.cs new file mode 100644 index 0000000..a8c93d7 --- /dev/null +++ b/src/ApiMark.Vhdl/VhdlGenerator.cs @@ -0,0 +1,74 @@ +using ApiMark.Core; +using ApiMark.Vhdl.VhdlAst; + +namespace ApiMark.Vhdl; + +/// IApiGenerator implementation that generates API documentation from VHDL source files. +public sealed class VhdlGenerator : IApiGenerator +{ + private readonly VhdlGeneratorOptions _options; + + /// Initializes a new VhdlGenerator with the specified options. + /// Generator options. Must not be null. LibraryName must not be null or whitespace. + /// Thrown when options is null. + /// Thrown when options.LibraryName is null or whitespace. + public VhdlGenerator(VhdlGeneratorOptions options) + { + ArgumentNullException.ThrowIfNull(options); + if (string.IsNullOrWhiteSpace(options.LibraryName)) + { + throw new ArgumentException("LibraryName must not be null or whitespace.", nameof(options)); + } + + // Normalize null Sources to empty list to prevent NullReferenceException + options.Sources ??= new List(); + _options = options; + } + + /// + public IApiEmitter Parse(IContext context) + { + ArgumentNullException.ThrowIfNull(context); + + var allFiles = CollectSourceFiles(); + + if (allFiles.Count == 0) + { + context.WriteError("Error: no .vhd or .vhdl files matched the --source patterns."); + return new VhdlEmitter(_options, []); + } + + var fileModels = new List(); + foreach (var file in allFiles) + { + context.WriteLine($"Parsing {file}"); + try + { + fileModels.Add(VhdlAstParser.Parse(file)); + } + catch (Exception ex) + { + context.WriteError($"Error: failed to parse {file} — {ex.Message}"); + } + } + + return new VhdlEmitter(_options, fileModels); + } + + // ========================================================================= + // Source file collection + // ========================================================================= + + /// + /// Enumerates .vhd and .vhdl files using + /// and returns a sorted, deduplicated list of absolute file paths. + /// + /// Sorted, deduplicated list of absolute file paths selected for documentation. + private List CollectSourceFiles() + { + var vhdlExtensions = new[] { ".vhd", ".vhdl" }; + var cwd = Path.GetFullPath(_options.WorkingDirectory ?? Directory.GetCurrentDirectory()); + + return GlobFileCollector.Collect(_options.Sources, vhdlExtensions, cwd).ToList(); + } +} diff --git a/src/ApiMark.Vhdl/VhdlGeneratorOptions.cs b/src/ApiMark.Vhdl/VhdlGeneratorOptions.cs new file mode 100644 index 0000000..116e065 --- /dev/null +++ b/src/ApiMark.Vhdl/VhdlGeneratorOptions.cs @@ -0,0 +1,44 @@ +namespace ApiMark.Vhdl; + +/// Configuration options for . +public sealed class VhdlGeneratorOptions +{ + /// Gets or sets the library name used as the top-level heading. + public string LibraryName { get; set; } = string.Empty; + + /// Gets or sets the library description emitted as an introductory paragraph. + public string Description { get; set; } = string.Empty; + + /// + /// Gets or sets the ordered list of glob and exclusion pattern strings that select + /// which VHDL files are documented. + /// + /// + /// + /// Both absolute and relative glob patterns are supported. Relative patterns are + /// resolved against (or the process working directory + /// when is ). + /// Absolute patterns determine their own root from the non-glob path prefix. + /// + /// + /// Patterns whose final segment is a bare * (e.g. **/*, + /// src/*) automatically discover .vhd and .vhdl files. + /// Patterns with an explicit extension (e.g. **/*.vhd) select only files + /// matching that extension. + /// + /// + /// Entries prefixed with ! are exclusion patterns (the ! is stripped + /// before glob matching). Inclusion patterns build the result set; exclusion patterns + /// subtract from it. An empty list or a list containing only exclusion patterns + /// produces an error; no output files are written. + /// + /// + public IList Sources { get; set; } = new List(); + + /// + /// Gets or sets the directory used as the root for glob pattern evaluation. + /// Defaults to , which means + /// is used at parse time. Set this in tests to anchor patterns to the fixture directory. + /// + public string? WorkingDirectory { get; set; } +} diff --git a/test/ApiMark.Core.Tests/GlobFileCollectorTests.cs b/test/ApiMark.Core.Tests/GlobFileCollectorTests.cs new file mode 100644 index 0000000..74631e7 --- /dev/null +++ b/test/ApiMark.Core.Tests/GlobFileCollectorTests.cs @@ -0,0 +1,303 @@ +using ApiMark.Core; +using Xunit; + +namespace ApiMark.Core.Tests; + +/// +/// Verifies the file-collection behavior of . +/// +public sealed class GlobFileCollectorTests +{ + private static readonly string[] VhdlExtensions = [".vhd", ".vhdl"]; + private static readonly string[] CppExtensions = [".h", ".hpp", ".hxx", ".h++"]; + + // ========================================================================= + // Helper: create an isolated temp directory and populate it with files + // ========================================================================= + + /// + /// Creates a uniquely named temporary directory and returns its absolute path. + /// Callers are responsible for deleting the directory in a finally block. + /// + private static string CreateTempDirectory() + { + var dir = Path.Join(Path.GetTempPath(), Path.GetRandomFileName()); + Directory.CreateDirectory(dir); + return dir; + } + + // ========================================================================= + // Empty-patterns tests + // ========================================================================= + + /// + /// Verifies that an empty pattern list returns an empty result with no filesystem access. + /// + [Fact] + public void GlobFileCollector_Collect_EmptyPatterns_ReturnsEmptyList() + { + // Arrange: an empty pattern list and a working directory that exists + var cwd = Path.GetTempPath(); + + // Act: collect with no patterns + var result = GlobFileCollector.Collect([], VhdlExtensions, cwd); + + // Assert: result is empty + Assert.Empty(result); + } + + // ========================================================================= + // Relative pattern tests + // ========================================================================= + + /// + /// Verifies that a relative **/*.vhd pattern finds only .vhd files + /// under the working directory. + /// + [Fact] + public void GlobFileCollector_Collect_RelativeVhdPattern_FindsVhdFiles() + { + // Arrange: create an isolated temp directory with one .vhd and one unrelated file + var tempDir = CreateTempDirectory(); + try + { + var vhdFile = Path.Join(tempDir, "design.vhd"); + var txtFile = Path.Join(tempDir, "readme.txt"); + File.WriteAllText(vhdFile, string.Empty); + File.WriteAllText(txtFile, string.Empty); + + // Act: collect with a relative pattern scoped to .vhd files + var result = GlobFileCollector.Collect(["**/*.vhd"], VhdlExtensions, tempDir); + + // Assert: only the .vhd file is returned + Assert.Single(result); + Assert.Equal(Path.GetFullPath(vhdFile), result[0]); + } + finally + { + Directory.Delete(tempDir, recursive: true); + } + } + + /// + /// Verifies that a bare-star pattern **/* with VHDL extensions finds both + /// .vhd and .vhdl files but excludes files with other extensions. + /// + [Fact] + public void GlobFileCollector_Collect_BareStarWithVhdlExtensions_FiltersToVhdlOnly() + { + // Arrange: create temp directory with .vhd, .vhdl, and .txt files + var tempDir = CreateTempDirectory(); + try + { + var vhdFile = Path.Join(tempDir, "top.vhd"); + var vhdlFile = Path.Join(tempDir, "pkg.vhdl"); + var txtFile = Path.Join(tempDir, "notes.txt"); + File.WriteAllText(vhdFile, string.Empty); + File.WriteAllText(vhdlFile, string.Empty); + File.WriteAllText(txtFile, string.Empty); + + // Act: collect using a bare-star pattern that triggers extension inference + var result = GlobFileCollector.Collect(["**/*"], VhdlExtensions, tempDir); + + // Assert: both VHDL files are returned and the .txt file is excluded + Assert.Equal(2, result.Count); + Assert.Contains(Path.GetFullPath(vhdFile), result); + Assert.Contains(Path.GetFullPath(vhdlFile), result); + } + finally + { + Directory.Delete(tempDir, recursive: true); + } + } + + // ========================================================================= + // Absolute pattern tests + // ========================================================================= + + /// + /// Verifies that an absolute pattern pointing to a temp directory finds the expected files. + /// + [Fact] + public void GlobFileCollector_Collect_AbsolutePattern_FindsFiles() + { + // Arrange: create a temp directory with a .vhd file and build an absolute pattern + var tempDir = CreateTempDirectory(); + try + { + var vhdFile = Path.Join(tempDir, "entity.vhd"); + File.WriteAllText(vhdFile, string.Empty); + + // Absolute pattern: {tempDir}/**/*.vhd (using native separator) + var absolutePattern = Path.Join(tempDir, "**", "*.vhd"); + + // Act: collect using an absolute pattern; workingDirectory is irrelevant here + var result = GlobFileCollector.Collect( + [absolutePattern], + VhdlExtensions, + workingDirectory: Path.GetTempPath()); + + // Assert: the file is found via the absolute path pattern + Assert.Single(result); + Assert.Equal(Path.GetFullPath(vhdFile), result[0]); + } + finally + { + Directory.Delete(tempDir, recursive: true); + } + } + + // ========================================================================= + // Exclusion pattern tests + // ========================================================================= + + /// + /// Verifies that an absolute pattern whose glob segment is directly under the + /// drive root (e.g. C:\*.vhd) produces the drive root (C:/) as + /// the filesystem root rather than the drive-relative path C:. + /// This guards against the Windows drive-root path truncation bug where + /// Substring(0, lastSlash) would strip the trailing slash and yield + /// C: instead of C:/. + /// + [Fact] + public void GlobFileCollector_Collect_AbsoluteDriveRootPattern_FindsFiles() + { + // This test is only meaningful on Windows where drive-rooted paths exist + if (!OperatingSystem.IsWindows()) + { + return; + } + + // Arrange: create a temp directory directly under the system temp root and + // build a drive-root-style absolute pattern (e.g. C:\*.vhd is the canonical + // failing case, but we use a real temp subdirectory so the test is self-contained). + // The key scenario: pattern root resolves to "C:/" not "C:". + var tempDir = CreateTempDirectory(); + try + { + var vhdFile = Path.Join(tempDir, "top.vhd"); + File.WriteAllText(vhdFile, string.Empty); + + // Construct a pattern rooted directly under the drive root, e.g. C:\TEMP\xyz\*.vhd + // This puts the glob segment (*) immediately after a path whose last static + // directory segment sits two levels above the first glob metacharacter, + // exercising the drive-root boundary when tempDir is on a drive like C:\. + var driveRoot = Path.GetPathRoot(tempDir)!; // e.g. "C:\" + var relToRoot = Path.GetRelativePath(driveRoot, tempDir); + var drivePattern = Path.Join(driveRoot, relToRoot, "*.vhd"); + + // Act + var result = GlobFileCollector.Collect( + [drivePattern], + VhdlExtensions, + workingDirectory: Path.GetTempPath()); + + // Assert: the file is found via the drive-rooted absolute pattern + Assert.Single(result); + Assert.Equal(Path.GetFullPath(vhdFile), result[0]); + } + finally + { + Directory.Delete(tempDir, recursive: true); + } + } + + // ========================================================================= + // Exclusion pattern tests + // ========================================================================= + + /// + /// Verifies that a !-prefixed exclusion pattern removes matching files from the result. + /// + [Fact] + public void GlobFileCollector_Collect_ExclusionPattern_RemovesMatchedFiles() + { + // Arrange: create a temp directory with two .vhd files in different subdirectories + var tempDir = CreateTempDirectory(); + try + { + var srcDir = Path.Join(tempDir, "src"); + var testDir = Path.Join(tempDir, "test"); + Directory.CreateDirectory(srcDir); + Directory.CreateDirectory(testDir); + + var srcFile = Path.Join(srcDir, "design.vhd"); + var testFile = Path.Join(testDir, "tb.vhd"); + File.WriteAllText(srcFile, string.Empty); + File.WriteAllText(testFile, string.Empty); + + // Act: include all .vhd files, then exclude those under test/ + var result = GlobFileCollector.Collect( + ["**/*.vhd", "!test/**/*.vhd"], + VhdlExtensions, + tempDir); + + // Assert: only the src file remains; the test file is excluded + Assert.Single(result); + Assert.Equal(Path.GetFullPath(srcFile), result[0]); + } + finally + { + Directory.Delete(tempDir, recursive: true); + } + } + + // ========================================================================= + // Non-existent root tests + // ========================================================================= + + /// + /// Verifies that a pattern whose root directory does not exist returns an empty list + /// without throwing an exception. + /// + [Fact] + public void GlobFileCollector_Collect_NonExistentRoot_ReturnsEmptyWithoutThrowing() + { + // Arrange: build a pattern pointing to a directory guaranteed not to exist + var missingRoot = Path.Join(Path.GetTempPath(), Path.GetRandomFileName(), "nonexistent"); + var pattern = Path.Join(missingRoot, "**", "*.vhd"); + + // Act / Assert: collecting from a missing root must not throw + var result = GlobFileCollector.Collect([pattern], VhdlExtensions, Path.GetTempPath()); + + // Assert: result is empty and no exception was raised + Assert.Empty(result); + } + + // ========================================================================= + // Deduplication and sort tests + // ========================================================================= + + /// + /// Verifies that files matched by overlapping patterns appear only once and are sorted. + /// + [Fact] + public void GlobFileCollector_Collect_OverlappingPatterns_ReturnsSortedDeduplicated() + { + // Arrange: create a temp directory with two .vhd files; both patterns match both files + var tempDir = CreateTempDirectory(); + try + { + var fileA = Path.Join(tempDir, "aaa.vhd"); + var fileB = Path.Join(tempDir, "bbb.vhd"); + File.WriteAllText(fileA, string.Empty); + File.WriteAllText(fileB, string.Empty); + + // Act: supply two overlapping patterns that both match the same files + var result = GlobFileCollector.Collect( + ["**/*.vhd", "**/*.vhd"], + VhdlExtensions, + tempDir); + + // Assert: exactly two unique files returned, in sorted order + Assert.Equal(2, result.Count); + Assert.True( + string.Compare(result[0], result[1], StringComparison.Ordinal) < 0, + "Results should be in ascending ordinal order."); + } + finally + { + Directory.Delete(tempDir, recursive: true); + } + } +} diff --git a/test/ApiMark.Cpp.Tests/CppEmitterTests.cs b/test/ApiMark.Cpp.Tests/CppEmitterTests.cs index 75a2c04..ef9ff97 100644 --- a/test/ApiMark.Cpp.Tests/CppEmitterTests.cs +++ b/test/ApiMark.Cpp.Tests/CppEmitterTests.cs @@ -87,6 +87,7 @@ public void CppEmitter_SanitizeFileName_RegularName_IsUnchanged() Assert.Equal("MyClass", result); } + /// Validates that returns the class name for a non-final class with no bases. [Fact] public void CppEmitter_BuildClassDeclaration_NonFinalNoBase_ReturnsJustClassName() diff --git a/test/ApiMark.Cpp.Tests/CppGeneratorTests.cs b/test/ApiMark.Cpp.Tests/CppGeneratorTests.cs index 3c0f00e..5387d6e 100644 --- a/test/ApiMark.Cpp.Tests/CppGeneratorTests.cs +++ b/test/ApiMark.Cpp.Tests/CppGeneratorTests.cs @@ -1384,9 +1384,7 @@ public void CppGenerator_Generate_SingleFileOutput_WritesSingleApiMarkdown() // Assert: exactly one writer, keyed "api" Assert.Single(factory.Writers); - Assert.True(factory.Writers.ContainsKey("api"), "Expected a single api writer for single-file output"); - - var writer = factory.Writers["api"]; + Assert.True(factory.Writers.TryGetValue("api", out var writer), "Expected a single api writer for single-file output"); var headings = writer.Operations.OfType().ToList(); // Assert: H1 is the library-level title containing the library name diff --git a/test/ApiMark.DotNet.Tests/DotNetGeneratorTests.cs b/test/ApiMark.DotNet.Tests/DotNetGeneratorTests.cs index c23a122..929a69f 100644 --- a/test/ApiMark.DotNet.Tests/DotNetGeneratorTests.cs +++ b/test/ApiMark.DotNet.Tests/DotNetGeneratorTests.cs @@ -1717,9 +1717,7 @@ public void DotNetGenerator_Generate_SingleFileOutput_WritesSingleApiMarkdown() // Assert: exactly one writer, keyed "api" Assert.Single(factory.Writers); - Assert.True(factory.Writers.ContainsKey("api"), "Expected a single api writer for single-file output"); - - var writer = factory.Writers["api"]; + Assert.True(factory.Writers.TryGetValue("api", out var writer), "Expected a single api writer for single-file output"); var headings = writer.Operations.OfType().ToList(); // Assert: H1 is the assembly-level title ending with "API Reference" @@ -1764,10 +1762,8 @@ public void DotNetGenerator_Generate_MethodWithExample_EmitsCodeBlockOnMemberPag // Assert: GetGreeting has a parameter so it gets its own member page Assert.True( - factory.Writers.ContainsKey("ApiMark.DotNet.Fixtures/ExampleDocClass/GetGreeting"), + factory.Writers.TryGetValue("ApiMark.DotNet.Fixtures/ExampleDocClass/GetGreeting", out var writer), "Expected member page for ExampleDocClass.GetGreeting"); - - var writer = factory.Writers["ApiMark.DotNet.Fixtures/ExampleDocClass/GetGreeting"]; var codeBlocks = writer.Operations.OfType().ToList(); // Assert: at least one csharp code block is emitted from the content @@ -1790,9 +1786,7 @@ public void DotNetGenerator_SingleFile_MethodWithExample_EmitsCodeBlock() generator.Parse(new InMemoryContext()).Emit(factory, config, new InMemoryContext()); // Assert: single-file writes exactly one "api" file - Assert.True(factory.Writers.ContainsKey("api"), "Expected single-file api writer"); - - var writer = factory.Writers["api"]; + Assert.True(factory.Writers.TryGetValue("api", out var writer), "Expected single-file api writer"); var codeBlocks = writer.Operations.OfType().ToList(); // Assert: at least one csharp code block from the ExampleDocClass.GetGreeting example diff --git a/test/ApiMark.Tool.Tests/Cli/ContextTests.cs b/test/ApiMark.Tool.Tests/Cli/ContextTests.cs index c462e66..5ecf8d3 100644 --- a/test/ApiMark.Tool.Tests/Cli/ContextTests.cs +++ b/test/ApiMark.Tool.Tests/Cli/ContextTests.cs @@ -639,4 +639,52 @@ public void Context_Create_WithClangPathOption_SetsClangPath() // Assert: ClangPath property must match the supplied path Assert.Equal("/usr/bin/clang", context.ClangPath); } + + /// + /// Validates that a single --source flag sets the Sources array. + /// + [Fact] + public void Context_Create_WithSourceOption_SetsSources() + { + // Arrange + var args = new[] { "--source", "src/**/*.vhd" }; + + // Act + using var context = Context.Create(args); + + // Assert + Assert.Equal(["src/**/*.vhd"], context.Sources); + } + + /// + /// Validates that repeated --source flags accumulate all patterns in order. + /// + [Fact] + public void Context_Create_WithRepeatedSource_AccumulatesAllPaths() + { + // Arrange + var args = new[] { "--source", "src/**/*.vhd", "--source", "src/**/*.vhdl" }; + + // Act + using var context = Context.Create(args); + + // Assert + Assert.Equal(["src/**/*.vhd", "src/**/*.vhdl"], context.Sources); + } + + /// + /// Validates that a --source flag with a ! exclusion prefix is forwarded verbatim. + /// + [Fact] + public void Context_Create_WithSourceExclusionPattern_ForwardsVerbatim() + { + // Arrange + var args = new[] { "--source", "src/**/*.vhd", "--source", "!src/tb/**/*.vhd" }; + + // Act + using var context = Context.Create(args); + + // Assert + Assert.Equal(["src/**/*.vhd", "!src/tb/**/*.vhd"], context.Sources); + } } diff --git a/test/ApiMark.Tool.Tests/ProgramTests.cs b/test/ApiMark.Tool.Tests/ProgramTests.cs index ead6b81..09ba9e4 100644 --- a/test/ApiMark.Tool.Tests/ProgramTests.cs +++ b/test/ApiMark.Tool.Tests/ProgramTests.cs @@ -344,36 +344,6 @@ public void Program_Main_WithHelpAfterSubcommand_PrintsHelpAndExitsZero() } } - /// - /// Validates that the removed --search-paths flag is no longer recognized and - /// produces an "Unsupported argument" diagnostic on stderr. - /// - [Fact] - public void Program_Main_CppWithSearchPathsFlag_ReturnsNonZeroExitCode() - { - // Arrange: provide --search-paths which was removed in the redesign - var outputDir = Path.Join(Path.GetTempPath(), Path.GetRandomFileName()); - var originalError = Console.Error; - using var errorWriter = new StringWriter(); - - try - { - Console.SetError(errorWriter); - - // Act - var exitCode = Program.Main(["cpp", "--search-paths", "/sdk", "--output", outputDir]); - - // Assert: must fail with the unsupported-argument diagnostic so the test - // confirms the specific flag was rejected rather than some other failure - Assert.NotEqual(0, exitCode); - Assert.Contains("--search-paths", errorWriter.ToString(), StringComparison.Ordinal); - } - finally - { - Console.SetError(originalError); - } - } - /// /// Validates that the --api-headers flag is recognized by the parser and /// does not cause an argument exception; when --includes is absent the tool @@ -406,13 +376,13 @@ public void Program_Main_CppWithApiHeadersFlag_FlagIsAccepted() } /// - /// Validates that the removed --include-patterns flag is no longer recognized - /// and produces an "Unsupported argument" diagnostic on stderr. + /// Validates that the vhdl subcommand returns a non-zero exit code when no + /// --source pattern is provided. /// [Fact] - public void Program_Main_CppWithIncludePatternsFlag_ReturnsNonZeroExitCode() + public void Program_Main_WithVhdlSubcommand_MissingSourceFiles_ReturnsNonZeroExitCode() { - // Arrange: provide --include-patterns which was removed in the redesign + // Arrange: provide --output but omit --source var outputDir = Path.Join(Path.GetTempPath(), Path.GetRandomFileName()); var originalError = Console.Error; using var errorWriter = new StringWriter(); @@ -422,16 +392,11 @@ public void Program_Main_CppWithIncludePatternsFlag_ReturnsNonZeroExitCode() Console.SetError(errorWriter); // Act - var exitCode = Program.Main([ - "cpp", - "--include-patterns", "*.h", - "--output", outputDir, - ]); + var exitCode = Program.Main(["vhdl", "--output", outputDir]); - // Assert: must fail with the unsupported-argument diagnostic so the test - // confirms the specific flag was rejected rather than some other failure + // Assert: at least one non-exclusion source pattern is required Assert.NotEqual(0, exitCode); - Assert.Contains("--include-patterns", errorWriter.ToString(), StringComparison.Ordinal); + Assert.Contains("--source", errorWriter.ToString(), StringComparison.Ordinal); } finally { diff --git a/test/ApiMark.Vhdl.Tests/ApiMark.Vhdl.Tests.csproj b/test/ApiMark.Vhdl.Tests/ApiMark.Vhdl.Tests.csproj new file mode 100644 index 0000000..23c4bb6 --- /dev/null +++ b/test/ApiMark.Vhdl.Tests/ApiMark.Vhdl.Tests.csproj @@ -0,0 +1,26 @@ + + + net8.0;net9.0;net10.0 + enable + enable + true + false + ApiMark.Vhdl.Tests + ApiMark.Vhdl.Tests + false + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + diff --git a/test/ApiMark.Vhdl.Tests/FixturePaths.cs b/test/ApiMark.Vhdl.Tests/FixturePaths.cs new file mode 100644 index 0000000..1b05702 --- /dev/null +++ b/test/ApiMark.Vhdl.Tests/FixturePaths.cs @@ -0,0 +1,34 @@ +using System.Runtime.CompilerServices; + +namespace ApiMark.Vhdl.Tests; + +/// Helper that resolves fixture file paths for VHDL tests. +internal static class FixturePaths +{ + /// Absolute path to the fixtures directory resolved at compile time. + private static readonly string FixturesDir = ResolveFixturesDir(); + + /// Gets the absolute path to the Fixtures directory. + public static string FixturesDirectory => FixturesDir; + + /// Gets the absolute path to the mux.vhd fixture file. + public static string MuxVhd => GetFixtureFilePath("mux.vhd"); + + /// Gets the absolute path to the common_types.vhd fixture file. + public static string CommonTypesVhd => GetFixtureFilePath("common_types.vhd"); + + /// Returns the absolute path to a named fixture file. + /// File name within the Fixtures directory. + /// Absolute path to the fixture file. + public static string GetFixtureFilePath(string fileName) => + Path.Join(FixturesDir, fileName); + + /// + /// Resolves the fixtures directory at compile time using . + /// + private static string ResolveFixturesDir([CallerFilePath] string? sourceFile = null) + { + var testDir = Path.GetDirectoryName(sourceFile)!; + return Path.GetFullPath(Path.Join(testDir, "Fixtures")); + } +} diff --git a/test/ApiMark.Vhdl.Tests/Fixtures/common_types.vhd b/test/ApiMark.Vhdl.Tests/Fixtures/common_types.vhd new file mode 100644 index 0000000..22887be --- /dev/null +++ b/test/ApiMark.Vhdl.Tests/Fixtures/common_types.vhd @@ -0,0 +1,42 @@ +LIBRARY ieee; + +--! @brief Common type definitions and utilities for the design. +PACKAGE common_types IS + + --! 32-bit data bus type. + SUBTYPE data_bus_t IS STD_LOGIC_VECTOR(31 DOWNTO 0); + + --! 4-bit nibble type. + SUBTYPE nibble_t IS STD_LOGIC_VECTOR(3 DOWNTO 0); + + --! Width of the data bus in bits. + CONSTANT DATA_WIDTH : INTEGER := 32; + + --! Reset value for counters. + CONSTANT RESET_VALUE : INTEGER := 0; + + --! Counter component declaration. + COMPONENT counter IS + GENERIC ( + DATA_WIDTH : INTEGER := 8; + MAX_COUNT : INTEGER := 255 + ); + PORT ( + clk : IN STD_LOGIC; + rst : IN STD_LOGIC; + en : IN STD_LOGIC; + count : OUT STD_LOGIC_VECTOR(DATA_WIDTH - 1 DOWNTO 0); + wrap : OUT STD_LOGIC + ); + END COMPONENT counter; + + --! @brief Converts a std_logic_vector to a natural integer. + --! @param v The std_logic_vector value to convert. + --! @return The natural integer representation. + FUNCTION to_natural(v : STD_LOGIC_VECTOR) RETURN NATURAL; + + --! @brief Resets all bits of a std_logic_vector output to zero. + --! @param v The output std_logic_vector to clear. + PROCEDURE clear_vector(SIGNAL v : OUT STD_LOGIC_VECTOR); + +END PACKAGE common_types; diff --git a/test/ApiMark.Vhdl.Tests/Fixtures/counter.vhd b/test/ApiMark.Vhdl.Tests/Fixtures/counter.vhd new file mode 100644 index 0000000..59e8ba3 --- /dev/null +++ b/test/ApiMark.Vhdl.Tests/Fixtures/counter.vhd @@ -0,0 +1,26 @@ +LIBRARY ieee; +USE ieee.std_logic_1164.ALL; +USE ieee.numeric_std.ALL; + +--! @brief Configurable synchronous counter entity. +--! +--! A simple up-counter that resets synchronously and wraps at a +--! configurable maximum count value. +ENTITY counter IS + GENERIC ( + DATA_WIDTH : INTEGER := 8; --! Width of the counter data bus in bits + MAX_COUNT : INTEGER := 255 --! Maximum count value before wrap-around + ); + PORT ( + clk : IN STD_LOGIC; --! Rising-edge clock input + rst : IN STD_LOGIC; --! Synchronous reset, active high + en : IN STD_LOGIC; --! Count enable + count : OUT STD_LOGIC_VECTOR(DATA_WIDTH - 1 DOWNTO 0); --! Current count value + wrap : OUT STD_LOGIC --! Asserted when counter wraps to zero + ); +END ENTITY counter; + +--! @brief Behavioral architecture for the counter entity. +ARCHITECTURE behavioral OF counter IS +BEGIN +END ARCHITECTURE behavioral; diff --git a/test/ApiMark.Vhdl.Tests/Fixtures/mux.vhd b/test/ApiMark.Vhdl.Tests/Fixtures/mux.vhd new file mode 100644 index 0000000..4461495 --- /dev/null +++ b/test/ApiMark.Vhdl.Tests/Fixtures/mux.vhd @@ -0,0 +1,33 @@ +LIBRARY ieee; +USE ieee.std_logic_1164.ALL; + +--! @brief 2-input multiplexer entity. +--! +--! Selects one of two input signals based on a select line. +ENTITY mux IS + PORT ( + a : IN STD_LOGIC; --! First data input + b : IN STD_LOGIC; --! Second data input + sel : IN STD_LOGIC; --! Select line: 0 selects a, 1 selects b + y : OUT STD_LOGIC --! Selected output + ); +END ENTITY mux; + +--! @brief Behavioral architecture using a process statement. +ARCHITECTURE behavioral OF mux IS +BEGIN + process(a, b, sel) + BEGIN + IF sel = '0' THEN + y <= a; + ELSE + y <= b; + END IF; + END process; +END ARCHITECTURE behavioral; + +--! @brief Dataflow architecture using concurrent signal assignment. +ARCHITECTURE dataflow OF mux IS +BEGIN + y <= a WHEN sel = '0' ELSE b; +END ARCHITECTURE dataflow; diff --git a/test/ApiMark.Vhdl.Tests/VhdlAstParserTests.cs b/test/ApiMark.Vhdl.Tests/VhdlAstParserTests.cs new file mode 100644 index 0000000..0e2c3bc --- /dev/null +++ b/test/ApiMark.Vhdl.Tests/VhdlAstParserTests.cs @@ -0,0 +1,356 @@ +using System.Linq; +using ApiMark.Vhdl.VhdlAst; +using Xunit; + +namespace ApiMark.Vhdl.Tests; + +/// Unit tests for . +public class VhdlAstParserTests +{ + /// Validates that the parser returns a non-null entity from the fixture file. + [Fact] + public void VhdlAstParser_Parse_FixtureFile_ReturnsEntity() + { + // Arrange + var path = FixturePaths.GetFixtureFilePath("counter.vhd"); + + // Act + var model = VhdlAstParser.Parse(path); + + // Assert + Assert.NotEmpty(model.Entities); + } + + /// Validates that the entity has at least one generic. + [Fact] + public void VhdlAstParser_Parse_FixtureFile_EntityHasGenerics() + { + // Arrange + var path = FixturePaths.GetFixtureFilePath("counter.vhd"); + + // Act + var model = VhdlAstParser.Parse(path); + + // Assert + var entity = Assert.Single(model.Entities); + Assert.NotEmpty(entity.Generics); + } + + /// Validates that the entity has at least one port. + [Fact] + public void VhdlAstParser_Parse_FixtureFile_EntityHasPorts() + { + // Arrange + var path = FixturePaths.GetFixtureFilePath("counter.vhd"); + + // Act + var model = VhdlAstParser.Parse(path); + + // Assert + var entity = Assert.Single(model.Entities); + Assert.NotEmpty(entity.Ports); + } + + /// Validates that the entity doc comment summary is not null or empty. + [Fact] + public void VhdlAstParser_Parse_FixtureFile_EntityDocCommentParsed() + { + // Arrange + var path = FixturePaths.GetFixtureFilePath("counter.vhd"); + + // Act + var model = VhdlAstParser.Parse(path); + + // Assert + var entity = Assert.Single(model.Entities); + Assert.NotNull(entity.Doc); + Assert.False(string.IsNullOrEmpty(entity.Doc.Summary)); + } + + /// Validates that at least one port has an inline doc comment. + [Fact] + public void VhdlAstParser_Parse_FixtureFile_PortsHaveInlineDocComments() + { + // Arrange + var path = FixturePaths.GetFixtureFilePath("counter.vhd"); + + // Act + var model = VhdlAstParser.Parse(path); + + // Assert + var entity = Assert.Single(model.Entities); + Assert.Contains(entity.Ports, p => p.Doc != null); + } + + /// Validates that mux.vhd parses two architectures. + [Fact] + public void VhdlAstParser_Parse_MuxFixture_ParsesTwoArchitectures() + { + // Arrange + var path = FixturePaths.MuxVhd; + + // Act + var model = VhdlAstParser.Parse(path); + + // Assert + Assert.Equal(2, model.Architectures.Count); + } + + /// Validates that mux.vhd has one entity named mux. + [Fact] + public void VhdlAstParser_Parse_MuxFixture_HasMuxEntity() + { + // Arrange + var path = FixturePaths.MuxVhd; + + // Act + var model = VhdlAstParser.Parse(path); + + // Assert + var entity = Assert.Single(model.Entities); + Assert.Equal("mux", entity.Name); + } + + /// Validates that common_types.vhd parses a package. + [Fact] + public void VhdlAstParser_Parse_CommonTypesFixture_ReturnsPackage() + { + // Arrange + var path = FixturePaths.CommonTypesVhd; + + // Act + var model = VhdlAstParser.Parse(path); + + // Assert + Assert.NotEmpty(model.Packages); + } + + /// Validates that common_types.vhd package has 2 types. + [Fact] + public void VhdlAstParser_Parse_CommonTypesFixture_PackageHasTwoTypes() + { + // Arrange + var path = FixturePaths.CommonTypesVhd; + + // Act + var model = VhdlAstParser.Parse(path); + + // Assert + var pkg = Assert.Single(model.Packages); + Assert.Equal(2, pkg.Types.Count); + } + + /// Validates that common_types.vhd package has 2 constants. + [Fact] + public void VhdlAstParser_Parse_CommonTypesFixture_PackageHasTwoConstants() + { + // Arrange + var path = FixturePaths.CommonTypesVhd; + + // Act + var model = VhdlAstParser.Parse(path); + + // Assert + var pkg = Assert.Single(model.Packages); + Assert.Equal(2, pkg.Constants.Count); + } + + /// Validates that package constants have their preceding doc comments parsed. + [Fact] + public void VhdlAstParser_Parse_CommonTypesFixture_ConstantsHaveDocComments() + { + // Arrange + var path = FixturePaths.CommonTypesVhd; + + // Act + var model = VhdlAstParser.Parse(path); + + // Assert + var pkg = Assert.Single(model.Packages); + var dataWidth = pkg.Constants.FirstOrDefault(c => c.Name == "DATA_WIDTH"); + Assert.NotNull(dataWidth); + Assert.NotNull(dataWidth.Doc); + Assert.False(string.IsNullOrEmpty(dataWidth.Doc.Summary)); + } + + /// Validates that common_types.vhd package has 1 component. + [Fact] + public void VhdlAstParser_Parse_CommonTypesFixture_PackageHasOneComponent() + { + // Arrange + var path = FixturePaths.CommonTypesVhd; + + // Act + var model = VhdlAstParser.Parse(path); + + // Assert + var pkg = Assert.Single(model.Packages); + Assert.Single(pkg.Components); + } + + /// Validates that common_types.vhd package has 2 subprograms. + [Fact] + public void VhdlAstParser_Parse_CommonTypesFixture_PackageHasTwoSubprograms() + { + // Arrange + var path = FixturePaths.CommonTypesVhd; + + // Act + var model = VhdlAstParser.Parse(path); + + // Assert + var pkg = Assert.Single(model.Packages); + Assert.Equal(2, pkg.Subprograms.Count); + } + + /// Validates that to_natural is a Function. + [Fact] + public void VhdlAstParser_Parse_CommonTypesFixture_ToNaturalIsFunction() + { + // Arrange + var path = FixturePaths.CommonTypesVhd; + + // Act + var model = VhdlAstParser.Parse(path); + + // Assert + var pkg = Assert.Single(model.Packages); + var subprogram = pkg.Subprograms.FirstOrDefault(s => s.Name == "to_natural"); + Assert.NotNull(subprogram); + Assert.Equal(VhdlSubprogramKind.Function, subprogram.Kind); + } + + /// Validates that clear_vector is a Procedure. + [Fact] + public void VhdlAstParser_Parse_CommonTypesFixture_ClearVectorIsProcedure() + { + // Arrange + var path = FixturePaths.CommonTypesVhd; + + // Act + var model = VhdlAstParser.Parse(path); + + // Assert + var pkg = Assert.Single(model.Packages); + var subprogram = pkg.Subprograms.FirstOrDefault(s => s.Name == "clear_vector"); + Assert.NotNull(subprogram); + Assert.Equal(VhdlSubprogramKind.Procedure, subprogram.Kind); + } + + /// Validates that to_natural has exactly one formal parameter named v of type STD_LOGIC_VECTOR. + [Fact] + public void VhdlAstParser_Parse_CommonTypesFixture_ToNaturalHasOneParameter() + { + // Arrange + var path = FixturePaths.CommonTypesVhd; + + // Act + var model = VhdlAstParser.Parse(path); + + // Assert + var pkg = Assert.Single(model.Packages); + var subprogram = pkg.Subprograms.FirstOrDefault(s => s.Name == "to_natural"); + Assert.NotNull(subprogram); + var param = Assert.Single(subprogram.Parameters); + Assert.Equal("v", param.Name); + Assert.Equal("STD_LOGIC_VECTOR", param.TypeName); + + // Mode is empty because no class keyword or direction is written for a plain function parameter + Assert.Equal(string.Empty, param.Mode); + } + + /// Validates that to_natural has a return type of NATURAL. + [Fact] + public void VhdlAstParser_Parse_CommonTypesFixture_ToNaturalHasReturnTypeNatural() + { + // Arrange + var path = FixturePaths.CommonTypesVhd; + + // Act + var model = VhdlAstParser.Parse(path); + + // Assert + var pkg = Assert.Single(model.Packages); + var subprogram = pkg.Subprograms.FirstOrDefault(s => s.Name == "to_natural"); + Assert.NotNull(subprogram); + Assert.Equal("NATURAL", subprogram.ReturnType); + } + + /// Validates that clear_vector has exactly one formal parameter named v of type STD_LOGIC_VECTOR. + [Fact] + public void VhdlAstParser_Parse_CommonTypesFixture_ClearVectorHasOneParameter() + { + // Arrange + var path = FixturePaths.CommonTypesVhd; + + // Act + var model = VhdlAstParser.Parse(path); + + // Assert + var pkg = Assert.Single(model.Packages); + var subprogram = pkg.Subprograms.FirstOrDefault(s => s.Name == "clear_vector"); + Assert.NotNull(subprogram); + var param = Assert.Single(subprogram.Parameters); + Assert.Equal("v", param.Name); + Assert.Equal("STD_LOGIC_VECTOR", param.TypeName); + + // Mode contains SIGNAL (class keyword) and/or OUT (direction) from `SIGNAL v : OUT STD_LOGIC_VECTOR` + Assert.True( + param.Mode.Contains("SIGNAL", StringComparison.Ordinal) || + param.Mode.Contains("OUT", StringComparison.Ordinal), + $"Expected mode to contain 'SIGNAL' or 'OUT', got '{param.Mode}'"); + } + + /// Validates that clear_vector has a null return type because it is a procedure. + [Fact] + public void VhdlAstParser_Parse_CommonTypesFixture_ClearVectorHasNullReturnType() + { + // Arrange + var path = FixturePaths.CommonTypesVhd; + + // Act + var model = VhdlAstParser.Parse(path); + + // Assert + var pkg = Assert.Single(model.Packages); + var subprogram = pkg.Subprograms.FirstOrDefault(s => s.Name == "clear_vector"); + Assert.NotNull(subprogram); + Assert.Null(subprogram.ReturnType); + } + + /// Validates that to_natural doc comment has a @param entry for parameter v. + [Fact] + public void VhdlAstParser_Parse_CommonTypesFixture_ToNaturalDocHasParamEntry() + { + // Arrange + var path = FixturePaths.CommonTypesVhd; + + // Act + var model = VhdlAstParser.Parse(path); + + // Assert + var pkg = Assert.Single(model.Packages); + var subprogram = pkg.Subprograms.FirstOrDefault(s => s.Name == "to_natural"); + Assert.NotNull(subprogram); + Assert.NotNull(subprogram.Doc); + Assert.Contains(subprogram.Doc.Params, p => p.Name == "v"); + } + + /// Validates that to_natural doc comment has a @return entry. + [Fact] + public void VhdlAstParser_Parse_CommonTypesFixture_ToNaturalDocHasReturnEntry() + { + // Arrange + var path = FixturePaths.CommonTypesVhd; + + // Act + var model = VhdlAstParser.Parse(path); + + // Assert + var pkg = Assert.Single(model.Packages); + var subprogram = pkg.Subprograms.FirstOrDefault(s => s.Name == "to_natural"); + Assert.NotNull(subprogram); + Assert.NotNull(subprogram.Doc); + Assert.False(string.IsNullOrEmpty(subprogram.Doc.Returns)); + } +} diff --git a/test/ApiMark.Vhdl.Tests/VhdlEmitterGradualDisclosureTests.cs b/test/ApiMark.Vhdl.Tests/VhdlEmitterGradualDisclosureTests.cs new file mode 100644 index 0000000..9974dd1 --- /dev/null +++ b/test/ApiMark.Vhdl.Tests/VhdlEmitterGradualDisclosureTests.cs @@ -0,0 +1,436 @@ +using System.Linq; +using ApiMark.Core; +using ApiMark.Core.TestHelpers; +using ApiMark.Vhdl.VhdlAst; +using Xunit; + +namespace ApiMark.Vhdl.Tests; + +/// Unit tests for . +public class VhdlEmitterGradualDisclosureTests +{ + /// Builds minimal data for testing without parsing real VHDL files. + private static (VhdlEmitter emitter, IReadOnlyList fileModels) BuildMinimalData() + { + var options = new VhdlGeneratorOptions { LibraryName = "TestLib" }; + var entity = new VhdlEntityDecl( + "MyEntity", + [], + [], + new VhdlDocComment("A test entity.", null, [])); + var fileModel = new VhdlFileModel("test.vhd", [entity], [], []); + var fileModels = new List { fileModel }; + var emitter = new VhdlEmitter(options, fileModels); + return (emitter, fileModels); + } + + /// Validates that the gradual-disclosure emitter creates the api index page. + [Fact] + public void VhdlEmitterGradualDisclosure_Emit_MinimalData_CreatesApiIndexPage() + { + // Arrange + var factory = new InMemoryMarkdownWriterFactory(); + var (emitter, fileModels) = BuildMinimalData(); + + // Act + new VhdlEmitterGradualDisclosure(emitter, fileModels).Emit(factory, new EmitConfig(), new InMemoryContext()); + + // Assert + Assert.True(factory.HasWriter("", "api"), "Expected api index page to be created"); + } + + /// Validates that the gradual-disclosure emitter creates an entity page. + [Fact] + public void VhdlEmitterGradualDisclosure_Emit_MinimalData_CreatesEntityPage() + { + // Arrange + var factory = new InMemoryMarkdownWriterFactory(); + var (emitter, fileModels) = BuildMinimalData(); + + // Act + new VhdlEmitterGradualDisclosure(emitter, fileModels).Emit(factory, new EmitConfig(), new InMemoryContext()); + + // Assert + Assert.True( + factory.Writers.Keys.Any(k => k.Contains("MyEntity", StringComparison.Ordinal)), + "Expected a page containing 'MyEntity'"); + } + + /// Validates that the api index page heading contains the library name. + [Fact] + public void VhdlEmitterGradualDisclosure_Emit_MinimalData_ApiIndexContainsLibraryNameHeading() + { + // Arrange + var factory = new InMemoryMarkdownWriterFactory(); + var (emitter, fileModels) = BuildMinimalData(); + + // Act + new VhdlEmitterGradualDisclosure(emitter, fileModels).Emit(factory, new EmitConfig(), new InMemoryContext()); + + // Assert + var apiWriter = factory.GetWriter("", "api"); + var headings = apiWriter.Operations.OfType().ToList(); + Assert.Contains(headings, h => h.Text.Contains("TestLib", StringComparison.Ordinal)); + } + + /// Builds data with an entity and architecture pair for architecture-related tests. + private static (VhdlEmitter emitter, IReadOnlyList fileModels) BuildDataWithArchitecture() + { + var options = new VhdlGeneratorOptions { LibraryName = "TestLib" }; + var entity = new VhdlEntityDecl( + "MyEntity", + [], + [], + new VhdlDocComment("A test entity.", null, [])); + var arch = new VhdlArchitectureDecl( + "behavioral", + "MyEntity", + new VhdlDocComment("Behavioral implementation.", null, [])); + var fileModel = new VhdlFileModel("test.vhd", [entity], [arch], []); + var fileModels = new List { fileModel }; + var emitter = new VhdlEmitter(options, fileModels); + return (emitter, fileModels); + } + + /// Builds data with a package that has members. + private static (VhdlEmitter emitter, IReadOnlyList fileModels) BuildDataWithPackageMembers() + { + var options = new VhdlGeneratorOptions { LibraryName = "TestLib" }; + var typeDecl = new VhdlTypeDecl("my_type", "STD_LOGIC_VECTOR(7 DOWNTO 0)", new VhdlDocComment("An 8-bit type.", null, [])); + var constDecl = new VhdlConstantDecl("MY_CONST", "INTEGER", "42", new VhdlDocComment("A constant.", null, [])); + var compDecl = new VhdlComponentDecl("my_comp", new VhdlDocComment("A component.", null, [])); + var subprogramDecl = new VhdlSubprogramDecl("my_func", VhdlSubprogramKind.Function, "FUNCTION my_func RETURN INTEGER", [], "INTEGER", new VhdlDocComment("A function.", null, [])); + var pkg = new VhdlPackageDecl( + "my_pkg", + new VhdlDocComment("A test package.", null, []), + [typeDecl], + [constDecl], + [compDecl], + [subprogramDecl]); + var fileModel = new VhdlFileModel("test.vhd", [], [], [pkg]); + var fileModels = new List { fileModel }; + var emitter = new VhdlEmitter(options, fileModels); + return (emitter, fileModels); + } + + /// Validates that api.md does NOT contain a standalone Architectures section heading. + [Fact] + public void VhdlEmitterGradualDisclosure_Emit_WithArchitecture_ApiIndexHasNoArchitecturesSection() + { + // Arrange + var factory = new InMemoryMarkdownWriterFactory(); + var (emitter, fileModels) = BuildDataWithArchitecture(); + + // Act + new VhdlEmitterGradualDisclosure(emitter, fileModels).Emit(factory, new EmitConfig(), new InMemoryContext()); + + // Assert + var apiWriter = factory.GetWriter("", "api"); + var headings = apiWriter.Operations.OfType().ToList(); + Assert.DoesNotContain(headings, h => h.Text.Equals("Architectures", StringComparison.Ordinal)); + } + + /// Validates that no standalone arch page files are created. + [Fact] + public void VhdlEmitterGradualDisclosure_Emit_WithArchitecture_NoStandaloneArchPageCreated() + { + // Arrange + var factory = new InMemoryMarkdownWriterFactory(); + var (emitter, fileModels) = BuildDataWithArchitecture(); + + // Act + new VhdlEmitterGradualDisclosure(emitter, fileModels).Emit(factory, new EmitConfig(), new InMemoryContext()); + + // Assert + Assert.DoesNotContain(factory.Writers.Keys, k => k.Contains("_arch", StringComparison.Ordinal)); + } + + /// Validates that entity page still has inline Architectures section. + [Fact] + public void VhdlEmitterGradualDisclosure_Emit_WithArchitecture_EntityPageHasInlineArchitecturesSection() + { + // Arrange + var factory = new InMemoryMarkdownWriterFactory(); + var (emitter, fileModels) = BuildDataWithArchitecture(); + + // Act + new VhdlEmitterGradualDisclosure(emitter, fileModels).Emit(factory, new EmitConfig(), new InMemoryContext()); + + // Assert + var entityWriter = factory.Writers.Values.FirstOrDefault(w => + w.Operations.OfType().Any(h => h.Text.Equals("MyEntity", StringComparison.Ordinal))); + Assert.NotNull(entityWriter); + var headings = entityWriter.Operations.OfType().ToList(); + Assert.Contains(headings, h => h.Text.Equals("Architectures", StringComparison.Ordinal)); + } + + /// Validates that package with members emits Types section on its detail page. + [Fact] + public void VhdlEmitterGradualDisclosure_Emit_PackageWithTypes_EmitsTypesSection() + { + // Arrange + var factory = new InMemoryMarkdownWriterFactory(); + var (emitter, fileModels) = BuildDataWithPackageMembers(); + + // Act + new VhdlEmitterGradualDisclosure(emitter, fileModels).Emit(factory, new EmitConfig(), new InMemoryContext()); + + // Assert + var pkgWriter = factory.Writers.Values.FirstOrDefault(w => + w.Operations.OfType().Any(h => h.Text.Equals("my_pkg", StringComparison.Ordinal))); + Assert.NotNull(pkgWriter); + var headings = pkgWriter.Operations.OfType().ToList(); + Assert.Contains(headings, h => h.Text.Equals("Types", StringComparison.Ordinal)); + + // Verify paragraph-per-type format: type name appears in a paragraph (not a table) + var paragraphs = pkgWriter.Operations.OfType().ToList(); + Assert.Contains(paragraphs, p => p.Text.Contains("my_type", StringComparison.Ordinal)); + } + + /// Validates that package with members emits Constants section on its detail page. + [Fact] + public void VhdlEmitterGradualDisclosure_Emit_PackageWithConstants_EmitsConstantsSection() + { + // Arrange + var factory = new InMemoryMarkdownWriterFactory(); + var (emitter, fileModels) = BuildDataWithPackageMembers(); + + // Act + new VhdlEmitterGradualDisclosure(emitter, fileModels).Emit(factory, new EmitConfig(), new InMemoryContext()); + + // Assert + var pkgWriter = factory.Writers.Values.FirstOrDefault(w => + w.Operations.OfType().Any(h => h.Text.Equals("my_pkg", StringComparison.Ordinal))); + Assert.NotNull(pkgWriter); + var headings = pkgWriter.Operations.OfType().ToList(); + Assert.Contains(headings, h => h.Text.Equals("Constants", StringComparison.Ordinal)); + + // Verify paragraph-per-constant format: constant name appears in a paragraph (not a table) + var paragraphs = pkgWriter.Operations.OfType().ToList(); + Assert.Contains(paragraphs, p => p.Text.Contains("MY_CONST", StringComparison.Ordinal)); + } + + /// Validates that package with members emits Components section on its detail page. + [Fact] + public void VhdlEmitterGradualDisclosure_Emit_PackageWithComponents_EmitsComponentsSection() + { + // Arrange + var factory = new InMemoryMarkdownWriterFactory(); + var (emitter, fileModels) = BuildDataWithPackageMembers(); + + // Act + new VhdlEmitterGradualDisclosure(emitter, fileModels).Emit(factory, new EmitConfig(), new InMemoryContext()); + + // Assert + var pkgWriter = factory.Writers.Values.FirstOrDefault(w => + w.Operations.OfType().Any(h => h.Text.Equals("my_pkg", StringComparison.Ordinal))); + Assert.NotNull(pkgWriter); + var headings = pkgWriter.Operations.OfType().ToList(); + Assert.Contains(headings, h => h.Text.Equals("Components", StringComparison.Ordinal)); + + // Verify paragraph-per-component format: component name appears in a paragraph (not a table) + var paragraphs = pkgWriter.Operations.OfType().ToList(); + Assert.Contains(paragraphs, p => p.Text.Contains("my_comp", StringComparison.Ordinal)); + } + + /// Validates that package with members emits Subprograms section on its detail page in paragraph-link format. + [Fact] + public void VhdlEmitterGradualDisclosure_Emit_PackageWithSubprograms_EmitsSubprogramsSection() + { + // Arrange + var factory = new InMemoryMarkdownWriterFactory(); + var (emitter, fileModels) = BuildDataWithPackageMembers(); + + // Act + new VhdlEmitterGradualDisclosure(emitter, fileModels).Emit(factory, new EmitConfig(), new InMemoryContext()); + + // Assert + var pkgWriter = factory.Writers.Values.FirstOrDefault(w => + w.Operations.OfType().Any(h => h.Text.Equals("my_pkg", StringComparison.Ordinal))); + Assert.NotNull(pkgWriter); + var headings = pkgWriter.Operations.OfType().ToList(); + Assert.Contains(headings, h => h.Text.Equals("Subprograms", StringComparison.Ordinal)); + + // Verify paragraph-link format: subprogram name appears in a paragraph (not a table) + var paragraphs = pkgWriter.Operations.OfType().ToList(); + Assert.Contains(paragraphs, p => p.Text.Contains("my_func", StringComparison.Ordinal)); + } + + /// Validates that a subprogram detail file is created for each subprogram in a package. + [Fact] + public void VhdlEmitterGradualDisclosure_Emit_PackageWithSubprograms_CreatesSubprogramDetailFile() + { + // Arrange + var factory = new InMemoryMarkdownWriterFactory(); + var (emitter, fileModels) = BuildDataWithPackageMembers(); + + // Act + new VhdlEmitterGradualDisclosure(emitter, fileModels).Emit(factory, new EmitConfig(), new InMemoryContext()); + + // Assert: detail file placed in per-package subfolder {pkg}/{subprogram} must exist + Assert.True(factory.HasWriter("my_pkg", "my_func"), "Expected subprogram detail file 'my_pkg/my_func' to be created"); + } + + /// Validates that the subprogram detail file contains a Signature heading. + [Fact] + public void VhdlEmitterGradualDisclosure_Emit_PackageWithSubprograms_SubprogramDetailFileHasSignatureHeading() + { + // Arrange + var factory = new InMemoryMarkdownWriterFactory(); + var (emitter, fileModels) = BuildDataWithPackageMembers(); + + // Act + new VhdlEmitterGradualDisclosure(emitter, fileModels).Emit(factory, new EmitConfig(), new InMemoryContext()); + + // Assert: Signature heading must appear in the subprogram detail file + var subWriter = factory.GetWriter("my_pkg", "my_func"); + var headings = subWriter.Operations.OfType().ToList(); + Assert.Contains(headings, h => h.Text.Equals("Signature", StringComparison.Ordinal)); + } + + /// Builds data with a subprogram that has formal parameters for Parameters-section tests. + private static (VhdlEmitter emitter, IReadOnlyList fileModels) BuildDataWithParameterizedSubprogram() + { + var options = new VhdlGeneratorOptions { LibraryName = "TestLib" }; + var paramDoc = new VhdlParamDoc("v", "The input vector."); + var param = new VhdlParamDecl("v", "", "STD_LOGIC_VECTOR"); + var subprogramDecl = new VhdlSubprogramDecl( + "to_natural", + VhdlSubprogramKind.Function, + "FUNCTION to_natural(v : STD_LOGIC_VECTOR) RETURN NATURAL", + [param], + "NATURAL", + new VhdlDocComment("Converts a vector.", null, [paramDoc], "The natural value.")); + var pkg = new VhdlPackageDecl( + "my_pkg", + new VhdlDocComment("A test package.", null, []), + [], + [], + [], + [subprogramDecl]); + var fileModel = new VhdlFileModel("test.vhd", [], [], [pkg]); + var fileModels = new List { fileModel }; + var emitter = new VhdlEmitter(options, fileModels); + return (emitter, fileModels); + } + + /// Validates that the subprogram detail file contains a Parameters heading when formal parameters are present. + [Fact] + public void VhdlEmitterGradualDisclosure_Emit_SubprogramWithParameters_DetailFileHasParametersHeading() + { + // Arrange + var factory = new InMemoryMarkdownWriterFactory(); + var (emitter, fileModels) = BuildDataWithParameterizedSubprogram(); + + // Act + new VhdlEmitterGradualDisclosure(emitter, fileModels).Emit(factory, new EmitConfig(), new InMemoryContext()); + + // Assert: Parameters heading must appear in the subprogram detail file + var subWriter = factory.GetWriter("my_pkg", "to_natural"); + var headings = subWriter.Operations.OfType().ToList(); + Assert.Contains(headings, h => h.Text.Equals("Parameters", StringComparison.Ordinal)); + } + + /// Validates that the subprogram detail file contains a Returns heading for functions. + [Fact] + public void VhdlEmitterGradualDisclosure_Emit_FunctionSubprogram_DetailFileHasReturnsHeading() + { + // Arrange + var factory = new InMemoryMarkdownWriterFactory(); + var (emitter, fileModels) = BuildDataWithParameterizedSubprogram(); + + // Act + new VhdlEmitterGradualDisclosure(emitter, fileModels).Emit(factory, new EmitConfig(), new InMemoryContext()); + + // Assert: Returns heading must appear in the subprogram detail file because ReturnType is set + var subWriter = factory.GetWriter("my_pkg", "to_natural"); + var headings = subWriter.Operations.OfType().ToList(); + Assert.Contains(headings, h => h.Text.Equals("Returns", StringComparison.Ordinal)); + } + + /// Validates that the Parameters table headers are Name, Type, Description (no Mode column). + [Fact] + public void VhdlEmitterGradualDisclosure_Emit_SubprogramWithParameters_ParametersTableHasCorrectHeaders() + { + // Arrange + var factory = new InMemoryMarkdownWriterFactory(); + var (emitter, fileModels) = BuildDataWithParameterizedSubprogram(); + + // Act + new VhdlEmitterGradualDisclosure(emitter, fileModels).Emit(factory, new EmitConfig(), new InMemoryContext()); + + // Assert: Parameters table headers must be Name | Type | Description (no Mode column) + var subWriter = factory.GetWriter("my_pkg", "to_natural"); + var table = subWriter.Operations.OfType().First(); + Assert.Equal(["Name", "Type", "Description"], table.Headers); + } + + /// Validates that a parameter with no direction shows the bare type name in the Type cell. + [Fact] + public void VhdlEmitterGradualDisclosure_Emit_SubprogramWithPlainParameter_TypeCellIsBareTypeName() + { + // Arrange + var factory = new InMemoryMarkdownWriterFactory(); + var (emitter, fileModels) = BuildDataWithParameterizedSubprogram(); + + // Act + new VhdlEmitterGradualDisclosure(emitter, fileModels).Emit(factory, new EmitConfig(), new InMemoryContext()); + + // Assert: parameter with empty Mode emits bare type name without direction prefix + var subWriter = factory.GetWriter("my_pkg", "to_natural"); + var table = subWriter.Operations.OfType().First(); + var row = Assert.Single(table.Rows); + Assert.Equal("v", row[0]); + Assert.Equal("STD_LOGIC_VECTOR", row[1]); + Assert.Equal("The input vector.", row[2]); + } + + /// Validates that a parameter with a direction and class keyword shows direction-prefixed type, class stripped. + [Fact] + public void VhdlEmitterGradualDisclosure_Emit_SubprogramWithDirectedParameter_TypeCellPrefixedWithDirection() + { + // Arrange — procedure parameter with SIGNAL class and OUT direction + var factory = new InMemoryMarkdownWriterFactory(); + var options = new VhdlGeneratorOptions { LibraryName = "TestLib" }; + var paramDoc = new VhdlParamDoc("v", "The output vector."); + var param = new VhdlParamDecl("v", "SIGNAL OUT", "STD_LOGIC_VECTOR"); + var subprogramDecl = new VhdlSubprogramDecl( + "clear_vec", + VhdlSubprogramKind.Procedure, + "PROCEDURE clear_vec(SIGNAL v : OUT STD_LOGIC_VECTOR)", + [param], + null, + new VhdlDocComment("Clears a vector.", null, [paramDoc])); + var pkg = new VhdlPackageDecl("my_pkg", new VhdlDocComment("Pkg.", null, []), [], [], [], [subprogramDecl]); + var fileModels = new List { new VhdlFileModel("test.vhd", [], [], [pkg]) }; + var emitter = new VhdlEmitter(options, fileModels); + + // Act + new VhdlEmitterGradualDisclosure(emitter, fileModels).Emit(factory, new EmitConfig(), new InMemoryContext()); + + // Assert: SIGNAL is stripped, OUT is prefixed to the type name + var subWriter = factory.GetWriter("my_pkg", "clear_vec"); + var table = subWriter.Operations.OfType().First(); + var row = Assert.Single(table.Rows); + Assert.Equal("OUT STD_LOGIC_VECTOR", row[1]); + } + + /// Validates that the package page link for a subprogram uses the subfolder path format. + [Fact] + public void VhdlEmitterGradualDisclosure_Emit_PackageWithSubprograms_PackagePageLinkUsesSubfolderPath() + { + // Arrange + var factory = new InMemoryMarkdownWriterFactory(); + var (emitter, fileModels) = BuildDataWithPackageMembers(); + + // Act + new VhdlEmitterGradualDisclosure(emitter, fileModels).Emit(factory, new EmitConfig(), new InMemoryContext()); + + // Assert: the package page paragraph linking to the subprogram must use the subfolder path + var pkgWriter = factory.Writers.Values.FirstOrDefault(w => + w.Operations.OfType().Any(h => h.Text.Equals("my_pkg", StringComparison.Ordinal))); + Assert.NotNull(pkgWriter); + var paragraphs = pkgWriter.Operations.OfType().ToList(); + Assert.Contains(paragraphs, p => p.Text.Contains("my_pkg/my_func.md", StringComparison.Ordinal)); + } +} diff --git a/test/ApiMark.Vhdl.Tests/VhdlEmitterSingleFileTests.cs b/test/ApiMark.Vhdl.Tests/VhdlEmitterSingleFileTests.cs new file mode 100644 index 0000000..a902cba --- /dev/null +++ b/test/ApiMark.Vhdl.Tests/VhdlEmitterSingleFileTests.cs @@ -0,0 +1,344 @@ +using System.Linq; +using ApiMark.Core; +using ApiMark.Core.TestHelpers; +using ApiMark.Vhdl.VhdlAst; +using Xunit; + +namespace ApiMark.Vhdl.Tests; + +/// Unit tests for . +public class VhdlEmitterSingleFileTests +{ + /// Builds minimal data for testing. + private static (VhdlEmitter emitter, IReadOnlyList fileModels) BuildMinimalData() + { + var options = new VhdlGeneratorOptions { LibraryName = "TestLib" }; + var entity = new VhdlEntityDecl("MyEntity", [], [], new VhdlDocComment("A test entity.", null, [])); + var fileModel = new VhdlFileModel("test.vhd", [entity], [], []); + var fileModels = new List { fileModel }; + var emitter = new VhdlEmitter(options, fileModels); + return (emitter, fileModels); + } + + /// Validates that the single-file emitter creates exactly one writer. + [Fact] + public void VhdlEmitterSingleFile_Emit_MinimalData_CreatesExactlyOneWriter() + { + // Arrange + var factory = new InMemoryMarkdownWriterFactory(); + var (emitter, fileModels) = BuildMinimalData(); + + // Act + new VhdlEmitterSingleFile(emitter, fileModels).Emit(factory, new EmitConfig { Format = OutputFormat.SingleFile }, new InMemoryContext()); + + // Assert + Assert.Single(factory.Writers); + } + + /// Validates that the single-file emitter creates only the api file. + [Fact] + public void VhdlEmitterSingleFile_Emit_MinimalData_CreatesApiFileOnly() + { + // Arrange + var factory = new InMemoryMarkdownWriterFactory(); + var (emitter, fileModels) = BuildMinimalData(); + + // Act + new VhdlEmitterSingleFile(emitter, fileModels).Emit(factory, new EmitConfig { Format = OutputFormat.SingleFile }, new InMemoryContext()); + + // Assert + Assert.True(factory.HasWriter("", "api"), "Expected api writer to be created"); + } + + /// Builds data with two entities for multi-entity tests. + private static (VhdlEmitter emitter, IReadOnlyList fileModels) BuildTwoEntityData() + { + var options = new VhdlGeneratorOptions { LibraryName = "TestLib" }; + var entity1 = new VhdlEntityDecl("EntityOne", [], [], new VhdlDocComment("First entity.", null, [])); + var entity2 = new VhdlEntityDecl("EntityTwo", [], [], new VhdlDocComment("Second entity.", null, [])); + var fileModel = new VhdlFileModel("test.vhd", [entity1, entity2], [], []); + var fileModels = new List { fileModel }; + var emitter = new VhdlEmitter(options, fileModels); + return (emitter, fileModels); + } + + /// Builds data with a package that has types for single-file tests. + private static (VhdlEmitter emitter, IReadOnlyList fileModels) BuildPackageWithTypesData() + { + var options = new VhdlGeneratorOptions { LibraryName = "TestLib" }; + var typeDecl = new VhdlTypeDecl("my_type", "STD_LOGIC_VECTOR(7 DOWNTO 0)", new VhdlDocComment("An 8-bit type.", null, [])); + var pkg = new VhdlPackageDecl( + "my_pkg", + new VhdlDocComment("A test package.", null, []), + [typeDecl], + [], + [], + []); + var fileModel = new VhdlFileModel("test.vhd", [], [], [pkg]); + var fileModels = new List { fileModel }; + var emitter = new VhdlEmitter(options, fileModels); + return (emitter, fileModels); + } + + /// Builds data with entity and architecture for architecture section tests. + private static (VhdlEmitter emitter, IReadOnlyList fileModels) BuildEntityWithArchData() + { + var options = new VhdlGeneratorOptions { LibraryName = "TestLib" }; + var entity = new VhdlEntityDecl("MyEntity", [], [], new VhdlDocComment("A test entity.", null, [])); + var arch = new VhdlArchitectureDecl("behavioral", "MyEntity", new VhdlDocComment("Behavioral arch.", null, [])); + var fileModel = new VhdlFileModel("test.vhd", [entity], [arch], []); + var fileModels = new List { fileModel }; + var emitter = new VhdlEmitter(options, fileModels); + return (emitter, fileModels); + } + + /// Validates that two entities appear in single-file output. + [Fact] + public void VhdlEmitterSingleFile_Emit_TwoEntities_BothAppearInOutput() + { + // Arrange + var factory = new InMemoryMarkdownWriterFactory(); + var (emitter, fileModels) = BuildTwoEntityData(); + + // Act + new VhdlEmitterSingleFile(emitter, fileModels).Emit(factory, new EmitConfig { Format = OutputFormat.SingleFile }, new InMemoryContext()); + + // Assert + var apiWriter = factory.GetWriter("", "api"); + var headings = apiWriter.Operations.OfType().ToList(); + Assert.Contains(headings, h => h.Text.Equals("EntityOne", StringComparison.Ordinal)); + Assert.Contains(headings, h => h.Text.Equals("EntityTwo", StringComparison.Ordinal)); + } + + /// Validates that package with members renders Types section in single-file output. + [Fact] + public void VhdlEmitterSingleFile_Emit_PackageWithTypes_EmitsTypesSection() + { + // Arrange + var factory = new InMemoryMarkdownWriterFactory(); + var (emitter, fileModels) = BuildPackageWithTypesData(); + + // Act + new VhdlEmitterSingleFile(emitter, fileModels).Emit(factory, new EmitConfig { Format = OutputFormat.SingleFile }, new InMemoryContext()); + + // Assert: Types heading still present (paragraph format, not table) + var apiWriter = factory.GetWriter("", "api"); + var headings = apiWriter.Operations.OfType().ToList(); + Assert.Contains(headings, h => h.Text.Equals("Types", StringComparison.Ordinal)); + + // Verify paragraph-per-type format: type name appears in a paragraph (not a table) + var paragraphs = apiWriter.Operations.OfType().ToList(); + Assert.Contains(paragraphs, p => p.Text.Contains("my_type", StringComparison.Ordinal)); + } + + /// Builds data with a package containing a function subprogram for subprogram rendering tests. + private static (VhdlEmitter emitter, IReadOnlyList fileModels) BuildPackageWithSubprogramsData() + { + var options = new VhdlGeneratorOptions { LibraryName = "TestLib" }; + var subprogramDecl = new VhdlSubprogramDecl( + "my_func", + VhdlSubprogramKind.Function, + "FUNCTION my_func RETURN INTEGER", + [], + "INTEGER", + new VhdlDocComment("A function.", null, [])); + var pkg = new VhdlPackageDecl( + "my_pkg", + new VhdlDocComment("A test package.", null, []), + [], + [], + [], + [subprogramDecl]); + var fileModel = new VhdlFileModel("test.vhd", [], [], [pkg]); + var fileModels = new List { fileModel }; + var emitter = new VhdlEmitter(options, fileModels); + return (emitter, fileModels); + } + + /// Validates that subprogram sections do NOT contain a standalone italic kind paragraph in single-file output. + /// + /// The kind is already visible in the Signature line (FUNCTION/PROCEDURE keyword), + /// so the redundant italic attribution paragraph was removed. + /// + [Fact] + public void VhdlEmitterSingleFile_Emit_PackageWithSubprograms_NoKindAttributionParagraph() + { + // Arrange + var factory = new InMemoryMarkdownWriterFactory(); + var (emitter, fileModels) = BuildPackageWithSubprogramsData(); + + // Act + new VhdlEmitterSingleFile(emitter, fileModels).Emit(factory, new EmitConfig { Format = OutputFormat.SingleFile }, new InMemoryContext()); + + // Assert: no standalone italic kind paragraph (*Function* or *Procedure*) should appear + var apiWriter = factory.GetWriter("", "api"); + var paragraphs = apiWriter.Operations.OfType().ToList(); + Assert.DoesNotContain(paragraphs, p => + p.Text.Equals("*Function*", StringComparison.Ordinal) || + p.Text.Equals("*Procedure*", StringComparison.Ordinal)); + } + + /// Validates that subprogram sections contain a Signature heading in single-file output. + [Fact] + public void VhdlEmitterSingleFile_Emit_PackageWithSubprograms_SubprogramSectionContainsSignatureHeading() + { + // Arrange + var factory = new InMemoryMarkdownWriterFactory(); + var (emitter, fileModels) = BuildPackageWithSubprogramsData(); + + // Act + new VhdlEmitterSingleFile(emitter, fileModels).Emit(factory, new EmitConfig { Format = OutputFormat.SingleFile }, new InMemoryContext()); + + // Assert: Signature heading must appear in the api output for the subprogram + var apiWriter = factory.GetWriter("", "api"); + var headings = apiWriter.Operations.OfType().ToList(); + Assert.Contains(headings, h => h.Text.Equals("Signature", StringComparison.Ordinal)); + } + + /// Validates that architecture sections appear inside entity sections in single-file output. + [Fact] + public void VhdlEmitterSingleFile_Emit_EntityWithArchitecture_ArchitectureSectionAppearsInOutput() + { + // Arrange + var factory = new InMemoryMarkdownWriterFactory(); + var (emitter, fileModels) = BuildEntityWithArchData(); + + // Act + new VhdlEmitterSingleFile(emitter, fileModels).Emit(factory, new EmitConfig { Format = OutputFormat.SingleFile }, new InMemoryContext()); + + // Assert + var apiWriter = factory.GetWriter("", "api"); + var headings = apiWriter.Operations.OfType().ToList(); + Assert.Contains(headings, h => h.Text.Equals("Architectures", StringComparison.Ordinal)); + } + + /// Builds data with a subprogram that has formal parameters for Parameters-section tests. + private static (VhdlEmitter emitter, IReadOnlyList fileModels) BuildPackageWithParameterizedSubprogramData() + { + var options = new VhdlGeneratorOptions { LibraryName = "TestLib" }; + var paramDoc = new VhdlParamDoc("v", "The input vector."); + var param = new VhdlParamDecl("v", "", "STD_LOGIC_VECTOR"); + var subprogramDecl = new VhdlSubprogramDecl( + "to_natural", + VhdlSubprogramKind.Function, + "FUNCTION to_natural(v : STD_LOGIC_VECTOR) RETURN NATURAL", + [param], + "NATURAL", + new VhdlDocComment("Converts a vector.", null, [paramDoc], "The natural value.")); + var pkg = new VhdlPackageDecl( + "my_pkg", + new VhdlDocComment("A test package.", null, []), + [], + [], + [], + [subprogramDecl]); + var fileModel = new VhdlFileModel("test.vhd", [], [], [pkg]); + var fileModels = new List { fileModel }; + var emitter = new VhdlEmitter(options, fileModels); + return (emitter, fileModels); + } + + /// Validates that a subprogram with formal parameters emits a Parameters heading in single-file output. + [Fact] + public void VhdlEmitterSingleFile_Emit_SubprogramWithParameters_EmitsParametersHeading() + { + // Arrange + var factory = new InMemoryMarkdownWriterFactory(); + var (emitter, fileModels) = BuildPackageWithParameterizedSubprogramData(); + + // Act + new VhdlEmitterSingleFile(emitter, fileModels).Emit(factory, new EmitConfig { Format = OutputFormat.SingleFile }, new InMemoryContext()); + + // Assert: Parameters heading must appear in the api output + var apiWriter = factory.GetWriter("", "api"); + var headings = apiWriter.Operations.OfType().ToList(); + Assert.Contains(headings, h => h.Text.Equals("Parameters", StringComparison.Ordinal)); + } + + /// Validates that a function subprogram emits a Returns heading in single-file output. + [Fact] + public void VhdlEmitterSingleFile_Emit_FunctionSubprogram_EmitsReturnsHeading() + { + // Arrange + var factory = new InMemoryMarkdownWriterFactory(); + var (emitter, fileModels) = BuildPackageWithParameterizedSubprogramData(); + + // Act + new VhdlEmitterSingleFile(emitter, fileModels).Emit(factory, new EmitConfig { Format = OutputFormat.SingleFile }, new InMemoryContext()); + + // Assert: Returns heading must appear because ReturnType is set + var apiWriter = factory.GetWriter("", "api"); + var headings = apiWriter.Operations.OfType().ToList(); + Assert.Contains(headings, h => h.Text.Equals("Returns", StringComparison.Ordinal)); + } + + /// Validates that the Parameters table headers are Name, Type, Description (no Mode column). + [Fact] + public void VhdlEmitterSingleFile_Emit_SubprogramWithParameters_ParametersTableHasCorrectHeaders() + { + // Arrange + var factory = new InMemoryMarkdownWriterFactory(); + var (emitter, fileModels) = BuildPackageWithParameterizedSubprogramData(); + + // Act + new VhdlEmitterSingleFile(emitter, fileModels).Emit(factory, new EmitConfig { Format = OutputFormat.SingleFile }, new InMemoryContext()); + + // Assert: Parameters table headers must be Name | Type | Description (no Mode column) + var apiWriter = factory.GetWriter("", "api"); + var table = apiWriter.Operations.OfType() + .First(t => t.Headers.Length == 3 && t.Headers[0] == "Name" && t.Headers[1] == "Type"); + Assert.Equal(["Name", "Type", "Description"], table.Headers); + } + + /// Validates that a parameter with no direction shows the bare type name in the Type cell. + [Fact] + public void VhdlEmitterSingleFile_Emit_SubprogramWithPlainParameter_TypeCellIsBareTypeName() + { + // Arrange + var factory = new InMemoryMarkdownWriterFactory(); + var (emitter, fileModels) = BuildPackageWithParameterizedSubprogramData(); + + // Act + new VhdlEmitterSingleFile(emitter, fileModels).Emit(factory, new EmitConfig { Format = OutputFormat.SingleFile }, new InMemoryContext()); + + // Assert: parameter with empty Mode emits bare type name without direction prefix + var apiWriter = factory.GetWriter("", "api"); + var table = apiWriter.Operations.OfType() + .First(t => t.Headers.Length == 3 && t.Headers[0] == "Name" && t.Headers[1] == "Type"); + var row = Assert.Single(table.Rows); + Assert.Equal("v", row[0]); + Assert.Equal("STD_LOGIC_VECTOR", row[1]); + Assert.Equal("The input vector.", row[2]); + } + + /// Validates that a parameter with a direction and class keyword shows direction-prefixed type, class stripped. + [Fact] + public void VhdlEmitterSingleFile_Emit_SubprogramWithDirectedParameter_TypeCellPrefixedWithDirection() + { + // Arrange — procedure parameter with SIGNAL class and OUT direction + var factory = new InMemoryMarkdownWriterFactory(); + var options = new VhdlGeneratorOptions { LibraryName = "TestLib" }; + var paramDoc = new VhdlParamDoc("v", "The output vector."); + var param = new VhdlParamDecl("v", "SIGNAL OUT", "STD_LOGIC_VECTOR"); + var subprogramDecl = new VhdlSubprogramDecl( + "clear_vec", + VhdlSubprogramKind.Procedure, + "PROCEDURE clear_vec(SIGNAL v : OUT STD_LOGIC_VECTOR)", + [param], + null, + new VhdlDocComment("Clears a vector.", null, [paramDoc])); + var pkg = new VhdlPackageDecl("my_pkg", new VhdlDocComment("Pkg.", null, []), [], [], [], [subprogramDecl]); + var fileModels = new List { new VhdlFileModel("test.vhd", [], [], [pkg]) }; + var emitter = new VhdlEmitter(options, fileModels); + + // Act + new VhdlEmitterSingleFile(emitter, fileModels).Emit(factory, new EmitConfig { Format = OutputFormat.SingleFile }, new InMemoryContext()); + + // Assert: SIGNAL is stripped, OUT is prefixed to the type name + var apiWriter = factory.GetWriter("", "api"); + var table = apiWriter.Operations.OfType() + .First(t => t.Headers.Length == 3 && t.Headers[0] == "Name" && t.Headers[1] == "Type"); + var row = Assert.Single(table.Rows); + Assert.Equal("OUT STD_LOGIC_VECTOR", row[1]); + } +} diff --git a/test/ApiMark.Vhdl.Tests/VhdlEmitterTests.cs b/test/ApiMark.Vhdl.Tests/VhdlEmitterTests.cs new file mode 100644 index 0000000..7e54e59 --- /dev/null +++ b/test/ApiMark.Vhdl.Tests/VhdlEmitterTests.cs @@ -0,0 +1,23 @@ +using ApiMark.Core; +using ApiMark.Core.TestHelpers; +using ApiMark.Vhdl.VhdlAst; +using Xunit; + +namespace ApiMark.Vhdl.Tests; + +/// Unit tests for . +public class VhdlEmitterTests +{ + /// Validates that passing null factory to Emit throws ArgumentNullException. + [Fact] + public void VhdlEmitter_Emit_NullFactory_ThrowsArgumentNullException() + { + // Arrange + var options = new VhdlGeneratorOptions { LibraryName = "TestLib" }; + var emitter = new VhdlEmitter(options, []); + + // Act / Assert + Assert.Throws(() => + emitter.Emit(null!, new EmitConfig(), new InMemoryContext())); + } +} diff --git a/test/ApiMark.Vhdl.Tests/VhdlGeneratorTests.cs b/test/ApiMark.Vhdl.Tests/VhdlGeneratorTests.cs new file mode 100644 index 0000000..fd15fb8 --- /dev/null +++ b/test/ApiMark.Vhdl.Tests/VhdlGeneratorTests.cs @@ -0,0 +1,92 @@ +using ApiMark.Core; +using ApiMark.Core.TestHelpers; +using Xunit; + +namespace ApiMark.Vhdl.Tests; + +/// Unit tests for . +public class VhdlGeneratorTests +{ + /// Validates that null options throw ArgumentNullException. + [Fact] + public void VhdlGenerator_Constructor_NullOptions_ThrowsArgumentNullException() + { + // Arrange / Act / Assert + Assert.Throws(() => new VhdlGenerator(null!)); + } + + /// Validates that the generator creates the api entrypoint file from the fixture. + [Fact] + public void VhdlGenerator_Generate_FixtureFile_CreatesApiEntrypoint() + { + // Arrange + var options = new VhdlGeneratorOptions + { + LibraryName = "TestLib", + WorkingDirectory = FixturePaths.FixturesDirectory, + Sources = ["*.vhd"], + }; + var generator = new VhdlGenerator(options); + var factory = new InMemoryMarkdownWriterFactory(); + var context = new InMemoryContext(); + + // Act + generator.Parse(context).Emit(factory, new EmitConfig(), context); + + // Assert + Assert.True(factory.HasWriter("", "api"), "Expected api entrypoint to be created"); + } + + /// Validates that the generator creates an entity page from the fixture. + [Fact] + public void VhdlGenerator_Generate_FixtureFile_CreatesEntityPage() + { + // Arrange + var options = new VhdlGeneratorOptions + { + LibraryName = "TestLib", + WorkingDirectory = FixturePaths.FixturesDirectory, + Sources = ["*.vhd"], + }; + var generator = new VhdlGenerator(options); + var factory = new InMemoryMarkdownWriterFactory(); + var context = new InMemoryContext(); + + // Act + generator.Parse(context).Emit(factory, new EmitConfig(), context); + + // Assert + Assert.True( + factory.Writers.Keys.Any(k => k.Contains("counter", StringComparison.OrdinalIgnoreCase)), + "Expected a page containing 'counter'"); + } + + /// Validates that generator against all fixtures confirms entities, package, and no standalone arch pages. + [Fact] + public void VhdlGenerator_Generate_AllFixtures_ProducesExpectedOutputStructure() + { + // Arrange + var options = new VhdlGeneratorOptions + { + LibraryName = "TestLib", + WorkingDirectory = FixturePaths.FixturesDirectory, + Sources = ["*.vhd"], + }; + var generator = new VhdlGenerator(options); + var factory = new InMemoryMarkdownWriterFactory(); + var context = new InMemoryContext(); + + // Act + generator.Parse(context).Emit(factory, new EmitConfig(), context); + + // Assert + Assert.True(factory.HasWriter("", "api"), "Expected api entrypoint to be created"); + Assert.True( + factory.Writers.Keys.Any(k => k.Contains("mux", StringComparison.OrdinalIgnoreCase)), + "Expected a page containing 'mux'"); + Assert.True( + factory.Writers.Keys.Any(k => k.Contains("common_types", StringComparison.OrdinalIgnoreCase)), + "Expected a page containing 'common_types'"); + Assert.DoesNotContain(factory.Writers.Keys, k => k.Contains("_arch", StringComparison.Ordinal)); + } +}