commit 73106880a3e4b668d14c84ae78fd86b52dcd2a58385420b343ef98a1fe086b60 Author: Adrian Schröter Date: Sat May 4 00:01:53 2024 +0200 Sync from SUSE:SLFO:Main re2c revision 0cbca5a88bd8f41aae4bd28a1e8264dc diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/re2c-3.0.tar.xz b/re2c-3.0.tar.xz new file mode 100644 index 0000000..60f5e4e --- /dev/null +++ b/re2c-3.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b3babbbb1461e13fe22c630a40c43885efcfbbbb585830c6f4c0d791cf82ba0b +size 1441456 diff --git a/re2c.changes b/re2c.changes new file mode 100644 index 0000000..e796c0a --- /dev/null +++ b/re2c.changes @@ -0,0 +1,393 @@ +------------------------------------------------------------------- +Thu Apr 28 19:03:51 UTC 2022 - Dirk Müller + +- update to 3.0: + - Added code generation backend for Rust: + - Added options: + + ``--loop-switch`` + + ``--no-unsafe`` + - Added configurations; + + ``re2c:label:yyloop`` + + ``re2c:unsafe`` + - Renamed options to use common naming scheme. The old names are supported as + aliases, so the change does not break existing code. Documentation has been + updated to use new names. + + ``--api`` is a new alias for ``--input`` + + ``--ebcdic`` is a new alias for ``--ecb`` + + ``--ucs2`` is a new alias for ``--wide-chars`` + + ``--utf32`` is a new alias for ``--unicode`` + + ``--utf16`` is a new alias for ``--utf-16`` + + ``--utf8`` is a new alias for ``--utf-8`` + + ``--header`` is a new alias for ``--type-header`` + - Renamed configurations to use common naming scheme and support proper scoping + under subcategories such as ``:define``, ``:label``, ``:variable``, etc. The + old names are supported as aliases, so the change does not break existing + code. Documentation has been updated to use new names. + + ``re2c:api`` is a new alias for ``re2c:flags:input`` + + ``re2c:bit-vectors`` is a new alias for ``re2c:flags:bit-vectors`` + + ``re2c:case-insensitive`` is a new alias for ``re2c:flags:case-insensitive`` + + ``re2c:case-inverted`` is a new alias for ``re2c:flags:case-inverted`` + + ``re2c:case-ranges`` is a new alias for ``re2c:flags:case-ranges`` + + ``re2c:cond:prefix`` is a new alias for ``re2c:condprefix`` + + ``re2c:cond:enumprefix`` is a new alias for ``re2c:condenumprefix`` + + ``re2c:computed-gotos`` is a new alias for ``re2c:flags:computed-gotos`` + + ``re2c:computed-gotos:threshold`` is a new alias for ``re2c:cgoto:threshold`` + + ``re2c:debug-output`` is a new alias for ``re2c:flags:debug-output`` + + ``re2c:encoding:ebcdic`` is a new alias for ``re2c:flags:ecb`` + + ``re2c:encoding:utf32`` is a new alias for ``re2c:flags:unicode`` + + ``re2c:encoding:ucs2`` is a new alias for ``re2c:flags:wide-chars`` + + ``re2c:encoding:utf16`` is a new alias for ``re2c:flags:utf-16`` + + ``re2c:encoding:utf8`` is a new alias for ``re2c:flags:utf-8`` + + ``re2c:encoding-policy`` is a new alias for ``re2c:flags:encoding-policy`` + + ``re2c:empty-class`` is a new alias for ``re2c:flags:empty-class`` + + ``re2c:header`` is a new alias for ``re2c:flags:type-header`` + + ``re2c:label:prefix`` is a new alias for ``re2c:labelprefix`` + + ``re2c:label:yyfill`` is a new alias for ``re2c:label:yyFillLabel`` + + ``re2c:label:start`` is a new alias for ``re2c:startlabel`` + + ``re2c:nested-ifs`` is a new alias for ``re2c:flags:nested-ifs`` + + ``re2c:posix-captures`` is a new alias for ``re2c:flags:posix-captures`` + + ``re2c:tags`` is a new alias for ``re2c:flags:tags`` + + ``re2c:variable:yych:conversion`` is a new alias for ``re2c:yych:conversion`` + + ``re2c:variable:yych:emit`` is a new alias for ``re2c:yych:emit`` + + ``re2c:variable:yybm:hex`` is a new alias for ``re2c:yybm:hex`` + + ``re2c:unsafe`` is a new alias for ``re2c:flags:unsafe`` + - Added directive alias ``conditions:re2c`` for ``types:re2c``. + - Multiple small changes in code generation, including some formatting changes + that result in large diffs in the generated code: + + Do not allocate indices for unused state labels (this results in a change in + state enumeration), commits + + Do not generate redundant ``YYPEEK`` statements, commit + + Do not generate ``YYDEBUG`` statements for unused states labels, commit + + C backend: change formatting of switch statements, commit + + Go backend: render continuous character ranges in compact form, commit + + Mark start and end of included .re files with line directives, commit + - A fix to limit maximum allowed NFA and DFA size (to avoid out of memory + crashes and stack overflows), + - A fix to correctly compute fixed tags in trailing context, commit + - A fix to generate non-overlapping names for s-tag and m-tag variables, commit + - Infrastructural: added support for CMake presets. + - Updated documentation. + - Backwards-incompatible changes that are unlikely to affect any users: + + Restrict lexical contexts where ``%{`` is recognized as a block start, + + Emit an error when repetition lower bound exceeds upper bound, commit + +------------------------------------------------------------------- +Fri Nov 12 13:59:22 UTC 2021 - Dominique Leuenberger + +- BuildRequire python3-base instead of full python3: allow to be + slimmer. + +------------------------------------------------------------------- +Mon Nov 8 11:58:25 UTC 2021 - Daniel Donisa + +- update 2.2: + - Added named blocks and block lists in directives. + - Added local blocks ``/*!local:re2c ... */``. + - Added in-block ``!include`` directive. + - Added in-block ``!use`` directive. + - Allowed reusable blocks without ``-r --reusable`` option. + - Allowed customizing the generated code with configurations for directives + ``max:re2c``, ``maxnmatch:re2c``, ``stags:re2c``, ``mtags:re2c`` and + ``types:re2c`` (see directive descriptions for details). + - Forbid arbitrary text at the end of ``max:re2c`` directive. This may break + backwards compatibility, although it is unlikely that this was used by anyone. + The change was necessary in order to allow customization of the generated code + with configurations. + - Deprecated configurations ``flags:i``, ``flags:no-debug-info`` in favour of + the global options ``-i``, ``--no-debug-info``. + - Reimplemented re2c test runner in Python (thanks to + `Serghei Iakovlev `_). Improved integration + with GitHub Actions. + - Changes in the experimental libre2c library: added new algorithms that + construct t-string or extract submatch on all repetitions; added TDFA + benchmark written in Java by Angelo Borsotti. + - Updated documentation. +- Add python >= 3.7 dependency required by new tests. + - Upstream added some tests written in python. The tests failed locally + because the module dataclasses from python >= 3.7 were missing. On OBS + the builds failed due to a timeout when trying to run those python tests. + +------------------------------------------------------------------- +Sun May 9 17:24:35 UTC 2021 - Dirk Müller + +- update to 2.1.1: + - Added missing CMakeLists.txt to release tarballs + - Added GitHub Actions CI for Linux, macOS and Windows and fixed numerous build + issues on those platforms + - Added benchmarks for submatch extraction in lexer generators (ragel vs. + kleenex vs. re2c with TDFA(0), TDFA(1) or sta-DFA algorithms). + + New CMake options: ``-DRE2C_BUILD_BENCHMARKS``, ``-DRE2C_REGEN_BENCHMARKS`` + + New `json2pgfplot.py + - Added option ``--depfile `` to generate build dependency files + - Added option ``--fixed-tags `` and improved fixed-tag + optimization to work with nested tags. + - Added lzip to the distribution tarballs. + - Added registerless-TDFA algorithm in the experimental libre2c library. + - Explicitly disallowed invalid configuration when ``-f``, ``--storable-state`` + option is used, but ``YYFILL`` is disabled + - Fixed bug in UTF-8 decode for 4-bytes rune + - Fixed bugs in rare cases of the end-of-input rule ``$`` usage + - Optimized ``--skeleton`` generation time. + - Renamed internal option ``--dfa`` to ``--nested-negative-tags``. + - Updated documentation for end of input handling and submatch extraction. + +------------------------------------------------------------------- +Fri Sep 4 21:00:43 UTC 2020 - Dirk Mueller + +- update to 2.0.3: + - Fix issues when building re2c as a CMake subproject + - Final corrections in the SIMPA article "RE2C: A lexer generator based on + lookahead-TDFA", https://doi.org/10.1016/j.simpa.2020.100027 + +------------------------------------------------------------------- +Thu Aug 13 07:10:43 UTC 2020 - Paolo Stivanin + +- Update to version 2.0.2: + * Go backend. The new Go code generation backend can be used either + with a --lang go re2c option, or as a standalone re2go binary + * Free-form generic API. Generic API now supports two styles + * Improved reuse mode and start conditions + * Backwards incompatible changes: + + Generic APIs YYSHIFT/YYSHIFTSTAG/YYSHIFTMTAG have been added + + Generic APIs YYSTAGPD/YYMTAGPD have been removed + + The re2c:flags:type-header option now treats the header filename + as relative to the output directory + + Some internal labels have been renamed, in particular the + yyFillLabel prefix has been replaced with yyfill + +------------------------------------------------------------------- +Wed Feb 5 08:52:11 UTC 2020 - Martin Pluskal + +- Update to version 1.3: + * Added option: ``--stadfa``. + * Added warning: ``-Wsentinel-in-midrule``. + * Added generic API primitives: + + ``YYSTAGPD`` + + ``YYMTAGPD`` + * Added configurations: + + ``re2c:sentinel = 0;`` + + ``re2c:define:YYSTAGPD = "YYSTAGPD";`` + + ``re2c:define:YYMTAGPD = "YYMTAGPD";`` + * Worked on reproducible builds + +------------------------------------------------------------------- +Wed Aug 14 15:37:39 UTC 2019 - Martin Pluskal + +- Update to version 1.2.1: + * Lots of changes, see provided CHANGELOG +- Drop no longer needed re2c-nogenerationdatedefault.patch +- Enable profile guided optimization during build + +------------------------------------------------------------------- +Mon Mar 11 00:09:53 UTC 2019 - Chris Coutinho + +- Update re2c to 1.1.1 + * Fixed bug #211 re2c '-V' throws 'std::out_of_range' (version to vernum conversion). + * Replaced Kuklewicz POSIX disambiguation algorithm with Okui algorithm. + * Optimized GOR1 algorithm (computation of tagged epsilon-closure). + * Added option "--conditions" (an alias for "-c" and "--start-conditions"). + * Fixed bug #201 Bugs with option: 're2c:flags:no-debug-info'. + * Reworked first part of TDFA paper. + +------------------------------------------------------------------- +Thu Mar 15 10:11:22 UTC 2018 - mpluskal@suse.com + +- Modernise spec file with spec-cleaner + +------------------------------------------------------------------- +Thu Nov 9 15:02:34 UTC 2017 - aavindraa@gmail.com + +- Update to version 1.0.3: + * Fixes build failure on Mac OS X 10.5.8 with gcc 4.2.1 + * Documentation fix + * 2 examples removed + +------------------------------------------------------------------- +Mon Sep 4 12:02:10 UTC 2017 - mpluskal@suse.com + +- Update to version 1.0.2: + * Fixed bug #194 “Build with --enable-docs” + * Updated documentation. +- Changes for version 1.0.1: + * Fixed bug #193 “1.0 build failure on macOS: error: calling a + * private constructor of class ‘re2c::Rule’” +- Changes for version 1.0: + * Added several new options + * Added new inplace confgurations + * Added warning -Wnondeterministic-tags + * Added fuzz-testing scripts + * Added paper “Tagged Deterministic Finite Automata with Lookahead” + * See provided CHANGELOG for full list of new features + * Fixed bugs: + + #121 “trailing contexts are fundamentally broken” + + #135 “In installation make check give syntax error” + + #137 “run_tests.sh fail when running configure script with absolute path” + + #138 “website improvement” + + #141 “Tests under Windows” + + #142 “segvault with null terminated input” + + #145 “Values for enum YYCONDTYPE are not generated when default rules with conditions are used” + + #147 “Please add symbol name to “can’t find symbol” error message” + + #152 “Line number in #line directive after enum YYCONDTYPE is 0-based” + + #156 “Build with Visual Studio 14 2015: symbol name conflict” + + #158 “Inconsistent forward declaration of struct/class vs definition” + + #160 “Open text files with “wb” causes issues on Windows” + + #162 “Reading files with “rb” causes issues in Windows” + + #165 “Trailing context consumed if initial expression matches it” + + #176 “re2c help message is too wide for most terminals” + + #184 “Small documentation issue” + +------------------------------------------------------------------- +Sat Jan 30 21:50:07 UTC 2016 - mpluskal@suse.com + +- Update to 0.16 + * Fixed bug #127 "code generation error with wide chars and + bitmaps (omitted 'goto' statement)" + * Added DFA minimization and option '--dfa-minimization + ' + * Fixed bug #128 "very slow DFA construction (resulting in a very + large DFA)" + * Fixed bug #132 "test failure on big endian archs with 0.15.3" +- Make building more verbose + +------------------------------------------------------------------- +Fri Jan 8 11:17:08 UTC 2016 - tchvatal@suse.com + +- Version update to 0.15.3: + * Syntax expansion and various updates + * See CHANGELOG for in-depth details +- Rebase patch to apply: + * re2c-nogenerationdatedefault.patch + +------------------------------------------------------------------- +Mon Oct 5 14:31:57 UTC 2015 - mpluskal@suse.com + +- Update to 0.14.3 + * applied patch '#27 re2c crashes reading files containing %{ %}' + * dropped distfiles for MSVC (they are broken anyway) +- Changes for 0.14.2 + * fixed #57 Wrong result only if another rule is present + +------------------------------------------------------------------- +Fri Mar 13 14:23:10 UTC 2015 - tchvatal@suse.com + +- Version bump to latest 0.14.1: + * Plenty of bugfixes all around + +------------------------------------------------------------------- +Tue Feb 3 11:35:34 UTC 2015 - crrodriguez@opensuse.org + +- re2c-nogenerationdatedefault.patch: Default to + --no-generation-date to avoid build-compare problems [BNC#915937] + +------------------------------------------------------------------- +Thu Dec 11 23:03:37 UTC 2014 - crrodriguez@opensuse.org + +- make test currently does nothing, make check however + executes the test suite. + +------------------------------------------------------------------- +Thu Dec 11 21:36:57 UTC 2014 - crrodriguez@opensuse.org + +- version 0.13.7.5 +* Added UTF-8 and UTF-16 support. +* fixed PHP HEREDOC problems. + +------------------------------------------------------------------- +Mon May 12 15:03:28 UTC 2014 - tchvatal@suse.com + +- Cleanup with spec-cleaner +- Sort out the %prep finds that are no longer needed. + +------------------------------------------------------------------- +Sat Aug 3 03:10:02 UTC 2013 - crrodriguez@opensuse.org + +- version 0.13.6 +* allow Yacc-style %{code brackets}% +* allow C++ // comments +* Fixed inplace configuration in -e mode +* Fixed Wrong start_label in -c mode. +* Fixed Unescaped backslash in file name of #line directive + +------------------------------------------------------------------- +Fri Sep 9 20:17:36 UTC 2011 - andrea.turrini@gmail.com + +- Fixed typo in re2c.spec + +------------------------------------------------------------------- +Tue Nov 23 12:52:50 UTC 2010 - cristian.rodriguez@opensuse.org + +- Use smp_flags +- when rebuilding the scanner use -g, to generate GCC specific + code that is slightly faster. + +------------------------------------------------------------------- +Thu Jun 26 18:36:53 CEST 2008 - mmarek@suse.cz + +- updated to version 0.13.5 + * Fixed sf#1952896 Segfault in re2c::Scanner::scan. + * Fixed sf#1952842 Regression. + +------------------------------------------------------------------- +Mon Apr 7 13:06:36 CEST 2008 - mmarek@suse.cz + +- updated to version 0.13.4 + * Added transparent handling of #line directives in input files. + * Added re2c:yyfill:check inplace configuration. + * Added re2c:define:YYSETSTATE:naked inplace configuration. + * Added re2c:flags:w and re2c:flags:u inplace configurations. + * Added the ability to add rules in 'use:re2c' blocks. + * Changed -r flag to accept only 'rules:re2c' and 'use:re2c' + blocks. + +------------------------------------------------------------------- +Mon Mar 17 20:33:16 CET 2008 - crrodriguez@suse.de + +- update to version 0.13.3 , required for new PHP language parser + * Added -r flag to allow reuse of scanner definitions. + * Added -F flag to support flex syntax in rules. + * Fixed SEGV in scanner that occurs with very large blocks. + * Fixed issue with unused yybm. + * Partial support for flex syntax. + * Changed to allow /* comments with -c switch. + * Added flag -D/--emit-dot. + +------------------------------------------------------------------- +Mon Feb 4 14:20:48 CET 2008 - mmarek@suse.cz + +- updated to version 0.13.1 + * build fixes for non-linux platforms only + +------------------------------------------------------------------- +Mon Jun 25 18:38:49 CEST 2007 - dmueller@suse.de + +- add gcc-c++ buildrequires + +------------------------------------------------------------------- +Mon Jun 25 11:58:00 CEST 2007 - dmueller@suse.de + +- update to versoin 0.13.0: + * Fixed issue with short form of switches and parameter if not first switch. + * Fixed #1708378 segfault in actions.cc. + * Added -c and -t to generate scanners with (f)lex-like condition support. + +------------------------------------------------------------------- +Fri May 4 01:41:09 CEST 2007 - dmueller@suse.de + +- update to version 0.12.0 + +------------------------------------------------------------------- +Sun Apr 1 22:00:58 CEST 2007 - mrueckert@suse.de + +- update to version 0.11.3 + +------------------------------------------------------------------- +Sun Mar 4 09:41:10 CET 2007 - mrueckert@suse.de + +- update to version 0.11.2 + +------------------------------------------------------------------- +Tue Feb 20 21:06:08 CET 2007 - mrueckert@suse.de + +- This version fixes a warning in the generated code that some + compilers issue. No other changes have been made. + diff --git a/re2c.spec b/re2c.spec new file mode 100644 index 0000000..d8d9801 --- /dev/null +++ b/re2c.spec @@ -0,0 +1,73 @@ +# +# spec file for package re2c +# +# Copyright (c) 2022 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: re2c +Version: 3.0 +Release: 0 +Summary: Tool for generating C-based recognizers from regular expressions +License: SUSE-Public-Domain +Group: Development/Libraries/C and C++ +URL: https://re2c.org/ +Source: https://github.com/skvadrik/re2c/releases/download/%{version}/%{name}-%{version}.tar.xz +BuildRequires: bison +BuildRequires: gcc-c++ +BuildRequires: python3-base >= 3.7 + +%description +re2c is a tool for writing fast and flexible lexers. Unlike other such +tools, it concentrates solely on generating efficient code for matching +regular expressions. This makes it suitable for a wide variety of +applications. The generated scanners approach hand-crafted ones in +terms of size and speed. + +%prep +%autosetup + +%build +%configure +%if 0%{?do_profiling} + %make_build CFLAGS="%{optflags} %{cflags_profile_generate}" + # do not run profiling in parallel for reproducible builds (boo#1040589 boo#1102408) + %make_build CFLAGS="%{optflags} %{cflags_profile_generate}" check + %make_build clean + %make_build CFLAGS="%{optflags} %{cflags_profile_feedback}" +%else + %make_build CFLAGS="%{optflags}" +%endif + +%install +%make_install + +%check +%make_build check + +%files +%license README.md +%doc CHANGELOG +%doc examples/ +%{_bindir}/re2c +%{_bindir}/re2go +%{_bindir}/re2rust +%{_mandir}/man1/re2c.1%{?ext_man} +%{_mandir}/man1/re2go.1%{?ext_man} +%{_mandir}/man1/re2rust.1%{?ext_man} +%dir %{_datadir}/re2c +%dir %{_datadir}/re2c/stdlib +%{_datadir}/re2c/stdlib/unicode_categories.re + +%changelog