!8 update to 3.2.7
From: @lyn1001 Reviewed-by: @Lostwayzxc, @caodongxia Signed-off-by: @caodongxia
This commit is contained in:
commit
fb8eedc8e6
BIN
2.8.0.tar.gz
BIN
2.8.0.tar.gz
Binary file not shown.
BIN
3.2.7.tar.gz
Normal file
BIN
3.2.7.tar.gz
Normal file
Binary file not shown.
34
PEGTL.spec
34
PEGTL.spec
@ -1,17 +1,15 @@
|
|||||||
%global debug_package %{nil}
|
%global debug_package %{nil}
|
||||||
|
|
||||||
Name: PEGTL
|
Name: PEGTL
|
||||||
Version: 2.8.0
|
Version: 3.2.7
|
||||||
Release: 3
|
Release: 1
|
||||||
Summary: Parsing Expression Grammar Template Library
|
Summary: Parsing Expression Grammar Template Library
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/taocpp/PEGTL/
|
URL: https://github.com/taocpp/PEGTL/
|
||||||
Source0: https://github.com/taocpp/%{name}/archive/%{version}.tar.gz
|
Source0: https://github.com/taocpp/%{name}/archive/%{version}.tar.gz
|
||||||
|
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: make
|
BuildRequires: make cmake
|
||||||
|
|
||||||
Patch0001: bugfix-gcc-10.patch
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The Parsing Expression Grammar Template Library (PEGTL) is a zero-dependency
|
The Parsing Expression Grammar Template Library (PEGTL) is a zero-dependency
|
||||||
@ -30,24 +28,34 @@ applications that use %{name}.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}
|
%setup -q -n %{name}-%{version}
|
||||||
%patch0001 -p1
|
|
||||||
|
%build
|
||||||
|
%cmake \
|
||||||
|
-DPEGTL_INSTALL_DOC_DIR:PATH=%{_defaultdocdir}/pegtl \
|
||||||
|
-DPEGTL_INSTALL_CMAKE_DIR:PATH=%{_datadir}/cmake/Modules \
|
||||||
|
-DPEGTL_BUILD_EXAMPLES:BOOL=OFF \
|
||||||
|
-DPEGTL_BUILD_TESTS:BOOL=ON
|
||||||
|
|
||||||
|
%make_build
|
||||||
|
|
||||||
%check
|
%check
|
||||||
make
|
/usr/bin/ctest --output-on-failure --force-new-ctest-process %{?_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
install -d -m 0755 %{buildroot}%{_includedir}
|
%make_install
|
||||||
pushd include/
|
rm %{buildroot}%{_defaultdocdir}/pegtl/LICENSE
|
||||||
cp -R tao/ %{buildroot}%{_includedir}
|
|
||||||
popd
|
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%doc README.md doc/
|
%doc README.md doc/
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%{_includedir}/tao/pegtl.hpp
|
%{_includedir}/*
|
||||||
%{_includedir}/tao/pegtl
|
%{_datadir}/cmake/Modules
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Sep 14 2023 liyanan <thistleslyn@163.com> - 3.2.7-1
|
||||||
|
- update to 3.2.7
|
||||||
|
|
||||||
* Mon Aug 2 2021 Shenmei Tu <tushenmei@huawei.com> - 2.8.0-3
|
* Mon Aug 2 2021 Shenmei Tu <tushenmei@huawei.com> - 2.8.0-3
|
||||||
- bugfix-gcc-10.patch
|
- bugfix-gcc-10.patch
|
||||||
|
|
||||||
|
|||||||
@ -1,37 +0,0 @@
|
|||||||
diff -Nur PEGTL-2.8.0/include/tao/pegtl/contrib/rep_one_min_max.hpp PEGTL-2.8.0-new/include/tao/pegtl/contrib/rep_one_min_max.hpp
|
|
||||||
--- PEGTL-2.8.0/include/tao/pegtl/contrib/rep_one_min_max.hpp 2019-04-10 02:27:36.000000000 +0800
|
|
||||||
+++ PEGTL-2.8.0-new/include/tao/pegtl/contrib/rep_one_min_max.hpp 2021-08-02 10:13:41.000000000 +0800
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey
|
|
||||||
+// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey
|
|
||||||
// Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/
|
|
||||||
|
|
||||||
#ifndef TAO_PEGTL_CONTRIB_REP_ONE_MIN_MAX_HPP
|
|
||||||
@@ -41,6 +41,27 @@
|
|
||||||
bump_help< result_on_found::success, Input, char, C >( in, i );
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
+ return false;
|
|
||||||
+ }
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ template< unsigned Max, char C >
|
|
||||||
+ struct rep_one_min_max< 0, Max, C >
|
|
||||||
+ {
|
|
||||||
+ using analyze_t = analysis::counted< analysis::rule_type::any, 0 >;
|
|
||||||
+
|
|
||||||
+ template< typename Input >
|
|
||||||
+ static bool match( Input& in )
|
|
||||||
+ {
|
|
||||||
+ const auto size = in.size( Max + 1 );
|
|
||||||
+ std::size_t i = 0;
|
|
||||||
+ while( ( i < size ) && ( in.peek_char( i ) == C ) ) {
|
|
||||||
+ ++i;
|
|
||||||
+ }
|
|
||||||
+ if( i <= Max ) {
|
|
||||||
+ bump_help< result_on_found::success, Input, char, C >( in, i );
|
|
||||||
+ return true;
|
|
||||||
+ }
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
Loading…
x
Reference in New Issue
Block a user