Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4424a0dd1e |
No files matched your search
@@ -1,3 +1,2 @@
|
||||
* text=auto
|
||||
test/newlines/** -text
|
||||
test/codegen/python/indentation_sensitive_crlf.re -text
|
||||
@@ -1,12 +0,0 @@
|
||||
version: 2
|
||||
updates:
|
||||
|
||||
- package-ecosystem: "github-actions"
|
||||
commit-message:
|
||||
include: "scope"
|
||||
prefix: "Actions"
|
||||
directory: "/"
|
||||
labels:
|
||||
- "enhancement"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
@@ -33,15 +33,15 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: '3.8'
|
||||
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v4
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: '11'
|
||||
@@ -71,16 +71,8 @@ jobs:
|
||||
cmake -S . -B .build \
|
||||
-G "Unix Makefiles" \
|
||||
-DRE2C_BUILD_LIBS=ON \
|
||||
-DRE2C_BUILD_RE2D=OFF \
|
||||
-DRE2C_BUILD_RE2GO=OFF \
|
||||
-DRE2C_BUILD_RE2HS=OFF \
|
||||
-DRE2C_BUILD_RE2JAVA=OFF \
|
||||
-DRE2C_BUILD_RE2JS=OFF \
|
||||
-DRE2C_BUILD_RE2OCAML=OFF \
|
||||
-DRE2C_BUILD_RE2PY=OFF \
|
||||
-DRE2C_BUILD_RE2RUST=OFF \
|
||||
-DRE2C_BUILD_RE2V=OFF \
|
||||
-DRE2C_BUILD_RE2ZIG=OFF \
|
||||
-DRE2C_BUILD_BENCHMARKS=ON \
|
||||
-DCMAKE_CXX_FLAGS="-O3"
|
||||
|
||||
@@ -88,20 +80,20 @@ jobs:
|
||||
run: cmake --build .build
|
||||
|
||||
- name: Run submatch DFA AOT benchmark
|
||||
working-directory: .build/benchmarks/c
|
||||
working-directory: .build/benchmarks/submatch_dfa_aot
|
||||
run: |
|
||||
./run.py --quickverify \
|
||||
&& ./run.py --repetitions 5 --output results.json \
|
||||
&& cat results.json
|
||||
|
||||
- name: Run submatch DFA JIT benchmark
|
||||
working-directory: .build/benchmarks/c/libre2c/jit
|
||||
run: ./bench_submatch_jit
|
||||
working-directory: .build/benchmarks/submatch_dfa_jit
|
||||
run: ./bench_submatch_dfa_jit
|
||||
|
||||
- name: Run submatch Java benchmark (ReTdfa)
|
||||
working-directory: .build/benchmarks/c/libre2c/java
|
||||
working-directory: .build/benchmarks/submatch_java
|
||||
run: ./run.py
|
||||
|
||||
- name: Run submatch NFA benchmark
|
||||
working-directory: .build/benchmarks/c/libre2c/nfa
|
||||
working-directory: .build/benchmarks/submatch_nfa
|
||||
run: ./bench_submatch_nfa
|
||||
@@ -36,11 +36,11 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup apt cache (Linux)
|
||||
if: startsWith(runner.os, 'Linux')
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: /var/cache/apt
|
||||
key: ${{ runner.os }}-apt-cache-${{ matrix.os }}-${{ github.sha }}
|
||||
@@ -69,7 +69,7 @@ jobs:
|
||||
esac
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: 3.x
|
||||
architecture: x64
|
||||
@@ -146,7 +146,7 @@ jobs:
|
||||
- name: Archive test artifacts
|
||||
# Run this step only if tests failed (otherwise there is nothing to upload).
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
# To ensure that jobs don't overwrite existing artifacts,
|
||||
# use a different name per job.
|
||||
|
||||
@@ -62,11 +62,11 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup chocolatey Cache (Windows)
|
||||
if: startsWith(runner.os, 'Windows')
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: C:\Users\runneradmin\AppData\Local\Temp\chocolatey
|
||||
key: ${{ runner.os }}-chocolatey-${{ matrix.os }}-${{ github.sha }}
|
||||
@@ -76,7 +76,7 @@ jobs:
|
||||
|
||||
- name: Setup apt cache (Linux)
|
||||
if: startsWith(runner.os, 'Linux')
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: /var/cache/apt
|
||||
key: ${{ runner.os }}-apt-cache-${{ matrix.os }}-${{ github.sha }}
|
||||
@@ -105,7 +105,7 @@ jobs:
|
||||
esac
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: 3.x
|
||||
architecture: x64
|
||||
@@ -135,9 +135,9 @@ jobs:
|
||||
id: build-info
|
||||
run: |
|
||||
if echo "${{ matrix.name }}" | grep -q "ootree"; then
|
||||
BUILD_DIR="${{ github.workspace }}/.build/${{ matrix.name }}-full"
|
||||
BUILD_DIR="$(pwd)/.build/${{ matrix.name }}-full"
|
||||
else
|
||||
BUILD_DIR="${{ github.workspace }}"
|
||||
BUILD_DIR="$(pwd)"
|
||||
fi
|
||||
echo "BUILD_DIR=$BUILD_DIR" >> $GITHUB_OUTPUT
|
||||
|
||||
@@ -165,17 +165,13 @@ jobs:
|
||||
- name: Archive test artifacts
|
||||
# Run this step only if tests failed (otherwise there is nothing to upload).
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
# To ensure that jobs don't overwrite existing artifacts,
|
||||
# use a different name per job.
|
||||
name: test-${{ matrix.name }}
|
||||
# Tests run in a temporary directory that has a name test_<timestamp>.
|
||||
# Provide both relative and absolute paths. Absolute path should work for all builds,
|
||||
# but it doesn't work on Windows. Relative path works for in-tree Windows builds.
|
||||
path: |
|
||||
test_[0-9]*
|
||||
${{ steps.build-info.outputs.BUILD_DIR }}/test_[0-9]*
|
||||
path: ${{ steps.build-info.outputs.BUILD_DIR }}/test_[0-9]*
|
||||
# Artifacts are retained for 90 days by default.
|
||||
# In fact, we don't need such long period.
|
||||
retention-days: 30
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
[submodule "benchmarks/c/libre2c/java/REgen"]
|
||||
path = benchmarks/c/libre2c/java/REgen
|
||||
[submodule "benchmarks/submatch_java/REgen"]
|
||||
path = benchmarks/submatch_java/REgen
|
||||
url = https://github.com/skvadrik/REgen.git
|
||||
@@ -45,36 +45,12 @@ The configure script has many options (to see them all, run
|
||||
* `--enable-debug`
|
||||
Enable debug checks in the re2c source code. Also enables debug options.
|
||||
|
||||
* `--enable-dlang`
|
||||
Build re2d (identical to `re2c --lang d`). This is on by default.
|
||||
|
||||
* `--enable-golang`
|
||||
Build re2go (identical to `re2c --lang go`). This is on by default.
|
||||
|
||||
* `--enable-haskell`
|
||||
Build re2hs (identical to `re2c --lang haskell`). This is on by default.
|
||||
|
||||
* `--enable-java`
|
||||
Build re2java (identical to `re2c --lang java`). This is on by default.
|
||||
|
||||
* `--enable-js`
|
||||
Build re2js (identical to `re2c --lang js`). This is on by default.
|
||||
|
||||
* `--enable-ocaml`
|
||||
Build re2ocaml (identical to `re2c --lang ocaml`). This is on by default.
|
||||
|
||||
* `--enable-python`
|
||||
Build re2py (identical to `re2c --lang python`). This is on by default.
|
||||
|
||||
* `--enable-rust`
|
||||
Build re2rust (identical to `re2c --lang rust`). This is on by default.
|
||||
|
||||
* `--enable-vlang`
|
||||
Build re2v (identical to `re2c --lang v`). This is on by default.
|
||||
|
||||
* `--enable-zig`
|
||||
Build re2zig (identical to `re2c --lang zig`). This is on by default.
|
||||
|
||||
* `--enable-lexers`
|
||||
Enable regeneration of lexers from *.re* files (as opposed to using
|
||||
pre-generated bootstrap files). This requires setting `RE2C_FOR_BUILD` to
|
||||
@@ -84,10 +60,6 @@ The configure script has many options (to see them all, run
|
||||
Enable regeneration of parsers from *.ypp* files with bison (as opposed to
|
||||
using pre-generated bootstrap files).
|
||||
|
||||
* `--enable-syntax`
|
||||
Enable regeneration of default syntax files from the ones provided in
|
||||
include/ directory (as opposed to using pre-generated bootstrap files).
|
||||
|
||||
* `--enable-docs`
|
||||
Enable regeneration of documentation (requires Python 3 Docutils).
|
||||
|
||||
@@ -176,41 +148,13 @@ A simple build (objects are generated in a separate build directory):
|
||||
CMake supports a lot of configuration options. Here is the list of options
|
||||
specific to re2c:
|
||||
|
||||
* `-DRE2C_BUILD_RE2D=yes`
|
||||
Build re2d executable (an alias to `re2c --lang d`). Enabled by default.
|
||||
|
||||
* `-DRE2C_BUILD_RE2GO=yes`
|
||||
Build re2go executable (an alias to `re2c --lang go`). Enabled by default.
|
||||
|
||||
* `-DRE2C_BUILD_RE2HS=yes`
|
||||
Build re2hs executable (an alias to `re2c --lang haskell`). Enabled by
|
||||
default.
|
||||
|
||||
* `-DRE2C_BUILD_RE2JAVA=yes`
|
||||
Build re2java executable (an alias to `re2c --lang java`). Enabled by
|
||||
default.
|
||||
|
||||
* `-DRE2C_BUILD_RE2JS=yes`
|
||||
Build re2js executable (an alias to `re2c --lang js`). Enabled by default.
|
||||
|
||||
* `-DRE2C_BUILD_RE2OCAML=yes`
|
||||
Build re2ocaml executable (an alias to `re2c --lang ocaml`). Enabled by
|
||||
default.
|
||||
|
||||
* `-DRE2C_BUILD_RE2PY=yes`
|
||||
Build re2py executable (an alias to `re2c --lang python`). Enabled by
|
||||
default.
|
||||
|
||||
* `-DRE2C_BUILD_RE2RUST=yes`
|
||||
Build re2rust executable (an alias to `re2c --lang rust`). Enabled by
|
||||
default.
|
||||
|
||||
* `-DRE2C_BUILD_RE2V=yes`
|
||||
Build re2v executable (an alias to `re2c --lang v`). Enabled by default.
|
||||
|
||||
* `-DRE2C_BUILD_RE2ZIG=yes`
|
||||
Build re2zig executable (an alias to `re2c --lang zig`). Enabled by default.
|
||||
|
||||
* `-DRE2C_REBUILD_LEXERS=yes`
|
||||
Enable regeneration of lexers from *.re* files (as opposed to using
|
||||
pre-generated bootstrap files). This requires setting `-DRE2C_FOR_BUILD` to
|
||||
@@ -220,10 +164,6 @@ specific to re2c:
|
||||
Enable regeneration of parsers from *.ypp* files with bison (as opposed to
|
||||
using pre-generated bootstrap files).
|
||||
|
||||
* `-DRE2C_REBUILD_SYNTAX=yes`
|
||||
Enable regeneration of default syntax files from the ones provided in
|
||||
include/ directory (as opposed to using pre-generated bootstrap files).
|
||||
|
||||
* `-DRE2C_REBUILD_DOCS=yes`
|
||||
Enable regeneration of documentation (requires Python 3 Docutils).
|
||||
|
||||
|
||||
@@ -2,261 +2,6 @@ Changelog
|
||||
=========
|
||||
|
||||
|
||||
----
|
||||
4.0x
|
||||
----
|
||||
|
||||
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.
|
||||
|
||||
|
||||
----
|
||||
3.0x
|
||||
----
|
||||
|
||||
+170
-286
@@ -1,25 +1,17 @@
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
project(re2c VERSION 4.0.2 HOMEPAGE_URL "https://re2c.org/")
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
project(re2c VERSION 3.1 HOMEPAGE_URL "https://re2c.org/")
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
|
||||
include(Re2cAutotoolsHelpers)
|
||||
include(Re2cBootstrapLexer)
|
||||
include(Re2cBootstrapParser)
|
||||
include(Re2cBootstrapSyntax)
|
||||
include(Re2cBuildType)
|
||||
include(Re2cGenDocs)
|
||||
include(Re2cCompilerFlags)
|
||||
|
||||
ac_subst(PACKAGE_VERSION "${PROJECT_VERSION}")
|
||||
|
||||
# check whether re2c is the root project
|
||||
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
|
||||
set(RE2C_IS_ROOT_PROJECT TRUE)
|
||||
else()
|
||||
set(RE2C_IS_ROOT_PROJECT FALSE)
|
||||
endif()
|
||||
|
||||
option(RE2C_REBUILD_LEXERS "Regenerate lexers" OFF)
|
||||
if(RE2C_REBUILD_LEXERS AND NOT RE2C_FOR_BUILD)
|
||||
message(FATAL_ERROR "option RE2C_FOR_BUILD is required for RE2C_REBUILD_LEXERS")
|
||||
@@ -30,32 +22,22 @@ if(RE2C_REBUILD_PARSERS AND NOT RE2C_FOR_BUILD)
|
||||
find_package(BISON REQUIRED)
|
||||
endif()
|
||||
|
||||
option(RE2C_REBUILD_SYNTAX "Regenerate default syntax files" OFF)
|
||||
option(RE2C_REBUILD_DOCS "Regenerate manpage" OFF)
|
||||
option(RE2C_BUILD_LIBS "Build libraries" OFF)
|
||||
|
||||
option(RE2C_BUILD_RE2D "Build re2d executable (an alias for `re2c --lang d`)" ON)
|
||||
|
||||
option(RE2C_BUILD_RE2GO "Build re2go executable (an alias for `re2c --lang go`)" ON)
|
||||
option(RE2C_BUILD_RE2HS "Build re2hs executable (an alias for `re2c --lang haskell`)" ON)
|
||||
option(RE2C_BUILD_RE2JAVA "Build re2java executable (an alias for `re2c --lang java`)" ON)
|
||||
option(RE2C_BUILD_RE2JS "Build re2js executable (an alias for `re2c --lang js`)" ON)
|
||||
option(RE2C_BUILD_RE2OCAML "Build re2ocaml executable (an alias for `re2c --lang ocaml`)" ON)
|
||||
option(RE2C_BUILD_RE2PY "Build re2py executable (an alias for `re2c --lang python`)" ON)
|
||||
option(RE2C_BUILD_RE2RUST "Build re2rust executable (an alias for `re2c --lang rust`)" ON)
|
||||
option(RE2C_BUILD_RE2V "Build re2v executable (an alias for `re2c --lang v`)" ON)
|
||||
option(RE2C_BUILD_RE2ZIG "Build re2zig executable (an alias for `re2c --lang zig`)" ON)
|
||||
|
||||
option(RE2C_BUILD_BENCHMARKS "Build benchmarks" OFF)
|
||||
option(RE2C_REGEN_BENCHMARKS "Regenerate C code for benchmarks" OFF)
|
||||
|
||||
# test targets are enabled by default only if re2c is the root project
|
||||
option(RE2C_BUILD_TESTS "Build tests" "${RE2C_IS_ROOT_PROJECT}")
|
||||
|
||||
# checks for programs
|
||||
if(RE2C_REBUILD_DOCS OR RE2C_BUILD_TESTS OR RE2C_BUILD_BENCHMARKS)
|
||||
find_package(Python3 3.7 REQUIRED COMPONENTS Interpreter)
|
||||
find_package(Python3 COMPONENTS Interpreter)
|
||||
# starting from cmake 3.19 find_package can do version check, but we are on 3.12
|
||||
if(Python3_VERSION VERSION_LESS 3.7)
|
||||
message(FATAL_ERROR "python version 3.7 or higher is required")
|
||||
endif()
|
||||
|
||||
if(RE2C_REBUILD_DOCS)
|
||||
execute_process(
|
||||
COMMAND "${Python3_EXECUTABLE}" -c "import docutils"
|
||||
@@ -83,50 +65,26 @@ ac_check_headers("unistd.h")
|
||||
ac_check_headers("io.h")
|
||||
|
||||
# docs (manpages and help)
|
||||
set(re2c_manpage_source "${CMAKE_CURRENT_BINARY_DIR}/doc/manpage.rst")
|
||||
set(re2c_help_source "${CMAKE_CURRENT_BINARY_DIR}/doc/help.rst")
|
||||
set(re2c_manpage_c "${CMAKE_CURRENT_BINARY_DIR}/doc/re2c.1")
|
||||
set(re2c_manpage_d "${CMAKE_CURRENT_BINARY_DIR}/doc/re2d.1")
|
||||
set(re2c_manpage_go "${CMAKE_CURRENT_BINARY_DIR}/doc/re2go.1")
|
||||
set(re2c_manpage_haskell "${CMAKE_CURRENT_BINARY_DIR}/doc/re2hs.1")
|
||||
set(re2c_manpage_java "${CMAKE_CURRENT_BINARY_DIR}/doc/re2java.1")
|
||||
set(re2c_manpage_js "${CMAKE_CURRENT_BINARY_DIR}/doc/re2js.1")
|
||||
set(re2c_manpage_ocaml "${CMAKE_CURRENT_BINARY_DIR}/doc/re2ocaml.1")
|
||||
set(re2c_manpage_python "${CMAKE_CURRENT_BINARY_DIR}/doc/re2py.1")
|
||||
set(re2c_manpage_rust "${CMAKE_CURRENT_BINARY_DIR}/doc/re2rust.1")
|
||||
set(re2c_manpage_v "${CMAKE_CURRENT_BINARY_DIR}/doc/re2v.1")
|
||||
set(re2c_manpage_zig "${CMAKE_CURRENT_BINARY_DIR}/doc/re2zig.1")
|
||||
set(re2c_help_c "${CMAKE_CURRENT_BINARY_DIR}/src/msg/help_re2c.cc")
|
||||
set(re2c_help_d "${CMAKE_CURRENT_BINARY_DIR}/src/msg/help_re2d.cc")
|
||||
set(re2c_help_go "${CMAKE_CURRENT_BINARY_DIR}/src/msg/help_re2go.cc")
|
||||
set(re2c_help_haskell "${CMAKE_CURRENT_BINARY_DIR}/src/msg/help_re2hs.cc")
|
||||
set(re2c_help_java "${CMAKE_CURRENT_BINARY_DIR}/src/msg/help_re2java.cc")
|
||||
set(re2c_help_js "${CMAKE_CURRENT_BINARY_DIR}/src/msg/help_re2js.cc")
|
||||
set(re2c_help_ocaml "${CMAKE_CURRENT_BINARY_DIR}/src/msg/help_re2ocaml.cc")
|
||||
set(re2c_help_python "${CMAKE_CURRENT_BINARY_DIR}/src/msg/help_re2py.cc")
|
||||
set(re2c_help_rust "${CMAKE_CURRENT_BINARY_DIR}/src/msg/help_re2rust.cc")
|
||||
set(re2c_help_v "${CMAKE_CURRENT_BINARY_DIR}/src/msg/help_re2v.cc")
|
||||
set(re2c_help_zig "${CMAKE_CURRENT_BINARY_DIR}/src/msg/help_re2zig.cc")
|
||||
set(re2c_rst2man "${CMAKE_CURRENT_SOURCE_DIR}/build/rst2man.py")
|
||||
set(re2c_rst2txt "${CMAKE_CURRENT_SOURCE_DIR}/build/rst2txt.py")
|
||||
set(re2c_splitman "${CMAKE_CURRENT_SOURCE_DIR}/build/split_man.py")
|
||||
set(re2c_manpage_source "${CMAKE_CURRENT_BINARY_DIR}/doc/manpage.rst")
|
||||
set(re2c_help_source "${CMAKE_CURRENT_BINARY_DIR}/doc/help.rst")
|
||||
set(re2c_manpage_bootstrap_c "${CMAKE_CURRENT_SOURCE_DIR}/bootstrap/doc/re2c.1")
|
||||
set(re2c_manpage_bootstrap_go "${CMAKE_CURRENT_SOURCE_DIR}/bootstrap/doc/re2go.1")
|
||||
set(re2c_manpage_bootstrap_rust "${CMAKE_CURRENT_SOURCE_DIR}/bootstrap/doc/re2rust.1")
|
||||
set(re2c_help_bootstrap "${CMAKE_CURRENT_SOURCE_DIR}/bootstrap/src/msg/help.cc")
|
||||
set(re2c_manpage_c "${CMAKE_CURRENT_BINARY_DIR}/doc/re2c.1")
|
||||
set(re2c_manpage_go "${CMAKE_CURRENT_BINARY_DIR}/doc/re2go.1")
|
||||
set(re2c_manpage_rust "${CMAKE_CURRENT_BINARY_DIR}/doc/re2rust.1")
|
||||
set(re2c_help "${CMAKE_CURRENT_BINARY_DIR}/src/msg/help.cc")
|
||||
set(re2c_rst2man "${CMAKE_CURRENT_SOURCE_DIR}/build/rst2man.py")
|
||||
set(re2c_rst2txt "${CMAKE_CURRENT_SOURCE_DIR}/build/rst2txt.py")
|
||||
set(re2c_splitman "${CMAKE_CURRENT_SOURCE_DIR}/build/split_man.py")
|
||||
set(re2c_docs
|
||||
"${re2c_help}"
|
||||
"${re2c_manpage_c}"
|
||||
"$<$<BOOL:${RE2C_BUILD_RE2D}>:${re2c_manpage_d}>"
|
||||
"$<$<BOOL:${RE2C_BUILD_RE2GO}>:${re2c_manpage_go}>"
|
||||
"$<$<BOOL:${RE2C_BUILD_RE2HS}>:${re2c_manpage_haskell}>"
|
||||
"$<$<BOOL:${RE2C_BUILD_RE2JAVA}>:${re2c_manpage_java}>"
|
||||
"$<$<BOOL:${RE2C_BUILD_RE2JS}>:${re2c_manpage_js}>"
|
||||
"$<$<BOOL:${RE2C_BUILD_RE2OCAML}>:${re2c_manpage_ocaml}>"
|
||||
"$<$<BOOL:${RE2C_BUILD_RE2PY}>:${re2c_manpage_python}>"
|
||||
"$<$<BOOL:${RE2C_BUILD_RE2RUST}>:${re2c_manpage_rust}>"
|
||||
"$<$<BOOL:${RE2C_BUILD_RE2V}>:${re2c_manpage_v}>"
|
||||
"$<$<BOOL:${RE2C_BUILD_RE2ZIG}>:${re2c_manpage_zig}>"
|
||||
)
|
||||
|
||||
# syntax files
|
||||
set(re2c_stx2cpp "${CMAKE_CURRENT_SOURCE_DIR}/build/stx2cpp.py")
|
||||
|
||||
set(top_srcdir "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
set(top_builddir "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
set(PYTHON "${Python3_EXECUTABLE}")
|
||||
@@ -134,12 +92,10 @@ set(PYTHON "${Python3_EXECUTABLE}")
|
||||
configure_file(doc/manpage.rst.in doc/manpage.rst @ONLY)
|
||||
configure_file(doc/help.rst.in doc/help.rst @ONLY)
|
||||
|
||||
if(RE2C_BUILD_TESTS)
|
||||
configure_file(run_tests.py.in run_tests.py @ONLY)
|
||||
set(RE2C_RUN_TESTS "${CMAKE_CURRENT_BINARY_DIR}/run_tests.py")
|
||||
if(CMAKE_HOST_UNIX)
|
||||
execute_process(COMMAND chmod +x "${RE2C_RUN_TESTS}")
|
||||
endif()
|
||||
configure_file(run_tests.py.in run_tests.py @ONLY)
|
||||
set(RE2C_RUN_TESTS "${CMAKE_CURRENT_BINARY_DIR}/run_tests.py")
|
||||
if(CMAKE_HOST_UNIX)
|
||||
execute_process(COMMAND chmod +x "${RE2C_RUN_TESTS}")
|
||||
endif()
|
||||
|
||||
ac_config_headers("config.h")
|
||||
@@ -157,25 +113,12 @@ include_directories(. "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
# WARNING: custom target that depends on autogenerated sources won't do here
|
||||
# as its dependencies get built multiple times, which ruins parallel builds.
|
||||
add_library(re2c_objects_autogen OBJECT
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/src/options/parse_opts.cc"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/src/parse/lexer.cc"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/src/parse/lexer.h"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/src/parse/parser.cc"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/src/parse/parser.h"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/src/parse/conf_lexer.cc"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/src/parse/conf_parser.cc"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/src/parse/conf_parser.h"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/src/default_syntax_c.h"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/src/default_syntax_d.h"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/src/default_syntax_go.h"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/src/default_syntax_haskell.h"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/src/default_syntax_java.h"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/src/default_syntax_js.h"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/src/default_syntax_ocaml.h"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/src/default_syntax_python.h"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/src/default_syntax_rust.h"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/src/default_syntax_v.h"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/src/default_syntax_zig.h"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/src/parse/lex.cc"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/src/parse/lex.h"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/src/parse/lex_conf.cc"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/src/options/parse_opts.cc"
|
||||
"${re2c_docs}"
|
||||
)
|
||||
add_library(re2c_objects_autogen_ver_to_vernum OBJECT
|
||||
@@ -246,207 +189,156 @@ set(re2c_sources
|
||||
$<TARGET_OBJECTS:re2c_objects_autogen_ver_to_vernum>
|
||||
)
|
||||
|
||||
re2c_bootstrap_lexer("src/msg/ver_to_vernum.re" "src/msg/ver_to_vernum.cc")
|
||||
re2c_bootstrap_lexer("src/options/parse_opts.re" "src/options/parse_opts.cc")
|
||||
re2c_bootstrap_lexer("src/parse/lexer.re" "src/parse/lexer.cc" "src/parse/lexer.h")
|
||||
re2c_bootstrap_parser("src/parse/parser.ypp" "src/parse/parser.cc" "src/parse/parser.h")
|
||||
re2c_bootstrap_lexer("src/parse/conf_lexer.re" "src/parse/conf_lexer.cc")
|
||||
re2c_bootstrap_parser("src/parse/conf_parser.ypp" "src/parse/conf_parser.cc" "src/parse/conf_parser.h")
|
||||
|
||||
re2c_bootstrap_syntax("include/syntax/c" "src/default_syntax_c.h")
|
||||
re2c_bootstrap_syntax("include/syntax/d" "src/default_syntax_d.h")
|
||||
re2c_bootstrap_syntax("include/syntax/go" "src/default_syntax_go.h")
|
||||
re2c_bootstrap_syntax("include/syntax/haskell" "src/default_syntax_haskell.h")
|
||||
re2c_bootstrap_syntax("include/syntax/java" "src/default_syntax_java.h")
|
||||
re2c_bootstrap_syntax("include/syntax/js" "src/default_syntax_js.h")
|
||||
re2c_bootstrap_syntax("include/syntax/ocaml" "src/default_syntax_ocaml.h")
|
||||
re2c_bootstrap_syntax("include/syntax/python" "src/default_syntax_python.h")
|
||||
re2c_bootstrap_syntax("include/syntax/rust" "src/default_syntax_rust.h")
|
||||
re2c_bootstrap_syntax("include/syntax/v" "src/default_syntax_v.h")
|
||||
re2c_bootstrap_syntax("include/syntax/zig" "src/default_syntax_zig.h")
|
||||
|
||||
# docs
|
||||
file(GLOB_RECURSE re2c_docs_sources CONFIGURE_DEPENDS
|
||||
"examples/*"
|
||||
"doc/manual/*"
|
||||
"${re2c_manpage_source}"
|
||||
)
|
||||
re2c_gen_help("${re2c_help_source}" "${re2c_help_c}")
|
||||
re2c_gen_manpage("${re2c_manpage_source}" "${re2c_manpage_c}")
|
||||
add_custom_target(docs DEPENDS "${re2c_docs}")
|
||||
|
||||
# re2c
|
||||
add_executable(re2c ${re2c_sources} "${re2c_help_c}")
|
||||
|
||||
# re2d
|
||||
if (RE2C_BUILD_RE2D)
|
||||
re2c_gen_help("${re2c_help_source}" "${re2c_help_d}")
|
||||
re2c_gen_manpage("${re2c_manpage_source}" "${re2c_manpage_d}")
|
||||
add_executable(re2d ${re2c_sources} "${re2c_help_d}")
|
||||
target_compile_definitions(re2d PUBLIC
|
||||
"RE2C_LANG=Lang::D"
|
||||
"RE2C_PROG=\"re2d\""
|
||||
)
|
||||
endif()
|
||||
add_executable(re2c ${re2c_sources})
|
||||
|
||||
# re2go
|
||||
if (RE2C_BUILD_RE2GO)
|
||||
re2c_gen_help("${re2c_help_source}" "${re2c_help_go}")
|
||||
re2c_gen_manpage("${re2c_manpage_source}" "${re2c_manpage_go}")
|
||||
add_executable(re2go ${re2c_sources} "${re2c_help_go}")
|
||||
target_compile_definitions(re2go PUBLIC
|
||||
"RE2C_LANG=Lang::GO"
|
||||
"RE2C_PROG=\"re2go\""
|
||||
)
|
||||
endif()
|
||||
|
||||
# re2hs
|
||||
if (RE2C_BUILD_RE2HS)
|
||||
re2c_gen_help("${re2c_help_source}" "${re2c_help_haskell}")
|
||||
re2c_gen_manpage("${re2c_manpage_source}" "${re2c_manpage_haskell}")
|
||||
add_executable(re2hs ${re2c_sources} "${re2c_help_haskell}")
|
||||
target_compile_definitions(re2hs PUBLIC
|
||||
"RE2C_LANG=Lang::HASKELL"
|
||||
"RE2C_PROG=\"re2hs\""
|
||||
)
|
||||
endif()
|
||||
|
||||
# re2java
|
||||
if (RE2C_BUILD_RE2JAVA)
|
||||
re2c_gen_help("${re2c_help_source}" "${re2c_help_java}")
|
||||
re2c_gen_manpage("${re2c_manpage_source}" "${re2c_manpage_java}")
|
||||
add_executable(re2java ${re2c_sources} "${re2c_help_java}")
|
||||
target_compile_definitions(re2java PUBLIC
|
||||
"RE2C_LANG=Lang::JAVA"
|
||||
"RE2C_PROG=\"re2java\""
|
||||
)
|
||||
endif()
|
||||
|
||||
# re2js
|
||||
if (RE2C_BUILD_RE2JS)
|
||||
re2c_gen_help("${re2c_help_source}" "${re2c_help_js}")
|
||||
re2c_gen_manpage("${re2c_manpage_source}" "${re2c_manpage_js}")
|
||||
add_executable(re2js ${re2c_sources} "${re2c_help_js}")
|
||||
target_compile_definitions(re2js PUBLIC
|
||||
"RE2C_LANG=Lang::JS"
|
||||
"RE2C_PROG=\"re2js\""
|
||||
)
|
||||
endif()
|
||||
|
||||
# re2ocaml
|
||||
if (RE2C_BUILD_RE2OCAML)
|
||||
re2c_gen_help("${re2c_help_source}" "${re2c_help_ocaml}")
|
||||
re2c_gen_manpage("${re2c_manpage_source}" "${re2c_manpage_ocaml}")
|
||||
add_executable(re2ocaml ${re2c_sources} "${re2c_help_ocaml}")
|
||||
target_compile_definitions(re2ocaml PUBLIC
|
||||
"RE2C_LANG=Lang::OCAML"
|
||||
"RE2C_PROG=\"re2ocaml\""
|
||||
)
|
||||
endif()
|
||||
|
||||
# re2py
|
||||
if (RE2C_BUILD_RE2PY)
|
||||
re2c_gen_help("${re2c_help_source}" "${re2c_help_python}")
|
||||
re2c_gen_manpage("${re2c_manpage_source}" "${re2c_manpage_python}")
|
||||
add_executable(re2py ${re2c_sources} "${re2c_help_python}")
|
||||
target_compile_definitions(re2py PUBLIC
|
||||
"RE2C_LANG=Lang::PYTHON"
|
||||
"RE2C_PROG=\"re2py\""
|
||||
)
|
||||
add_executable(re2go ${re2c_sources})
|
||||
target_compile_definitions(re2go PUBLIC "RE2C_LANG=Lang::GO")
|
||||
endif()
|
||||
|
||||
# re2rust
|
||||
if (RE2C_BUILD_RE2RUST)
|
||||
re2c_gen_help("${re2c_help_source}" "${re2c_help_rust}")
|
||||
re2c_gen_manpage("${re2c_manpage_source}" "${re2c_manpage_rust}")
|
||||
add_executable(re2rust ${re2c_sources} "${re2c_help_rust}")
|
||||
target_compile_definitions(re2rust PUBLIC
|
||||
"RE2C_LANG=Lang::RUST"
|
||||
"RE2C_PROG=\"re2rust\""
|
||||
)
|
||||
add_executable(re2rust ${re2c_sources})
|
||||
target_compile_definitions(re2rust PUBLIC "RE2C_LANG=Lang::RUST")
|
||||
endif()
|
||||
|
||||
# re2v
|
||||
if (RE2C_BUILD_RE2V)
|
||||
re2c_gen_help("${re2c_help_source}" "${re2c_help_v}")
|
||||
re2c_gen_manpage("${re2c_manpage_source}" "${re2c_manpage_v}")
|
||||
add_executable(re2v ${re2c_sources} "${re2c_help_v}")
|
||||
target_compile_definitions(re2v PUBLIC
|
||||
"RE2C_LANG=Lang::V"
|
||||
"RE2C_PROG=\"re2v\""
|
||||
)
|
||||
endif()
|
||||
re2c_bootstrap_lexer("src/parse/lex.re" "src/parse/lex.cc" "src/parse/lex.h")
|
||||
re2c_bootstrap_lexer("src/parse/lex_conf.re" "src/parse/lex_conf.cc")
|
||||
re2c_bootstrap_lexer("src/options/parse_opts.re" "src/options/parse_opts.cc")
|
||||
re2c_bootstrap_lexer("src/msg/ver_to_vernum.re" "src/msg/ver_to_vernum.cc")
|
||||
re2c_bootstrap_parser("src/parse/parser.ypp" "src/parse/parser.cc" "src/parse/parser.h")
|
||||
|
||||
# re2zig
|
||||
if (RE2C_BUILD_RE2ZIG)
|
||||
re2c_gen_help("${re2c_help_source}" "${re2c_help_zig}")
|
||||
re2c_gen_manpage("${re2c_manpage_source}" "${re2c_manpage_zig}")
|
||||
add_executable(re2zig ${re2c_sources} "${re2c_help_zig}")
|
||||
target_compile_definitions(re2zig PUBLIC
|
||||
"RE2C_LANG=Lang::ZIG"
|
||||
"RE2C_PROG=\"re2zig\""
|
||||
)
|
||||
endif()
|
||||
# docs
|
||||
set(re2c_docs_sources
|
||||
"${re2c_manpage_source}"
|
||||
"doc/manual/api/interface.rst_"
|
||||
"doc/manual/conditions/blocks.rst_"
|
||||
"doc/manual/conditions/conditions.rst_"
|
||||
"doc/manual/configurations/configurations.rst_"
|
||||
"doc/manual/directives/directives.rst_"
|
||||
"doc/manual/dot/dot.rst_"
|
||||
"doc/manual/encodings/encodings.rst_"
|
||||
"doc/manual/eof/01_sentinel.rst_"
|
||||
"doc/manual/eof/02_bounds_checking.rst_"
|
||||
"doc/manual/eof/03_eof_rule.rst_"
|
||||
"doc/manual/eof/04_generic_api.rst_"
|
||||
"doc/manual/eof/eof.rst_"
|
||||
"doc/manual/fill/01_fill.rst_"
|
||||
"doc/manual/fill/02_fill.rst_"
|
||||
"doc/manual/fill/fill.rst_"
|
||||
"doc/manual/headers/headers.rst_"
|
||||
"doc/manual/includes/includes.rst_"
|
||||
"doc/manual/options/debug.rst_"
|
||||
"doc/manual/options/internal.rst_"
|
||||
"doc/manual/options/options.rst_"
|
||||
"doc/manual/regexps/regular_expressions.rst_"
|
||||
"doc/manual/reuse/reuse.rst_"
|
||||
"doc/manual/skeleton/skeleton.rst_"
|
||||
"doc/manual/state/state.rst_"
|
||||
"doc/manual/submatch/submatch_example_mtags.rst_"
|
||||
"doc/manual/submatch/submatch_example_posix.rst_"
|
||||
"doc/manual/submatch/submatch_example_stags_fill.rst_"
|
||||
"doc/manual/submatch/submatch_example_stags.rst_"
|
||||
"doc/manual/submatch/submatch.rst_"
|
||||
"doc/manual/synopsis.rst_"
|
||||
"doc/manual/syntax/api1.rst_"
|
||||
"doc/manual/syntax/api2_c.rst_"
|
||||
"doc/manual/syntax/api2_go.rst_"
|
||||
"doc/manual/syntax/api2_rust.rst_"
|
||||
"doc/manual/syntax/api3.rst_"
|
||||
"doc/manual/syntax/intro.rst_"
|
||||
"doc/manual/syntax/syntax.rst_"
|
||||
"doc/manual/warnings/warnings_general.rst_"
|
||||
"doc/manual/warnings/warnings_list.rst_"
|
||||
"examples/c/01_basic.re"
|
||||
"examples/c/01_basic.c"
|
||||
"examples/c/conditions/parse_u32_blocks.re"
|
||||
"examples/c/conditions/parse_u32_conditions.re"
|
||||
"examples/c/encodings/unicode_identifier.re"
|
||||
"examples/c/eof/01_sentinel.re"
|
||||
"examples/c/eof/02_bounds_checking.re"
|
||||
"examples/c/eof/03_eof_rule.re"
|
||||
"examples/c/eof/05_generic_api_eof_rule.re"
|
||||
"examples/c/fill/01_fill.re"
|
||||
"examples/c/fill/02_fill.re"
|
||||
"examples/c/headers/header.re"
|
||||
"examples/c/headers/lexer/state.h"
|
||||
"examples/c/includes/include.re"
|
||||
"examples/c/includes/definitions.h"
|
||||
"examples/c/reuse/reuse.re"
|
||||
"examples/c/reuse/usedir.re"
|
||||
"examples/c/state/push.re"
|
||||
"examples/c/submatch/01_stags_fill.re"
|
||||
"examples/c/submatch/01_stags.re"
|
||||
"examples/c/submatch/02_mtags.re"
|
||||
"examples/c/submatch/03_posix.re"
|
||||
"examples/go/01_basic.re"
|
||||
"examples/go/01_basic.go"
|
||||
"examples/go/conditions/parse_u32_blocks.re"
|
||||
"examples/go/conditions/parse_u32_conditions.re"
|
||||
"examples/go/encodings/unicode_identifier.re"
|
||||
"examples/go/eof/01_sentinel.re"
|
||||
"examples/go/eof/02_bounds_checking.re"
|
||||
"examples/go/eof/03_eof_rule.re"
|
||||
"examples/go/eof/05_generic_api_eof_rule.re"
|
||||
"examples/go/fill/01_fill.re"
|
||||
"examples/go/fill/02_fill.re"
|
||||
"examples/go/headers/header.re"
|
||||
"examples/go/headers/lexer/state.go"
|
||||
"examples/go/includes/include.re"
|
||||
"examples/go/includes/definitions.go"
|
||||
"examples/go/reuse/reuse.re"
|
||||
"examples/go/reuse/usedir.re"
|
||||
"examples/go/state/push.re"
|
||||
"examples/go/submatch/01_stags_fill.re"
|
||||
"examples/go/submatch/01_stags.re"
|
||||
"examples/go/submatch/02_mtags.re"
|
||||
"examples/go/submatch/03_posix.re"
|
||||
"examples/rust/01_basic.re"
|
||||
"examples/rust/01_basic.rs"
|
||||
"examples/rust/conditions/parse_u32_blocks.re"
|
||||
"examples/rust/conditions/parse_u32_conditions.re"
|
||||
"examples/rust/encodings/unicode_identifier.re"
|
||||
"examples/rust/eof/01_sentinel.re"
|
||||
"examples/rust/eof/02_bounds_checking.re"
|
||||
"examples/rust/eof/03_eof_rule.re"
|
||||
"examples/rust/eof/05_generic_api_eof_rule.re"
|
||||
"examples/rust/fill/01_fill.re"
|
||||
"examples/rust/fill/02_fill.re"
|
||||
"examples/rust/headers/header.re"
|
||||
"examples/rust/headers/lexer/state.rs"
|
||||
"examples/rust/includes/include.re"
|
||||
"examples/rust/includes/definitions.rs"
|
||||
"examples/rust/reuse/reuse.re"
|
||||
"examples/rust/reuse/usedir.re"
|
||||
"examples/rust/state/push.re"
|
||||
"examples/rust/submatch/01_stags_fill.re"
|
||||
"examples/rust/submatch/01_stags.re"
|
||||
"examples/rust/submatch/02_mtags.re"
|
||||
"examples/rust/submatch/03_posix.re"
|
||||
)
|
||||
re2c_gen_manpage("${re2c_manpage_source}" "${re2c_manpage_c}" "${re2c_manpage_bootstrap_c}" "c")
|
||||
re2c_gen_manpage("${re2c_manpage_source}" "${re2c_manpage_go}" "${re2c_manpage_bootstrap_go}" "go")
|
||||
re2c_gen_manpage("${re2c_manpage_source}" "${re2c_manpage_rust}" "${re2c_manpage_bootstrap_rust}" "rust")
|
||||
re2c_gen_help("${re2c_help_source}" "${re2c_help}" "${re2c_help_bootstrap}")
|
||||
add_custom_target(docs DEPENDS "${re2c_docs}")
|
||||
|
||||
# install targets are enabled only if re2c is the root project
|
||||
if(RE2C_IS_ROOT_PROJECT)
|
||||
# install and test targets are enabled only if re2c is the root project
|
||||
if (CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
|
||||
# install
|
||||
install(TARGETS re2c RUNTIME DESTINATION bin)
|
||||
install(FILES "${re2c_manpage_c}" DESTINATION "share/man/man1")
|
||||
if(RE2C_BUILD_RE2D)
|
||||
install(TARGETS re2d RUNTIME DESTINATION bin)
|
||||
install(FILES "${re2c_manpage_d}" DESTINATION "share/man/man1")
|
||||
endif()
|
||||
if(RE2C_BUILD_RE2GO)
|
||||
install(TARGETS re2go RUNTIME DESTINATION bin)
|
||||
install(FILES "${re2c_manpage_go}" DESTINATION "share/man/man1")
|
||||
endif()
|
||||
if(RE2C_BUILD_RE2HS)
|
||||
install(TARGETS re2hs RUNTIME DESTINATION bin)
|
||||
install(FILES "${re2c_manpage_haskell}" DESTINATION "share/man/man1")
|
||||
endif()
|
||||
if(RE2C_BUILD_RE2JAVA)
|
||||
install(TARGETS re2java RUNTIME DESTINATION bin)
|
||||
install(FILES "${re2c_manpage_java}" DESTINATION "share/man/man1")
|
||||
endif()
|
||||
if(RE2C_BUILD_RE2JS)
|
||||
install(TARGETS re2js RUNTIME DESTINATION bin)
|
||||
install(FILES "${re2c_manpage_js}" DESTINATION "share/man/man1")
|
||||
endif()
|
||||
if(RE2C_BUILD_RE2OCAML)
|
||||
install(TARGETS re2ocaml RUNTIME DESTINATION bin)
|
||||
install(FILES "${re2c_manpage_ocaml}" DESTINATION "share/man/man1")
|
||||
endif()
|
||||
if(RE2C_BUILD_RE2PY)
|
||||
install(TARGETS re2py RUNTIME DESTINATION bin)
|
||||
install(FILES "${re2c_manpage_python}" DESTINATION "share/man/man1")
|
||||
endif()
|
||||
if(RE2C_BUILD_RE2RUST)
|
||||
install(TARGETS re2rust RUNTIME DESTINATION bin)
|
||||
install(FILES "${re2c_manpage_rust}" DESTINATION "share/man/man1")
|
||||
endif()
|
||||
if(RE2C_BUILD_RE2V)
|
||||
install(TARGETS re2v RUNTIME DESTINATION bin)
|
||||
install(FILES "${re2c_manpage_v}" DESTINATION "share/man/man1")
|
||||
endif()
|
||||
if(RE2C_BUILD_RE2ZIG)
|
||||
install(TARGETS re2zig RUNTIME DESTINATION bin)
|
||||
install(FILES "${re2c_manpage_zig}" DESTINATION "share/man/man1")
|
||||
endif()
|
||||
install(FILES
|
||||
include/syntax/c
|
||||
include/syntax/d
|
||||
include/syntax/go
|
||||
include/syntax/haskell
|
||||
include/syntax/java
|
||||
include/syntax/js
|
||||
include/syntax/ocaml
|
||||
include/syntax/python
|
||||
include/syntax/rust
|
||||
include/syntax/v
|
||||
include/syntax/zig
|
||||
include/unicode_categories.re
|
||||
DESTINATION "${RE2C_STDLIB_DIR}")
|
||||
install(FILES include/unicode_categories.re DESTINATION "${RE2C_STDLIB_DIR}")
|
||||
|
||||
# rebuild all re2c sources using newly built re2c
|
||||
add_custom_target(bootstrap
|
||||
@@ -454,9 +346,7 @@ if(RE2C_IS_ROOT_PROJECT)
|
||||
COMMAND "${CMAKE_COMMAND}" -E remove_directory "doc"
|
||||
COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(RE2C_BUILD_TESTS)
|
||||
# tests
|
||||
add_custom_target(tests
|
||||
DEPENDS "${RE2C_RUN_TESTS}"
|
||||
@@ -476,9 +366,6 @@ if(RE2C_BUILD_TESTS)
|
||||
COMMAND "${Python3_EXECUTABLE}" "${RE2C_RUN_TESTS}" --wine -j1
|
||||
)
|
||||
add_dependencies(wtests re2c)
|
||||
add_executable(re2c_test_list
|
||||
src/test/list/test.cc
|
||||
)
|
||||
add_executable(re2c_test_range
|
||||
src/test/range/test-impl.h
|
||||
src/test/range/test.cc
|
||||
@@ -496,9 +383,9 @@ if(RE2C_BUILD_TESTS)
|
||||
)
|
||||
add_executable(re2c_test_argsubst
|
||||
src/test/argsubst/test.cc
|
||||
src/codegen/helpers.cc
|
||||
)
|
||||
add_custom_target(check_re2c
|
||||
COMMAND ./re2c_test_list
|
||||
COMMAND ./re2c_test_range
|
||||
COMMAND ./re2c_test_s_to_n32_unsafe
|
||||
COMMAND ./re2c_test_ver_to_vernum
|
||||
@@ -623,32 +510,29 @@ if (RE2C_BUILD_LIBS)
|
||||
endif()
|
||||
|
||||
# libre2c test
|
||||
if(RE2C_BUILD_TESTS)
|
||||
add_executable(test_libre2c lib/test.cc)
|
||||
target_link_libraries(test_libre2c libre2c)
|
||||
target_link_libraries(test_libre2c test_libre2c_objects_autogen)
|
||||
add_custom_target(check_libre2c
|
||||
COMMAND ./test_libre2c
|
||||
)
|
||||
endif()
|
||||
add_executable(test_libre2c lib/test.cc)
|
||||
target_link_libraries(test_libre2c libre2c)
|
||||
target_link_libraries(test_libre2c test_libre2c_objects_autogen)
|
||||
add_custom_target(check_libre2c
|
||||
COMMAND ./test_libre2c
|
||||
)
|
||||
|
||||
if(RE2C_BUILD_BENCHMARKS)
|
||||
add_subdirectory(benchmarks/c/libre2c/nfa)
|
||||
add_subdirectory(benchmarks/c/libre2c/jit)
|
||||
add_subdirectory(benchmarks/c/libre2c/java)
|
||||
add_subdirectory(benchmarks/submatch_nfa)
|
||||
add_subdirectory(benchmarks/submatch_dfa_jit)
|
||||
add_subdirectory(benchmarks/submatch_java)
|
||||
endif()
|
||||
else()
|
||||
# empty check target
|
||||
if(RE2C_BUILD_TESTS)
|
||||
add_custom_target(check_libre2c)
|
||||
endif()
|
||||
add_custom_target(check_libre2c)
|
||||
endif()
|
||||
|
||||
if(RE2C_BUILD_BENCHMARKS)
|
||||
add_subdirectory(benchmarks/c)
|
||||
add_subdirectory(benchmarks/submatch_dfa_aot)
|
||||
endif()
|
||||
|
||||
if(RE2C_BUILD_TESTS)
|
||||
# only add check target if toplevel project
|
||||
if (CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
|
||||
add_custom_target(check)
|
||||
add_dependencies(check check_re2c check_libre2c)
|
||||
endif()
|
||||
+11
-107
@@ -11,16 +11,8 @@
|
||||
"hidden": true,
|
||||
"installDir": "${sourceDir}/install-2",
|
||||
"cacheVariables": {
|
||||
"RE2C_BUILD_RE2D": true,
|
||||
"RE2C_BUILD_RE2GO": true,
|
||||
"RE2C_BUILD_RE2HS": true,
|
||||
"RE2C_BUILD_RE2JAVA": true,
|
||||
"RE2C_BUILD_RE2JS": true,
|
||||
"RE2C_BUILD_RE2OCAML": true,
|
||||
"RE2C_BUILD_RE2PY": true,
|
||||
"RE2C_BUILD_RE2RUST": true,
|
||||
"RE2C_BUILD_RE2V": true,
|
||||
"RE2C_BUILD_RE2ZIG": true,
|
||||
"RE2C_BUILD_LIBS": true,
|
||||
"RE2C_REBUILD_LEXERS": true,
|
||||
"RE2C_REBUILD_DOCS": true,
|
||||
@@ -56,16 +48,8 @@
|
||||
"CMAKE_BUILD_TYPE": "Ubsan",
|
||||
"CMAKE_C_FLAGS": "-O2",
|
||||
"CMAKE_CXX_FLAGS": "-O2",
|
||||
"RE2C_BUILD_RE2D": false,
|
||||
"RE2C_BUILD_RE2GO": false,
|
||||
"RE2C_BUILD_RE2HS": false,
|
||||
"RE2C_BUILD_RE2JAVA": false,
|
||||
"RE2C_BUILD_RE2JS": false,
|
||||
"RE2C_BUILD_RE2OCAML": false,
|
||||
"RE2C_BUILD_RE2PY": false,
|
||||
"RE2C_BUILD_RE2RUST": false,
|
||||
"RE2C_BUILD_RE2V": false,
|
||||
"RE2C_BUILD_RE2ZIG": false
|
||||
"RE2C_BUILD_RE2RUST": false
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -83,16 +67,8 @@
|
||||
"CMAKE_BUILD_TYPE": "Asan",
|
||||
"CMAKE_C_FLAGS": "-O2",
|
||||
"CMAKE_CXX_FLAGS": "-O2",
|
||||
"RE2C_BUILD_RE2D": false,
|
||||
"RE2C_BUILD_RE2GO": false,
|
||||
"RE2C_BUILD_RE2HS": false,
|
||||
"RE2C_BUILD_RE2JAVA": false,
|
||||
"RE2C_BUILD_RE2JS": false,
|
||||
"RE2C_BUILD_RE2OCAML": false,
|
||||
"RE2C_BUILD_RE2PY": false,
|
||||
"RE2C_BUILD_RE2RUST": false,
|
||||
"RE2C_BUILD_RE2V": false,
|
||||
"RE2C_BUILD_RE2ZIG": false
|
||||
"RE2C_BUILD_RE2RUST": false
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -110,16 +86,8 @@
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"CMAKE_C_FLAGS": "-O2",
|
||||
"CMAKE_CXX_FLAGS": "-O2",
|
||||
"RE2C_BUILD_RE2D": false,
|
||||
"RE2C_BUILD_RE2GO": false,
|
||||
"RE2C_BUILD_RE2HS": false,
|
||||
"RE2C_BUILD_RE2JAVA": false,
|
||||
"RE2C_BUILD_RE2JS": false,
|
||||
"RE2C_BUILD_RE2OCAML": false,
|
||||
"RE2C_BUILD_RE2PY": false,
|
||||
"RE2C_BUILD_RE2RUST": false,
|
||||
"RE2C_BUILD_RE2V": false,
|
||||
"RE2C_BUILD_RE2ZIG": false
|
||||
"RE2C_BUILD_RE2RUST": false
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -143,16 +111,8 @@
|
||||
"CMAKE_CXX_FLAGS": "-O2 -m32",
|
||||
"CMAKE_EXE_LINKER_FLAGS": "-m32",
|
||||
"CMAKE_SHARED_LINKER_FLAGS": "-m32",
|
||||
"RE2C_BUILD_RE2D": false,
|
||||
"RE2C_BUILD_RE2GO": false,
|
||||
"RE2C_BUILD_RE2HS": false,
|
||||
"RE2C_BUILD_RE2JAVA": false,
|
||||
"RE2C_BUILD_RE2JS": false,
|
||||
"RE2C_BUILD_RE2OCAML": false,
|
||||
"RE2C_BUILD_RE2PY": false,
|
||||
"RE2C_BUILD_RE2RUST": false,
|
||||
"RE2C_BUILD_RE2V": false,
|
||||
"RE2C_BUILD_RE2ZIG": false
|
||||
"RE2C_BUILD_RE2RUST": false
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -168,16 +128,8 @@
|
||||
"installDir": "${sourceDir}/install",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"RE2C_BUILD_RE2D": false,
|
||||
"RE2C_BUILD_RE2GO": false,
|
||||
"RE2C_BUILD_RE2HS": false,
|
||||
"RE2C_BUILD_RE2JAVA": false,
|
||||
"RE2C_BUILD_RE2JS": false,
|
||||
"RE2C_BUILD_RE2OCAML": false,
|
||||
"RE2C_BUILD_RE2PY": false,
|
||||
"RE2C_BUILD_RE2RUST": false,
|
||||
"RE2C_BUILD_RE2V": false,
|
||||
"RE2C_BUILD_RE2ZIG": false
|
||||
"RE2C_BUILD_RE2RUST": false
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -225,16 +177,8 @@
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"CMAKE_C_FLAGS": "-O2",
|
||||
"CMAKE_CXX_FLAGS": "-O2",
|
||||
"RE2C_BUILD_RE2D": false,
|
||||
"RE2C_BUILD_RE2GO": false,
|
||||
"RE2C_BUILD_RE2HS": false,
|
||||
"RE2C_BUILD_RE2JAVA": false,
|
||||
"RE2C_BUILD_RE2JS": false,
|
||||
"RE2C_BUILD_RE2OCAML": false,
|
||||
"RE2C_BUILD_RE2PY": false,
|
||||
"RE2C_BUILD_RE2RUST": false,
|
||||
"RE2C_BUILD_RE2V": false,
|
||||
"RE2C_BUILD_RE2ZIG": false
|
||||
"RE2C_BUILD_RE2RUST": false
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -252,16 +196,8 @@
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"CMAKE_C_FLAGS": "-O2",
|
||||
"CMAKE_CXX_FLAGS": "-O2",
|
||||
"RE2C_BUILD_RE2D": false,
|
||||
"RE2C_BUILD_RE2GO": false,
|
||||
"RE2C_BUILD_RE2HS": false,
|
||||
"RE2C_BUILD_RE2JAVA": false,
|
||||
"RE2C_BUILD_RE2JS": false,
|
||||
"RE2C_BUILD_RE2OCAML": false,
|
||||
"RE2C_BUILD_RE2PY": false,
|
||||
"RE2C_BUILD_RE2RUST": false,
|
||||
"RE2C_BUILD_RE2V": false,
|
||||
"RE2C_BUILD_RE2ZIG": false
|
||||
"RE2C_BUILD_RE2RUST": false
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -277,16 +213,8 @@
|
||||
"installDir": "${sourceDir}/install",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"RE2C_BUILD_RE2D": false,
|
||||
"RE2C_BUILD_RE2GO": false,
|
||||
"RE2C_BUILD_RE2HS": false,
|
||||
"RE2C_BUILD_RE2JAVA": false,
|
||||
"RE2C_BUILD_RE2JS": false,
|
||||
"RE2C_BUILD_RE2OCAML": false,
|
||||
"RE2C_BUILD_RE2PY": false,
|
||||
"RE2C_BUILD_RE2RUST": false,
|
||||
"RE2C_BUILD_RE2V": false,
|
||||
"RE2C_BUILD_RE2ZIG": false
|
||||
"RE2C_BUILD_RE2RUST": false
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -322,16 +250,8 @@
|
||||
"installDir": "${sourceDir}/install",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"RE2C_BUILD_RE2D": false,
|
||||
"RE2C_BUILD_RE2GO": false,
|
||||
"RE2C_BUILD_RE2HS": false,
|
||||
"RE2C_BUILD_RE2JAVA": false,
|
||||
"RE2C_BUILD_RE2JS": false,
|
||||
"RE2C_BUILD_RE2OCAML": false,
|
||||
"RE2C_BUILD_RE2PY": false,
|
||||
"RE2C_BUILD_RE2RUST": false,
|
||||
"RE2C_BUILD_RE2V": false,
|
||||
"RE2C_BUILD_RE2ZIG": false
|
||||
"RE2C_BUILD_RE2RUST": false
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -347,16 +267,8 @@
|
||||
"installDir": "${sourceDir}/install",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"RE2C_BUILD_RE2D": false,
|
||||
"RE2C_BUILD_RE2GO": false,
|
||||
"RE2C_BUILD_RE2HS": false,
|
||||
"RE2C_BUILD_RE2JAVA": false,
|
||||
"RE2C_BUILD_RE2JS": false,
|
||||
"RE2C_BUILD_RE2OCAML": false,
|
||||
"RE2C_BUILD_RE2PY": false,
|
||||
"RE2C_BUILD_RE2RUST": false,
|
||||
"RE2C_BUILD_RE2V": false,
|
||||
"RE2C_BUILD_RE2ZIG": false
|
||||
"RE2C_BUILD_RE2RUST": false
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -372,16 +284,8 @@
|
||||
"installDir": "${sourceDir}/install",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"RE2C_BUILD_RE2D": false,
|
||||
"RE2C_BUILD_RE2GO": false,
|
||||
"RE2C_BUILD_RE2HS": false,
|
||||
"RE2C_BUILD_RE2JAVA": false,
|
||||
"RE2C_BUILD_RE2JS": false,
|
||||
"RE2C_BUILD_RE2OCAML": false,
|
||||
"RE2C_BUILD_RE2PY": false,
|
||||
"RE2C_BUILD_RE2RUST": false,
|
||||
"RE2C_BUILD_RE2V": false,
|
||||
"RE2C_BUILD_RE2ZIG": false
|
||||
"RE2C_BUILD_RE2RUST": false
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -47,10 +47,6 @@ with options `--enable-parsers` (Autotools) or `-DRE2C_REBUILD_PARSERS=ON`
|
||||
(CMake). In this case `bison` must be installed on the system. Otherwise
|
||||
Autoconf or CMake will fail at configuration stage.
|
||||
|
||||
For changes that affect syntax files, regeneration mode is configured
|
||||
with options `--enable-syntax` (Autotools) or `-DRE2C_REBUILD_SYNTAX=ON`
|
||||
(CMake).
|
||||
|
||||
For changes that update documentation, it is necessary to rebuild the bootstrap
|
||||
manpages by reconfiguring and rebuilding re2c with options `--enable-docs`
|
||||
(Autotools) or `-DRE2C_REBUILD_DOCS=ON` (CMake).
|
||||
|
||||
@@ -41,6 +41,6 @@ requires some research. Does TDFA present any special difficulties?
|
||||
## Location support
|
||||
|
||||
It would be good to have something like Bison locations (automatic tracking of
|
||||
line/column/filename information). This is primarily useful for tokenizers and
|
||||
line/column/filename inforamtion). This is primarily useful for tokenizers and
|
||||
large lexers.
|
||||
|
||||
+142
-491
@@ -130,339 +130,146 @@ re2c_SOURCES = \
|
||||
$(re2c_SRC)
|
||||
|
||||
# autogenerated sources
|
||||
re2c_GEN_HELP = src/msg/help.cc
|
||||
re2c_GEN_LEX = src/parse/lex.cc
|
||||
re2c_GEN_PARSER = src/parse/parser.cc
|
||||
re2c_GEN_PARSER_HDR = src/parse/parser.h
|
||||
re2c_GEN_VER_TO_VERNUM = src/msg/ver_to_vernum.cc
|
||||
re2c_GEN_SRC = \
|
||||
src/msg/ver_to_vernum.cc \
|
||||
src/options/parse_opts.cc \
|
||||
src/parse/lexer.cc \
|
||||
src/parse/parser.cc \
|
||||
src/parse/conf_lexer.cc \
|
||||
src/parse/conf_parser.cc
|
||||
$(re2c_GEN_HELP) \
|
||||
$(re2c_GEN_LEX) \
|
||||
$(re2c_GEN_PARSER) \
|
||||
$(re2c_GEN_VER_TO_VERNUM) \
|
||||
src/parse/lex_conf.cc \
|
||||
src/options/parse_opts.cc
|
||||
re2c_GEN_HDR = \
|
||||
src/parse/parser.h \
|
||||
src/parse/conf_parser.h \
|
||||
src/parse/lexer.h
|
||||
re2c_GEN_STX = \
|
||||
src/default_syntax_c.h \
|
||||
src/default_syntax_d.h \
|
||||
src/default_syntax_go.h \
|
||||
src/default_syntax_haskell.h \
|
||||
src/default_syntax_java.h \
|
||||
src/default_syntax_js.h \
|
||||
src/default_syntax_ocaml.h \
|
||||
src/default_syntax_python.h \
|
||||
src/default_syntax_rust.h \
|
||||
src/default_syntax_v.h \
|
||||
src/default_syntax_zig.h
|
||||
src/parse/lex.h \
|
||||
$(re2c_GEN_PARSER_HDR)
|
||||
re2c_GEN = \
|
||||
$(re2c_GEN_SRC) \
|
||||
$(re2c_GEN_HDR) \
|
||||
$(re2c_GEN_STX)
|
||||
nodist_re2c_SOURCES = \
|
||||
$(re2c_GEN) \
|
||||
src/msg/help_re2c.cc
|
||||
$(re2c_GEN_HDR)
|
||||
nodist_re2c_SOURCES = $(re2c_GEN)
|
||||
|
||||
# custom rules create headers and must go before normal rules
|
||||
BUILT_SOURCES = $(re2c_GEN_SRC) $(re2c_GEN_STX)
|
||||
BUILT_SOURCES = $(re2c_GEN_SRC)
|
||||
|
||||
# bootstrap sources
|
||||
re2c_BOOT_PARSER = bootstrap/src/parse/parser.cc
|
||||
re2c_BOOT_PARSER_HDR = bootstrap/src/parse/parser.h
|
||||
re2c_BOOT_DOC_C = bootstrap/doc/re2c.1
|
||||
re2c_BOOT_DOC_GO = bootstrap/doc/re2go.1
|
||||
re2c_BOOT_DOC_RUST = bootstrap/doc/re2rust.1
|
||||
re2c_BOOT_HELP = bootstrap/src/msg/help.cc
|
||||
re2c_BOOT = \
|
||||
bootstrap/doc/re2c.1 \
|
||||
bootstrap/doc/re2d.1 \
|
||||
bootstrap/doc/re2go.1 \
|
||||
bootstrap/doc/re2hs.1 \
|
||||
bootstrap/doc/re2java.1 \
|
||||
bootstrap/doc/re2js.1 \
|
||||
bootstrap/doc/re2ocaml.1 \
|
||||
bootstrap/doc/re2py.1 \
|
||||
bootstrap/doc/re2rust.1 \
|
||||
bootstrap/doc/re2v.1 \
|
||||
bootstrap/doc/re2zig.1 \
|
||||
bootstrap/src/default_syntax_c.h \
|
||||
bootstrap/src/default_syntax_d.h \
|
||||
bootstrap/src/default_syntax_go.h \
|
||||
bootstrap/src/default_syntax_haskell.h \
|
||||
bootstrap/src/default_syntax_java.h \
|
||||
bootstrap/src/default_syntax_js.h \
|
||||
bootstrap/src/default_syntax_ocaml.h \
|
||||
bootstrap/src/default_syntax_python.h \
|
||||
bootstrap/src/default_syntax_rust.h \
|
||||
bootstrap/src/default_syntax_v.h \
|
||||
bootstrap/src/default_syntax_zig.h \
|
||||
bootstrap/src/msg/help_re2c.cc \
|
||||
bootstrap/src/msg/help_re2d.cc \
|
||||
bootstrap/src/msg/help_re2go.cc \
|
||||
bootstrap/src/msg/help_re2hs.cc \
|
||||
bootstrap/src/msg/help_re2java.cc \
|
||||
bootstrap/src/msg/help_re2js.cc \
|
||||
bootstrap/src/msg/help_re2ocaml.cc \
|
||||
bootstrap/src/msg/help_re2py.cc \
|
||||
bootstrap/src/msg/help_re2rust.cc \
|
||||
bootstrap/src/msg/help_re2v.cc \
|
||||
bootstrap/src/msg/help_re2zig.cc \
|
||||
bootstrap/src/msg/ver_to_vernum.cc \
|
||||
$(re2c_BOOT_DOC_C) \
|
||||
$(re2c_BOOT_DOC_GO) \
|
||||
$(re2c_BOOT_DOC_RUST) \
|
||||
$(re2c_BOOT_HELP) \
|
||||
$(re2c_BOOT_PARSER) \
|
||||
$(re2c_BOOT_PARSER_HDR) \
|
||||
bootstrap/src/parse/lex.cc \
|
||||
bootstrap/src/parse/lex.h \
|
||||
bootstrap/src/parse/lex_conf.cc \
|
||||
bootstrap/src/options/parse_opts.cc \
|
||||
bootstrap/src/parse/lexer.cc \
|
||||
bootstrap/src/parse/lexer.h \
|
||||
bootstrap/src/parse/parser.cc \
|
||||
bootstrap/src/parse/parser.h \
|
||||
bootstrap/src/parse/conf_lexer.cc \
|
||||
bootstrap/src/parse/conf_parser.h \
|
||||
bootstrap/src/parse/conf_parser.cc
|
||||
bootstrap/src/msg/ver_to_vernum.cc
|
||||
|
||||
# custom sources
|
||||
re2c_CUSTOM_PARSER = src/parse/parser.ypp
|
||||
re2c_CUSTOM_HELP = doc/help.rst
|
||||
re2c_CUSTOM = \
|
||||
src/msg/ver_to_vernum.re \
|
||||
$(re2c_CUSTOM_PARSER) \
|
||||
$(re2c_CUSTOM_HELP) \
|
||||
src/parse/lex.re \
|
||||
src/parse/lex_conf.re \
|
||||
src/options/parse_opts.re \
|
||||
src/parse/lexer.re \
|
||||
src/parse/parser.ypp \
|
||||
src/parse/conf_lexer.re \
|
||||
src/parse/conf_parser.ypp
|
||||
src/msg/ver_to_vernum.re
|
||||
|
||||
# docs
|
||||
# To build the list of examples for all backends, run:
|
||||
# find examples -regex '.*\.re\|.*\(state\|01_basic\|definitions\)\..*' -printf '\t%p \\\n' | sort
|
||||
re2c_SRC_DOC = doc/manpage.rst
|
||||
re2c_SRC_DOC_EXT = \
|
||||
doc/manual/basics/api/api1.rst_ \
|
||||
doc/manual/basics/api/api2_c.rst_ \
|
||||
doc/manual/basics/api/api2_d.rst_ \
|
||||
doc/manual/basics/api/api2_go.rst_ \
|
||||
doc/manual/basics/api/api2_haskell.rst_ \
|
||||
doc/manual/basics/api/api2_java.rst_ \
|
||||
doc/manual/basics/api/api2_js.rst_ \
|
||||
doc/manual/basics/api/api2_ocaml.rst_ \
|
||||
doc/manual/basics/api/api2_python.rst_ \
|
||||
doc/manual/basics/api/api2_rust.rst_ \
|
||||
doc/manual/basics/api/api2_v.rst_ \
|
||||
doc/manual/basics/api/api2_zig.rst_ \
|
||||
doc/manual/basics/api/api3.rst_ \
|
||||
doc/manual/basics/blocks.rst_ \
|
||||
doc/manual/basics/directives.rst_ \
|
||||
doc/manual/basics/configurations.rst_ \
|
||||
doc/manual/basics/regular_expressions.rst_ \
|
||||
doc/manual/basics/syntax.rst_ \
|
||||
doc/manual/basics/syntax_files.rst_ \
|
||||
doc/manual/basics/options/debug.rst_ \
|
||||
doc/manual/basics/options/internal.rst_ \
|
||||
doc/manual/basics/options/options.rst_ \
|
||||
doc/manual/basics/warnings/warnings_general.rst_ \
|
||||
doc/manual/basics/warnings/warnings_list.rst_ \
|
||||
doc/manual/api/interface.rst_ \
|
||||
doc/manual/conditions/blocks.rst_ \
|
||||
doc/manual/conditions/conditions.rst_ \
|
||||
doc/manual/configurations/configurations.rst_ \
|
||||
doc/manual/directives/directives.rst_ \
|
||||
doc/manual/dot/dot.rst_ \
|
||||
doc/manual/encodings/encodings.rst_ \
|
||||
doc/manual/eof/01_sentinel.rst_ \
|
||||
doc/manual/eof/02_bounds_checking.rst_ \
|
||||
doc/manual/eof/03_eof_rule.rst_ \
|
||||
doc/manual/eof/04_fake_sentinel.rst_ \
|
||||
doc/manual/eof/04_generic_api.rst_ \
|
||||
doc/manual/eof/eof.rst_ \
|
||||
doc/manual/features/conditions/blocks.rst_ \
|
||||
doc/manual/features/conditions/conditions.rst_ \
|
||||
doc/manual/features/dot/dot.rst_ \
|
||||
doc/manual/features/encodings/encodings.rst_ \
|
||||
doc/manual/features/headers/headers.rst_ \
|
||||
doc/manual/features/includes/includes.rst_ \
|
||||
doc/manual/features/reuse/reuse.rst_ \
|
||||
doc/manual/features/skeleton/skeleton.rst_ \
|
||||
doc/manual/features/state/state.rst_ \
|
||||
doc/manual/features/submatch/submatch_example_mtags.rst_ \
|
||||
doc/manual/features/submatch/submatch_example_captures.rst_ \
|
||||
doc/manual/features/submatch/submatch_example_stags_fill.rst_ \
|
||||
doc/manual/features/submatch/submatch_example_stags.rst_ \
|
||||
doc/manual/features/submatch/submatch.rst_ \
|
||||
doc/manual/fill/01_fill.rst_ \
|
||||
doc/manual/fill/02_fill.rst_ \
|
||||
doc/manual/fill/fill.rst_ \
|
||||
doc/manual/authors.rst_ \
|
||||
doc/manual/intro.rst_ \
|
||||
doc/manual/headers/headers.rst_ \
|
||||
doc/manual/includes/includes.rst_ \
|
||||
doc/manual/options/debug.rst_ \
|
||||
doc/manual/options/internal.rst_ \
|
||||
doc/manual/options/options.rst_ \
|
||||
doc/manual/regexps/regular_expressions.rst_ \
|
||||
doc/manual/reuse/reuse.rst_ \
|
||||
doc/manual/skeleton/skeleton.rst_ \
|
||||
doc/manual/state/state.rst_ \
|
||||
doc/manual/submatch/submatch_example_mtags.rst_ \
|
||||
doc/manual/submatch/submatch_example_posix.rst_ \
|
||||
doc/manual/submatch/submatch_example_stags_fill.rst_ \
|
||||
doc/manual/submatch/submatch_example_stags.rst_ \
|
||||
doc/manual/submatch/submatch.rst_ \
|
||||
doc/manual/synopsis.rst_ \
|
||||
examples/c/01_basic.c \
|
||||
doc/manual/syntax/api1.rst_ \
|
||||
doc/manual/syntax/api2_c.rst_ \
|
||||
doc/manual/syntax/api2_go.rst_ \
|
||||
doc/manual/syntax/api2_rust.rst_ \
|
||||
doc/manual/syntax/api3.rst_ \
|
||||
doc/manual/syntax/intro.rst_ \
|
||||
doc/manual/syntax/syntax.rst_ \
|
||||
doc/manual/warnings/warnings_general.rst_ \
|
||||
doc/manual/warnings/warnings_list.rst_ \
|
||||
examples/c/01_basic.re \
|
||||
examples/c/01_basic.c \
|
||||
examples/c/conditions/parse_u32_blocks.re \
|
||||
examples/c/conditions/parse_u32_conditions.re \
|
||||
examples/c/encodings/unicode_identifier.re \
|
||||
examples/c/eof/01_sentinel.re \
|
||||
examples/c/eof/02_bounds_checking.re \
|
||||
examples/c/eof/03_eof_rule.re \
|
||||
examples/c/eof/04_fake_sentinel.re \
|
||||
examples/c/eof/05_fake_sentinel_eof_rule.re \
|
||||
examples/c/eof/05_generic_api_eof_rule.re \
|
||||
examples/c/fill/01_fill.re \
|
||||
examples/c/fill/02_fill.re \
|
||||
examples/c/generic_api/ifstream.re \
|
||||
examples/c/headers/header.re \
|
||||
examples/c/headers/lexer/state.h \
|
||||
examples/c/includes/definitions.h \
|
||||
examples/c/includes/include.re \
|
||||
examples/c/real_world/cxx98.re \
|
||||
examples/c/reuse/braille.re \
|
||||
examples/c/includes/definitions.h \
|
||||
examples/c/reuse/reuse.re \
|
||||
examples/c/reuse/usedir.re \
|
||||
examples/c/state/push.re \
|
||||
examples/c/submatch/01_stags_fill.re \
|
||||
examples/c/submatch/01_stags.re \
|
||||
examples/c/submatch/02_mtags.re \
|
||||
examples/c/submatch/03_captures.re \
|
||||
examples/c/submatch/04_posix_captures.re \
|
||||
examples/c/submatch/http_rfc7230.re \
|
||||
examples/c/submatch/parse_etc_passwd.re \
|
||||
examples/c/submatch/parse_options.re \
|
||||
examples/c/submatch/parse_records.re \
|
||||
examples/c/submatch/uri_rfc3986.re \
|
||||
examples/d/01_basic.d \
|
||||
examples/d/01_basic.re \
|
||||
examples/d/conditions/parse_u32_blocks.re \
|
||||
examples/d/conditions/parse_u32_conditions.re \
|
||||
examples/d/encodings/unicode_identifier.re \
|
||||
examples/d/eof/01_sentinel.re \
|
||||
examples/d/eof/02_bounds_checking.re \
|
||||
examples/d/eof/03_eof_rule.re \
|
||||
examples/d/eof/04_fake_sentinel.re \
|
||||
examples/d/fill/01_fill.re \
|
||||
examples/d/fill/02_fill.re \
|
||||
examples/d/headers/header.re \
|
||||
examples/d/headers/lexer/state.d \
|
||||
examples/d/includes/definitions.d \
|
||||
examples/d/includes/include.re \
|
||||
examples/d/reuse/reuse.re \
|
||||
examples/d/reuse/usedir.re \
|
||||
examples/d/state/push.re \
|
||||
examples/d/submatch/01_stags_fill.re \
|
||||
examples/d/submatch/01_stags.re \
|
||||
examples/d/submatch/02_mtags.re \
|
||||
examples/d/submatch/03_captures.re \
|
||||
examples/d/submatch/04_posix_captures.re \
|
||||
examples/go/01_basic.go \
|
||||
examples/c/submatch/03_posix.re \
|
||||
examples/go/01_basic.re \
|
||||
examples/go/01_basic.go \
|
||||
examples/go/conditions/parse_u32_blocks.re \
|
||||
examples/go/conditions/parse_u32_conditions.re \
|
||||
examples/go/encodings/unicode_identifier.re \
|
||||
examples/go/eof/01_sentinel.re \
|
||||
examples/go/eof/02_bounds_checking.re \
|
||||
examples/go/eof/03_eof_rule.re \
|
||||
examples/go/eof/04_fake_sentinel.re \
|
||||
examples/go/eof/05_generic_api_eof_rule.re \
|
||||
examples/go/fill/01_fill.re \
|
||||
examples/go/fill/02_fill.re \
|
||||
examples/go/headers/header.re \
|
||||
examples/go/headers/lexer/state.go \
|
||||
examples/go/includes/definitions.go \
|
||||
examples/go/includes/include.re \
|
||||
examples/go/includes/definitions.go \
|
||||
examples/go/reuse/reuse.re \
|
||||
examples/go/reuse/usedir.re \
|
||||
examples/go/state/push.re \
|
||||
examples/go/submatch/01_stags_fill.re \
|
||||
examples/go/submatch/01_stags.re \
|
||||
examples/go/submatch/02_mtags.re \
|
||||
examples/go/submatch/03_captures.re \
|
||||
examples/go/submatch/04_posix_captures.re \
|
||||
examples/haskell/01_basic.hs \
|
||||
examples/haskell/01_basic.re \
|
||||
examples/haskell/conditions/parse_u32_blocks.re \
|
||||
examples/haskell/conditions/parse_u32_conditions.re \
|
||||
examples/haskell/encodings/unicode_identifier.re \
|
||||
examples/haskell/eof/01_sentinel.re \
|
||||
examples/haskell/eof/02_bounds_checking.re \
|
||||
examples/haskell/eof/03_eof_rule.re \
|
||||
examples/haskell/eof/04_fake_sentinel.re \
|
||||
examples/haskell/fill/01_fill.re \
|
||||
examples/haskell/fill/02_fill.re \
|
||||
examples/haskell/headers/header.re \
|
||||
examples/haskell/headers/lexer/state.hs \
|
||||
examples/haskell/includes/definitions.hs \
|
||||
examples/haskell/includes/include.re \
|
||||
examples/haskell/reuse/reuse.re \
|
||||
examples/haskell/reuse/usedir.re \
|
||||
examples/haskell/state/push.re \
|
||||
examples/haskell/submatch/01_stags_fill.re \
|
||||
examples/haskell/submatch/01_stags.re \
|
||||
examples/haskell/submatch/02_mtags.re \
|
||||
examples/haskell/submatch/03_captures.re \
|
||||
examples/java/01_basic.java \
|
||||
examples/java/01_basic.re \
|
||||
examples/java/conditions/parse_u32_blocks.re \
|
||||
examples/java/conditions/parse_u32_conditions.re \
|
||||
examples/java/encodings/unicode_identifier.re \
|
||||
examples/java/eof/01_sentinel.re \
|
||||
examples/java/eof/02_bounds_checking.re \
|
||||
examples/java/eof/03_eof_rule.re \
|
||||
examples/java/eof/04_fake_sentinel.re \
|
||||
examples/java/fill/01_fill.re \
|
||||
examples/java/fill/02_fill.re \
|
||||
examples/java/headers/header.re \
|
||||
examples/java/headers/lexer/state.java \
|
||||
examples/java/includes/definitions.java \
|
||||
examples/java/includes/include.re \
|
||||
examples/java/reuse/reuse.re \
|
||||
examples/java/reuse/usedir.re \
|
||||
examples/java/state/push.re \
|
||||
examples/java/submatch/01_stags_fill.re \
|
||||
examples/java/submatch/01_stags.re \
|
||||
examples/java/submatch/02_mtags.re \
|
||||
examples/java/submatch/03_captures.re \
|
||||
examples/java/submatch/04_posix_captures.re \
|
||||
examples/js/01_basic.js \
|
||||
examples/js/01_basic.re \
|
||||
examples/js/conditions/parse_u32_blocks.re \
|
||||
examples/js/conditions/parse_u32_conditions.re \
|
||||
examples/js/encodings/unicode_identifier.re \
|
||||
examples/js/eof/01_sentinel.re \
|
||||
examples/js/eof/02_bounds_checking.re \
|
||||
examples/js/eof/03_eof_rule.re \
|
||||
examples/js/eof/04_fake_sentinel.re \
|
||||
examples/js/fill/01_fill.re \
|
||||
examples/js/fill/02_fill.re \
|
||||
examples/js/headers/header.re \
|
||||
examples/js/headers/lexer/state.js \
|
||||
examples/js/includes/definitions.js \
|
||||
examples/js/includes/include.re \
|
||||
examples/js/reuse/reuse.re \
|
||||
examples/js/reuse/usedir.re \
|
||||
examples/js/state/push.re \
|
||||
examples/js/submatch/01_stags_fill.re \
|
||||
examples/js/submatch/01_stags.re \
|
||||
examples/js/submatch/02_mtags.re \
|
||||
examples/js/submatch/03_captures.re \
|
||||
examples/js/submatch/04_posix_captures.re \
|
||||
examples/ocaml/01_basic.ml \
|
||||
examples/ocaml/01_basic.re \
|
||||
examples/ocaml/conditions/parse_u32_blocks.re \
|
||||
examples/ocaml/conditions/parse_u32_conditions.re \
|
||||
examples/ocaml/encodings/unicode_identifier.re \
|
||||
examples/ocaml/eof/01_sentinel.re \
|
||||
examples/ocaml/eof/02_bounds_checking.re \
|
||||
examples/ocaml/eof/03_eof_rule.re \
|
||||
examples/ocaml/eof/04_fake_sentinel.re \
|
||||
examples/ocaml/fill/01_fill.re \
|
||||
examples/ocaml/fill/02_fill.re \
|
||||
examples/ocaml/headers/header.re \
|
||||
examples/ocaml/headers/lexer/state.ml \
|
||||
examples/ocaml/includes/definitions.ml \
|
||||
examples/ocaml/includes/include.re \
|
||||
examples/ocaml/reuse/reuse.re \
|
||||
examples/ocaml/reuse/usedir.re \
|
||||
examples/ocaml/state/push.re \
|
||||
examples/ocaml/submatch/01_stags_fill.re \
|
||||
examples/ocaml/submatch/01_stags.re \
|
||||
examples/ocaml/submatch/02_mtags.re \
|
||||
examples/ocaml/submatch/03_captures.re \
|
||||
examples/ocaml/submatch/04_posix_captures.re \
|
||||
examples/python/01_basic.py \
|
||||
examples/python/01_basic.re \
|
||||
examples/python/conditions/parse_u32_blocks.re \
|
||||
examples/python/conditions/parse_u32_conditions.re \
|
||||
examples/python/encodings/unicode_identifier.re \
|
||||
examples/python/eof/01_sentinel.re \
|
||||
examples/python/eof/02_bounds_checking.re \
|
||||
examples/python/eof/03_eof_rule.re \
|
||||
examples/python/eof/04_fake_sentinel.re \
|
||||
examples/python/fill/01_fill.re \
|
||||
examples/python/fill/02_fill.re \
|
||||
examples/python/headers/header.re \
|
||||
examples/python/headers/lexer/state.py \
|
||||
examples/python/includes/definitions.py \
|
||||
examples/python/includes/include.re \
|
||||
examples/python/reuse/reuse.re \
|
||||
examples/python/reuse/usedir.re \
|
||||
examples/python/state/push.re \
|
||||
examples/python/submatch/01_stags_fill.re \
|
||||
examples/python/submatch/01_stags.re \
|
||||
examples/python/submatch/02_mtags.re \
|
||||
examples/python/submatch/03_captures.re \
|
||||
examples/python/submatch/04_posix_captures.re \
|
||||
examples/go/submatch/03_posix.re \
|
||||
examples/rust/01_basic.re \
|
||||
examples/rust/01_basic.rs \
|
||||
examples/rust/conditions/parse_u32_blocks.re \
|
||||
@@ -471,129 +278,38 @@ re2c_SRC_DOC_EXT = \
|
||||
examples/rust/eof/01_sentinel.re \
|
||||
examples/rust/eof/02_bounds_checking.re \
|
||||
examples/rust/eof/03_eof_rule.re \
|
||||
examples/rust/eof/04_fake_sentinel.re \
|
||||
examples/rust/eof/05_generic_api_eof_rule.re \
|
||||
examples/rust/fill/01_fill.re \
|
||||
examples/rust/fill/02_fill.re \
|
||||
examples/rust/headers/header.re \
|
||||
examples/rust/headers/lexer/state.rs \
|
||||
examples/rust/includes/definitions.rs \
|
||||
examples/rust/includes/include.re \
|
||||
examples/rust/real_world/c.re \
|
||||
examples/rust/includes/definitions.rs \
|
||||
examples/rust/reuse/reuse.re \
|
||||
examples/rust/reuse/usedir.re \
|
||||
examples/rust/state/push.re \
|
||||
examples/rust/submatch/01_stags_fill.re \
|
||||
examples/rust/submatch/01_stags.re \
|
||||
examples/rust/submatch/02_mtags.re \
|
||||
examples/rust/submatch/03_captures.re \
|
||||
examples/rust/submatch/04_posix_captures.re \
|
||||
examples/v/01_basic.re \
|
||||
examples/v/01_basic.v \
|
||||
examples/v/conditions/parse_u32_blocks.re \
|
||||
examples/v/conditions/parse_u32_conditions.re \
|
||||
examples/v/encodings/unicode_identifier.re \
|
||||
examples/v/eof/01_sentinel.re \
|
||||
examples/v/eof/02_bounds_checking.re \
|
||||
examples/v/eof/03_eof_rule.re \
|
||||
examples/v/eof/04_fake_sentinel.re \
|
||||
examples/v/fill/01_fill.re \
|
||||
examples/v/fill/02_fill.re \
|
||||
examples/v/headers/header.re \
|
||||
examples/v/headers/lexer/state.v \
|
||||
examples/v/includes/definitions.v \
|
||||
examples/v/includes/include.re \
|
||||
examples/v/reuse/reuse.re \
|
||||
examples/v/reuse/usedir.re \
|
||||
examples/v/state/push.re \
|
||||
examples/v/submatch/01_stags_fill.re \
|
||||
examples/v/submatch/01_stags.re \
|
||||
examples/v/submatch/02_mtags.re \
|
||||
examples/v/submatch/03_captures.re \
|
||||
examples/v/submatch/04_posix_captures.re \
|
||||
examples/zig/01_basic.re \
|
||||
examples/zig/01_basic.zig \
|
||||
examples/zig/conditions/parse_u32_blocks.re \
|
||||
examples/zig/conditions/parse_u32_conditions.re \
|
||||
examples/zig/encodings/unicode_identifier.re \
|
||||
examples/zig/eof/01_sentinel.re \
|
||||
examples/zig/eof/02_bounds_checking.re \
|
||||
examples/zig/eof/03_eof_rule.re \
|
||||
examples/zig/eof/04_fake_sentinel.re \
|
||||
examples/zig/fill/01_fill.re \
|
||||
examples/zig/fill/02_fill.re \
|
||||
examples/zig/headers/header.re \
|
||||
examples/zig/headers/lexer/state.zig \
|
||||
examples/zig/includes/definitions.zig \
|
||||
examples/zig/includes/include.re \
|
||||
examples/zig/reuse/reuse.re \
|
||||
examples/zig/reuse/usedir.re \
|
||||
examples/zig/state/push.re \
|
||||
examples/zig/submatch/01_stags_fill.re \
|
||||
examples/zig/submatch/01_stags.re \
|
||||
examples/zig/submatch/02_mtags.re \
|
||||
examples/zig/submatch/03_captures.re \
|
||||
examples/zig/submatch/04_posix_captures.re
|
||||
examples/rust/submatch/03_posix.re
|
||||
|
||||
DOC_C = doc/re2c.1
|
||||
DOCS = $(DOC_C)
|
||||
|
||||
DOCS = doc/re2c.1
|
||||
HELP = src/msg/help_re2c.cc
|
||||
if WITH_DLANG
|
||||
DOCS += doc/re2d.1
|
||||
HELP += src/msg/help_re2d.cc
|
||||
endif
|
||||
if WITH_GOLANG
|
||||
DOCS += doc/re2go.1
|
||||
HELP += src/msg/help_re2go.cc
|
||||
endif
|
||||
if WITH_HASKELL
|
||||
DOCS += doc/re2hs.1
|
||||
HELP += src/msg/help_re2hs.cc
|
||||
endif
|
||||
if WITH_JAVA
|
||||
DOCS += doc/re2java.1
|
||||
HELP += src/msg/help_re2java.cc
|
||||
endif
|
||||
if WITH_JS
|
||||
DOCS += doc/re2js.1
|
||||
HELP += src/msg/help_re2js.cc
|
||||
endif
|
||||
if WITH_OCAML
|
||||
DOCS += doc/re2ocaml.1
|
||||
HELP += src/msg/help_re2ocaml.cc
|
||||
endif
|
||||
if WITH_PYTHON
|
||||
DOCS += doc/re2py.1
|
||||
HELP += src/msg/help_re2py.cc
|
||||
DOC_GO = doc/re2go.1
|
||||
DOCS += $(DOC_GO)
|
||||
endif
|
||||
|
||||
if WITH_RUST
|
||||
DOCS += doc/re2rust.1
|
||||
HELP += src/msg/help_re2rust.cc
|
||||
DOC_RUST = doc/re2rust.1
|
||||
DOCS += $(DOC_RUST)
|
||||
endif
|
||||
if WITH_VLANG
|
||||
DOCS += doc/re2v.1
|
||||
HELP += src/msg/help_re2v.cc
|
||||
endif
|
||||
if WITH_ZIG
|
||||
DOCS += doc/re2zig.1
|
||||
HELP += src/msg/help_re2zig.cc
|
||||
endif
|
||||
BUILT_SOURCES += $(HELP)
|
||||
|
||||
man_MANS = $(DOCS)
|
||||
|
||||
# include files (stdlib)
|
||||
dist_stdlib_DATA = \
|
||||
include/syntax/c \
|
||||
include/syntax/d \
|
||||
include/syntax/go \
|
||||
include/syntax/haskell \
|
||||
include/syntax/java \
|
||||
include/syntax/js \
|
||||
include/syntax/ocaml \
|
||||
include/syntax/python \
|
||||
include/syntax/rust \
|
||||
include/syntax/v \
|
||||
include/syntax/zig \
|
||||
include/unicode_categories.re
|
||||
dist_stdlib_DATA = include/unicode_categories.re
|
||||
|
||||
BAZELFILES := \
|
||||
BUILD.bazel \
|
||||
@@ -626,31 +342,14 @@ EXTRA_DIST = \
|
||||
|
||||
CLEANFILES = \
|
||||
$(re2c_GEN) \
|
||||
$(re2c_GEN_HELP) \
|
||||
$(DOCS) \
|
||||
$(HELP)
|
||||
|
||||
if REBUILD_SYNTAX
|
||||
STX2CPP = $(top_srcdir)/build/stx2cpp.py
|
||||
# generate C++ sources from syntax configs and update bootstrap files
|
||||
.stx.h:
|
||||
$(AM_V_at)$(MKDIR_P) $(@D)
|
||||
$(AM_V_GEN)$(PYTHON) $(STX2CPP) $< $@
|
||||
$(AM_V_GEN)cp -f $@ $(top_srcdir)/bootstrap/$@
|
||||
else
|
||||
# copy bootstrap files
|
||||
.stx.h:
|
||||
$(AM_V_at)$(MKDIR_P) $(@D)
|
||||
$(AM_V_GEN)cp $(top_srcdir)/bootstrap/$@ $(@D)
|
||||
$(AM_V_at)echo "Reconfigure with --enable-syntax to regenerate $@"
|
||||
endif
|
||||
$(DOCS)
|
||||
|
||||
if REBUILD_LEXERS
|
||||
# generate lexer and update bootstrap files
|
||||
.re.cc:
|
||||
$(AM_V_at)$(MKDIR_P) $(@D)
|
||||
$(AM_V_GEN)$(RE2C_FOR_BUILD) $(RE2CFLAGS) -o $@ $<
|
||||
$(AM_V_GEN)cp $(@:cc=[ch]*) $(top_srcdir)/bootstrap/$(@D)
|
||||
$(AM_V_GEN)cp $(@:cc=[ch]*) $(top_srcdir)/bootstrap/$(@D);
|
||||
else
|
||||
# copy bootstrap files
|
||||
.re.cc:
|
||||
@@ -664,18 +363,17 @@ if REBUILD_PARSERS
|
||||
.ypp.cc:
|
||||
$(AM_V_at)$(MKDIR_P) $(@D)
|
||||
$(AM_V_GEN)$(BISON) --warnings --output=$@ --defines=$(@:cc=h) $<
|
||||
$(AM_V_GEN)cp $@ $(@:cc=h) $(top_srcdir)/bootstrap/$(@D)
|
||||
$(AM_V_GEN)cp $@ $(@:cc=h) $(top_srcdir)/bootstrap/$(@D);
|
||||
else
|
||||
# copy bootstrap files
|
||||
.ypp.cc:
|
||||
$(AM_V_at)$(MKDIR_P) $(@D)
|
||||
$(AM_V_GEN)cp $(top_srcdir)/bootstrap/$(@:cc=*) $(@D)
|
||||
$(AM_V_GEN)cp $(top_srcdir)/bootstrap/$(@:cc=*) $(@D);
|
||||
$(AM_V_at)echo "Reconfigure with --enable-parsers to regenerate $@"
|
||||
endif
|
||||
|
||||
# re2c-generated lexer depends on bison-generated parser header (generated by the parser rule)
|
||||
src/parse/lexer.cc : src/parse/parser.cc
|
||||
src/parse/conf_lexer.cc : src/parse/conf_parser.cc
|
||||
# lexer depends on bison-generated header
|
||||
$(re2c_GEN_LEX): $(re2c_GEN_PARSER)
|
||||
|
||||
# rebuild all re2c sources using newly built re2c
|
||||
.PHONY: bootstrap
|
||||
@@ -685,34 +383,55 @@ bootstrap: all
|
||||
|
||||
.PHONY: docs
|
||||
if REBUILD_DOCS
|
||||
docs: $(DOCS) $(re2c_GEN_HELP)
|
||||
RST2TXT = $(top_srcdir)/build/rst2txt.py
|
||||
RST2MAN = $(top_srcdir)/build/rst2man.py
|
||||
SPLITMAN = $(top_srcdir)/build/split_man.py
|
||||
docs: $(DOCS) $(HELP)
|
||||
$(DOCS) $(HELP) : $(re2c_SRC_DOC_EXT) $(SPLITMAN) $(RST2MAN) $(RST2TXT)
|
||||
# generate manpage
|
||||
.rst.1:
|
||||
# generate manpage for C
|
||||
$(DOC_C): $(re2c_SRC_DOC) $(re2c_SRC_DOC_EXT) $(SPLITMAN) $(RST2MAN)
|
||||
$(AM_V_at)$(MKDIR_P) $(@D)
|
||||
$(AM_V_GEN)$(PYTHON) $(SPLITMAN) $(top_builddir)/$< $(top_builddir)/$< \
|
||||
&& $(PYTHON) $(RST2MAN) --tab-width=4 $(top_builddir)/$< > $@ \
|
||||
&& cp $@ $(top_srcdir)/bootstrap/$@
|
||||
$(AM_V_GEN)$(PYTHON) $(SPLITMAN) $(top_builddir)/$(re2c_SRC_DOC) $(top_builddir)/$(re2c_SRC_DOC).c c \
|
||||
&& $(PYTHON) $(RST2MAN) --tab-width=4 $(top_builddir)/$(re2c_SRC_DOC).c > $@ \
|
||||
&& cp $@ $(top_srcdir)/$(re2c_BOOT_DOC_C) \
|
||||
&& rm $(top_builddir)/$(re2c_SRC_DOC).c
|
||||
# generate manpage for Go
|
||||
$(DOC_GO): $(re2c_SRC_DOC) $(re2c_SRC_DOC_EXT) $(SPLITMAN) $(RST2MAN)
|
||||
$(AM_V_at)$(MKDIR_P) $(@D)
|
||||
$(AM_V_GEN)$(PYTHON) $(SPLITMAN) $(top_builddir)/$(re2c_SRC_DOC) $(top_builddir)/$(re2c_SRC_DOC).go go \
|
||||
&& $(PYTHON) $(RST2MAN) --tab-width=4 $(top_builddir)/$(re2c_SRC_DOC).go > $@ \
|
||||
&& cp $@ $(top_srcdir)/$(re2c_BOOT_DOC_GO) \
|
||||
&& rm $(top_builddir)/$(re2c_SRC_DOC).go
|
||||
# generate manpage for Rust
|
||||
$(DOC_RUST): $(re2c_SRC_DOC) $(re2c_SRC_DOC_EXT) $(SPLITMAN) $(RST2MAN)
|
||||
$(AM_V_at)$(MKDIR_P) $(@D)
|
||||
$(AM_V_GEN)$(PYTHON) $(SPLITMAN) $(top_builddir)/$(re2c_SRC_DOC) $(top_builddir)/$(re2c_SRC_DOC).rust rust \
|
||||
&& $(PYTHON) $(RST2MAN) --tab-width=4 $(top_builddir)/$(re2c_SRC_DOC).rust > $@ \
|
||||
&& cp $@ $(top_srcdir)/$(re2c_BOOT_DOC_RUST) \
|
||||
&& rm $(top_builddir)/$(re2c_SRC_DOC).rust
|
||||
# generate help
|
||||
.rst.cc:
|
||||
$(re2c_GEN_HELP): $(re2c_CUSTOM_HELP) $(re2c_SRC_DOC_EXT) $(RST2TXT)
|
||||
$(AM_V_at)$(MKDIR_P) $(@D)
|
||||
$(AM_V_GEN)$(PYTHON) $(SPLITMAN) $(top_builddir)/$< $(top_builddir)/$< \
|
||||
&& $(PYTHON) $(RST2TXT) --variable-name=help $(top_builddir)/$< $@ \
|
||||
&& cp $@ $(top_srcdir)/bootstrap/$@
|
||||
$(AM_V_GEN)$(PYTHON) $(RST2TXT) --variable-name=help $(top_builddir)/$(re2c_CUSTOM_HELP) $@ \
|
||||
&& cp $@ $(top_srcdir)/$(re2c_BOOT_HELP)
|
||||
else
|
||||
docs: $(DOCS) $(HELP)
|
||||
docs: $(DOCS) $(re2c_GEN_HELP)
|
||||
$(AM_V_at)echo "Reconfigure with --enable-docs to rebuild docs"
|
||||
# copy bootstrap manpage
|
||||
.rst.1:
|
||||
# copy bootstrap manpage for C
|
||||
$(DOC_C): $(re2c_BOOT_DOC_C)
|
||||
$(AM_V_at)$(MKDIR_P) $(@D)
|
||||
$(AM_V_GEN)cp $(top_srcdir)/bootstrap/$@ $@
|
||||
$(AM_V_GEN)cp $(top_srcdir)/$(re2c_BOOT_DOC_C) $@
|
||||
# copy bootstrap manpage for Go
|
||||
$(DOC_GO): $(re2c_BOOT_DOC_GO)
|
||||
$(AM_V_at)$(MKDIR_P) $(@D)
|
||||
$(AM_V_GEN)cp $(top_srcdir)/$(re2c_BOOT_DOC_GO) $@
|
||||
# copy bootstrap manpage for Rust
|
||||
$(DOC_RUST): $(re2c_BOOT_DOC_RUST)
|
||||
$(AM_V_at)$(MKDIR_P) $(@D)
|
||||
$(AM_V_GEN)cp $(top_srcdir)/$(re2c_BOOT_DOC_RUST) $@
|
||||
# copy bootstrap help
|
||||
.rst.cc:
|
||||
$(re2c_GEN_HELP): $(re2c_BOOT_HELP)
|
||||
$(AM_V_at)$(MKDIR_P) $(@D)
|
||||
$(AM_V_GEN)cp $(top_srcdir)/bootstrap/$@ $@
|
||||
$(AM_V_GEN)cp $(top_srcdir)/$(re2c_BOOT_HELP) $@
|
||||
endif
|
||||
|
||||
all-local: docs $(re2c_BOOT_PARSER)
|
||||
@@ -729,9 +448,6 @@ vtests: all $(re2c_TESTSUITE)
|
||||
wtests: all $(re2c_TESTSUITE)
|
||||
$(PYTHON) $(top_builddir)/$(re2c_TESTSUITE) --wine -j1
|
||||
|
||||
re2c_test_list_SOURCES = \
|
||||
src/test/list/test.cc
|
||||
|
||||
re2c_test_range_SOURCES = \
|
||||
src/test/range/test-impl.h \
|
||||
src/test/range/test.cc \
|
||||
@@ -745,13 +461,12 @@ re2c_test_s_to_n32_unsafe_SOURCES = \
|
||||
|
||||
re2c_test_ver_to_vernum_SOURCES = \
|
||||
src/test/ver_to_vernum/test.cc \
|
||||
src/msg/ver_to_vernum.cc
|
||||
$(re2c_GEN_VER_TO_VERNUM)
|
||||
|
||||
re2c_test_argsubst_SOURCES = \
|
||||
src/test/argsubst/test.cc
|
||||
|
||||
check_PROGRAMS = \
|
||||
re2c_test_list \
|
||||
re2c_test_range \
|
||||
re2c_test_s_to_n32_unsafe \
|
||||
re2c_test_ver_to_vernum \
|
||||
@@ -763,8 +478,8 @@ TESTS = \
|
||||
|
||||
# benchmarks
|
||||
if WITH_BENCHMARKS
|
||||
SUBDIRS += benchmarks/c
|
||||
EXTRA_DIST += benchmarks/c
|
||||
SUBDIRS += benchmarks/submatch_dfa_aot
|
||||
EXTRA_DIST += benchmarks/submatch_dfa_aot
|
||||
endif
|
||||
|
||||
# libre2c
|
||||
@@ -774,82 +489,18 @@ lib_LTLIBRARIES =
|
||||
include $(top_srcdir)/Makefile.lib.am
|
||||
endif
|
||||
|
||||
# re2d
|
||||
if WITH_DLANG
|
||||
bin_PROGRAMS += re2d
|
||||
re2d_CXXFLAGS = $(AM_CXXFLAGS) -DRE2C_LANG=Lang::D -DRE2C_PROG=\"re2d\"
|
||||
re2d_SOURCES = $(re2c_SOURCES)
|
||||
nodist_re2d_SOURCES = $(re2c_GEN) src/msg/help_re2d.cc
|
||||
endif
|
||||
|
||||
# re2go
|
||||
if WITH_GOLANG
|
||||
bin_PROGRAMS += re2go
|
||||
re2go_CXXFLAGS = $(AM_CXXFLAGS) -DRE2C_LANG=Lang::GO -DRE2C_PROG=\"re2go\"
|
||||
re2go_CXXFLAGS = $(AM_CXXFLAGS) -DRE2C_LANG=Lang::GO
|
||||
re2go_SOURCES = $(re2c_SOURCES)
|
||||
nodist_re2go_SOURCES = $(re2c_GEN) src/msg/help_re2go.cc
|
||||
endif
|
||||
|
||||
# re2hs
|
||||
if WITH_HASKELL
|
||||
bin_PROGRAMS += re2hs
|
||||
re2hs_CXXFLAGS = $(AM_CXXFLAGS) -DRE2C_LANG=Lang::HASKELL -DRE2C_PROG=\"re2hs\"
|
||||
re2hs_SOURCES = $(re2c_SOURCES)
|
||||
nodist_re2hs_SOURCES = $(re2c_GEN) src/msg/help_re2hs.cc
|
||||
endif
|
||||
|
||||
# re2java
|
||||
if WITH_JAVA
|
||||
bin_PROGRAMS += re2java
|
||||
re2java_CXXFLAGS = $(AM_CXXFLAGS) -DRE2C_LANG=Lang::JAVA -DRE2C_PROG=\"re2java\"
|
||||
re2java_SOURCES = $(re2c_SOURCES)
|
||||
nodist_re2java_SOURCES = $(re2c_GEN) src/msg/help_re2java.cc
|
||||
endif
|
||||
|
||||
# re2js
|
||||
if WITH_JS
|
||||
bin_PROGRAMS += re2js
|
||||
re2js_CXXFLAGS = $(AM_CXXFLAGS) -DRE2C_LANG=Lang::JS -DRE2C_PROG=\"re2js\"
|
||||
re2js_SOURCES = $(re2c_SOURCES)
|
||||
nodist_re2js_SOURCES = $(re2c_GEN) src/msg/help_re2js.cc
|
||||
endif
|
||||
|
||||
# re2ocaml
|
||||
if WITH_OCAML
|
||||
bin_PROGRAMS += re2ocaml
|
||||
re2ocaml_CXXFLAGS = $(AM_CXXFLAGS) -DRE2C_LANG=Lang::OCAML -DRE2C_PROG=\"re2ocaml\"
|
||||
re2ocaml_SOURCES = $(re2c_SOURCES)
|
||||
nodist_re2ocaml_SOURCES = $(re2c_GEN) src/msg/help_re2ocaml.cc
|
||||
endif
|
||||
|
||||
# re2py
|
||||
if WITH_PYTHON
|
||||
bin_PROGRAMS += re2py
|
||||
re2py_CXXFLAGS = $(AM_CXXFLAGS) -DRE2C_LANG=Lang::PYTHON -DRE2C_PROG=\"re2py\"
|
||||
re2py_SOURCES = $(re2c_SOURCES)
|
||||
nodist_re2py_SOURCES = $(re2c_GEN) src/msg/help_re2py.cc
|
||||
nodist_re2go_SOURCES = $(nodist_re2c_SOURCES)
|
||||
endif
|
||||
|
||||
# re2rust
|
||||
if WITH_RUST
|
||||
bin_PROGRAMS += re2rust
|
||||
re2rust_CXXFLAGS = $(AM_CXXFLAGS) -DRE2C_LANG=Lang::RUST -DRE2C_PROG=\"re2rust\"
|
||||
re2rust_CXXFLAGS = $(AM_CXXFLAGS) -DRE2C_LANG=Lang::RUST
|
||||
re2rust_SOURCES = $(re2c_SOURCES)
|
||||
nodist_re2rust_SOURCES = $(re2c_GEN) src/msg/help_re2rust.cc
|
||||
endif
|
||||
|
||||
# re2v
|
||||
if WITH_VLANG
|
||||
bin_PROGRAMS += re2v
|
||||
re2v_CXXFLAGS = $(AM_CXXFLAGS) -DRE2C_LANG=Lang::V -DRE2C_PROG=\"re2v\"
|
||||
re2v_SOURCES = $(re2c_SOURCES)
|
||||
nodist_re2v_SOURCES = $(re2c_GEN) src/msg/help_re2v.cc
|
||||
endif
|
||||
|
||||
# re2zig
|
||||
if WITH_ZIG
|
||||
bin_PROGRAMS += re2zig
|
||||
re2zig_CXXFLAGS = $(AM_CXXFLAGS) -DRE2C_LANG=Lang::ZIG -DRE2C_PROG=\"re2zig\"
|
||||
re2zig_SOURCES = $(re2c_SOURCES)
|
||||
nodist_re2zig_SOURCES = $(re2c_GEN) src/msg/help_re2zig.cc
|
||||
nodist_re2rust_SOURCES = $(nodist_re2c_SOURCES)
|
||||
endif
|
||||
+6
-6
@@ -169,12 +169,12 @@ check_PROGRAMS += test_libre2c
|
||||
|
||||
# benchmarks
|
||||
if WITH_BENCHMARKS
|
||||
SUBDIRS += benchmarks/c/libre2c/nfa
|
||||
SUBDIRS += benchmarks/c/libre2c/jit
|
||||
EXTRA_DIST += benchmarks/c/libre2c/nfa
|
||||
EXTRA_DIST += benchmarks/c/libre2c/jit
|
||||
SUBDIRS += benchmarks/submatch_nfa
|
||||
SUBDIRS += benchmarks/submatch_dfa_jit
|
||||
EXTRA_DIST += benchmarks/submatch_nfa
|
||||
EXTRA_DIST += benchmarks/submatch_dfa_jit
|
||||
if WITH_JAVA
|
||||
SUBDIRS += benchmarks/c/libre2c/java
|
||||
EXTRA_DIST += benchmarks/c/libre2c/java
|
||||
SUBDIRS += benchmarks/submatch_java
|
||||
EXTRA_DIST += benchmarks/submatch_java
|
||||
endif # WITH_JAVA
|
||||
endif # WITH_BENCHMARKS
|
||||
+3
-3
@@ -14,12 +14,12 @@ _RE2C_EXT = [".re", ".re2c"]
|
||||
def _re2c_impl(ctx):
|
||||
srcs = ctx.files.srcs
|
||||
if len(srcs) != 1:
|
||||
fail("Attribute `srcs` must contain exactly 1 re2c source file ({exts}).".format(exts = ", ".join(_RE2C_EXT)))
|
||||
fail("Attribute `srcs` must contain exactly 1 re2c source file ({exts}).".format(exts=", ".join(_RE2C_EXT)))
|
||||
outs = ctx.outputs.outs
|
||||
if not outs or [o for o in outs if paths.split_extension(o.path)[1] not in _C_SRC_EXT + _C_HDR_EXT]:
|
||||
fail("Attribute `outs` must contain at least 1 C/C++ shource or header file ({exts}).".format(exts = ", ".join(_C_SRC_EXT + _C_HDR_EXT)))
|
||||
fail("Attribute `outs` must contain at least 1 C/C++ shource or header file ({exts}).".format(exts=", ".join(_C_SRC_EXT + _C_HDR_EXT)))
|
||||
ctx.actions.run_shell(
|
||||
outputs = outs,
|
||||
outputs = outs + [err_file],
|
||||
tools = [ctx.executable._re2c_tool],
|
||||
inputs = ctx.files.srcs + ctx.files.data,
|
||||
command = """
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
ragel/submatch_21__cat2_4
|
||||
ragel/submatch_22__cat2_8
|
||||
ragel/submatch_24__cat4_2
|
||||
ragel/submatch_25__cat4_4
|
||||
ragel/submatch_28__cat8_2
|
||||
ragel/submatch_33__rep_alt_5_3_2
|
||||
ragel/submatch_34__rep_alt_13_11_7
|
||||
ragel/submatch_35__rep_alt_23_19_17
|
||||
ragel/submatch_36__rep_5_rep_3_rep_2
|
||||
ragel/submatch_37__rep_13_rep_11_rep_7
|
||||
ragel/submatch_38__rep_23_rep_19_rep_17
|
||||
@@ -1,21 +0,0 @@
|
||||
add_executable(bench_submatch_jit
|
||||
"bench.cc"
|
||||
"${CMAKE_SOURCE_DIR}/benchmarks/c/common/common.cc"
|
||||
)
|
||||
|
||||
target_link_libraries(bench_submatch_jit libre2c)
|
||||
|
||||
find_package(benchmark REQUIRED)
|
||||
target_link_libraries(bench_submatch_jit benchmark::benchmark)
|
||||
|
||||
# if present, re2 is used for benchmarks
|
||||
find_path(RE2_INCLUDE_DIRECTORY "re2/re2.h")
|
||||
find_library(RE2_LIBRARY re2)
|
||||
if(RE2_INCLUDE_DIRECTORY AND RE2_LIBRARY)
|
||||
set_target_properties(bench_submatch_jit PROPERTIES
|
||||
CXX_STANDARD 17
|
||||
CXX_STANDARD_REQUIRED ON)
|
||||
target_compile_definitions(bench_submatch_jit PRIVATE "HAVE_RE2_RE2_H=1")
|
||||
target_include_directories(bench_submatch_jit PRIVATE "${RE2_INCLUDE_DIRECTORY}")
|
||||
target_link_libraries(bench_submatch_jit "${RE2_LIBRARY}")
|
||||
endif()
|
||||
@@ -1,17 +0,0 @@
|
||||
bench_submatch_jit_CXXFLAGS = $(AM_CXXFLAGS) -O3 -I $(top_srcdir)
|
||||
bench_submatch_jit_LDFLAGS = $(LDFLAGS_RE2) -lbenchmark -lpthread
|
||||
bench_submatch_jit_LDADD = $(top_builddir)/libre2c.la
|
||||
|
||||
noinst_PROGRAMS = bench_submatch_jit
|
||||
|
||||
bench_submatch_jit_SOURCES = bench.cc \
|
||||
$(top_srcdir)/benchmarks/c/common/common.cc \
|
||||
$(top_srcdir)/benchmarks/c/common/common.h \
|
||||
$(top_srcdir)/benchmarks/c/common/strings_atom.h \
|
||||
$(top_srcdir)/benchmarks/c/common/strings_date.h \
|
||||
$(top_srcdir)/benchmarks/c/common/strings_http.h \
|
||||
$(top_srcdir)/benchmarks/c/common/strings_ipv4.h \
|
||||
$(top_srcdir)/benchmarks/c/common/strings_ipv6.h \
|
||||
$(top_srcdir)/benchmarks/c/common/strings_uri.h
|
||||
|
||||
all-local: bench_submatch_jit
|
||||
@@ -1,17 +0,0 @@
|
||||
bench_submatch_nfa_CXXFLAGS = $(AM_CXXFLAGS) -O3 -I $(top_srcdir)
|
||||
bench_submatch_nfa_LDFLAGS = $(LDFLAGS_RE2) -lbenchmark -lpthread
|
||||
bench_submatch_nfa_LDADD = $(top_builddir)/libre2c.la
|
||||
|
||||
noinst_PROGRAMS = bench_submatch_nfa
|
||||
|
||||
bench_submatch_nfa_SOURCES = bench.cc \
|
||||
$(top_srcdir)/benchmarks/c/common/common.cc \
|
||||
$(top_srcdir)/benchmarks/c/common/common.h \
|
||||
$(top_srcdir)/benchmarks/c/common/strings_atom.h \
|
||||
$(top_srcdir)/benchmarks/c/common/strings_date.h \
|
||||
$(top_srcdir)/benchmarks/c/common/strings_http.h \
|
||||
$(top_srcdir)/benchmarks/c/common/strings_ipv4.h \
|
||||
$(top_srcdir)/benchmarks/c/common/strings_ipv6.h \
|
||||
$(top_srcdir)/benchmarks/c/common/strings_uri.h
|
||||
|
||||
all-local: bench_submatch_nfa
|
||||
@@ -1,389 +0,0 @@
|
||||
#line 1 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
#include <assert.h>
|
||||
#include "ragel/common.c"
|
||||
|
||||
const char *delim = "\n";
|
||||
|
||||
|
||||
#line 35 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
|
||||
|
||||
|
||||
#line 10 "gen/ragel/submatch_13__alt2_2.c"
|
||||
static const int m_start = 5;
|
||||
static const int m_first_final = 5;
|
||||
static const int m_error = 0;
|
||||
|
||||
static const int m_en_main = 5;
|
||||
|
||||
|
||||
#line 37 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
|
||||
|
||||
static void lex(Input *in, Output *out)
|
||||
{
|
||||
char *p = in->p;
|
||||
char *pe = in->pe;
|
||||
const char
|
||||
*a1, *b1,
|
||||
*a2, *b2,
|
||||
*a3, *b3,
|
||||
*a4, *b4;
|
||||
int cs;
|
||||
|
||||
|
||||
#line 30 "gen/ragel/submatch_13__alt2_2.c"
|
||||
{
|
||||
cs = (int)m_start;
|
||||
}
|
||||
|
||||
#line 50 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
|
||||
|
||||
#line 35 "gen/ragel/submatch_13__alt2_2.c"
|
||||
{
|
||||
switch ( cs ) {
|
||||
case 5:
|
||||
goto st_case_5;
|
||||
case 0:
|
||||
goto st_case_0;
|
||||
case 1:
|
||||
goto st_case_1;
|
||||
case 2:
|
||||
goto st_case_2;
|
||||
case 3:
|
||||
goto st_case_3;
|
||||
case 4:
|
||||
goto st_case_4;
|
||||
}
|
||||
_ctr2:
|
||||
{
|
||||
#line 20 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
a2 = p; b1 = b2 = NULL; }
|
||||
|
||||
#line 55 "gen/ragel/submatch_13__alt2_2.c"
|
||||
|
||||
{
|
||||
#line 23 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
b3 = p; }
|
||||
|
||||
#line 60 "gen/ragel/submatch_13__alt2_2.c"
|
||||
|
||||
{
|
||||
#line 23 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
b4 = p; a3 = a4 = NULL; }
|
||||
|
||||
#line 65 "gen/ragel/submatch_13__alt2_2.c"
|
||||
|
||||
{
|
||||
#line 24 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 70 "gen/ragel/submatch_13__alt2_2.c"
|
||||
|
||||
{
|
||||
#line 24 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
a4 = p; b3 = b4 = NULL; }
|
||||
|
||||
#line 75 "gen/ragel/submatch_13__alt2_2.c"
|
||||
|
||||
{
|
||||
#line 26 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
|
||||
if (a1) { outc(out, 'A'); outs(out, a1, a2); }
|
||||
else if (b1) { outc(out, 'B'); outs(out, b1, b2); }
|
||||
if (a3) { outc(out, 'A'); outs(out, a3, a4); }
|
||||
else if (b3) { outc(out, 'B'); outs(out, b3, b4); }
|
||||
outc(out, '\n');
|
||||
}
|
||||
|
||||
#line 86 "gen/ragel/submatch_13__alt2_2.c"
|
||||
|
||||
goto _st5;
|
||||
_ctr5:
|
||||
{
|
||||
#line 23 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
b4 = p; a3 = a4 = NULL; }
|
||||
|
||||
#line 93 "gen/ragel/submatch_13__alt2_2.c"
|
||||
|
||||
{
|
||||
#line 26 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
|
||||
if (a1) { outc(out, 'A'); outs(out, a1, a2); }
|
||||
else if (b1) { outc(out, 'B'); outs(out, b1, b2); }
|
||||
if (a3) { outc(out, 'A'); outs(out, a3, a4); }
|
||||
else if (b3) { outc(out, 'B'); outs(out, b3, b4); }
|
||||
outc(out, '\n');
|
||||
}
|
||||
|
||||
#line 104 "gen/ragel/submatch_13__alt2_2.c"
|
||||
|
||||
goto _st5;
|
||||
_ctr7:
|
||||
{
|
||||
#line 19 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
b2 = p; a1 = a2 = NULL; }
|
||||
|
||||
#line 111 "gen/ragel/submatch_13__alt2_2.c"
|
||||
|
||||
{
|
||||
#line 23 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
b3 = p; }
|
||||
|
||||
#line 116 "gen/ragel/submatch_13__alt2_2.c"
|
||||
|
||||
{
|
||||
#line 23 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
b4 = p; a3 = a4 = NULL; }
|
||||
|
||||
#line 121 "gen/ragel/submatch_13__alt2_2.c"
|
||||
|
||||
{
|
||||
#line 24 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 126 "gen/ragel/submatch_13__alt2_2.c"
|
||||
|
||||
{
|
||||
#line 24 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
a4 = p; b3 = b4 = NULL; }
|
||||
|
||||
#line 131 "gen/ragel/submatch_13__alt2_2.c"
|
||||
|
||||
{
|
||||
#line 26 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
|
||||
if (a1) { outc(out, 'A'); outs(out, a1, a2); }
|
||||
else if (b1) { outc(out, 'B'); outs(out, b1, b2); }
|
||||
if (a3) { outc(out, 'A'); outs(out, a3, a4); }
|
||||
else if (b3) { outc(out, 'B'); outs(out, b3, b4); }
|
||||
outc(out, '\n');
|
||||
}
|
||||
|
||||
#line 142 "gen/ragel/submatch_13__alt2_2.c"
|
||||
|
||||
goto _st5;
|
||||
_ctr10:
|
||||
{
|
||||
#line 24 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
a4 = p; b3 = b4 = NULL; }
|
||||
|
||||
#line 149 "gen/ragel/submatch_13__alt2_2.c"
|
||||
|
||||
{
|
||||
#line 26 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
|
||||
if (a1) { outc(out, 'A'); outs(out, a1, a2); }
|
||||
else if (b1) { outc(out, 'B'); outs(out, b1, b2); }
|
||||
if (a3) { outc(out, 'A'); outs(out, a3, a4); }
|
||||
else if (b3) { outc(out, 'B'); outs(out, b3, b4); }
|
||||
outc(out, '\n');
|
||||
}
|
||||
|
||||
#line 160 "gen/ragel/submatch_13__alt2_2.c"
|
||||
|
||||
goto _st5;
|
||||
_ctr12:
|
||||
{
|
||||
#line 19 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
b1 = p; }
|
||||
|
||||
#line 167 "gen/ragel/submatch_13__alt2_2.c"
|
||||
|
||||
{
|
||||
#line 19 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
b2 = p; a1 = a2 = NULL; }
|
||||
|
||||
#line 172 "gen/ragel/submatch_13__alt2_2.c"
|
||||
|
||||
{
|
||||
#line 20 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
a1 = p; }
|
||||
|
||||
#line 177 "gen/ragel/submatch_13__alt2_2.c"
|
||||
|
||||
{
|
||||
#line 20 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
a2 = p; b1 = b2 = NULL; }
|
||||
|
||||
#line 182 "gen/ragel/submatch_13__alt2_2.c"
|
||||
|
||||
{
|
||||
#line 23 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
b3 = p; }
|
||||
|
||||
#line 187 "gen/ragel/submatch_13__alt2_2.c"
|
||||
|
||||
{
|
||||
#line 23 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
b4 = p; a3 = a4 = NULL; }
|
||||
|
||||
#line 192 "gen/ragel/submatch_13__alt2_2.c"
|
||||
|
||||
{
|
||||
#line 24 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 197 "gen/ragel/submatch_13__alt2_2.c"
|
||||
|
||||
{
|
||||
#line 24 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
a4 = p; b3 = b4 = NULL; }
|
||||
|
||||
#line 202 "gen/ragel/submatch_13__alt2_2.c"
|
||||
|
||||
{
|
||||
#line 26 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
|
||||
if (a1) { outc(out, 'A'); outs(out, a1, a2); }
|
||||
else if (b1) { outc(out, 'B'); outs(out, b1, b2); }
|
||||
if (a3) { outc(out, 'A'); outs(out, a3, a4); }
|
||||
else if (b3) { outc(out, 'B'); outs(out, b3, b4); }
|
||||
outc(out, '\n');
|
||||
}
|
||||
|
||||
#line 213 "gen/ragel/submatch_13__alt2_2.c"
|
||||
|
||||
goto _st5;
|
||||
_st5:
|
||||
p+= 1;
|
||||
st_case_5:
|
||||
if ( p == pe )
|
||||
goto _out5;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr12;
|
||||
}
|
||||
case 97: {
|
||||
goto _ctr13;
|
||||
}
|
||||
case 98: {
|
||||
goto _ctr14;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_st0:
|
||||
st_case_0:
|
||||
goto _out0;
|
||||
_ctr13:
|
||||
{
|
||||
#line 20 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
a1 = p; }
|
||||
|
||||
#line 240 "gen/ragel/submatch_13__alt2_2.c"
|
||||
|
||||
goto _st1;
|
||||
_st1:
|
||||
p+= 1;
|
||||
st_case_1:
|
||||
if ( p == pe )
|
||||
goto _out1;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr2;
|
||||
}
|
||||
case 97: {
|
||||
goto _st1;
|
||||
}
|
||||
case 98: {
|
||||
goto _ctr3;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_ctr3:
|
||||
{
|
||||
#line 20 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
a2 = p; b1 = b2 = NULL; }
|
||||
|
||||
#line 264 "gen/ragel/submatch_13__alt2_2.c"
|
||||
|
||||
{
|
||||
#line 23 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
b3 = p; }
|
||||
|
||||
#line 269 "gen/ragel/submatch_13__alt2_2.c"
|
||||
|
||||
goto _st2;
|
||||
_st2:
|
||||
p+= 1;
|
||||
st_case_2:
|
||||
if ( p == pe )
|
||||
goto _out2;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr5;
|
||||
}
|
||||
case 98: {
|
||||
goto _st2;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_ctr14:
|
||||
{
|
||||
#line 19 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
b1 = p; }
|
||||
|
||||
#line 290 "gen/ragel/submatch_13__alt2_2.c"
|
||||
|
||||
goto _st3;
|
||||
_st3:
|
||||
p+= 1;
|
||||
st_case_3:
|
||||
if ( p == pe )
|
||||
goto _out3;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr7;
|
||||
}
|
||||
case 97: {
|
||||
goto _ctr8;
|
||||
}
|
||||
case 98: {
|
||||
goto _st3;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_ctr8:
|
||||
{
|
||||
#line 19 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
b2 = p; a1 = a2 = NULL; }
|
||||
|
||||
#line 314 "gen/ragel/submatch_13__alt2_2.c"
|
||||
|
||||
{
|
||||
#line 24 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 319 "gen/ragel/submatch_13__alt2_2.c"
|
||||
|
||||
goto _st4;
|
||||
_st4:
|
||||
p+= 1;
|
||||
st_case_4:
|
||||
if ( p == pe )
|
||||
goto _out4;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr10;
|
||||
}
|
||||
case 97: {
|
||||
goto _st4;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_out5: cs = 5; goto _out;
|
||||
_out0: cs = 0; goto _out;
|
||||
_out1: cs = 1; goto _out;
|
||||
_out2: cs = 2; goto _out;
|
||||
_out3: cs = 3; goto _out;
|
||||
_out4: cs = 4; goto _out;
|
||||
_out: {}
|
||||
}
|
||||
|
||||
#line 51 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
|
||||
|
||||
|
||||
in->p = p;
|
||||
in->pe = pe;
|
||||
}
|
||||
@@ -1,957 +0,0 @@
|
||||
#line 1 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
#include <assert.h>
|
||||
#include "ragel/common.c"
|
||||
|
||||
const char *delim = "\n";
|
||||
|
||||
|
||||
#line 43 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
|
||||
|
||||
|
||||
#line 10 "gen/ragel/submatch_14__alt2_4.c"
|
||||
static const int m_start = 9;
|
||||
static const int m_first_final = 9;
|
||||
static const int m_error = 0;
|
||||
|
||||
static const int m_en_main = 9;
|
||||
|
||||
|
||||
#line 45 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
|
||||
|
||||
static void lex(Input *in, Output *out)
|
||||
{
|
||||
char *p = in->p;
|
||||
char *pe = in->pe;
|
||||
const char
|
||||
*a1, *b1, *c1, *d1,
|
||||
*a2, *b2, *c2, *d2,
|
||||
*a3, *b3, *c3, *d3,
|
||||
*a4, *b4, *c4, *d4;
|
||||
int cs;
|
||||
|
||||
|
||||
#line 30 "gen/ragel/submatch_14__alt2_4.c"
|
||||
{
|
||||
cs = (int)m_start;
|
||||
}
|
||||
|
||||
#line 58 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
|
||||
|
||||
#line 35 "gen/ragel/submatch_14__alt2_4.c"
|
||||
{
|
||||
switch ( cs ) {
|
||||
case 9:
|
||||
goto st_case_9;
|
||||
case 0:
|
||||
goto st_case_0;
|
||||
case 1:
|
||||
goto st_case_1;
|
||||
case 2:
|
||||
goto st_case_2;
|
||||
case 3:
|
||||
goto st_case_3;
|
||||
case 4:
|
||||
goto st_case_4;
|
||||
case 5:
|
||||
goto st_case_5;
|
||||
case 6:
|
||||
goto st_case_6;
|
||||
case 7:
|
||||
goto st_case_7;
|
||||
case 8:
|
||||
goto st_case_8;
|
||||
}
|
||||
_ctr2:
|
||||
{
|
||||
#line 22 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
a2 = p; b1 = b2 = c1 = c2 = d1 = d2 = NULL; }
|
||||
|
||||
#line 63 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 25 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
b3 = p; }
|
||||
|
||||
#line 68 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 25 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
b4 = p; a3 = a4 = c3 = c4 = d3 = d4 = NULL; }
|
||||
|
||||
#line 73 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 26 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
c3 = p; }
|
||||
|
||||
#line 78 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 26 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
c4 = p; a3 = a4 = b3 = b4 = d3 = d4 = NULL; }
|
||||
|
||||
#line 83 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 27 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
d3 = p; }
|
||||
|
||||
#line 88 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 27 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
d4 = p; a3 = a4 = b3 = b4 = c3 = c4 = NULL; }
|
||||
|
||||
#line 93 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 28 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 98 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 28 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
a4 = p; b3 = b4 = c3 = c4 = d3 = d4 = NULL; }
|
||||
|
||||
#line 103 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 30 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
|
||||
if (a1) { outc(out, 'A'); outs(out, a1, a2); }
|
||||
else if (b1) { outc(out, 'B'); outs(out, b1, b2); }
|
||||
else if (c1) { outc(out, 'C'); outs(out, c1, c2); }
|
||||
else if (d1) { outc(out, 'D'); outs(out, d1, d2); }
|
||||
if (a3) { outc(out, 'A'); outs(out, a3, a4); }
|
||||
else if (b3) { outc(out, 'B'); outs(out, b3, b4); }
|
||||
else if (c3) { outc(out, 'C'); outs(out, c3, c4); }
|
||||
else if (d3) { outc(out, 'D'); outs(out, d3, d4); }
|
||||
outc(out, '\n');
|
||||
}
|
||||
|
||||
#line 118 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
goto _st9;
|
||||
_ctr7:
|
||||
{
|
||||
#line 25 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
b4 = p; a3 = a4 = c3 = c4 = d3 = d4 = NULL; }
|
||||
|
||||
#line 125 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 30 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
|
||||
if (a1) { outc(out, 'A'); outs(out, a1, a2); }
|
||||
else if (b1) { outc(out, 'B'); outs(out, b1, b2); }
|
||||
else if (c1) { outc(out, 'C'); outs(out, c1, c2); }
|
||||
else if (d1) { outc(out, 'D'); outs(out, d1, d2); }
|
||||
if (a3) { outc(out, 'A'); outs(out, a3, a4); }
|
||||
else if (b3) { outc(out, 'B'); outs(out, b3, b4); }
|
||||
else if (c3) { outc(out, 'C'); outs(out, c3, c4); }
|
||||
else if (d3) { outc(out, 'D'); outs(out, d3, d4); }
|
||||
outc(out, '\n');
|
||||
}
|
||||
|
||||
#line 140 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
goto _st9;
|
||||
_ctr9:
|
||||
{
|
||||
#line 26 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
c4 = p; a3 = a4 = b3 = b4 = d3 = d4 = NULL; }
|
||||
|
||||
#line 147 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 30 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
|
||||
if (a1) { outc(out, 'A'); outs(out, a1, a2); }
|
||||
else if (b1) { outc(out, 'B'); outs(out, b1, b2); }
|
||||
else if (c1) { outc(out, 'C'); outs(out, c1, c2); }
|
||||
else if (d1) { outc(out, 'D'); outs(out, d1, d2); }
|
||||
if (a3) { outc(out, 'A'); outs(out, a3, a4); }
|
||||
else if (b3) { outc(out, 'B'); outs(out, b3, b4); }
|
||||
else if (c3) { outc(out, 'C'); outs(out, c3, c4); }
|
||||
else if (d3) { outc(out, 'D'); outs(out, d3, d4); }
|
||||
outc(out, '\n');
|
||||
}
|
||||
|
||||
#line 162 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
goto _st9;
|
||||
_ctr11:
|
||||
{
|
||||
#line 27 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
d4 = p; a3 = a4 = b3 = b4 = c3 = c4 = NULL; }
|
||||
|
||||
#line 169 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 30 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
|
||||
if (a1) { outc(out, 'A'); outs(out, a1, a2); }
|
||||
else if (b1) { outc(out, 'B'); outs(out, b1, b2); }
|
||||
else if (c1) { outc(out, 'C'); outs(out, c1, c2); }
|
||||
else if (d1) { outc(out, 'D'); outs(out, d1, d2); }
|
||||
if (a3) { outc(out, 'A'); outs(out, a3, a4); }
|
||||
else if (b3) { outc(out, 'B'); outs(out, b3, b4); }
|
||||
else if (c3) { outc(out, 'C'); outs(out, c3, c4); }
|
||||
else if (d3) { outc(out, 'D'); outs(out, d3, d4); }
|
||||
outc(out, '\n');
|
||||
}
|
||||
|
||||
#line 184 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
goto _st9;
|
||||
_ctr13:
|
||||
{
|
||||
#line 19 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
b2 = p; a1 = a2 = c1 = c2 = d1 = d2 = NULL; }
|
||||
|
||||
#line 191 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 25 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
b3 = p; }
|
||||
|
||||
#line 196 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 25 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
b4 = p; a3 = a4 = c3 = c4 = d3 = d4 = NULL; }
|
||||
|
||||
#line 201 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 26 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
c3 = p; }
|
||||
|
||||
#line 206 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 26 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
c4 = p; a3 = a4 = b3 = b4 = d3 = d4 = NULL; }
|
||||
|
||||
#line 211 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 27 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
d3 = p; }
|
||||
|
||||
#line 216 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 27 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
d4 = p; a3 = a4 = b3 = b4 = c3 = c4 = NULL; }
|
||||
|
||||
#line 221 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 28 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 226 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 28 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
a4 = p; b3 = b4 = c3 = c4 = d3 = d4 = NULL; }
|
||||
|
||||
#line 231 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 30 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
|
||||
if (a1) { outc(out, 'A'); outs(out, a1, a2); }
|
||||
else if (b1) { outc(out, 'B'); outs(out, b1, b2); }
|
||||
else if (c1) { outc(out, 'C'); outs(out, c1, c2); }
|
||||
else if (d1) { outc(out, 'D'); outs(out, d1, d2); }
|
||||
if (a3) { outc(out, 'A'); outs(out, a3, a4); }
|
||||
else if (b3) { outc(out, 'B'); outs(out, b3, b4); }
|
||||
else if (c3) { outc(out, 'C'); outs(out, c3, c4); }
|
||||
else if (d3) { outc(out, 'D'); outs(out, d3, d4); }
|
||||
outc(out, '\n');
|
||||
}
|
||||
|
||||
#line 246 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
goto _st9;
|
||||
_ctr18:
|
||||
{
|
||||
#line 28 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
a4 = p; b3 = b4 = c3 = c4 = d3 = d4 = NULL; }
|
||||
|
||||
#line 253 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 30 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
|
||||
if (a1) { outc(out, 'A'); outs(out, a1, a2); }
|
||||
else if (b1) { outc(out, 'B'); outs(out, b1, b2); }
|
||||
else if (c1) { outc(out, 'C'); outs(out, c1, c2); }
|
||||
else if (d1) { outc(out, 'D'); outs(out, d1, d2); }
|
||||
if (a3) { outc(out, 'A'); outs(out, a3, a4); }
|
||||
else if (b3) { outc(out, 'B'); outs(out, b3, b4); }
|
||||
else if (c3) { outc(out, 'C'); outs(out, c3, c4); }
|
||||
else if (d3) { outc(out, 'D'); outs(out, d3, d4); }
|
||||
outc(out, '\n');
|
||||
}
|
||||
|
||||
#line 268 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
goto _st9;
|
||||
_ctr20:
|
||||
{
|
||||
#line 20 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
c2 = p; a1 = a2 = b1 = b2 = d1 = d2 = NULL; }
|
||||
|
||||
#line 275 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 25 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
b3 = p; }
|
||||
|
||||
#line 280 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 25 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
b4 = p; a3 = a4 = c3 = c4 = d3 = d4 = NULL; }
|
||||
|
||||
#line 285 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 26 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
c3 = p; }
|
||||
|
||||
#line 290 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 26 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
c4 = p; a3 = a4 = b3 = b4 = d3 = d4 = NULL; }
|
||||
|
||||
#line 295 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 27 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
d3 = p; }
|
||||
|
||||
#line 300 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 27 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
d4 = p; a3 = a4 = b3 = b4 = c3 = c4 = NULL; }
|
||||
|
||||
#line 305 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 28 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 310 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 28 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
a4 = p; b3 = b4 = c3 = c4 = d3 = d4 = NULL; }
|
||||
|
||||
#line 315 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 30 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
|
||||
if (a1) { outc(out, 'A'); outs(out, a1, a2); }
|
||||
else if (b1) { outc(out, 'B'); outs(out, b1, b2); }
|
||||
else if (c1) { outc(out, 'C'); outs(out, c1, c2); }
|
||||
else if (d1) { outc(out, 'D'); outs(out, d1, d2); }
|
||||
if (a3) { outc(out, 'A'); outs(out, a3, a4); }
|
||||
else if (b3) { outc(out, 'B'); outs(out, b3, b4); }
|
||||
else if (c3) { outc(out, 'C'); outs(out, c3, c4); }
|
||||
else if (d3) { outc(out, 'D'); outs(out, d3, d4); }
|
||||
outc(out, '\n');
|
||||
}
|
||||
|
||||
#line 330 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
goto _st9;
|
||||
_ctr25:
|
||||
{
|
||||
#line 21 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
d2 = p; a1 = a2 = b1 = b2 = c1 = c2 = NULL; }
|
||||
|
||||
#line 337 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 25 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
b3 = p; }
|
||||
|
||||
#line 342 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 25 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
b4 = p; a3 = a4 = c3 = c4 = d3 = d4 = NULL; }
|
||||
|
||||
#line 347 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 26 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
c3 = p; }
|
||||
|
||||
#line 352 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 26 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
c4 = p; a3 = a4 = b3 = b4 = d3 = d4 = NULL; }
|
||||
|
||||
#line 357 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 27 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
d3 = p; }
|
||||
|
||||
#line 362 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 27 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
d4 = p; a3 = a4 = b3 = b4 = c3 = c4 = NULL; }
|
||||
|
||||
#line 367 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 28 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 372 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 28 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
a4 = p; b3 = b4 = c3 = c4 = d3 = d4 = NULL; }
|
||||
|
||||
#line 377 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 30 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
|
||||
if (a1) { outc(out, 'A'); outs(out, a1, a2); }
|
||||
else if (b1) { outc(out, 'B'); outs(out, b1, b2); }
|
||||
else if (c1) { outc(out, 'C'); outs(out, c1, c2); }
|
||||
else if (d1) { outc(out, 'D'); outs(out, d1, d2); }
|
||||
if (a3) { outc(out, 'A'); outs(out, a3, a4); }
|
||||
else if (b3) { outc(out, 'B'); outs(out, b3, b4); }
|
||||
else if (c3) { outc(out, 'C'); outs(out, c3, c4); }
|
||||
else if (d3) { outc(out, 'D'); outs(out, d3, d4); }
|
||||
outc(out, '\n');
|
||||
}
|
||||
|
||||
#line 392 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
goto _st9;
|
||||
_ctr30:
|
||||
{
|
||||
#line 19 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
b1 = p; }
|
||||
|
||||
#line 399 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 19 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
b2 = p; a1 = a2 = c1 = c2 = d1 = d2 = NULL; }
|
||||
|
||||
#line 404 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 20 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
c1 = p; }
|
||||
|
||||
#line 409 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 20 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
c2 = p; a1 = a2 = b1 = b2 = d1 = d2 = NULL; }
|
||||
|
||||
#line 414 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 21 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
d1 = p; }
|
||||
|
||||
#line 419 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 21 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
d2 = p; a1 = a2 = b1 = b2 = c1 = c2 = NULL; }
|
||||
|
||||
#line 424 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 22 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
a1 = p; }
|
||||
|
||||
#line 429 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 22 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
a2 = p; b1 = b2 = c1 = c2 = d1 = d2 = NULL; }
|
||||
|
||||
#line 434 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 25 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
b3 = p; }
|
||||
|
||||
#line 439 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 25 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
b4 = p; a3 = a4 = c3 = c4 = d3 = d4 = NULL; }
|
||||
|
||||
#line 444 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 26 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
c3 = p; }
|
||||
|
||||
#line 449 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 26 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
c4 = p; a3 = a4 = b3 = b4 = d3 = d4 = NULL; }
|
||||
|
||||
#line 454 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 27 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
d3 = p; }
|
||||
|
||||
#line 459 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 27 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
d4 = p; a3 = a4 = b3 = b4 = c3 = c4 = NULL; }
|
||||
|
||||
#line 464 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 28 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 469 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 28 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
a4 = p; b3 = b4 = c3 = c4 = d3 = d4 = NULL; }
|
||||
|
||||
#line 474 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 30 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
|
||||
if (a1) { outc(out, 'A'); outs(out, a1, a2); }
|
||||
else if (b1) { outc(out, 'B'); outs(out, b1, b2); }
|
||||
else if (c1) { outc(out, 'C'); outs(out, c1, c2); }
|
||||
else if (d1) { outc(out, 'D'); outs(out, d1, d2); }
|
||||
if (a3) { outc(out, 'A'); outs(out, a3, a4); }
|
||||
else if (b3) { outc(out, 'B'); outs(out, b3, b4); }
|
||||
else if (c3) { outc(out, 'C'); outs(out, c3, c4); }
|
||||
else if (d3) { outc(out, 'D'); outs(out, d3, d4); }
|
||||
outc(out, '\n');
|
||||
}
|
||||
|
||||
#line 489 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
goto _st9;
|
||||
_st9:
|
||||
p+= 1;
|
||||
st_case_9:
|
||||
if ( p == pe )
|
||||
goto _out9;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr30;
|
||||
}
|
||||
case 97: {
|
||||
goto _ctr31;
|
||||
}
|
||||
case 98: {
|
||||
goto _ctr32;
|
||||
}
|
||||
case 99: {
|
||||
goto _ctr33;
|
||||
}
|
||||
case 100: {
|
||||
goto _ctr34;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_st0:
|
||||
st_case_0:
|
||||
goto _out0;
|
||||
_ctr31:
|
||||
{
|
||||
#line 22 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
a1 = p; }
|
||||
|
||||
#line 522 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
goto _st1;
|
||||
_st1:
|
||||
p+= 1;
|
||||
st_case_1:
|
||||
if ( p == pe )
|
||||
goto _out1;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr2;
|
||||
}
|
||||
case 97: {
|
||||
goto _st1;
|
||||
}
|
||||
case 98: {
|
||||
goto _ctr3;
|
||||
}
|
||||
case 99: {
|
||||
goto _ctr4;
|
||||
}
|
||||
case 100: {
|
||||
goto _ctr5;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_ctr3:
|
||||
{
|
||||
#line 22 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
a2 = p; b1 = b2 = c1 = c2 = d1 = d2 = NULL; }
|
||||
|
||||
#line 552 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 25 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
b3 = p; }
|
||||
|
||||
#line 557 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
goto _st2;
|
||||
_ctr22:
|
||||
{
|
||||
#line 20 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
c2 = p; a1 = a2 = b1 = b2 = d1 = d2 = NULL; }
|
||||
|
||||
#line 564 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 25 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
b3 = p; }
|
||||
|
||||
#line 569 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
goto _st2;
|
||||
_ctr27:
|
||||
{
|
||||
#line 21 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
d2 = p; a1 = a2 = b1 = b2 = c1 = c2 = NULL; }
|
||||
|
||||
#line 576 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 25 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
b3 = p; }
|
||||
|
||||
#line 581 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
goto _st2;
|
||||
_st2:
|
||||
p+= 1;
|
||||
st_case_2:
|
||||
if ( p == pe )
|
||||
goto _out2;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr7;
|
||||
}
|
||||
case 98: {
|
||||
goto _st2;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_ctr4:
|
||||
{
|
||||
#line 22 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
a2 = p; b1 = b2 = c1 = c2 = d1 = d2 = NULL; }
|
||||
|
||||
#line 602 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 26 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
c3 = p; }
|
||||
|
||||
#line 607 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
goto _st3;
|
||||
_ctr15:
|
||||
{
|
||||
#line 19 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
b2 = p; a1 = a2 = c1 = c2 = d1 = d2 = NULL; }
|
||||
|
||||
#line 614 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 26 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
c3 = p; }
|
||||
|
||||
#line 619 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
goto _st3;
|
||||
_ctr28:
|
||||
{
|
||||
#line 21 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
d2 = p; a1 = a2 = b1 = b2 = c1 = c2 = NULL; }
|
||||
|
||||
#line 626 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 26 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
c3 = p; }
|
||||
|
||||
#line 631 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
goto _st3;
|
||||
_st3:
|
||||
p+= 1;
|
||||
st_case_3:
|
||||
if ( p == pe )
|
||||
goto _out3;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr9;
|
||||
}
|
||||
case 99: {
|
||||
goto _st3;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_ctr5:
|
||||
{
|
||||
#line 22 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
a2 = p; b1 = b2 = c1 = c2 = d1 = d2 = NULL; }
|
||||
|
||||
#line 652 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 27 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
d3 = p; }
|
||||
|
||||
#line 657 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
goto _st4;
|
||||
_ctr16:
|
||||
{
|
||||
#line 19 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
b2 = p; a1 = a2 = c1 = c2 = d1 = d2 = NULL; }
|
||||
|
||||
#line 664 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 27 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
d3 = p; }
|
||||
|
||||
#line 669 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
goto _st4;
|
||||
_ctr23:
|
||||
{
|
||||
#line 20 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
c2 = p; a1 = a2 = b1 = b2 = d1 = d2 = NULL; }
|
||||
|
||||
#line 676 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 27 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
d3 = p; }
|
||||
|
||||
#line 681 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
goto _st4;
|
||||
_st4:
|
||||
p+= 1;
|
||||
st_case_4:
|
||||
if ( p == pe )
|
||||
goto _out4;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr11;
|
||||
}
|
||||
case 100: {
|
||||
goto _st4;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_ctr32:
|
||||
{
|
||||
#line 19 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
b1 = p; }
|
||||
|
||||
#line 702 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
goto _st5;
|
||||
_st5:
|
||||
p+= 1;
|
||||
st_case_5:
|
||||
if ( p == pe )
|
||||
goto _out5;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr13;
|
||||
}
|
||||
case 97: {
|
||||
goto _ctr14;
|
||||
}
|
||||
case 98: {
|
||||
goto _st5;
|
||||
}
|
||||
case 99: {
|
||||
goto _ctr15;
|
||||
}
|
||||
case 100: {
|
||||
goto _ctr16;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_ctr14:
|
||||
{
|
||||
#line 19 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
b2 = p; a1 = a2 = c1 = c2 = d1 = d2 = NULL; }
|
||||
|
||||
#line 732 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 28 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 737 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
goto _st6;
|
||||
_ctr21:
|
||||
{
|
||||
#line 20 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
c2 = p; a1 = a2 = b1 = b2 = d1 = d2 = NULL; }
|
||||
|
||||
#line 744 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 28 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 749 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
goto _st6;
|
||||
_ctr26:
|
||||
{
|
||||
#line 21 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
d2 = p; a1 = a2 = b1 = b2 = c1 = c2 = NULL; }
|
||||
|
||||
#line 756 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
{
|
||||
#line 28 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 761 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
goto _st6;
|
||||
_st6:
|
||||
p+= 1;
|
||||
st_case_6:
|
||||
if ( p == pe )
|
||||
goto _out6;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr18;
|
||||
}
|
||||
case 97: {
|
||||
goto _st6;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_ctr33:
|
||||
{
|
||||
#line 20 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
c1 = p; }
|
||||
|
||||
#line 782 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
goto _st7;
|
||||
_st7:
|
||||
p+= 1;
|
||||
st_case_7:
|
||||
if ( p == pe )
|
||||
goto _out7;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr20;
|
||||
}
|
||||
case 97: {
|
||||
goto _ctr21;
|
||||
}
|
||||
case 98: {
|
||||
goto _ctr22;
|
||||
}
|
||||
case 99: {
|
||||
goto _st7;
|
||||
}
|
||||
case 100: {
|
||||
goto _ctr23;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_ctr34:
|
||||
{
|
||||
#line 21 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
d1 = p; }
|
||||
|
||||
#line 812 "gen/ragel/submatch_14__alt2_4.c"
|
||||
|
||||
goto _st8;
|
||||
_st8:
|
||||
p+= 1;
|
||||
st_case_8:
|
||||
if ( p == pe )
|
||||
goto _out8;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr25;
|
||||
}
|
||||
case 97: {
|
||||
goto _ctr26;
|
||||
}
|
||||
case 98: {
|
||||
goto _ctr27;
|
||||
}
|
||||
case 99: {
|
||||
goto _ctr28;
|
||||
}
|
||||
case 100: {
|
||||
goto _st8;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_out9: cs = 9; goto _out;
|
||||
_out0: cs = 0; goto _out;
|
||||
_out1: cs = 1; goto _out;
|
||||
_out2: cs = 2; goto _out;
|
||||
_out3: cs = 3; goto _out;
|
||||
_out4: cs = 4; goto _out;
|
||||
_out5: cs = 5; goto _out;
|
||||
_out6: cs = 6; goto _out;
|
||||
_out7: cs = 7; goto _out;
|
||||
_out8: cs = 8; goto _out;
|
||||
_out: {}
|
||||
}
|
||||
|
||||
#line 59 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
|
||||
|
||||
|
||||
in->p = p;
|
||||
in->pe = pe;
|
||||
}
|
||||
@@ -1,933 +0,0 @@
|
||||
#line 1 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
#include <assert.h>
|
||||
#include "ragel/common.c"
|
||||
|
||||
const char *delim = "\n";
|
||||
|
||||
|
||||
#line 48 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
|
||||
|
||||
|
||||
#line 10 "gen/ragel/submatch_16__alt4_2.c"
|
||||
static const int m_start = 9;
|
||||
static const int m_first_final = 9;
|
||||
static const int m_error = 0;
|
||||
|
||||
static const int m_en_main = 9;
|
||||
|
||||
|
||||
#line 50 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
|
||||
|
||||
static void lex(Input *in, Output *out)
|
||||
{
|
||||
char *p = in->p;
|
||||
char *pe = in->pe;
|
||||
const char
|
||||
*a1, *b1,
|
||||
*a2, *b2,
|
||||
*a3, *b3,
|
||||
*a4, *b4,
|
||||
*a5, *b5,
|
||||
*a6, *b6,
|
||||
*a7, *b7,
|
||||
*a8, *b8;
|
||||
int cs;
|
||||
|
||||
|
||||
#line 34 "gen/ragel/submatch_16__alt4_2.c"
|
||||
{
|
||||
cs = (int)m_start;
|
||||
}
|
||||
|
||||
#line 67 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
|
||||
|
||||
#line 39 "gen/ragel/submatch_16__alt4_2.c"
|
||||
{
|
||||
switch ( cs ) {
|
||||
case 9:
|
||||
goto st_case_9;
|
||||
case 0:
|
||||
goto st_case_0;
|
||||
case 1:
|
||||
goto st_case_1;
|
||||
case 2:
|
||||
goto st_case_2;
|
||||
case 3:
|
||||
goto st_case_3;
|
||||
case 4:
|
||||
goto st_case_4;
|
||||
case 5:
|
||||
goto st_case_5;
|
||||
case 6:
|
||||
goto st_case_6;
|
||||
case 7:
|
||||
goto st_case_7;
|
||||
case 8:
|
||||
goto st_case_8;
|
||||
}
|
||||
_ctr2:
|
||||
{
|
||||
#line 21 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a2 = p; b1 = b2 = NULL; }
|
||||
|
||||
#line 67 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 24 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b3 = p; }
|
||||
|
||||
#line 72 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 24 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b4 = p; a3 = a4 = NULL; }
|
||||
|
||||
#line 77 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 25 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 82 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 25 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a4 = p; b3 = b4 = NULL; }
|
||||
|
||||
#line 87 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 28 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b5 = p; }
|
||||
|
||||
#line 92 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 28 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b6 = p; a5 = a6 = NULL; }
|
||||
|
||||
#line 97 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 29 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a5 = p; }
|
||||
|
||||
#line 102 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 29 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a6 = p; b5 = b6 = NULL; }
|
||||
|
||||
#line 107 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 32 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b7 = p; }
|
||||
|
||||
#line 112 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 32 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b8 = p; a7 = a8 = NULL; }
|
||||
|
||||
#line 117 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 33 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a7 = p; }
|
||||
|
||||
#line 122 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 33 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a8 = p; b7 = b8 = NULL; }
|
||||
|
||||
#line 127 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 35 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
|
||||
if (a1) { outc(out, 'A'); outs(out, a1, a2); }
|
||||
else if (b1) { outc(out, 'B'); outs(out, b1, b2); }
|
||||
if (a3) { outc(out, 'A'); outs(out, a3, a4); }
|
||||
else if (b3) { outc(out, 'B'); outs(out, b3, b4); }
|
||||
if (a5) { outc(out, 'A'); outs(out, a5, a6); }
|
||||
else if (b5) { outc(out, 'B'); outs(out, b5, b6); }
|
||||
if (a7) { outc(out, 'A'); outs(out, a7, a8); }
|
||||
else if (b7) { outc(out, 'B'); outs(out, b7, b8); }
|
||||
outc(out, '\n');
|
||||
}
|
||||
|
||||
#line 142 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
goto _st9;
|
||||
_ctr5:
|
||||
{
|
||||
#line 24 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b4 = p; a3 = a4 = NULL; }
|
||||
|
||||
#line 149 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 28 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b5 = p; }
|
||||
|
||||
#line 154 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 28 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b6 = p; a5 = a6 = NULL; }
|
||||
|
||||
#line 159 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 29 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a5 = p; }
|
||||
|
||||
#line 164 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 29 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a6 = p; b5 = b6 = NULL; }
|
||||
|
||||
#line 169 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 32 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b7 = p; }
|
||||
|
||||
#line 174 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 32 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b8 = p; a7 = a8 = NULL; }
|
||||
|
||||
#line 179 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 33 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a7 = p; }
|
||||
|
||||
#line 184 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 33 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a8 = p; b7 = b8 = NULL; }
|
||||
|
||||
#line 189 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 35 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
|
||||
if (a1) { outc(out, 'A'); outs(out, a1, a2); }
|
||||
else if (b1) { outc(out, 'B'); outs(out, b1, b2); }
|
||||
if (a3) { outc(out, 'A'); outs(out, a3, a4); }
|
||||
else if (b3) { outc(out, 'B'); outs(out, b3, b4); }
|
||||
if (a5) { outc(out, 'A'); outs(out, a5, a6); }
|
||||
else if (b5) { outc(out, 'B'); outs(out, b5, b6); }
|
||||
if (a7) { outc(out, 'A'); outs(out, a7, a8); }
|
||||
else if (b7) { outc(out, 'B'); outs(out, b7, b8); }
|
||||
outc(out, '\n');
|
||||
}
|
||||
|
||||
#line 204 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
goto _st9;
|
||||
_ctr8:
|
||||
{
|
||||
#line 29 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a6 = p; b5 = b6 = NULL; }
|
||||
|
||||
#line 211 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 32 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b7 = p; }
|
||||
|
||||
#line 216 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 32 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b8 = p; a7 = a8 = NULL; }
|
||||
|
||||
#line 221 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 33 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a7 = p; }
|
||||
|
||||
#line 226 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 33 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a8 = p; b7 = b8 = NULL; }
|
||||
|
||||
#line 231 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 35 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
|
||||
if (a1) { outc(out, 'A'); outs(out, a1, a2); }
|
||||
else if (b1) { outc(out, 'B'); outs(out, b1, b2); }
|
||||
if (a3) { outc(out, 'A'); outs(out, a3, a4); }
|
||||
else if (b3) { outc(out, 'B'); outs(out, b3, b4); }
|
||||
if (a5) { outc(out, 'A'); outs(out, a5, a6); }
|
||||
else if (b5) { outc(out, 'B'); outs(out, b5, b6); }
|
||||
if (a7) { outc(out, 'A'); outs(out, a7, a8); }
|
||||
else if (b7) { outc(out, 'B'); outs(out, b7, b8); }
|
||||
outc(out, '\n');
|
||||
}
|
||||
|
||||
#line 246 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
goto _st9;
|
||||
_ctr11:
|
||||
{
|
||||
#line 32 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b8 = p; a7 = a8 = NULL; }
|
||||
|
||||
#line 253 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 35 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
|
||||
if (a1) { outc(out, 'A'); outs(out, a1, a2); }
|
||||
else if (b1) { outc(out, 'B'); outs(out, b1, b2); }
|
||||
if (a3) { outc(out, 'A'); outs(out, a3, a4); }
|
||||
else if (b3) { outc(out, 'B'); outs(out, b3, b4); }
|
||||
if (a5) { outc(out, 'A'); outs(out, a5, a6); }
|
||||
else if (b5) { outc(out, 'B'); outs(out, b5, b6); }
|
||||
if (a7) { outc(out, 'A'); outs(out, a7, a8); }
|
||||
else if (b7) { outc(out, 'B'); outs(out, b7, b8); }
|
||||
outc(out, '\n');
|
||||
}
|
||||
|
||||
#line 268 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
goto _st9;
|
||||
_ctr13:
|
||||
{
|
||||
#line 20 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b2 = p; a1 = a2 = NULL; }
|
||||
|
||||
#line 275 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 24 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b3 = p; }
|
||||
|
||||
#line 280 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 24 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b4 = p; a3 = a4 = NULL; }
|
||||
|
||||
#line 285 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 25 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 290 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 25 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a4 = p; b3 = b4 = NULL; }
|
||||
|
||||
#line 295 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 28 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b5 = p; }
|
||||
|
||||
#line 300 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 28 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b6 = p; a5 = a6 = NULL; }
|
||||
|
||||
#line 305 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 29 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a5 = p; }
|
||||
|
||||
#line 310 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 29 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a6 = p; b5 = b6 = NULL; }
|
||||
|
||||
#line 315 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 32 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b7 = p; }
|
||||
|
||||
#line 320 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 32 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b8 = p; a7 = a8 = NULL; }
|
||||
|
||||
#line 325 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 33 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a7 = p; }
|
||||
|
||||
#line 330 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 33 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a8 = p; b7 = b8 = NULL; }
|
||||
|
||||
#line 335 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 35 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
|
||||
if (a1) { outc(out, 'A'); outs(out, a1, a2); }
|
||||
else if (b1) { outc(out, 'B'); outs(out, b1, b2); }
|
||||
if (a3) { outc(out, 'A'); outs(out, a3, a4); }
|
||||
else if (b3) { outc(out, 'B'); outs(out, b3, b4); }
|
||||
if (a5) { outc(out, 'A'); outs(out, a5, a6); }
|
||||
else if (b5) { outc(out, 'B'); outs(out, b5, b6); }
|
||||
if (a7) { outc(out, 'A'); outs(out, a7, a8); }
|
||||
else if (b7) { outc(out, 'B'); outs(out, b7, b8); }
|
||||
outc(out, '\n');
|
||||
}
|
||||
|
||||
#line 350 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
goto _st9;
|
||||
_ctr16:
|
||||
{
|
||||
#line 25 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a4 = p; b3 = b4 = NULL; }
|
||||
|
||||
#line 357 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 28 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b5 = p; }
|
||||
|
||||
#line 362 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 28 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b6 = p; a5 = a6 = NULL; }
|
||||
|
||||
#line 367 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 29 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a5 = p; }
|
||||
|
||||
#line 372 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 29 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a6 = p; b5 = b6 = NULL; }
|
||||
|
||||
#line 377 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 32 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b7 = p; }
|
||||
|
||||
#line 382 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 32 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b8 = p; a7 = a8 = NULL; }
|
||||
|
||||
#line 387 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 33 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a7 = p; }
|
||||
|
||||
#line 392 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 33 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a8 = p; b7 = b8 = NULL; }
|
||||
|
||||
#line 397 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 35 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
|
||||
if (a1) { outc(out, 'A'); outs(out, a1, a2); }
|
||||
else if (b1) { outc(out, 'B'); outs(out, b1, b2); }
|
||||
if (a3) { outc(out, 'A'); outs(out, a3, a4); }
|
||||
else if (b3) { outc(out, 'B'); outs(out, b3, b4); }
|
||||
if (a5) { outc(out, 'A'); outs(out, a5, a6); }
|
||||
else if (b5) { outc(out, 'B'); outs(out, b5, b6); }
|
||||
if (a7) { outc(out, 'A'); outs(out, a7, a8); }
|
||||
else if (b7) { outc(out, 'B'); outs(out, b7, b8); }
|
||||
outc(out, '\n');
|
||||
}
|
||||
|
||||
#line 412 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
goto _st9;
|
||||
_ctr19:
|
||||
{
|
||||
#line 28 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b6 = p; a5 = a6 = NULL; }
|
||||
|
||||
#line 419 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 32 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b7 = p; }
|
||||
|
||||
#line 424 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 32 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b8 = p; a7 = a8 = NULL; }
|
||||
|
||||
#line 429 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 33 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a7 = p; }
|
||||
|
||||
#line 434 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 33 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a8 = p; b7 = b8 = NULL; }
|
||||
|
||||
#line 439 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 35 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
|
||||
if (a1) { outc(out, 'A'); outs(out, a1, a2); }
|
||||
else if (b1) { outc(out, 'B'); outs(out, b1, b2); }
|
||||
if (a3) { outc(out, 'A'); outs(out, a3, a4); }
|
||||
else if (b3) { outc(out, 'B'); outs(out, b3, b4); }
|
||||
if (a5) { outc(out, 'A'); outs(out, a5, a6); }
|
||||
else if (b5) { outc(out, 'B'); outs(out, b5, b6); }
|
||||
if (a7) { outc(out, 'A'); outs(out, a7, a8); }
|
||||
else if (b7) { outc(out, 'B'); outs(out, b7, b8); }
|
||||
outc(out, '\n');
|
||||
}
|
||||
|
||||
#line 454 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
goto _st9;
|
||||
_ctr22:
|
||||
{
|
||||
#line 33 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a8 = p; b7 = b8 = NULL; }
|
||||
|
||||
#line 461 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 35 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
|
||||
if (a1) { outc(out, 'A'); outs(out, a1, a2); }
|
||||
else if (b1) { outc(out, 'B'); outs(out, b1, b2); }
|
||||
if (a3) { outc(out, 'A'); outs(out, a3, a4); }
|
||||
else if (b3) { outc(out, 'B'); outs(out, b3, b4); }
|
||||
if (a5) { outc(out, 'A'); outs(out, a5, a6); }
|
||||
else if (b5) { outc(out, 'B'); outs(out, b5, b6); }
|
||||
if (a7) { outc(out, 'A'); outs(out, a7, a8); }
|
||||
else if (b7) { outc(out, 'B'); outs(out, b7, b8); }
|
||||
outc(out, '\n');
|
||||
}
|
||||
|
||||
#line 476 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
goto _st9;
|
||||
_ctr24:
|
||||
{
|
||||
#line 20 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b1 = p; }
|
||||
|
||||
#line 483 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 20 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b2 = p; a1 = a2 = NULL; }
|
||||
|
||||
#line 488 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 21 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a1 = p; }
|
||||
|
||||
#line 493 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 21 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a2 = p; b1 = b2 = NULL; }
|
||||
|
||||
#line 498 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 24 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b3 = p; }
|
||||
|
||||
#line 503 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 24 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b4 = p; a3 = a4 = NULL; }
|
||||
|
||||
#line 508 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 25 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 513 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 25 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a4 = p; b3 = b4 = NULL; }
|
||||
|
||||
#line 518 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 28 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b5 = p; }
|
||||
|
||||
#line 523 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 28 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b6 = p; a5 = a6 = NULL; }
|
||||
|
||||
#line 528 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 29 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a5 = p; }
|
||||
|
||||
#line 533 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 29 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a6 = p; b5 = b6 = NULL; }
|
||||
|
||||
#line 538 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 32 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b7 = p; }
|
||||
|
||||
#line 543 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 32 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b8 = p; a7 = a8 = NULL; }
|
||||
|
||||
#line 548 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 33 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a7 = p; }
|
||||
|
||||
#line 553 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 33 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a8 = p; b7 = b8 = NULL; }
|
||||
|
||||
#line 558 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 35 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
|
||||
if (a1) { outc(out, 'A'); outs(out, a1, a2); }
|
||||
else if (b1) { outc(out, 'B'); outs(out, b1, b2); }
|
||||
if (a3) { outc(out, 'A'); outs(out, a3, a4); }
|
||||
else if (b3) { outc(out, 'B'); outs(out, b3, b4); }
|
||||
if (a5) { outc(out, 'A'); outs(out, a5, a6); }
|
||||
else if (b5) { outc(out, 'B'); outs(out, b5, b6); }
|
||||
if (a7) { outc(out, 'A'); outs(out, a7, a8); }
|
||||
else if (b7) { outc(out, 'B'); outs(out, b7, b8); }
|
||||
outc(out, '\n');
|
||||
}
|
||||
|
||||
#line 573 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
goto _st9;
|
||||
_st9:
|
||||
p+= 1;
|
||||
st_case_9:
|
||||
if ( p == pe )
|
||||
goto _out9;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr24;
|
||||
}
|
||||
case 97: {
|
||||
goto _ctr25;
|
||||
}
|
||||
case 98: {
|
||||
goto _ctr26;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_st0:
|
||||
st_case_0:
|
||||
goto _out0;
|
||||
_ctr25:
|
||||
{
|
||||
#line 21 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a1 = p; }
|
||||
|
||||
#line 600 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
goto _st1;
|
||||
_st1:
|
||||
p+= 1;
|
||||
st_case_1:
|
||||
if ( p == pe )
|
||||
goto _out1;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr2;
|
||||
}
|
||||
case 97: {
|
||||
goto _st1;
|
||||
}
|
||||
case 98: {
|
||||
goto _ctr3;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_ctr3:
|
||||
{
|
||||
#line 21 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a2 = p; b1 = b2 = NULL; }
|
||||
|
||||
#line 624 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 24 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b3 = p; }
|
||||
|
||||
#line 629 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
goto _st2;
|
||||
_st2:
|
||||
p+= 1;
|
||||
st_case_2:
|
||||
if ( p == pe )
|
||||
goto _out2;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr5;
|
||||
}
|
||||
case 97: {
|
||||
goto _ctr6;
|
||||
}
|
||||
case 98: {
|
||||
goto _st2;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_ctr6:
|
||||
{
|
||||
#line 24 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b4 = p; a3 = a4 = NULL; }
|
||||
|
||||
#line 653 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 29 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a5 = p; }
|
||||
|
||||
#line 658 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
goto _st3;
|
||||
_st3:
|
||||
p+= 1;
|
||||
st_case_3:
|
||||
if ( p == pe )
|
||||
goto _out3;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr8;
|
||||
}
|
||||
case 97: {
|
||||
goto _st3;
|
||||
}
|
||||
case 98: {
|
||||
goto _ctr9;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_ctr9:
|
||||
{
|
||||
#line 29 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a6 = p; b5 = b6 = NULL; }
|
||||
|
||||
#line 682 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 32 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b7 = p; }
|
||||
|
||||
#line 687 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
goto _st4;
|
||||
_st4:
|
||||
p+= 1;
|
||||
st_case_4:
|
||||
if ( p == pe )
|
||||
goto _out4;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr11;
|
||||
}
|
||||
case 98: {
|
||||
goto _st4;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_ctr26:
|
||||
{
|
||||
#line 20 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b1 = p; }
|
||||
|
||||
#line 708 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
goto _st5;
|
||||
_st5:
|
||||
p+= 1;
|
||||
st_case_5:
|
||||
if ( p == pe )
|
||||
goto _out5;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr13;
|
||||
}
|
||||
case 97: {
|
||||
goto _ctr14;
|
||||
}
|
||||
case 98: {
|
||||
goto _st5;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_ctr14:
|
||||
{
|
||||
#line 20 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b2 = p; a1 = a2 = NULL; }
|
||||
|
||||
#line 732 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 25 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 737 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
goto _st6;
|
||||
_st6:
|
||||
p+= 1;
|
||||
st_case_6:
|
||||
if ( p == pe )
|
||||
goto _out6;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr16;
|
||||
}
|
||||
case 97: {
|
||||
goto _st6;
|
||||
}
|
||||
case 98: {
|
||||
goto _ctr17;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_ctr17:
|
||||
{
|
||||
#line 25 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a4 = p; b3 = b4 = NULL; }
|
||||
|
||||
#line 761 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 28 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b5 = p; }
|
||||
|
||||
#line 766 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
goto _st7;
|
||||
_st7:
|
||||
p+= 1;
|
||||
st_case_7:
|
||||
if ( p == pe )
|
||||
goto _out7;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr19;
|
||||
}
|
||||
case 97: {
|
||||
goto _ctr20;
|
||||
}
|
||||
case 98: {
|
||||
goto _st7;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_ctr20:
|
||||
{
|
||||
#line 28 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
b6 = p; a5 = a6 = NULL; }
|
||||
|
||||
#line 790 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
{
|
||||
#line 33 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
a7 = p; }
|
||||
|
||||
#line 795 "gen/ragel/submatch_16__alt4_2.c"
|
||||
|
||||
goto _st8;
|
||||
_st8:
|
||||
p+= 1;
|
||||
st_case_8:
|
||||
if ( p == pe )
|
||||
goto _out8;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr22;
|
||||
}
|
||||
case 97: {
|
||||
goto _st8;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_out9: cs = 9; goto _out;
|
||||
_out0: cs = 0; goto _out;
|
||||
_out1: cs = 1; goto _out;
|
||||
_out2: cs = 2; goto _out;
|
||||
_out3: cs = 3; goto _out;
|
||||
_out4: cs = 4; goto _out;
|
||||
_out5: cs = 5; goto _out;
|
||||
_out6: cs = 6; goto _out;
|
||||
_out7: cs = 7; goto _out;
|
||||
_out8: cs = 8; goto _out;
|
||||
_out: {}
|
||||
}
|
||||
|
||||
#line 68 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
|
||||
|
||||
|
||||
in->p = p;
|
||||
in->pe = pe;
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,380 +0,0 @@
|
||||
#line 1 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
#include "ragel/common.c"
|
||||
|
||||
const char *delim = "\n";
|
||||
|
||||
|
||||
#line 17 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
|
||||
|
||||
|
||||
#line 9 "gen/ragel/submatch_20__cat2_0.c"
|
||||
static const int abcd_start = 5;
|
||||
static const int abcd_first_final = 5;
|
||||
static const int abcd_error = 0;
|
||||
|
||||
static const int abcd_en_main = 5;
|
||||
|
||||
|
||||
#line 19 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
|
||||
|
||||
static void lex(Input *in, Output *out)
|
||||
{
|
||||
char *p = in->p;
|
||||
char *pe = in->pe;
|
||||
const char
|
||||
*a0, *a1,
|
||||
*b0, *b1;
|
||||
int cs;
|
||||
|
||||
|
||||
#line 27 "gen/ragel/submatch_20__cat2_0.c"
|
||||
{
|
||||
cs = (int)abcd_start;
|
||||
}
|
||||
|
||||
#line 30 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
|
||||
|
||||
#line 32 "gen/ragel/submatch_20__cat2_0.c"
|
||||
{
|
||||
switch ( cs ) {
|
||||
case 5:
|
||||
goto st_case_5;
|
||||
case 0:
|
||||
goto st_case_0;
|
||||
case 1:
|
||||
goto st_case_1;
|
||||
case 2:
|
||||
goto st_case_2;
|
||||
case 3:
|
||||
goto st_case_3;
|
||||
case 4:
|
||||
goto st_case_4;
|
||||
}
|
||||
_ctr2:
|
||||
{
|
||||
#line 9 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
b0 = p; }
|
||||
|
||||
#line 52 "gen/ragel/submatch_20__cat2_0.c"
|
||||
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
a1 = p; }
|
||||
|
||||
#line 57 "gen/ragel/submatch_20__cat2_0.c"
|
||||
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
b1 = p; }
|
||||
|
||||
#line 62 "gen/ragel/submatch_20__cat2_0.c"
|
||||
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
|
||||
outs(out, a0, b0); outc(out, '.'); outs(out, b0, a1); outc(out, '.');
|
||||
outs(out, a1, b1); outc(out, '.'); outs(out, b1, p + 1);
|
||||
}
|
||||
|
||||
#line 70 "gen/ragel/submatch_20__cat2_0.c"
|
||||
|
||||
goto _st5;
|
||||
_ctr6:
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
a1 = p; }
|
||||
|
||||
#line 77 "gen/ragel/submatch_20__cat2_0.c"
|
||||
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
b1 = p; }
|
||||
|
||||
#line 82 "gen/ragel/submatch_20__cat2_0.c"
|
||||
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
|
||||
outs(out, a0, b0); outc(out, '.'); outs(out, b0, a1); outc(out, '.');
|
||||
outs(out, a1, b1); outc(out, '.'); outs(out, b1, p + 1);
|
||||
}
|
||||
|
||||
#line 90 "gen/ragel/submatch_20__cat2_0.c"
|
||||
|
||||
goto _st5;
|
||||
_ctr10:
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
b1 = p; }
|
||||
|
||||
#line 97 "gen/ragel/submatch_20__cat2_0.c"
|
||||
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
|
||||
outs(out, a0, b0); outc(out, '.'); outs(out, b0, a1); outc(out, '.');
|
||||
outs(out, a1, b1); outc(out, '.'); outs(out, b1, p + 1);
|
||||
}
|
||||
|
||||
#line 105 "gen/ragel/submatch_20__cat2_0.c"
|
||||
|
||||
goto _st5;
|
||||
_ctr13:
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
|
||||
outs(out, a0, b0); outc(out, '.'); outs(out, b0, a1); outc(out, '.');
|
||||
outs(out, a1, b1); outc(out, '.'); outs(out, b1, p + 1);
|
||||
}
|
||||
|
||||
#line 115 "gen/ragel/submatch_20__cat2_0.c"
|
||||
|
||||
goto _st5;
|
||||
_ctr15:
|
||||
{
|
||||
#line 9 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
a0 = p; }
|
||||
|
||||
#line 122 "gen/ragel/submatch_20__cat2_0.c"
|
||||
|
||||
{
|
||||
#line 9 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
b0 = p; }
|
||||
|
||||
#line 127 "gen/ragel/submatch_20__cat2_0.c"
|
||||
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
a1 = p; }
|
||||
|
||||
#line 132 "gen/ragel/submatch_20__cat2_0.c"
|
||||
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
b1 = p; }
|
||||
|
||||
#line 137 "gen/ragel/submatch_20__cat2_0.c"
|
||||
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
|
||||
outs(out, a0, b0); outc(out, '.'); outs(out, b0, a1); outc(out, '.');
|
||||
outs(out, a1, b1); outc(out, '.'); outs(out, b1, p + 1);
|
||||
}
|
||||
|
||||
#line 145 "gen/ragel/submatch_20__cat2_0.c"
|
||||
|
||||
goto _st5;
|
||||
_st5:
|
||||
p+= 1;
|
||||
st_case_5:
|
||||
if ( p == pe )
|
||||
goto _out5;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr15;
|
||||
}
|
||||
case 97: {
|
||||
goto _ctr16;
|
||||
}
|
||||
case 98: {
|
||||
goto _ctr17;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_st0:
|
||||
st_case_0:
|
||||
goto _out0;
|
||||
_ctr3:
|
||||
{
|
||||
#line 9 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
b0 = p; }
|
||||
|
||||
#line 172 "gen/ragel/submatch_20__cat2_0.c"
|
||||
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
a1 = p; }
|
||||
|
||||
#line 177 "gen/ragel/submatch_20__cat2_0.c"
|
||||
|
||||
goto _st1;
|
||||
_ctr16:
|
||||
{
|
||||
#line 9 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
a0 = p; }
|
||||
|
||||
#line 184 "gen/ragel/submatch_20__cat2_0.c"
|
||||
|
||||
{
|
||||
#line 9 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
b0 = p; }
|
||||
|
||||
#line 189 "gen/ragel/submatch_20__cat2_0.c"
|
||||
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
a1 = p; }
|
||||
|
||||
#line 194 "gen/ragel/submatch_20__cat2_0.c"
|
||||
|
||||
goto _st1;
|
||||
_st1:
|
||||
p+= 1;
|
||||
st_case_1:
|
||||
if ( p == pe )
|
||||
goto _out1;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr2;
|
||||
}
|
||||
case 97: {
|
||||
goto _ctr3;
|
||||
}
|
||||
case 98: {
|
||||
goto _ctr4;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_ctr4:
|
||||
{
|
||||
#line 9 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
b0 = p; }
|
||||
|
||||
#line 218 "gen/ragel/submatch_20__cat2_0.c"
|
||||
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
a1 = p; }
|
||||
|
||||
#line 223 "gen/ragel/submatch_20__cat2_0.c"
|
||||
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
b1 = p; }
|
||||
|
||||
#line 228 "gen/ragel/submatch_20__cat2_0.c"
|
||||
|
||||
goto _st2;
|
||||
_ctr8:
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
a1 = p; }
|
||||
|
||||
#line 235 "gen/ragel/submatch_20__cat2_0.c"
|
||||
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
b1 = p; }
|
||||
|
||||
#line 240 "gen/ragel/submatch_20__cat2_0.c"
|
||||
|
||||
goto _st2;
|
||||
_ctr17:
|
||||
{
|
||||
#line 9 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
a0 = p; }
|
||||
|
||||
#line 247 "gen/ragel/submatch_20__cat2_0.c"
|
||||
|
||||
{
|
||||
#line 9 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
b0 = p; }
|
||||
|
||||
#line 252 "gen/ragel/submatch_20__cat2_0.c"
|
||||
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
a1 = p; }
|
||||
|
||||
#line 257 "gen/ragel/submatch_20__cat2_0.c"
|
||||
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
b1 = p; }
|
||||
|
||||
#line 262 "gen/ragel/submatch_20__cat2_0.c"
|
||||
|
||||
goto _st2;
|
||||
_st2:
|
||||
p+= 1;
|
||||
st_case_2:
|
||||
if ( p == pe )
|
||||
goto _out2;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr6;
|
||||
}
|
||||
case 97: {
|
||||
goto _ctr7;
|
||||
}
|
||||
case 98: {
|
||||
goto _ctr8;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_ctr7:
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
a1 = p; }
|
||||
|
||||
#line 286 "gen/ragel/submatch_20__cat2_0.c"
|
||||
|
||||
goto _st3;
|
||||
_st3:
|
||||
p+= 1;
|
||||
st_case_3:
|
||||
if ( p == pe )
|
||||
goto _out3;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr10;
|
||||
}
|
||||
case 97: {
|
||||
goto _st3;
|
||||
}
|
||||
case 98: {
|
||||
goto _ctr11;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_ctr11:
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
b1 = p; }
|
||||
|
||||
#line 310 "gen/ragel/submatch_20__cat2_0.c"
|
||||
|
||||
goto _st4;
|
||||
_st4:
|
||||
p+= 1;
|
||||
st_case_4:
|
||||
if ( p == pe )
|
||||
goto _out4;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr13;
|
||||
}
|
||||
case 98: {
|
||||
goto _st4;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_out5: cs = 5; goto _out;
|
||||
_out0: cs = 0; goto _out;
|
||||
_out1: cs = 1; goto _out;
|
||||
_out2: cs = 2; goto _out;
|
||||
_out3: cs = 3; goto _out;
|
||||
_out4: cs = 4; goto _out;
|
||||
_out: {}
|
||||
}
|
||||
|
||||
#line 31 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
|
||||
|
||||
|
||||
in->p = p;
|
||||
in->pe = pe;
|
||||
}
|
||||
@@ -1,982 +0,0 @@
|
||||
#line 1 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
#include "ragel/common.c"
|
||||
|
||||
const char *delim = "\n";
|
||||
|
||||
|
||||
#line 21 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
|
||||
|
||||
|
||||
#line 9 "gen/ragel/submatch_23__cat4_0.c"
|
||||
static const int abcd_start = 9;
|
||||
static const int abcd_first_final = 9;
|
||||
static const int abcd_error = 0;
|
||||
|
||||
static const int abcd_en_main = 9;
|
||||
|
||||
|
||||
#line 23 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
|
||||
|
||||
static void lex(Input *in, Output *out)
|
||||
{
|
||||
char *p = in->p;
|
||||
char *pe = in->pe;
|
||||
const char
|
||||
*a0, *a1, *a2, *a3,
|
||||
*b0, *b1, *b2, *b3;
|
||||
int cs;
|
||||
|
||||
|
||||
#line 27 "gen/ragel/submatch_23__cat4_0.c"
|
||||
{
|
||||
cs = (int)abcd_start;
|
||||
}
|
||||
|
||||
#line 34 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
|
||||
|
||||
#line 32 "gen/ragel/submatch_23__cat4_0.c"
|
||||
{
|
||||
switch ( cs ) {
|
||||
case 9:
|
||||
goto st_case_9;
|
||||
case 0:
|
||||
goto st_case_0;
|
||||
case 1:
|
||||
goto st_case_1;
|
||||
case 2:
|
||||
goto st_case_2;
|
||||
case 3:
|
||||
goto st_case_3;
|
||||
case 4:
|
||||
goto st_case_4;
|
||||
case 5:
|
||||
goto st_case_5;
|
||||
case 6:
|
||||
goto st_case_6;
|
||||
case 7:
|
||||
goto st_case_7;
|
||||
case 8:
|
||||
goto st_case_8;
|
||||
}
|
||||
_ctr2:
|
||||
{
|
||||
#line 9 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b0 = p; }
|
||||
|
||||
#line 60 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a1 = p; }
|
||||
|
||||
#line 65 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b1 = p; }
|
||||
|
||||
#line 70 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a2 = p; }
|
||||
|
||||
#line 75 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b2 = p; }
|
||||
|
||||
#line 80 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 85 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b3 = p; }
|
||||
|
||||
#line 90 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
|
||||
outs(out, a0, b0); outc(out, '.'); outs(out, b0, a1); outc(out, '.');
|
||||
outs(out, a1, b1); outc(out, '.'); outs(out, b1, a2); outc(out, '.');
|
||||
outs(out, a2, b2); outc(out, '.'); outs(out, b2, a3); outc(out, '.');
|
||||
outs(out, a3, b3); outc(out, '.'); outs(out, b3, p + 1);
|
||||
}
|
||||
|
||||
#line 100 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
goto _st9;
|
||||
_ctr6:
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a1 = p; }
|
||||
|
||||
#line 107 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b1 = p; }
|
||||
|
||||
#line 112 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a2 = p; }
|
||||
|
||||
#line 117 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b2 = p; }
|
||||
|
||||
#line 122 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 127 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b3 = p; }
|
||||
|
||||
#line 132 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
|
||||
outs(out, a0, b0); outc(out, '.'); outs(out, b0, a1); outc(out, '.');
|
||||
outs(out, a1, b1); outc(out, '.'); outs(out, b1, a2); outc(out, '.');
|
||||
outs(out, a2, b2); outc(out, '.'); outs(out, b2, a3); outc(out, '.');
|
||||
outs(out, a3, b3); outc(out, '.'); outs(out, b3, p + 1);
|
||||
}
|
||||
|
||||
#line 142 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
goto _st9;
|
||||
_ctr10:
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b1 = p; }
|
||||
|
||||
#line 149 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a2 = p; }
|
||||
|
||||
#line 154 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b2 = p; }
|
||||
|
||||
#line 159 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 164 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b3 = p; }
|
||||
|
||||
#line 169 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
|
||||
outs(out, a0, b0); outc(out, '.'); outs(out, b0, a1); outc(out, '.');
|
||||
outs(out, a1, b1); outc(out, '.'); outs(out, b1, a2); outc(out, '.');
|
||||
outs(out, a2, b2); outc(out, '.'); outs(out, b2, a3); outc(out, '.');
|
||||
outs(out, a3, b3); outc(out, '.'); outs(out, b3, p + 1);
|
||||
}
|
||||
|
||||
#line 179 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
goto _st9;
|
||||
_ctr14:
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a2 = p; }
|
||||
|
||||
#line 186 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b2 = p; }
|
||||
|
||||
#line 191 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 196 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b3 = p; }
|
||||
|
||||
#line 201 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
|
||||
outs(out, a0, b0); outc(out, '.'); outs(out, b0, a1); outc(out, '.');
|
||||
outs(out, a1, b1); outc(out, '.'); outs(out, b1, a2); outc(out, '.');
|
||||
outs(out, a2, b2); outc(out, '.'); outs(out, b2, a3); outc(out, '.');
|
||||
outs(out, a3, b3); outc(out, '.'); outs(out, b3, p + 1);
|
||||
}
|
||||
|
||||
#line 211 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
goto _st9;
|
||||
_ctr18:
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b2 = p; }
|
||||
|
||||
#line 218 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 223 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b3 = p; }
|
||||
|
||||
#line 228 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
|
||||
outs(out, a0, b0); outc(out, '.'); outs(out, b0, a1); outc(out, '.');
|
||||
outs(out, a1, b1); outc(out, '.'); outs(out, b1, a2); outc(out, '.');
|
||||
outs(out, a2, b2); outc(out, '.'); outs(out, b2, a3); outc(out, '.');
|
||||
outs(out, a3, b3); outc(out, '.'); outs(out, b3, p + 1);
|
||||
}
|
||||
|
||||
#line 238 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
goto _st9;
|
||||
_ctr22:
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 245 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b3 = p; }
|
||||
|
||||
#line 250 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
|
||||
outs(out, a0, b0); outc(out, '.'); outs(out, b0, a1); outc(out, '.');
|
||||
outs(out, a1, b1); outc(out, '.'); outs(out, b1, a2); outc(out, '.');
|
||||
outs(out, a2, b2); outc(out, '.'); outs(out, b2, a3); outc(out, '.');
|
||||
outs(out, a3, b3); outc(out, '.'); outs(out, b3, p + 1);
|
||||
}
|
||||
|
||||
#line 260 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
goto _st9;
|
||||
_ctr26:
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b3 = p; }
|
||||
|
||||
#line 267 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
|
||||
outs(out, a0, b0); outc(out, '.'); outs(out, b0, a1); outc(out, '.');
|
||||
outs(out, a1, b1); outc(out, '.'); outs(out, b1, a2); outc(out, '.');
|
||||
outs(out, a2, b2); outc(out, '.'); outs(out, b2, a3); outc(out, '.');
|
||||
outs(out, a3, b3); outc(out, '.'); outs(out, b3, p + 1);
|
||||
}
|
||||
|
||||
#line 277 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
goto _st9;
|
||||
_ctr29:
|
||||
{
|
||||
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
|
||||
outs(out, a0, b0); outc(out, '.'); outs(out, b0, a1); outc(out, '.');
|
||||
outs(out, a1, b1); outc(out, '.'); outs(out, b1, a2); outc(out, '.');
|
||||
outs(out, a2, b2); outc(out, '.'); outs(out, b2, a3); outc(out, '.');
|
||||
outs(out, a3, b3); outc(out, '.'); outs(out, b3, p + 1);
|
||||
}
|
||||
|
||||
#line 289 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
goto _st9;
|
||||
_ctr31:
|
||||
{
|
||||
#line 9 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a0 = p; }
|
||||
|
||||
#line 296 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 9 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b0 = p; }
|
||||
|
||||
#line 301 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a1 = p; }
|
||||
|
||||
#line 306 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b1 = p; }
|
||||
|
||||
#line 311 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a2 = p; }
|
||||
|
||||
#line 316 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b2 = p; }
|
||||
|
||||
#line 321 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 326 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b3 = p; }
|
||||
|
||||
#line 331 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
|
||||
outs(out, a0, b0); outc(out, '.'); outs(out, b0, a1); outc(out, '.');
|
||||
outs(out, a1, b1); outc(out, '.'); outs(out, b1, a2); outc(out, '.');
|
||||
outs(out, a2, b2); outc(out, '.'); outs(out, b2, a3); outc(out, '.');
|
||||
outs(out, a3, b3); outc(out, '.'); outs(out, b3, p + 1);
|
||||
}
|
||||
|
||||
#line 341 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
goto _st9;
|
||||
_st9:
|
||||
p+= 1;
|
||||
st_case_9:
|
||||
if ( p == pe )
|
||||
goto _out9;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr31;
|
||||
}
|
||||
case 97: {
|
||||
goto _ctr32;
|
||||
}
|
||||
case 98: {
|
||||
goto _ctr33;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_st0:
|
||||
st_case_0:
|
||||
goto _out0;
|
||||
_ctr3:
|
||||
{
|
||||
#line 9 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b0 = p; }
|
||||
|
||||
#line 368 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a1 = p; }
|
||||
|
||||
#line 373 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b1 = p; }
|
||||
|
||||
#line 378 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a2 = p; }
|
||||
|
||||
#line 383 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b2 = p; }
|
||||
|
||||
#line 388 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 393 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
goto _st1;
|
||||
_ctr32:
|
||||
{
|
||||
#line 9 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a0 = p; }
|
||||
|
||||
#line 400 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 9 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b0 = p; }
|
||||
|
||||
#line 405 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a1 = p; }
|
||||
|
||||
#line 410 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b1 = p; }
|
||||
|
||||
#line 415 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a2 = p; }
|
||||
|
||||
#line 420 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b2 = p; }
|
||||
|
||||
#line 425 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 430 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
goto _st1;
|
||||
_st1:
|
||||
p+= 1;
|
||||
st_case_1:
|
||||
if ( p == pe )
|
||||
goto _out1;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr2;
|
||||
}
|
||||
case 97: {
|
||||
goto _ctr3;
|
||||
}
|
||||
case 98: {
|
||||
goto _ctr4;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_ctr4:
|
||||
{
|
||||
#line 9 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b0 = p; }
|
||||
|
||||
#line 454 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a1 = p; }
|
||||
|
||||
#line 459 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b1 = p; }
|
||||
|
||||
#line 464 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a2 = p; }
|
||||
|
||||
#line 469 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b2 = p; }
|
||||
|
||||
#line 474 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 479 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b3 = p; }
|
||||
|
||||
#line 484 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
goto _st2;
|
||||
_ctr8:
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a1 = p; }
|
||||
|
||||
#line 491 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b1 = p; }
|
||||
|
||||
#line 496 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a2 = p; }
|
||||
|
||||
#line 501 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b2 = p; }
|
||||
|
||||
#line 506 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 511 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b3 = p; }
|
||||
|
||||
#line 516 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
goto _st2;
|
||||
_ctr33:
|
||||
{
|
||||
#line 9 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a0 = p; }
|
||||
|
||||
#line 523 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 9 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b0 = p; }
|
||||
|
||||
#line 528 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a1 = p; }
|
||||
|
||||
#line 533 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b1 = p; }
|
||||
|
||||
#line 538 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a2 = p; }
|
||||
|
||||
#line 543 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b2 = p; }
|
||||
|
||||
#line 548 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 553 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b3 = p; }
|
||||
|
||||
#line 558 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
goto _st2;
|
||||
_st2:
|
||||
p+= 1;
|
||||
st_case_2:
|
||||
if ( p == pe )
|
||||
goto _out2;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr6;
|
||||
}
|
||||
case 97: {
|
||||
goto _ctr7;
|
||||
}
|
||||
case 98: {
|
||||
goto _ctr8;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_ctr7:
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a1 = p; }
|
||||
|
||||
#line 582 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b1 = p; }
|
||||
|
||||
#line 587 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a2 = p; }
|
||||
|
||||
#line 592 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b2 = p; }
|
||||
|
||||
#line 597 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 602 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
goto _st3;
|
||||
_ctr11:
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b1 = p; }
|
||||
|
||||
#line 609 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a2 = p; }
|
||||
|
||||
#line 614 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b2 = p; }
|
||||
|
||||
#line 619 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 624 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
goto _st3;
|
||||
_st3:
|
||||
p+= 1;
|
||||
st_case_3:
|
||||
if ( p == pe )
|
||||
goto _out3;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr10;
|
||||
}
|
||||
case 97: {
|
||||
goto _ctr11;
|
||||
}
|
||||
case 98: {
|
||||
goto _ctr12;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_ctr12:
|
||||
{
|
||||
#line 10 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b1 = p; }
|
||||
|
||||
#line 648 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a2 = p; }
|
||||
|
||||
#line 653 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b2 = p; }
|
||||
|
||||
#line 658 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 663 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b3 = p; }
|
||||
|
||||
#line 668 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
goto _st4;
|
||||
_ctr16:
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a2 = p; }
|
||||
|
||||
#line 675 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b2 = p; }
|
||||
|
||||
#line 680 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 685 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b3 = p; }
|
||||
|
||||
#line 690 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
goto _st4;
|
||||
_st4:
|
||||
p+= 1;
|
||||
st_case_4:
|
||||
if ( p == pe )
|
||||
goto _out4;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr14;
|
||||
}
|
||||
case 97: {
|
||||
goto _ctr15;
|
||||
}
|
||||
case 98: {
|
||||
goto _ctr16;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_ctr15:
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a2 = p; }
|
||||
|
||||
#line 714 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b2 = p; }
|
||||
|
||||
#line 719 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 724 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
goto _st5;
|
||||
_ctr19:
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b2 = p; }
|
||||
|
||||
#line 731 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 736 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
goto _st5;
|
||||
_st5:
|
||||
p+= 1;
|
||||
st_case_5:
|
||||
if ( p == pe )
|
||||
goto _out5;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr18;
|
||||
}
|
||||
case 97: {
|
||||
goto _ctr19;
|
||||
}
|
||||
case 98: {
|
||||
goto _ctr20;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_ctr20:
|
||||
{
|
||||
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b2 = p; }
|
||||
|
||||
#line 760 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 765 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b3 = p; }
|
||||
|
||||
#line 770 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
goto _st6;
|
||||
_ctr24:
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 777 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b3 = p; }
|
||||
|
||||
#line 782 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
goto _st6;
|
||||
_st6:
|
||||
p+= 1;
|
||||
st_case_6:
|
||||
if ( p == pe )
|
||||
goto _out6;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr22;
|
||||
}
|
||||
case 97: {
|
||||
goto _ctr23;
|
||||
}
|
||||
case 98: {
|
||||
goto _ctr24;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_ctr23:
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
a3 = p; }
|
||||
|
||||
#line 806 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
goto _st7;
|
||||
_st7:
|
||||
p+= 1;
|
||||
st_case_7:
|
||||
if ( p == pe )
|
||||
goto _out7;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr26;
|
||||
}
|
||||
case 97: {
|
||||
goto _st7;
|
||||
}
|
||||
case 98: {
|
||||
goto _ctr27;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_ctr27:
|
||||
{
|
||||
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
b3 = p; }
|
||||
|
||||
#line 830 "gen/ragel/submatch_23__cat4_0.c"
|
||||
|
||||
goto _st8;
|
||||
_st8:
|
||||
p+= 1;
|
||||
st_case_8:
|
||||
if ( p == pe )
|
||||
goto _out8;
|
||||
switch( ( (*( p))) ) {
|
||||
case 10: {
|
||||
goto _ctr29;
|
||||
}
|
||||
case 98: {
|
||||
goto _st8;
|
||||
}
|
||||
}
|
||||
goto _st0;
|
||||
_out9: cs = 9; goto _out;
|
||||
_out0: cs = 0; goto _out;
|
||||
_out1: cs = 1; goto _out;
|
||||
_out2: cs = 2; goto _out;
|
||||
_out3: cs = 3; goto _out;
|
||||
_out4: cs = 4; goto _out;
|
||||
_out5: cs = 5; goto _out;
|
||||
_out6: cs = 6; goto _out;
|
||||
_out7: cs = 7; goto _out;
|
||||
_out8: cs = 8; goto _out;
|
||||
_out: {}
|
||||
}
|
||||
|
||||
#line 35 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
|
||||
|
||||
|
||||
in->p = p;
|
||||
in->pe = pe;
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -1,6 +1,6 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "benchmarks/c/common/common.h"
|
||||
#include "benchmarks/common/common.h"
|
||||
#include "lib/regex.h"
|
||||
|
||||
#ifdef HAVE_RE2_RE2_H
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -117,7 +117,7 @@ plot_end = """
|
||||
"""
|
||||
|
||||
|
||||
VARIANTS = ['aot', 'jit', 'nfa']
|
||||
VARIANTS = ['dfa_aot', 'dfa_jit', 'nfa']
|
||||
|
||||
|
||||
def parse_args():
|
||||
@@ -192,10 +192,10 @@ class Params:
|
||||
def __init__(self, args):
|
||||
self.barwidth = 0.08
|
||||
|
||||
if args.variant == 'aot':
|
||||
self.override_params_aot()
|
||||
elif args.variant == 'jit':
|
||||
self.override_params_jit()
|
||||
if args.variant == 'dfa_aot':
|
||||
self.override_params_dfa_aot()
|
||||
elif args.variant == 'dfa_jit':
|
||||
self.override_params_dfa_jit()
|
||||
elif args.variant == 'nfa':
|
||||
self.override_params_nfa()
|
||||
|
||||
@@ -210,7 +210,7 @@ class Params:
|
||||
if args.relative_to: # override only if set
|
||||
self.relative_to = args.relative_to
|
||||
|
||||
def override_params_aot(self):
|
||||
def override_params_dfa_aot(self):
|
||||
self.plotwidth = 1.5
|
||||
self.xshift = 2 * self.plotwidth
|
||||
self.header = """
|
||||
@@ -225,7 +225,7 @@ class Params:
|
||||
self.global_styles = ""
|
||||
self.local_styles = plot_labels_and_title % 'left'
|
||||
|
||||
def override_params_jit(self):
|
||||
def override_params_dfa_jit(self):
|
||||
self.plotwidth = 2.7
|
||||
self.xshift = self.plotwidth
|
||||
self.header = """
|
||||
File renamed without changes.
@@ -1,42 +1,42 @@
|
||||
set(BENCHMARKS
|
||||
"submatch_00__http_rfc7230"
|
||||
"submatch_01__http_simple"
|
||||
"submatch_02__uri_rfc3986"
|
||||
"submatch_03__uri_simple"
|
||||
"submatch_04__apache_log"
|
||||
"submatch_05__datetime"
|
||||
"submatch_06__email"
|
||||
"submatch_07__ipv4"
|
||||
"00__http_rfc7230"
|
||||
"01__http_simple"
|
||||
"02__uri_rfc3986"
|
||||
"03__uri_simple"
|
||||
"04__apache_log"
|
||||
"05__datetime"
|
||||
"06__email"
|
||||
"07__ipv4"
|
||||
|
||||
"submatch_10__alt1_2"
|
||||
"submatch_11__alt1_4"
|
||||
"submatch_12__alt1_8"
|
||||
"submatch_13__alt2_2"
|
||||
"submatch_14__alt2_4"
|
||||
"submatch_15__alt2_8"
|
||||
"submatch_16__alt4_2"
|
||||
"submatch_17__alt4_4"
|
||||
"submatch_18__alt4_8"
|
||||
"10__alt1_2"
|
||||
"11__alt1_4"
|
||||
"12__alt1_8"
|
||||
"13__alt2_2"
|
||||
"14__alt2_4"
|
||||
"15__alt2_8"
|
||||
"16__alt4_2"
|
||||
"17__alt4_4"
|
||||
"18__alt4_8"
|
||||
|
||||
"submatch_20__cat2_0"
|
||||
"submatch_21__cat2_4"
|
||||
"submatch_22__cat2_8"
|
||||
"submatch_23__cat4_0"
|
||||
"submatch_24__cat4_2"
|
||||
"submatch_25__cat4_4"
|
||||
"submatch_26__cat8_0"
|
||||
"submatch_27__cat8_1"
|
||||
"submatch_28__cat8_2"
|
||||
"20__cat2_0"
|
||||
"21__cat2_4"
|
||||
"22__cat2_8"
|
||||
"23__cat4_0"
|
||||
"24__cat4_2"
|
||||
"25__cat4_4"
|
||||
"26__cat8_0"
|
||||
"27__cat8_1"
|
||||
"28__cat8_2"
|
||||
|
||||
"submatch_30__rep_cat_5_3_2"
|
||||
"submatch_31__rep_cat_13_11_7"
|
||||
"submatch_32__rep_cat_23_19_17"
|
||||
"submatch_33__rep_alt_5_3_2"
|
||||
"submatch_34__rep_alt_13_11_7"
|
||||
"submatch_35__rep_alt_23_19_17"
|
||||
"submatch_36__rep_5_rep_3_rep_2"
|
||||
"submatch_37__rep_13_rep_11_rep_7"
|
||||
"submatch_38__rep_23_rep_19_rep_17"
|
||||
"30__rep_cat_5_3_2"
|
||||
"31__rep_cat_13_11_7"
|
||||
"32__rep_cat_23_19_17"
|
||||
"33__rep_alt_5_3_2"
|
||||
"34__rep_alt_13_11_7"
|
||||
"35__rep_alt_23_19_17"
|
||||
"36__rep_5_rep_3_rep_2"
|
||||
"37__rep_13_rep_11_rep_7"
|
||||
"38__rep_23_rep_19_rep_17"
|
||||
)
|
||||
|
||||
set(SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src")
|
||||
@@ -53,16 +53,16 @@ file(MAKE_DIRECTORY "${GEN_DIR}/kleenex/")
|
||||
set(KLEENEX "${ENG_DIR}/kleenex/kexc")
|
||||
add_custom_command(
|
||||
OUTPUT "${KLEENEX}"
|
||||
COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/../_engines/kleenex/getkleenex.sh"
|
||||
COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/engines/kleenex/getkleenex.sh"
|
||||
WORKING_DIRECTORY "${ENG_DIR}/kleenex/"
|
||||
)
|
||||
# Masked benchmarks for which Kleenex either generates very large output
|
||||
# (tens of megabytes of C code), or even causes out of memory condition.
|
||||
set(KLEENEX_MASKED
|
||||
"submatch_34__rep_alt_13_11_7"
|
||||
"submatch_35__rep_alt_23_19_17"
|
||||
"submatch_37__rep_13_rep_11_rep_7"
|
||||
"submatch_38__rep_23_rep_19_rep_17"
|
||||
"34__rep_alt_13_11_7"
|
||||
"35__rep_alt_23_19_17"
|
||||
"37__rep_13_rep_11_rep_7"
|
||||
"38__rep_23_rep_19_rep_17"
|
||||
)
|
||||
list(JOIN KLEENEX_MASKED "|" KLEENEX_MASKED_REGEXP)
|
||||
set(KLEENEX_BENCHMARKS ${BENCHMARKS})
|
||||
@@ -71,24 +71,23 @@ foreach(bench ${KLEENEX_BENCHMARKS})
|
||||
set(src_file "${SRC_DIR}/kleenex/${bench}.kex")
|
||||
set(gen_file "${GEN_DIR}/kleenex/${bench}.c")
|
||||
set(pregen_file "${PREGEN_DIR}/kleenex/${bench}.c")
|
||||
# don't regenerate kleenex benchmarks, as kleenex is not actively developed
|
||||
# and it cannot be built with the recent cabal / haskell ecosystem
|
||||
# if(RE2C_REGEN_BENCHMARKS)
|
||||
# file(RELATIVE_PATH rel_src_file "${CMAKE_CURRENT_BINARY_DIR}" "${src_file}")
|
||||
# file(RELATIVE_PATH rel_gen_file "${CMAKE_CURRENT_BINARY_DIR}" "${gen_file}")
|
||||
# add_custom_command(
|
||||
# OUTPUT "${gen_file}"
|
||||
# COMMAND "${KLEENEX}" compile "${rel_src_file}" --srcout "${rel_gen_file}" --act=false --la=true
|
||||
# COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${gen_file}" "${pregen_file}"
|
||||
# DEPENDS "${src_file}" "${KLEENEX}"
|
||||
# )
|
||||
# else()
|
||||
# optionally regenerate kleenex benchmarks if RE2C_REGEN_BENCHMARKS is set
|
||||
if(RE2C_REGEN_BENCHMARKS)
|
||||
file(RELATIVE_PATH rel_src_file "${CMAKE_CURRENT_BINARY_DIR}" "${src_file}")
|
||||
file(RELATIVE_PATH rel_gen_file "${CMAKE_CURRENT_BINARY_DIR}" "${gen_file}")
|
||||
add_custom_command(
|
||||
OUTPUT "${gen_file}"
|
||||
COMMAND "${KLEENEX}" compile "${rel_src_file}" --srcout "${rel_gen_file}" --act=false --la=true
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${gen_file}" "${pregen_file}"
|
||||
DEPENDS "${src_file}" "${KLEENEX}"
|
||||
)
|
||||
else()
|
||||
add_custom_command(
|
||||
OUTPUT "${gen_file}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy "${pregen_file}" "${gen_file}"
|
||||
DEPENDS "${pregen_file}"
|
||||
)
|
||||
# endif()
|
||||
endif()
|
||||
list(APPEND GEN "${gen_file}")
|
||||
endforeach()
|
||||
|
||||
@@ -98,7 +97,7 @@ file(MAKE_DIRECTORY "${GEN_DIR}/ragel/")
|
||||
set(RAGEL "${ENG_DIR}/ragel/ragel7")
|
||||
add_custom_command(
|
||||
OUTPUT "${RAGEL}"
|
||||
COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/../_engines/ragel/getragel7.sh"
|
||||
COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/engines/ragel/getragel7.sh"
|
||||
WORKING_DIRECTORY "${ENG_DIR}/ragel/"
|
||||
)
|
||||
foreach(bench ${BENCHMARKS})
|
||||
@@ -132,7 +131,7 @@ set(RE2C "${CMAKE_BINARY_DIR}/re2c")
|
||||
set(RE2C3 "${ENG_DIR}/re2c/re2c3")
|
||||
add_custom_command(
|
||||
OUTPUT "${RE2C3}"
|
||||
COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/../_engines/re2c/getre2c3.sh"
|
||||
COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/engines/re2c/getre2c3.sh"
|
||||
WORKING_DIRECTORY "${ENG_DIR}/re2c/"
|
||||
)
|
||||
set(RE2C_FLAGS "--reusable" "--tags" "--no-generation-date" "--no-version")
|
||||
@@ -221,13 +220,13 @@ endfunction()
|
||||
|
||||
# input data
|
||||
set(DAT)
|
||||
# Some benchmarks share the same data, like submatch_03__uri_simple and submatch_02__uri_rfc3986.
|
||||
regex_replace_list("^submatch_[0-9]+__([^_]+).*" "\\1" INPUTS ${BENCHMARKS})
|
||||
# Some benchmarks share the same data, like 03__uri_simple and 02__uri_rfc3986.
|
||||
regex_replace_list("^[0-9]+__([^_]+).*" "\\1" INPUTS ${BENCHMARKS})
|
||||
list(REMOVE_DUPLICATES INPUTS)
|
||||
foreach(input ${INPUTS})
|
||||
set(src_dir "${CMAKE_CURRENT_SOURCE_DIR}/../_data/${input}")
|
||||
set(src_dir "${CMAKE_CURRENT_SOURCE_DIR}/data/${input}")
|
||||
set(dst_dir "${CMAKE_CURRENT_BINARY_DIR}/data/${input}")
|
||||
file(GLOB script "${CMAKE_CURRENT_SOURCE_DIR}/../_data/gen.py")
|
||||
file(GLOB script "${CMAKE_CURRENT_SOURCE_DIR}/data/gen.py")
|
||||
add_custom_command(
|
||||
OUTPUT "${dst_dir}/small"
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy "${src_dir}/small" "${dst_dir}/small"
|
||||
@@ -242,7 +241,7 @@ foreach(input ${INPUTS})
|
||||
list(APPEND DAT "${dst_dir}/small" "${dst_dir}/big")
|
||||
endforeach()
|
||||
|
||||
add_custom_target(bench_submatch_aot ALL DEPENDS ${BIN} ${DAT})
|
||||
add_custom_target(bench_submatch_dfa_aot ALL DEPENDS ${BIN} ${DAT})
|
||||
|
||||
# benchmark scripts
|
||||
set(srcdir "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
File renamed without changes.
@@ -14,44 +14,44 @@ RE2C_FLAGS = $(RE2C_FLAGS_COMMON) -I $(SRC_DIR)/re2c/include
|
||||
RE2C_FLAGS_EOF = $(RE2C_FLAGS_COMMON) -I $(SRC_DIR)/re2c/include-eof
|
||||
|
||||
BENCHMARKS = \
|
||||
submatch_00__http_rfc7230 \
|
||||
submatch_01__http_simple \
|
||||
submatch_02__uri_rfc3986 \
|
||||
submatch_03__uri_simple \
|
||||
submatch_04__apache_log \
|
||||
submatch_05__datetime \
|
||||
submatch_06__email \
|
||||
submatch_07__ipv4 \
|
||||
00__http_rfc7230 \
|
||||
01__http_simple \
|
||||
02__uri_rfc3986 \
|
||||
03__uri_simple \
|
||||
04__apache_log \
|
||||
05__datetime \
|
||||
06__email \
|
||||
07__ipv4 \
|
||||
\
|
||||
submatch_10__alt1_2 \
|
||||
submatch_11__alt1_4 \
|
||||
submatch_12__alt1_8 \
|
||||
submatch_13__alt2_2 \
|
||||
submatch_14__alt2_4 \
|
||||
submatch_15__alt2_8 \
|
||||
submatch_16__alt4_2 \
|
||||
submatch_17__alt4_4 \
|
||||
submatch_18__alt4_8 \
|
||||
10__alt1_2 \
|
||||
11__alt1_4 \
|
||||
12__alt1_8 \
|
||||
13__alt2_2 \
|
||||
14__alt2_4 \
|
||||
15__alt2_8 \
|
||||
16__alt4_2 \
|
||||
17__alt4_4 \
|
||||
18__alt4_8 \
|
||||
\
|
||||
submatch_20__cat2_0 \
|
||||
submatch_21__cat2_4 \
|
||||
submatch_22__cat2_8 \
|
||||
submatch_23__cat4_0 \
|
||||
submatch_24__cat4_2 \
|
||||
submatch_25__cat4_4 \
|
||||
submatch_26__cat8_0 \
|
||||
submatch_27__cat8_1 \
|
||||
submatch_28__cat8_2 \
|
||||
20__cat2_0 \
|
||||
21__cat2_4 \
|
||||
22__cat2_8 \
|
||||
23__cat4_0 \
|
||||
24__cat4_2 \
|
||||
25__cat4_4 \
|
||||
26__cat8_0 \
|
||||
27__cat8_1 \
|
||||
28__cat8_2 \
|
||||
\
|
||||
submatch_30__rep_cat_5_3_2 \
|
||||
submatch_31__rep_cat_13_11_7 \
|
||||
submatch_32__rep_cat_23_19_17 \
|
||||
submatch_33__rep_alt_5_3_2 \
|
||||
submatch_34__rep_alt_13_11_7 \
|
||||
submatch_35__rep_alt_23_19_17 \
|
||||
submatch_36__rep_5_rep_3_rep_2 \
|
||||
submatch_37__rep_13_rep_11_rep_7 \
|
||||
submatch_38__rep_23_rep_19_rep_17
|
||||
30__rep_cat_5_3_2 \
|
||||
31__rep_cat_13_11_7 \
|
||||
32__rep_cat_23_19_17 \
|
||||
33__rep_alt_5_3_2 \
|
||||
34__rep_alt_13_11_7 \
|
||||
35__rep_alt_23_19_17 \
|
||||
36__rep_5_rep_3_rep_2 \
|
||||
37__rep_13_rep_11_rep_7 \
|
||||
38__rep_23_rep_19_rep_17
|
||||
|
||||
COMMON_SRC = $(SRC_DIR)/common.h
|
||||
|
||||
@@ -90,10 +90,10 @@ COMMON_RE2C = \
|
||||
# Masked benchmarks for which Kleenex either generates very large output
|
||||
# (tens of megabytes of C code), or even causes out of memory condition.
|
||||
KLEENEX_MASKED = \
|
||||
submatch_34__rep_alt_13_11_7 \
|
||||
submatch_35__rep_alt_23_19_17 \
|
||||
submatch_37__rep_13_rep_11_rep_7 \
|
||||
submatch_38__rep_23_rep_19_rep_17
|
||||
34__rep_alt_13_11_7 \
|
||||
35__rep_alt_23_19_17 \
|
||||
37__rep_13_rep_11_rep_7 \
|
||||
38__rep_23_rep_19_rep_17
|
||||
|
||||
GEN_KLEENEX = $(patsubst %, $(GEN_DIR)/kleenex/%.c, \
|
||||
$(filter-out $(KLEENEX_MASKED), $(BENCHMARKS)))
|
||||
@@ -112,7 +112,7 @@ OBJ = $(patsubst %, %.o, $(BIN))
|
||||
# Some benchmarks share the same data, like 03__uri_simple and 02__uri_rfc3986.
|
||||
DAT = $(patsubst %, $(DAT_DIR)/%/big, \
|
||||
$(sort $(foreach bench, $(BENCHMARKS), \
|
||||
$(word 3, $(subst _, , $(bench))))))
|
||||
$(word 2, $(subst _, , $(bench))))))
|
||||
|
||||
all-local: $(BIN) $(DAT)
|
||||
|
||||
@@ -128,7 +128,6 @@ $(GEN_RE2C_EOF_TDFA1): $(GEN_DIR)/%-eof-tdfa1.c: $(SRC_DIR)/%.re $(COMMON_RE2C)
|
||||
$(AM_V_GEN)$(RE2C) $(RE2C_FLAGS_EOF) $< -o $@
|
||||
$(AM_V_at)if ! cmp -s $@ $(PREGEN_DIR)/re2c/$(@F) ; then cp -f $@ $(PREGEN_DIR)/re2c/$(@F) ; fi
|
||||
|
||||
|
||||
# optionally regenerate ragel, kleenex and re2c-3.0 benchmarks
|
||||
# (TDFA(0) and staDFA algorithms were removed in re2c versions after 3.0)
|
||||
|
||||
@@ -159,15 +158,10 @@ $(GEN_RAGEL): $(GEN_DIR)/%.c: $(SRC_DIR)/%.rl $(COMMON_RAGEL) $(RAGEL)
|
||||
$(AM_V_GEN)$(RAGEL) -G2 $< -o $@
|
||||
$(AM_V_at)if ! cmp -s $@ $(PREGEN_DIR)/ragel/$(@F) ; then cp -f $@ $(PREGEN_DIR)/ragel/$(@F) ; fi
|
||||
|
||||
# don't regenerate kleenex benchmarks, as kleenex is not actively developed
|
||||
# and it cannot be built with the recent cabal / haskell ecosystem
|
||||
# $(GEN_KLEENEX): $(GEN_DIR)/%.c: $(SRC_DIR)/%.kex $(KLEENEX)
|
||||
# $(AM_V_at)mkdir -p $(@D)
|
||||
# $(AM_V_GEN)$(KLEENEX) compile $< --srcout $@ --act=false --la=true
|
||||
# $(AM_V_at)if ! cmp -s $@ $(PREGEN_DIR)/kleenex/$(@F) ; then cp -f $@ $(PREGEN_DIR)/kleenex/$(@F) ; fi
|
||||
$(GEN_KLEENEX): $(GEN_DIR)/%: $(PREGEN_DIR)/%
|
||||
$(GEN_KLEENEX): $(GEN_DIR)/%.c: $(SRC_DIR)/%.kex $(KLEENEX)
|
||||
$(AM_V_at)mkdir -p $(@D)
|
||||
$(AM_V_GEN)cp -f $< $@
|
||||
$(AM_V_GEN)$(KLEENEX) compile $< --srcout $@ --act=false --la=true
|
||||
$(AM_V_at)if ! cmp -s $@ $(PREGEN_DIR)/kleenex/$(@F) ; then cp -f $@ $(PREGEN_DIR)/kleenex/$(@F) ; fi
|
||||
|
||||
else
|
||||
|
||||
@@ -187,20 +181,20 @@ $(BIN_CLANG): $(BIN_DIR)/%-clang: $(GEN_DIR)/%.c
|
||||
$(AM_V_at)clang $(CFLAGS) -c -o $@.o $<
|
||||
$(AM_V_GEN)clang $(CFLAGS) -o $@ $@.o
|
||||
|
||||
$(DAT): $(DAT_DIR)/%/big: $(srcdir)/../_data/%/small
|
||||
$(AM_V_at)mkdir -p $(@D) && cp $< $(@D)
|
||||
$(AM_V_GEN)( cd $(@D) && ../../$(srcdir)/../_data/gen.py )
|
||||
$(DAT): $(DAT_DIR)/%/big: $(DAT_DIR)/%/small
|
||||
$(AM_V_at)mkdir -p $(@D) && cp $(srcdir)/$(@D)/small $(@D)
|
||||
$(AM_V_GEN)( cd $(@D) && ../../$(srcdir)/data/gen.py )
|
||||
|
||||
$(KLEENEX):
|
||||
$(AM_V_at)mkdir -p $(@D) && cp $(srcdir)/../_engines/kleenex/getkleenex.sh $(@D)
|
||||
$(AM_V_at)mkdir -p $(@D) && cp $(srcdir)/engines/kleenex/getkleenex.sh $(@D)
|
||||
$(AM_V_GEN)( cd $(@D) && ./getkleenex.sh )
|
||||
|
||||
$(RAGEL):
|
||||
$(AM_V_at)mkdir -p $(@D) && cp $(srcdir)/../_engines/ragel/getragel7.sh $(@D)
|
||||
$(AM_V_at)mkdir -p $(@D) && cp $(srcdir)/engines/ragel/getragel7.sh $(@D)
|
||||
$(AM_V_GEN)( cd $(@D) && ./getragel7.sh )
|
||||
|
||||
$(RE2C3):
|
||||
$(AM_V_at)mkdir -p $(@D) && cp $(srcdir)/../_engines/re2c/getre2c3.sh $(@D)
|
||||
$(AM_V_at)mkdir -p $(@D) && cp $(srcdir)/engines/re2c/getre2c3.sh $(@D)
|
||||
$(AM_V_GEN)( cd $(@D) && ./getre2c3.sh )
|
||||
|
||||
clean-local:
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,11 @@
|
||||
ragel/21__cat2_4
|
||||
ragel/22__cat2_8
|
||||
ragel/24__cat4_2
|
||||
ragel/25__cat4_4
|
||||
ragel/28__cat8_2
|
||||
ragel/33__rep_alt_5_3_2
|
||||
ragel/34__rep_alt_13_11_7
|
||||
ragel/35__rep_alt_23_19_17
|
||||
ragel/36__rep_5_rep_3_rep_2
|
||||
ragel/37__rep_13_rep_11_rep_7
|
||||
ragel/38__rep_23_rep_19_rep_17
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+721
-721
File diff suppressed because it is too large.
Load diff
Loaded 100 of 2008 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user