Skip to content
Snippets Groups Projects
Commit c1b35ca4 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

git subrepo pull (merge) packages/PEGTL

subrepo:
  subdir:   "packages/PEGTL"
  merged:   "23b9a9a1c"
upstream:
  origin:   "git@github.com:taocpp/PEGTL.git"
  branch:   "main"
  commit:   "dc3d82928"
git-subrepo:
  version:  "0.4.6"
  origin:   "git@github.com:ingydotnet/git-subrepo.git"
  commit:   "110b9eb"
parent 80c785c6
No related branches found
No related tags found
1 merge request!169git subrepo pull (merge) packages/PEGTL
Showing
with 171 additions and 114 deletions
# The Art of C++
# https://github.com/PEGTL
# https://github.com/taocpp
# Copyright (c) 2016-2021 Daniel Frey
# Copyright (c) 2016-2023 Dr. Colin Hirsch and Daniel Frey
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
# This is our official .clang-format style for https://github.com/taocpp
#
# clang-format -i -style=file $(find . -name '[^.]*.[hc]pp')
Language: Cpp
Standard: Latest
......
# The Art of C++
# https://github.com/PEGTL
# https://github.com/taocpp
# Copyright (c) 2016-2021 Daniel Frey
# Copyright (c) 2016-2023 Dr. Colin Hirsch and Daniel Frey
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
Checks: >-
bugprone-*,
-bugprone-easily-swappable-parameters,
cppcoreguidelines-slicing,
cppcoreguidelines-special-member-functions,
google-build-explicit-make-pair,
......@@ -28,6 +29,8 @@ Checks: >-
performance-*,
readability-*,
-readability-avoid-const-params-in-decls,
-readability-function-cognitive-complexity,
-readability-identifier-length,
-readability-magic-numbers,
-readability-static-accessed-through-instance,
......
......@@ -32,7 +32,7 @@ jobs:
options: --user root
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: cmake -H$GITHUB_WORKSPACE -B/home/developer/build -GNinja -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake -DANDROID_ABI=${{ matrix.abi }} -DANDROID_PLATFORM=${{ matrix.platform }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
......
......@@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: sudo apt-get update -yq
......
......@@ -15,8 +15,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: DoozyX/clang-format-lint-action@v0.12
- uses: actions/checkout@v3
- uses: DoozyX/clang-format-lint-action@v0.15
with:
extensions: 'hpp,cpp'
clangFormatVersion: 12
clangFormatVersion: 15
......@@ -15,12 +15,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: sudo apt-get update -yq
- run: sudo apt-get install -yq clang-tidy
- run: find include/ -name '*.hpp' | grep -vF file_mapper_win32.hpp | grep -vF endian_win.hpp | xargs -I '{}' clang-tidy --quiet '{}' -- --std=c++17 -Iinclude
- run: find include/ -name '*.hpp' | grep -vF mmap_file_win32.hpp | grep -vF endian_win.hpp | xargs -I '{}' clang-tidy --quiet '{}' -- --std=c++17 -Iinclude
- run: find src/ -name '*.cpp' | xargs -I '{}' clang-tidy --quiet '{}' -- --std=c++17 -Iinclude
......@@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: cmake -E make_directory build
......
......@@ -41,11 +41,11 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
......@@ -56,7 +56,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
......@@ -70,4 +70,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
......@@ -18,10 +18,11 @@ jobs:
compiler:
- g++-9
- g++-10
#- g++-11
- clang++-10
- clang++-11
- g++-11
- g++-12
- clang++-12
- clang++-13
- clang++-14
build_type: [Debug, Release]
runs-on: ubuntu-latest
......@@ -30,7 +31,7 @@ jobs:
CXX: ${{ matrix.compiler }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: cmake -E make_directory build
......@@ -48,25 +49,26 @@ jobs:
fail-fast: false
matrix:
compiler:
- g++-7
- g++-8
- clang++-6.0
- clang++-7
- clang++-8
- clang++-9
- clang++-10
- clang++-11
build_type: [Debug, Release]
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
env:
CXX: ${{ matrix.compiler }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: sudo apt-get update -yq
- run: sudo apt-get update -y
- run: sudo apt-get install -yq ${{ matrix.compiler }}
- run: sudo apt-get install -y ${{ matrix.compiler }}
- run: cmake -E make_directory build
......@@ -83,13 +85,13 @@ jobs:
strategy:
fail-fast: false
matrix:
flags: ["-fno-rtti"]
flags: ["-fno-rtti", "-fno-exceptions"]
build_type: [Debug, Release]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: cmake -E make_directory build
......@@ -106,7 +108,7 @@ jobs:
strategy:
fail-fast: false
matrix:
flags: ["-fno-rtti", "-fms-extensions"]
flags: ["-fno-rtti", "-fno-exceptions", "-fms-extensions"]
build_type: [Debug, Release]
runs-on: ubuntu-latest
......@@ -115,7 +117,7 @@ jobs:
CXX: clang++
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: cmake -E make_directory build
......
......@@ -15,13 +15,35 @@ jobs:
strategy:
fail-fast: false
matrix:
xcode: ['11', '12']
build_type: [Debug, Release]
runs-on: macos-latest
include:
- xcode: 11
build_type: Debug
os: macos-11
- xcode: 11
build_type: Release
os: macos-11
- xcode: 12
build_type: Debug
os: macos-11
- xcode: 12
build_type: Release
os: macos-11
- xcode: 13
build_type: Debug
os: macos-12
- xcode: 13
build_type: Release
os: macos-12
- xcode: 14
build_type: Debug
os: macos-12
- xcode: 14
build_type: Release
os: macos-12
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: maxim-lobanov/setup-xcode@v1
with:
......
name: No-Exceptions
on:
push:
paths-ignore:
- 'README.md'
- 'doc/**'
pull_request:
paths-ignore:
- 'README.md'
- 'doc/**'
jobs:
no-exceptions:
strategy:
fail-fast: false
matrix:
compiler: [g++, clang++]
build_type: [Debug, Release]
runs-on: ubuntu-latest
env:
CXX: ${{ matrix.compiler }}
steps:
- uses: actions/checkout@v2
- run: cmake -E make_directory build
- working-directory: build/
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_CXX_FLAGS="-fno-exceptions"
- working-directory: build/
run: cmake --build .
- working-directory: build/
run: ctest --output-on-failure
......@@ -24,7 +24,7 @@ jobs:
CXX: ${{ matrix.cxx }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: cmake -E make_directory build
......
......@@ -11,7 +11,7 @@ on:
- 'doc/**'
jobs:
vs2019:
vs2022:
strategy:
fail-fast: false
matrix:
......@@ -20,13 +20,13 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: cmake -E make_directory build
- shell: bash
working-directory: build/
run: cmake $GITHUB_WORKSPACE -G "Visual Studio 16 2019"
run: cmake $GITHUB_WORKSPACE -G "Visual Studio 17 2022"
- working-directory: build/
run: cmake --build . --config ${{ matrix.build_type }}
......@@ -34,7 +34,7 @@ jobs:
- working-directory: build/
run: ctest -C ${{ matrix.build_type }} --output-on-failure
vs2019-clang:
vs2022-clang:
strategy:
fail-fast: false
matrix:
......@@ -43,13 +43,13 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: cmake -E make_directory build
- shell: bash
working-directory: build/
run: cmake $GITHUB_WORKSPACE -G "Visual Studio 16 2019" -T ClangCL
run: cmake $GITHUB_WORKSPACE -G "Visual Studio 17 2022" -T ClangCL
- working-directory: build/
run: cmake --build . --config ${{ matrix.build_type }}
......@@ -57,25 +57,45 @@ jobs:
- working-directory: build/
run: ctest -C ${{ matrix.build_type }} --output-on-failure
vs2017:
vs2019:
strategy:
fail-fast: false
matrix:
visual_studio:
- 'Visual Studio 15 2017'
- 'Visual Studio 15 2017 Win64'
build_type: [Debug, Release]
runs-on: windows-2016
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: cmake -E make_directory build
- shell: bash
working-directory: build/
run: cmake $GITHUB_WORKSPACE -G "${{ matrix.visual_studio }}"
run: cmake $GITHUB_WORKSPACE -G "Visual Studio 16 2019"
- working-directory: build/
run: cmake --build . --config ${{ matrix.build_type }}
- working-directory: build/
run: ctest -C ${{ matrix.build_type }} --output-on-failure
vs2019-clang:
strategy:
fail-fast: false
matrix:
build_type: [Debug, Release]
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
- run: cmake -E make_directory build
- shell: bash
working-directory: build/
run: cmake $GITHUB_WORKSPACE -G "Visual Studio 16 2019" -T ClangCL
- working-directory: build/
run: cmake --build . --config ${{ matrix.build_type }}
......
......@@ -3,3 +3,4 @@ build
private
/.vs
/.vscode
.DS_Store
......@@ -6,7 +6,7 @@
[subrepo]
remote = git@github.com:taocpp/PEGTL.git
branch = main
commit = bf4487c9793121e483291c4e516cec3e5c1c17b5
commit = dc3d82928755046be3d66efb3015ed8b03f299ac
parent = e00b72ebcd9d2add12cfe0e6fe4d114a7858dfa5
method = merge
cmdver = 0.4.3
cmdver = 0.4.6
# The Art of C++
# https://github.com/PEGTL
# Copyright (c) 2014-2021 Dr. Colin Hirsch and Daniel Frey
# Copyright (c) 2014-2023 Dr. Colin Hirsch and Daniel Frey
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
......
# Welcome to the PEGTL
[![Windows CI](https://github.com/taocpp/PEGTL/workflows/Windows/badge.svg)](https://github.com/taocpp/PEGTL/actions?query=workflow%3AWindows)
[![macOS CI](https://github.com/taocpp/PEGTL/workflows/macOS/badge.svg)](https://github.com/taocpp/PEGTL/actions?query=workflow%3AmacOS)
[![Linux CI](https://github.com/taocpp/PEGTL/workflows/Linux/badge.svg)](https://github.com/taocpp/PEGTL/actions?query=workflow%3ALinux)
[![Android CI](https://github.com/taocpp/PEGTL/workflows/Android/badge.svg)](https://github.com/taocpp/PEGTL/actions?query=workflow%3AAndroid)
[![Windows](https://github.com/taocpp/PEGTL/actions/workflows/windows.yml/badge.svg)](https://github.com/taocpp/PEGTL/actions/workflows/windows.yml)
[![macOS](https://github.com/taocpp/PEGTL/actions/workflows/macos.yml/badge.svg)](https://github.com/taocpp/PEGTL/actions/workflows/macos.yml)
[![Linux](https://github.com/taocpp/PEGTL/actions/workflows/linux.yml/badge.svg)](https://github.com/taocpp/PEGTL/actions/workflows/linux.yml)
[![Android](https://github.com/taocpp/PEGTL/actions/workflows/android.yml/badge.svg)](https://github.com/taocpp/PEGTL/actions/workflows/android.yml)
<br>
[![clang-analyze](https://github.com/taocpp/PEGTL/workflows/clang-analyze/badge.svg)](https://github.com/taocpp/PEGTL/actions?query=workflow%3Aclang-analyze)
[![clang-tidy](https://github.com/taocpp/PEGTL/workflows/clang-tidy/badge.svg)](https://github.com/taocpp/PEGTL/actions?query=workflow%3Aclang-tidy)
[![Sanitizer](https://github.com/taocpp/PEGTL/workflows/Sanitizer/badge.svg)](https://github.com/taocpp/PEGTL/actions?query=workflow%3ASanitizer)
[![CodeQL](https://github.com/taocpp/PEGTL/workflows/CodeQL/badge.svg)](https://github.com/taocpp/PEGTL/actions?query=workflow%3ACodeQL)
[![Code Coverage](https://codecov.io/gh/taocpp/PEGTL/branch/main/graph/badge.svg?token=ykWa8RRdyk)](https://codecov.io/gh/taocpp/PEGTL)
[![clang-analyze](https://github.com/taocpp/PEGTL/actions/workflows/clang-analyze.yml/badge.svg)](https://github.com/taocpp/PEGTL/actions/workflows/clang-analyze.yml)
[![clang-tidy](https://github.com/taocpp/PEGTL/actions/workflows/clang-tidy.yml/badge.svg)](https://github.com/taocpp/PEGTL/actions/workflows/clang-tidy.yml)
[![Sanitizer](https://github.com/taocpp/PEGTL/actions/workflows/sanitizer.yml/badge.svg)](https://github.com/taocpp/PEGTL/actions/workflows/sanitizer.yml)
[![CodeQL](https://github.com/taocpp/PEGTL/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/taocpp/PEGTL/actions/workflows/codeql-analysis.yml)
[![Codecov](https://codecov.io/gh/taocpp/PEGTL/branch/main/graph/badge.svg?token=ykWa8RRdyk)](https://codecov.io/gh/taocpp/PEGTL)
The Parsing Expression Grammar Template Library (PEGTL) is a zero-dependency C++ header-only parser combinator library for creating parsers according to a [Parsing Expression Grammar](http://en.wikipedia.org/wiki/Parsing_expression_grammar) (PEG).
**The main branch will go through phases of incompatible changes while parts of the evolution branch are back-ported. Please download [the latest release](https://github.com/taocpp/PEGTL/releases) rather than using unreleased changes from the main branch.**
## Documentation
* [Changelog](doc/Changelog.md)
* [Version 3.x](doc/README.md) (requires C++17)
* [Development](doc/README.md) (requires C++17)
* [Version 3.x](https://github.com/taocpp/PEGTL/blob/3.x/doc/README.md) (requires C++17)
* [Version 2.x](https://github.com/taocpp/PEGTL/blob/2.x/doc/README.md) (requires C++11)
* [Version 1.x](https://github.com/taocpp/PEGTL/blob/1.x/doc/README.md) (requires C++11)
## Contact
<a href="https://discord.gg/VQYkppcgqN"><img align="right" src="https://discordapp.com/api/guilds/790164930083028993/embed.png?style=banner2" alt="Join us on Discord"></a>
For questions and suggestions regarding the PEGTL, success or failure stories, and any other kind of feedback, please feel free to join our [Discord](https://discord.gg/VQYkppcgqN) server, open a [discussion](https://github.com/taocpp/PEGTL/discussions), an [issue](https://github.com/taocpp/PEGTL/issues) or a [pull request](https://github.com/taocpp/PEGTL/pulls) on GitHub or contact the authors at `taocpp(at)icemx.net`.
For questions and suggestions regarding the PEGTL, success or failure stories, and any other kind of feedback, please feel free to open a [discussion](https://github.com/taocpp/PEGTL/discussions), an [issue](https://github.com/taocpp/PEGTL/issues) or a [pull request](https://github.com/taocpp/PEGTL/pulls) on GitHub or contact the authors at `taocpp(at)icemx.net`.
## Introduction
......@@ -136,9 +137,9 @@ The PEGTL is part of [The Art of C++](https://taocpp.github.io/).
## License
<a href="https://opensource.org/licenses/BSL-1.0"><img align="right" src="https://opensource.org/files/OSIApproved.png" width="150" hspace="20" alt="Open Source Initiative"></a>
<a href="https://opensource.org/licenses/BSL-1.0"><img align="right" src="https://opensource.org/wp-content/uploads/2009/06/OSIApproved.svg" width="150" hspace="20" alt="Open Source Initiative"></a>
Copyright (c) 2007-2021 Daniel Frey and Dr. Colin Hirsch
Copyright (c) 2007-2023 Daniel Frey and Dr. Colin Hirsch
The PEGTL is certified [Open Source](http://www.opensource.org/docs/definition.html) software.
It is [licensed](https://pdimov.github.io/blog/2020/09/06/why-use-the-boost-license/) under the terms of the [Boost Software License, Version 1.0](https://www.boost.org/LICENSE_1_0.txt) reproduced here.
......
......@@ -300,7 +300,7 @@ struct foo
Now an action class template can be specialised for `foo`, or for `tao::pegtl::alpha`, but *not* for `tao::pegtl::plus< tao::pegtl::alpha >`.
This because base classes are not taken into consideration by the C++ language when choosing a specialisation, which might be surprising when being used to pointer arguments to functions where conversions from pointer-to-derived to pointer-to-base are performed implicitly and silently.
This is because base classes are not taken into consideration by the C++ language when choosing a specialisation, which might be surprising when being used to pointer arguments to functions where conversions from pointer-to-derived to pointer-to-base are performed implicitly and silently.
So although the function called by the library to match `foo` is the inherited `tao::pegtl::plus< tao::pegtl::alpha >::match()`, the rule class is `foo` and the function known as `foo::match()`, wherefore an action needs to be specialised for `foo` instead of `tao::pegtl::plus< tao::pegtl::alpha >`.
......@@ -608,6 +608,6 @@ See the [section on legacy-style action rules](Rule-Reference.md#action-rules).
This document is part of the [PEGTL](https://github.com/taocpp/PEGTL).
Copyright (c) 2014-2021 Dr. Colin Hirsch and Daniel Frey
Copyright (c) 2014-2023 Dr. Colin Hirsch and Daniel Frey
Distributed under the Boost Software License, Version 1.0<br>
See accompanying file [LICENSE_1_0.txt](../LICENSE_1_0.txt) or copy at https://www.boost.org/LICENSE_1_0.txt
# Changelog
## 3.3.0
## 4.0.0
**Not yet released**
* Switched to Boost Software License, Version 1.0.
* Added new customization point for error messages.
* Added optional source line output for the tracer.
* Added new atomic rule `everything`.
* Added new convenience rule `partial`.
* Added new convenience rule `star_partial`.
* Added new convenience rule `strict`.
* Added new convenience rule `star_strict`.
* Moved depth counter to adapter class in contrib.
* Changed default top-level `rewind_mode` to `dontcare`.
* Removed support for building an amalgamated header.
* Deprecated the `TAO_PEGTL_NAMESPACE` macro.
* Will be removed in version 4.0.0.
* Removed support for Visual Studio 2017.
* Removed support for GCC 7.
## 3.2.7
Released 2022-07-14
* Removed superfluous deprecated include.
## 3.2.6
Released 2022-06-29
* Made `unwind()` optional for parse tree nodes.
* Fixed `demangle()` for MSVC, again.
* Fixed `demangle()` for GCC 12.
## 3.2.5
Released 2022-02-05
* Added missing include for fallback `demangle()` implementations.
## 3.2.4
Released 2022-02-03
* Fixed `version.hpp`.
## 3.2.3
Released 2022-02-03
* Fixed `static_assert` in `demangle()` with recent MSVC.
## 3.2.2
......@@ -651,6 +692,6 @@ It is based on ideas from the YARD library by Christopher Diggins.
This document is part of the [PEGTL](https://github.com/taocpp/PEGTL).
Copyright (c) 2007-2021 Dr. Colin Hirsch and Daniel Frey
Copyright (c) 2007-2023 Dr. Colin Hirsch and Daniel Frey
Distributed under the Boost Software License, Version 1.0<br>
See accompanying file [LICENSE_1_0.txt](../LICENSE_1_0.txt) or copy at https://www.boost.org/LICENSE_1_0.txt
......@@ -40,11 +40,12 @@ For all questions and remarks contact us at **taocpp(at)icemx.net**.
* Grammars and actions for PEGTL-input-to-integer conversions.
###### `<tao/pegtl/contrib/input_with_depth.hpp>`
###### `<tao/pegtl/contrib/limit_depth.hpp>`
* Limits the nesting level of rules when parsing a grammar, prevents stack overflows.
* Can be applied selectively at specific rules to improve efficiency.
* See `src/test/pegtl/limit_depth.cpp`.
* Limit the nesting depth of rules when parsing a grammar to prevent stack overflows.
* Can be applied selectively at specific rules to reduce overhead.
* See `src/test/pegtl/contrib_limit_depth.cpp`.
###### `<tao/pegtl/contrib/json.hpp>`
......@@ -216,6 +217,6 @@ Invoked with one or more URIs as command line arguments will attempt to parse th
This document is part of the [PEGTL](https://github.com/taocpp/PEGTL).
Copyright (c) 2014-2021 Dr. Colin Hirsch and Daniel Frey
Copyright (c) 2014-2023 Dr. Colin Hirsch and Daniel Frey
Distributed under the Boost Software License, Version 1.0<br>
See accompanying file [LICENSE_1_0.txt](../LICENSE_1_0.txt) or copy at https://www.boost.org/LICENSE_1_0.txt
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment