Path to this page:
Subject: CVS commit: pkgsrc/devel/re2c
From: Thomas Klausner
Date: 2024-12-26 12:47:46
Message id: 20241226114746.C21D8FC1D@cvs.NetBSD.org
Log Message:
re2c: update to 4.0.2.
4.0.2 (2024-12-11)
~~~~~~~~~~~~~~~~~~
- CMake build system: fixed bug
`#515 <https://github.com/skvadrik/re2c/issues/515>`_ where language-specific
binaries erroneously defaulted to generating code for C.
- Playground: address bar now reflects navigation between examples, editors use
a more high-contrast CSS theme.
4.0.1 (2024-11-25)
~~~~~~~~~~~~~~~~~~
- Added missing doc sources to the distribution tarball
(`#503 <https://github.com/skvadrik/re2c/issues/503>`_)
- Reworked C/C++ examples to avoid using new configuration aliases until the
world has updated to re2c 4.0, made them compatible with C.
- A few build system changes: increased CMake minimum required version to 3.15,
added missing dependencies on doc sources in Makefile.am.
- Fixed typos in docs.
4.0 (2024-11-19)
~~~~~~~~~~~~~~~~
- Added a generic technique for describing language backends based on the idea
of syntax files (`#450 <https://github.com/skvadrik/re2c/issues/450>`_).
- Added support for new languages: D, Haskell, Java, JavaScript, OCaml, Python,
V, Zig.
- Added new record API for all languages (enabled with ``--api record``,
``re2c:api = record``) and made it the default API for Haskell and OCaml.
- Renamed former "default API" to "simple API", implemented \
it for all backends
except Haskell and OCaml, and enabled by default API for C, D, Java,
JavaScript, Python, V and Zig.
- Added new code generation model - recursive functions (enabled with
``--recursive-functions``), primarily to be used for functional languages.
- Added options:
+ ``--syntax <file>``
+ ``--api simple``
+ ``--api generic``
+ ``--api record``
+ ``--goto-label``
+ ``--recursive-functions``
+ ``--lang none``
+ ``--lang d``
+ ``--lang haskell``
+ ``--lang java``
+ ``--lang js``
+ ``--lang ocaml``
+ ``--lang python``
+ ``--lang v``
+ ``--lang zig``
+ ``--leftmost-captvars``
+ ``--posix-captvars``
+ ``--captvars`` (alias for ``--leftmost-captvars``)
+ ``--captures`` (alias for ``--leftmost-captures``)
- Added configurations:
+ ``re2c:api = simple`` (alias for ``re2c:api = default``)
+ ``re2c:api = generic`` (alias for ``re2c:api = custom``)
+ ``re2c:api = record``
+ ``re2c:computed-gotos`` (alias for ``re2c:cgoto``)
+ ``re2c:cond:abort``
+ ``re2c:tags:negative``
+ ``re2c:leftmost-captvars``
+ ``re2c:posix-captvars``
+ ``re2c:captvars`` (alias for ``re2c:leftmost-captvars``)
+ ``re2c:captures`` (alias for ``re2c:leftmost-captures``)
+ ``re2c:monadic``
+ ``re2c:fn:sep``
+ ``re2c:[define:]YYFN``
+ ``re2c:[define:]YYINPUT``
+ ``re2c:[define:]YYGETACCEPT``
+ ``re2c:[define:]YYSETACCEPT``
+ ``re2c:[define:]YYCOPYSTAG``
+ ``re2c:[define:]YYCOPYMTAG``
+ ``re2c:[define:]YYGETCOND`` (alias for ``re2c:[define:]YYGETCONDITION``)
+ ``re2c:[define:]YYSETCOND`` (alias for ``re2c:[define:]YYSETCONDITION``)
+ ``re2c:[variable:]yyfill``
+ ``re2c:[variable:]yynmatch``
+ ``re2c:[variable:]yypmatch``
+ ``re2c:[variable:]yych:literals``
- All configurations that have ``define:`` or ``variable:`` part in their name
now have an alias without this part.
- Added new block types:
+ ``/*!svars:re2c ... */``
+ ``/*!mvars:re2c ... */``
- Flex-style opening/closing braces ``%{`` and ``%}`` for block start/end
markers now work for all block types.
- Added syntax file feature lists:
+ ``supported_apis`` with values from the list:
``simple``, ``generic``, ``record``
+ ``supported_api_styles`` with values from the list:
``free-form``, ``functions``
+ ``supported_code_models`` with values from the list:
``goto-label``, ``loop-switch``, ``recursive-functions``
+ ``supported_targets`` with values from the list:
``code``, ``dot``, ``skeleton``
+ ``supported_features`` with values from the list:
``nested-ifs``, ``bitmaps``, ``computed-gotos``, ``case-ranges``,
``tags``, ``captures``, ``captvars``, ``monadic``, ``unsafe``
- Added syntax file language-specific options:
+ ``semicolons``
+ ``backtick_quoted_strings``
+ ``single_quoted_strings``
+ ``indentation_sensitive``
+ ``wrap_blocks_in_braces``
- Added syntax file code templates:
+ ``code:var_local``
+ ``code:var_global``
+ ``code:const_local``
+ ``code:const_global``
+ ``code:array_local``
+ ``code:array_global``
+ ``code:array_elem``
+ ``code:enum``
+ ``code:enum_elem``
+ ``code:assign``
+ ``code:type_int``
+ ``code:type_uint``
+ ``code:type_cond_enum``
+ ``code:type_yybm``
+ ``code:type_yytarget``
+ ``code:cmp_eq``
+ ``code:cmp_ne``
+ ``code:cmp_lt``
+ ``code:cmp_gt``
+ ``code:cmp_le``
+ ``code:cmp_ge``
+ ``code:if_then_else``
+ ``code:if_then_else_oneline``
+ ``code:switch``
+ ``code:switch_cases``
+ ``code:switch_cases_oneline``
+ ``code:switch_case_range``
+ ``code:switch_case_default``
+ ``code:loop``
+ ``code:continue``
+ ``code:goto``
+ ``code:fndecl``
+ ``code:fndef``
+ ``code:fncall``
+ ``code:tailcall``
+ ``code:recursive_functions``
+ ``code:fingerprint``
+ ``code:line_info``
+ ``code:abort``
+ ``code:yydebug``
+ ``code:yypeek``
+ ``code:yyskip``
+ ``code:yybackup``
+ ``code:yybackupctx``
+ ``code:yyskip_yypeek``
+ ``code:yypeek_yyskip``
+ ``code:yyskip_yybackup``
+ ``code:yybackup_yyskip``
+ ``code:yybackup_yypeek``
+ ``code:yyskip_yybackup_yypeek``
+ ``code:yybackup_yypeek_yyskip``
+ ``code:yyrestore``
+ ``code:yyrestorectx``
+ ``code:yyrestoretag``
+ ``code:yyshift``
+ ``code:yyshiftstag``
+ ``code:yyshiftmtag``
+ ``code:yystagp``
+ ``code:yymtagp``
+ ``code:yystagn``
+ ``code:yymtagn``
+ ``code:yycopystag``
+ ``code:yycopymtag``
+ ``code:yygetaccept``
+ ``code:yysetaccept``
+ ``code:yygetcond``
+ ``code:yysetcond``
+ ``code:yygetstate``
+ ``code:yysetstate``
+ ``code:yylessthan``
+ ``code:yybm_filter``
+ ``code:yybm_match``
- Added global variables in syntax files:
+ ``nl``
+ ``indent``
+ ``dedent``
+ ``topindent``
- Added global conditionals in syntax files:
+ ``.api.simple``
+ ``.api.generic``
+ ``.api.record``
+ ``.api_style.functions``
+ ``.api_style.freeform``
+ ``.case_ranges``
+ ``.code_model.goto_label``
+ ``.code_model.loop_switch``
+ ``.code_model.recursive_functions``
+ ``.date``
+ ``.loop_label``
+ ``.monadic``
+ ``.start_conditions``
+ ``.storable_state``
+ ``.unsafe``
+ ``.version``
- Added warning ``-Wundefined-syntax-config``.
- Warnings that indicate serious issues are now turned on by default
(and can be disabled with ``-Wno-<warning>`` options.
- Added configure options:
+ ``--enable-syntax`` (Autoconf)
+ ``RE2C_REBUILD_SYNTAX`` (CMake)
- Dropped support for function-like API style for Rust.
(it was hard to use, if at all possible)
- Added online playground that allows one to run re2c in a web browser:
https://re2c.org/playground.
- Infra work on Github Actions CI.
Files: