Compare commits

..
20 Commits
Author SHA1 Message Date
Ulya Trofimovich 0350862f26 Remove similar cases in submatch DFA JIT benchmark. 2021-03-24 23:44:47 +00:00
Ulya Trofimovich 86cafe4134 Drop fractional part in timings for submatch DFA AOT benchmarks.
They normally take hundreds of milliseconds to run, so the fractional
part doesn't matter and it clutters the output.
2021-03-24 23:44:47 +00:00
Ulya Trofimovich f6ecb94a31 Clean up data generation scripts for submatch DFA AOT benchmarks.
Replace them all with a small python script that copy-pastes small
sample enough times to fill 100M file.
2021-03-24 23:44:47 +00:00
Ulya Trofimovich 086e61c504 Rework submatch DFA AOT benchmarks for repetition.
Changes:
  - give benchmarks more descriptive names
  - make the first benchmark triple in the "rep" series use multiple
    tags and the same counters as the other triples
2021-03-24 23:44:47 +00:00
Ulya Trofimovich a282452cbe Drop Kleenex patch, as the upstream has been fixed. 2021-03-24 23:44:47 +00:00
Ulya Trofimovich 748ba87355 Rename submatch DFA AOT benchmarks (to enforce order and group by name).
Prefix all benchmarks with a number, where the first digit is the group
index (e.g. all "real-world" benchmarks start with 0), and the second
digit is the index of a benchmark inside group. Now it is possible to
run a selected subset of benchmarks, e.g. all "real-world" benchmarks:

  $ ./run.py --filter '^0'
2021-03-24 23:44:17 +00:00
Ulya Trofimovich 9a352a1b28 benchmarks/submatch_dfa_aot/run.py: interpret filters as regexps. 2021-03-20 19:05:30 +00:00
Ulya Trofimovich 6e7cfa82be Rename submatch DFA AOT benchmarks for re2c (to avoid "-bc" suffix).
re2c benchmarks use two different end-of-input handling methods: the
default bounds checking method, and the more recent $-rule method based
on `re2c:eof` configuration. Although it is interesting to compare their
performance, presenting both methods on the plots makes them too
cluttered (and the performance of the two methods is similar compared to
other algorithms and lexer generators). So one of them is chosen as
primary (bounds checking) and its suffix "-bc" is dropped to simplify
labels on the plots.
2021-03-19 22:39:37 +00:00
Ulya Trofimovich ca96e506fd json2pgfplot.py: change --relative option to --relative-to <name>.
The new option requires passing (part of) a name of the algorithm to be
used as a base for normalizing other algorithms.
2021-03-19 08:38:05 +00:00
Ulya Trofimovich 508c32ffed json2pgfplot.py: make dots at the end of cropped columns more visible. 2021-03-19 07:48:41 +00:00
Ulya Trofimovich 20fd1eacbd json2pgfplot.py: better handling of plot limits.
Don't cut off parts of the plot because of too-small limits: set limits
based on the number of bars in each individual plot, and use "ymax" and
"ymin" to specify exact limits (rather than the previously used
"enlarge y limits" setting).
2021-03-19 00:18:50 +00:00
Ulya Trofimovich 3cbeb7acb0 json2pgfplot.py: choose scale based on the global average and maximum.
Compute maximum bar length ("xmax") based on the global average and
maximum values among all benchmarks. This is to avoid cases when a very
long bar dominates other bars and makes them appear too small. Such
outliers are cropped and marked with "..." to show that they overflow.
Previously the corring was done only in "relative" mode, because in
"absolute" mode it was unclear how to choose "xmax" value. Now that
"xmax" is computed based on global average and maximum, cropping is used
in both "relative" and "absolute" modes.
2021-03-19 00:18:50 +00:00
Ulya Trofimovich 2990b428a9 json2pgfplot.py: optionally plot binary size in addition to CPU time.
Also add binary size plots to benchmarks/submatch_dfa_aot/run.py.
2021-03-19 00:18:50 +00:00
Ulya Trofimovich e5084efc5b json2pgfplot.py: allow JSON input w/o "regsize" and "captures" fields.
For DFA AOT submatch benchmarks we do not know the number of captures or
the regular expression size. In principle they could be extracted from
the generated file (for re2c only), or an option could be added to the
programs to print statistics (for re2c and ragel, but not kleenex, as it
autogenerates the program and the user controls only the regexp). But it
would be still problematic, as different engines have slightly different
regexps and ways to mark submatch positions.
2021-03-17 06:39:36 +00:00
Ulya Trofimovich ec4799051c json2pgfplot.py: use uniform scale regardless of --relative option.
Uniform scale means that there is a global scale (a common maximum value
shared by all benchmarks). Previously this was used only in "relative"
mode, when all algorithms of a given benchmark are normalized by the
first algorithm. Now it is also used in "absolute" mode.
2021-03-16 23:49:12 +00:00
Ulya Trofimovich 3a1594c0ba Add verification options to benchmarks/submatch_dfa_aot/run.py.
The new options are:
    --verify       verify parse results on full data files
    --quickverify  verify parse results on small data samples

Replace the old verification script verify.sh with run.py.
2021-03-16 09:10:06 +00:00
Ulya Trofimovich 80572964ed Rewrite benchmarks/submatch_dfa_aot/run.sh in Python.
Also, add options `--output <JSON file>` (to generate JSON output in a
form accepted by json2pgfplot.py) and `--filter-out <word>` (to mask
some of the benchmarks). The new script run.py can be used as follows:

  $ ./run.py -h
  usage: run.py [-h] [--output OUTPUT] [--filter FILTER]
                [--filter-out FILTER_OUT] repcount

  positional arguments:
    repcount         number of times to run one benchmark

  optional arguments:
    -h, --help       show this help message and exit
    --output OUTPUT  JSON file to write benchmark results to
    --filter FILTER  pattern to select a subset of benchmarks by name
    --filter-out FILTER_OUT
                     pattern to mask a subset of benchmarks by name
2021-03-15 09:14:58 +00:00
Ulya Trofimovich 925e4f677f json2pgfplot.py: allow intermixing benchmark groups in the input.
Previously the script grouped benchmarks with the same name together
only if they appeared sequentially in the input file, so that all
benchmarks in one group preceded any benchmarks in another group. Now
this restriction is relaxed: benchmarks with the same name are grouped
together regardless of their position.
2021-03-15 08:04:58 +00:00
Ulya Trofimovich 0a1652dd62 json2pgfplot.py: add a comment about expected JSON format. 2021-03-11 07:38:51 +00:00
Ulya Trofimovich 7f0552399f Separate compilation and linking steps in submatch_dfa_aot build.
This is needeed for ccache: it only knows how to cache the compilation
of a single file. Other types of compilations (multi-file compilation,
linking, etc) will silently fall back to running the real compiler.
2021-03-11 07:28:16 +00:00
5292 changed files with 2008216 additions and 1806719 deletions
-3
View File
@@ -1,3 +0,0 @@
* text=auto
test/newlines/** -text
test/codegen/python/indentation_sensitive_crlf.re -text
-12
View File
@@ -1,12 +0,0 @@
version: 2
updates:
- package-ecosystem: "github-actions"
commit-message:
include: "scope"
prefix: "Actions"
directory: "/"
labels:
- "enhancement"
schedule:
interval: "weekly"
+10 -39
View File
@@ -32,30 +32,16 @@ jobs:
# no Windows, as Kleenex generates non-portable C code
steps:
- name: Checkout Code
uses: actions/checkout@v7
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v7
with:
python-version: '3.8'
- name: Setup Java
uses: actions/setup-java@v6
with:
# One of the distributions that packages OpenJDK, see
# https://github.com/marketplace/actions/setup-java-jdk#supported-distributions
distribution: 'oracle-openjdk'
java-version: '26'
- name: Setup Common Prerequisites
- name: Setup
run: |
case ${{ runner.os }} in
Linux*)
echo "CC=gcc" >> $GITHUB_ENV
echo "CXX=g++" >> $GITHUB_ENV
sudo apt update
sudo apt install libre2-dev libbenchmark-dev
sudo apt-get install libre2-dev libbenchmark-dev
;;
macOS*)
sudo xcode-select -switch /Applications/Xcode.app
@@ -66,24 +52,13 @@ jobs:
brew install re2 google-benchmark
;;
esac
pip install psutil
- name: Configure
run: |
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_RE2SWIFT=OFF \
-DRE2C_BUILD_RE2V=OFF \
-DRE2C_BUILD_RE2ZIG=OFF \
-DRE2C_BUILD_BENCHMARKS=ON \
-DCMAKE_CXX_FLAGS="-O3"
@@ -91,20 +66,16 @@ 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 --verify \
&& ./run.py --output results.json \
./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
- name: Run submatch Java benchmark (ReTdfa)
working-directory: .build/benchmarks/c/libre2c/java
run: ./run.py
working-directory: .build/benchmarks/submatch_dfa_jit
run: ./bench_submatch_dfa_jit
- name: Run submatch NFA benchmark
working-directory: .build/benchmarks/c/libre2c/nfa
working-directory: .build/benchmarks/submatch_nfa
run: ./bench_submatch_nfa
-167
View File
@@ -1,167 +0,0 @@
name: CI autotools
on:
push:
pull_request:
defaults:
run:
shell: bash
jobs:
build-and-test:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
# When set to true, GitHub cancels
# all in-progress jobs if any matrix job fails.
fail-fast: false
matrix:
include:
- name: linux-gcc-intree
os: ubuntu-latest
- name: linux-gcc-ootree
os: ubuntu-latest
# macOS
- name: macos-clang-intree
os: macos-latest
- name: macos-clang-ootree
os: macos-latest
steps:
- name: Checkout Code
uses: actions/checkout@v7
- name: Setup apt cache (Linux)
if: startsWith(runner.os, 'Linux')
uses: actions/cache@v6
with:
path: /var/cache/apt
key: ${{ runner.os }}-apt-cache-${{ matrix.os }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-apt-cache-${{ matrix.os }}-
${{ runner.os }}-apt-cache-
- name: Setup Common Prerequisites
run: |
case ${{ runner.os }} in
Linux*)
sudo apt update
sudo apt install autoconf automake libtool bison
;;
macOS*)
sudo xcode-select -switch /Applications/Xcode.app
echo "SDKROOT=$(xcodebuild -version -sdk macosx Path)" >> $GITHUB_ENV
echo "$(xcodebuild -version -sdk macosx Path)" >> $GITHUB_PATH
brew install autoconf automake libtool bison coreutils
# bison is not activated by default to avoid clobbering
# already present outdated system bison. Let's prepend
# brew's path.
echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH
;;
esac
- name: Setup Python
uses: actions/setup-python@v7
with:
python-version: 3.x
architecture: x64
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install docutils pygments
- name: Generate ./configure
run: ./autogen.sh
- name: Fast Configure
run: |
./configure \
--disable-dlang \
--disable-golang \
--disable-haskell \
--disable-java \
--disable-js \
--disable-ocaml \
--disable-python \
--disable-rust \
--disable-swift \
--disable-vlang \
--disable-zig \
--prefix=$PWD/install
- name: Fast Build
run: make -j$(nproc)
- name: Fast Install
run: make -j$(nproc) install
- name: Fast Clean
run: make -j$(nproc) distclean
- name: Minimal Install Test
working-directory: ./install/bin
run: ./re2c --version
- name: Get build dir
id: build-info
run: |
if echo "${{ matrix.name }}" | grep -q "ootree"; then
BUILD_DIR="$(pwd)/.build/${{ matrix.name }}-full"
mkdir -p "$BUILD_DIR"
else
BUILD_DIR="$(pwd)"
fi
echo "BUILD_DIR=$BUILD_DIR" >> $GITHUB_OUTPUT
- name: Full Configure
working-directory: ${{ steps.build-info.outputs.BUILD_DIR }}
run: |
$GITHUB_WORKSPACE/configure \
--prefix=$PWD/full-install \
--enable-libs \
--enable-parsers \
--enable-lexers \
--enable-docs \
--enable-debug \
RE2C_FOR_BUILD=$GITHUB_WORKSPACE/install/bin/re2c
- name: Full Build
working-directory: ${{ steps.build-info.outputs.BUILD_DIR }}
run: |
find $GITHUB_WORKSPACE/src -name '*.re' | xargs touch
make -j$(nproc)
- name: Run Main Test Suite
working-directory: ${{ steps.build-info.outputs.BUILD_DIR }}
run: bash -c "ulimit -s 256; make check -j$(nproc)"
- name: Run Skeleton Tests
working-directory: ${{ steps.build-info.outputs.BUILD_DIR }}
run: python run_tests.py --skeleton
- name: Full Install
working-directory: ${{ steps.build-info.outputs.BUILD_DIR }}
run: make -j$(nproc) install
- name: Archive test artifacts
# Run this step only if tests failed (otherwise there is nothing to upload).
if: failure()
uses: actions/upload-artifact@v7
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>.
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
-181
View File
@@ -1,181 +0,0 @@
name: CI CMake
on:
push:
pull_request:
defaults:
run:
shell: bash
jobs:
build-and-test:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
# When set to true, GitHub cancels
# all in-progress jobs if any matrix job fails.
fail-fast: false
matrix:
include:
# Linux
- name: linux-gcc-ubsan-ootree
os: ubuntu-latest
- name: linux-gcc-asan-ootree
os: ubuntu-latest
- name: linux-gcc-valgrind-ootree
os: ubuntu-latest
- name: linux-gcc-debug-ootree-skeleton
os: ubuntu-latest
- name: linux-gcc-debug-intree-m32-skeleton
os: ubuntu-latest
- name: linux-gcc-release-ootree-skeleton
os: ubuntu-latest
# macOS
- name: macos-clang-debug-ootree-skeleton
os: macos-latest
- name: macos-clang-debug-intree-skeleton
os: macos-latest
- name: macos-clang-release-ootree-skeleton
os: macos-latest
# Windows
- name: windows-msvc-debug-ootree
os: windows-latest
- name: windows-msvc-debug-intree
os: windows-latest
- name: windows-msvc-release-ootree
os: windows-latest
steps:
- name: Checkout Code
uses: actions/checkout@v7
- name: Setup chocolatey Cache (Windows)
if: startsWith(runner.os, 'Windows')
uses: actions/cache@v6
with:
path: C:\Users\runneradmin\AppData\Local\Temp\chocolatey
key: ${{ runner.os }}-chocolatey-${{ matrix.os }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-chocolatey-${{ matrix.os }}-
${{ runner.os }}-chocolatey-
- name: Setup apt cache (Linux)
if: startsWith(runner.os, 'Linux')
uses: actions/cache@v6
with:
path: /var/cache/apt
key: ${{ runner.os }}-apt-cache-${{ matrix.os }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-apt-cache-${{ matrix.os }}-
${{ runner.os }}-apt-cache-
- name: Setup Common Prerequisites
run: |
case ${{ runner.os }} in
Linux*)
sudo apt update
sudo apt install gcc-multilib g++-multilib # for -m32
sudo apt install valgrind
;;
macOS*)
sudo xcode-select -switch /Applications/Xcode.app
echo "SDKROOT=$(xcodebuild -version -sdk macosx Path)" >> $GITHUB_ENV
echo "$(xcodebuild -version -sdk macosx Path)" >> $GITHUB_PATH
brew install coreutils # for `nproc`
;;
Windows*)
choco install --no-progress -y winflexbison3
choco install gnuwin32-coreutils.install # for `nproc`
;;
esac
- name: Setup Python
uses: actions/setup-python@v7
with:
python-version: 3.x
architecture: x64
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install docutils pygments
- name: Check Available Configure Presets
run: cmake --list-presets
- name: Fast Configure
run: cmake --preset=${{ matrix.name }}-fast -DPython3_ROOT_DIR="${{ env.pythonLocation }}"
- name: Fast Build
run: cmake --build --preset=${{ matrix.name }}-fast -j$(nproc)
- name: Install
run: cmake --build --preset=${{ matrix.name }}-fast --target install
- name: Minimal Install Test
working-directory: ./install/bin
run: ./re2c --version
- name: Get build dir
id: build-info
run: |
if echo "${{ matrix.name }}" | grep -q "ootree"; then
BUILD_DIR="${{ github.workspace }}/.build/${{ matrix.name }}-full"
else
BUILD_DIR="${{ github.workspace }}"
fi
echo "BUILD_DIR=$BUILD_DIR" >> $GITHUB_OUTPUT
- name: Full Configure
run: cmake --preset=${{ matrix.name }}-full -DPython3_ROOT_DIR="${{ env.pythonLocation }}"
- name: Full Build
run: |
find src -name '*.re' | xargs touch
cmake --build --preset=${{ matrix.name }}-full -j$(nproc)
- name: Run Main Test Suite
run: bash -c "ulimit -s 256; cmake --build --preset=${{ matrix.name }}-full --target tests -j$(nproc)"
- name: Run Skeleton Tests
if: "contains(matrix.name, 'skeleton')"
working-directory: ${{ steps.build-info.outputs.BUILD_DIR }}
run: python run_tests.py --skeleton
- name: Run Valgrind Tests
if: "contains(matrix.name, 'valgrind')"
working-directory: ${{ steps.build-info.outputs.BUILD_DIR }}
run: python run_tests.py --valgrind
- name: Archive test artifacts
# Run this step only if tests failed (otherwise there is nothing to upload).
if: failure()
uses: actions/upload-artifact@v7
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]*
# Artifacts are retained for 90 days by default.
# In fact, we don't need such long period.
retention-days: 30
+279
View File
@@ -0,0 +1,279 @@
name: CI
on:
push:
pull_request:
defaults:
run:
shell: bash
jobs:
build-and-test:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
# Linux
- name: linux-gcc-ubsan-ootree
os: ubuntu-latest
generator: Unix Makefiles
build-type: Ubsan
build-dir: .build
cxx-flags: '-O2'
skeleton: ${{ false }}
- name: linux-gcc-asan-ootree
os: ubuntu-latest
generator: Unix Makefiles
build-type: Asan
build-dir: .build
cxx-flags: '-O2'
skeleton: ${{ false }}
- name: linux-gcc-debug-ootree-skeleton
os: ubuntu-latest
generator: Unix Makefiles
build-type: Debug
build-dir: .build
cxx-flags: -O2
skeleton: ${{ true }}
- name: linux-gcc-debug-intree-skeleton
os: ubuntu-latest
generator: Unix Makefiles
build-type: Debug
build-dir: .
cxx-flags: -O2
skeleton: ${{ true }}
- name: linux-gcc-release-ootree-skeleton
os: ubuntu-latest
generator: Unix Makefiles
build-type: Release
build-dir: .build
cxx-flags: ${{ null }}
skeleton: ${{ true }}
# macOS
- name: macos-clang-debug-ootree-skeleton
os: macos-latest
generator: Unix Makefiles
build-type: Debug
build-dir: .build
cxx-flags: -O2
skeleton: ${{ true }}
- name: macos-clang-debug-intree-skeleton
os: macos-latest
generator: Unix Makefiles
build-type: Debug
build-dir: .
cxx-flags: -O2
skeleton: ${{ true }}
- name: macos-clang-release-ootree-skeleton
os: macos-latest
generator: Unix Makefiles
build-type: Release
build-dir: .build
cxx-flags: ${{ null }}
skeleton: ${{ true }}
# Windows
- name: windows-msvc-debug-ootree
os: windows-latest
generator: Visual Studio 16 2019
build-type: Debug
build-dir: .build
cxx-flags: ${{ null }}
skeleton: ${{ false }}
- name: windows-msvc-debug-intree
os: windows-latest
generator: Visual Studio 16 2019
build-type: Debug
build-dir: .
cxx-flags: ${{ null }}
skeleton: ${{ false }}
- name: windows-msvc-release-ootree
os: windows-latest
generator: Visual Studio 16 2019
build-type: Release
build-dir: .build
cxx-flags: ${{ null }}
skeleton: ${{ false }}
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup chocolatey Cache (Windows)
if: startsWith(runner.os, 'Windows')
uses: actions/cache@v2
with:
path: C:\Users\runneradmin\AppData\Local\Temp\chocolatey
key: ${{ runner.os }}-chocolatey-${{ matrix.os }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-chocolatey-${{ matrix.os }}-
${{ runner.os }}-chocolatey-
- name: Setup Common Prerequisites
run: |
case ${{ runner.os }} in
Linux*)
echo "CC=gcc" >> $GITHUB_ENV
echo "CXX=g++" >> $GITHUB_ENV
;;
macOS*)
sudo xcode-select -switch /Applications/Xcode.app
echo "CC=$(xcrun -f clang)" >> $GITHUB_ENV
echo "CXX=$(xcrun -f clang++)" >> $GITHUB_ENV
echo "SDKROOT=$(xcodebuild -version -sdk macosx Path)" >> $GITHUB_ENV
echo "$(xcodebuild -version -sdk macosx Path)" >> $GITHUB_PATH
;;
Windows*)
choco install --no-progress -y winflexbison3
;;
esac
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.x
architecture: x64
- name: Get PIP Cache Key
id: pip-cache
run: |
python -c "from pip._internal.locations import USER_CACHE_DIR; \
print('::set-output name=dir::' + USER_CACHE_DIR)"
- name: Install Python Dependencies
# Disabled until this https://github.com/skvadrik/re2c/issues/327
# will be implemented
if: startsWith(runner.os, 'Windows') == false
run: |
python -m pip install --upgrade pip
pip install docutils pygments
- name: Prepare Configure Command
id: configure-command
run: |
# Common CMake arguments
args=( -S . -B ${{ matrix.build-dir }} )
# Generator's specific stuff.
# We don't add generator here to avoid word split when expanding
# array elements, e.g. 'Visual Studio' passed as two arguments.
case "${{ matrix.generator }}" in
'Visual Studio'*)
args+=( -A x64 )
;;
*)
# CMAKE_BUILD_TYPE is not used by multi-config build
# types (e.g Visual Studio) at the configure time
# thus we add it only for single-config build types
args+=( -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} )
;;
esac
# CFLAGS, CXXFLAGS
[[ ! -z '${{ matrix.cxx-flags }}' ]] && \
args+=( -DCMAKE_C_FLAGS="${{ matrix.cxx-flags }}" -DCMAKE_CXX_FLAGS="${{ matrix.cxx-flags }}" )
echo "::set-output name=cmake::${args[@]}"
- name: Fast Configure
run: |
# Read prepared command into an array
astr="${{ steps.configure-command.outputs.cmake }}"
args=($astr)
# Amend Build Options
args+=( -DCMAKE_INSTALL_PREFIX="$(pwd)/install" )
# Disable some defaults for now to speed up the build as
# they are not necessary in a minimal installation
args+=( -DRE2C_BUILD_RE2GO=OFF )
# Generator's specific stuff.
# Some generator names contains a space e.g. 'Visual Studio'.
# So, to avoid word split when expanding array elements in 'args=($astr)'
# we add generator here instead of 'Prepare Configure Command' step.
args+=( -G "${{ matrix.generator }}" )
# Print the resulting command line for debugging purposes
echo "cmake ${args[@]}"
# Run
cmake "${args[@]}"
- name: Fast Build
run: cmake --build ${{ matrix.build-dir }} --config ${{ matrix.build-type }}
- name: Install
run: |
cmake --build ${{ matrix.build-dir }} --config ${{ matrix.build-type }} --target install
echo -e "Install tree:\n$(find install | sed 's/^/-- /')"
- name: Minimal Install Test
working-directory: ./install/bin
run: ./re2c --version
- name: Full Configure
run: |
# Read prepared command into an array
astr="${{ steps.configure-command.outputs.cmake }}"
args=($astr)
# Amend Build Options
args+=( -DCMAKE_INSTALL_PREFIX="$(pwd)/install-2" -DRE2C_BUILD_RE2GO=ON -DRE2C_BUILD_LIBS=ON )
args+=( -DRE2C_REBUILD_LEXERS=ON -DRE2C_FOR_BUILD="$(pwd)/install/bin/re2c" )
# Windows does not have a native 'man' and 'sed' commands.
# Disabled until this https://github.com/skvadrik/re2c/issues/327
# will be implemented
case ${{ runner.os }} in
Windows*)
args+=( -DRE2C_REBUILD_DOCS=OFF )
;;
*)
args+=( -DRE2C_REBUILD_DOCS=ON )
;;
esac
# Generator's specific stuff
# Some generator names contains a space e.g. 'Visual Studio'.
# So, to avoid word split when expanding array elements in 'args=($astr)'
# we add generator here instead of 'Prepare Configure Command' step.
args+=( -G "${{ matrix.generator }}" )
# Print the resulting command line for debugging purposes
echo "cmake ${args[@]}"
# Run
cmake "${args[@]}"
- name: Full Build
run: |
find src -name '*.re' | xargs touch
cmake --build ${{ matrix.build-dir }} --config ${{ matrix.build-type }} --verbose
- name: Test
if: startsWith(runner.os, 'Windows') == false
working-directory: ${{ matrix.build-dir }}
run: |
# main test suite
cmake --build . --target check
# skeleton tests (if enabled)
if [[ "x${{ matrix.skeleton }}" == "xtrue" ]] ; then
./run_tests.sh --skeleton
fi
-4
View File
@@ -11,10 +11,6 @@
/m4
/test_*
/.build*
/bazel-*
# Ignore user defined CMake presets
CMakeUserPresets.json
# The files autogenerated by automake.
Makefile.in
-3
View File
@@ -1,3 +0,0 @@
[submodule "benchmarks/c/libre2c/java/REgen"]
path = benchmarks/c/libre2c/java/REgen
url = https://github.com/skvadrik/REgen.git
+1 -4
View File
@@ -1,8 +1,5 @@
language: cpp
# use Ubuntu 20.04 (Focal Fossa) that defaults to Python 3
dist: focal
# speed up incremental builds
cache: ccache
@@ -78,7 +75,7 @@ script:
- make -j$(nproc)
- |
if [ x${SKELETON} = "xyes" ]; then
./run_tests.py --skeleton
./run_tests.sh --skeleton
else
make -j$(nproc) check VERBOSE=1
fi
-46
View File
@@ -1,46 +0,0 @@
package(default_visibility = ["//visibility:private"])
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
genrule(
name = "re2c_config",
srcs = [
"CMakeLists.txt",
"//bazel:re2c_config.h",
],
outs = ["config.h"],
cmd = """
cat $(location //:CMakeLists.txt) |\\
sed -rne 's/project\\(re2c VERSION ([^ ]+).*/#define PACKAGE_VERSION "\\1-bootstrap"/p' >> "$@"
cat $(location //bazel:re2c_config.h) >> "$@"
""",
)
cc_library(
name = "re2c_config_cc",
hdrs = ["config.h"],
defines = ["""RE2C_STDLIB_DIR='"$(BINDIR)/re2c.runfiles/re2c/include"'"""],
data = ["include/unicode_categories.re"],
)
cc_library(
name = "re2c_bootstrap_cc",
includes = ["bootstrap"],
hdrs = glob([
"bootstrap/src/**/*.h",
"src/**/*.h",
]),
srcs = glob([
"bootstrap/src/**/*.cc",
"src/**/*.cc",
], exclude = ["src/test/**/*.cc"]),
deps = [
"re2c_config_cc", # Needed for 're2c_config_cc' data files
],
)
cc_binary(
name = "re2c",
srcs = ["src/main.cc"],
deps = [":re2c_bootstrap_cc"],
visibility = ["//visibility:public"],
)
-308
View File
@@ -1,308 +0,0 @@
Build & install
===============
If you want to install re2c from a prebuilt package, skip to the bottom of the
page for a list of all packages available on different systems. Below is a guide
how to build re2c from source code.
Dependencies
------------
To build re2c from a release tarball one needs only a C++ compiler (supporting
at least C++11) and Python 3 for build-time scripts and for testing. Building on
Windows additionally requires either CMake or a Mingw build environment.
To develop re2c one also needs CMake or Autotools (both build systems are
maintained). Other dependencies include Bison (to rebuild parsers), Python 3
Docutils (to rebuild documentation) and Sphinx (to rebuild the website).
Benchmarks also use Google-benchmark, re2 and Java. A few helper scripts are
written in Haskell, but they are not essential for re2c development.
re2c is a self-hosting lexer generator, meaning that parts of its source code
are written in re2c (namely, all the source files that have a *.re* extension).
By default re2c builds from pre-generated bootstrap files. To build from source
*.re* files, it is necessary to reconfigure the build and provide a path to an
existing re2c binary that will be used for bootstrap (see the details below).
Build (Autotools)
-----------------
If you are building from a release tarball, the configure script is already
there. Otherwise it is necessary to generate it:
```
$ autoreconf -i -W all
```
An in-tree build (objects are generated side by side with sources):
```
$ ./configure && make && make install
```
An out-of-tree build (objects are generated in a separate directory
named `.build`):
```
$ mkdir .build && cd .build && ../configure && make && make install
```
The configure script has many options (to see them all, run
`configure --help`). The options specific to re2c are the following:
* `--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-swift`
Build re2swift (identical to `re2c --lang swift`). 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
an existing re2c executable path.
* `--enable-parsers`
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).
* `--enable-benchmarks`
Build benchmarks (requires Google benchmarks library).
* `--enable-benchmarks-regenerate`
Regenerate C code for Ragel and Kleenex benchmarks (this will download and
build Ragel and Kleenex). re2c benchmarks are always regenerated.
* `--enable-libs`
Build the experimental libre2c library that provides POSIX
`regcomp`/`regexec`/`regfree` interface to re2c.
Cross-compile re2c for Windows (for some Mingw versions you might have to use
`-std=gnu++11` compiler option):
```
$ ./configure --host i686-w64-ming32 \
LDFLAGS="-static -static-libstdc++ -static-libgcc"
```
There is a bunch of build scripts for specialized builds with Asan, Ubsan,
GLIBCXX_DEBUG, etc. in the ``build`` subdirectory.
Build (CMake)
-------------
re2c includes CMake presets for Linux, MacOS, and Windows. Use `cmake
--list-presets` to see them.
* The `-fast` presets have minimal dependencies and build re2c using
pre-generated manpages, lexers, and parsers.
* The `-full` presets have additional prerequisites (Docutils, Bison, and a
pre-existing re2c binary) and re-generate the manpages, lexers, and parsers.
If you just want to build re2c, use the `-release-ootree-fast` preset. The
other presets are primarily of interest to developers.
For example, to build the `windows-msvc-release-ootree-fast` preset:
* CD to the root of the re2c folder (the folder containing this README).
* Configure: `cmake --preset=windows-msvc-release-ootree-fast`
* Build: `cmake --build --preset=windows-msvc-release-ootree-fast`
* The binary will be in the `.build/<preset-name>` folder.
CMake supports different build modes, which can be further customized with
individual options. By default re2c builds with `-O2 -g` and does not set any
particular mode to allow the user complete freedom in overriding the build
options. To enable a build mode at configure phase, use
`-DCMAKE_BUILD_TYPE=<mode>` option (this works with single-config generators,
such as Makefiles or Ninja). At build phase use `--config <mode>` option.
The following modes are supported:
* `Release`
This is an optimized `-O3 -DNDEBUG` build without debug symbols, asserts
and debug checks.
* `Debug`
This is a non-optimized `-g -DRE2C_DEBUG` build with debug symbols, asserts,
and debug checks.
* `RelWithDebInfo`
This is an optimized `-O2 -g -DNDEBUG` build with debug symbols, but
without asserts and debug checks.
* `MinSizeRel`
This is an optimized for size `-Os -DNDEBUG` build without debug symbols,
asserts and debug checks.
* `Asan`
This is a non-optimized `-g -fsanitize=address` build that instruments the
code with Address Sanitizer to check for memory errors.
* `Ubsan`
This is a non-optimized `-g -fsanitize=undefined` build that instruments
the code with Undefined Behavior Sanitizer to check for undefined behavior
errors.
A simple build (objects are generated in a separate build directory named
`.build`):
```
$ mkdir .build && cd .build && cmake .. && cmake --build .
```
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_RE2SWIFT=yes`
Build re2swift executable (an alias to `re2c --lang swift`). 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
an existing re2c executable path.
* `-DRE2C_REBUILD_PARSERS=yes`
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).
* `-DRE2C_BUILD_BENCHMARKS=yes`
Build benchmarks (requires Google benchmarks library).
* `-DRE2C_REGEN_BENCHMARKS=yes`
Regenerate C code for Ragel and Kleenex benchmarks (this will download and
build Ragel and Kleenex). re2c benchmarks are always regenerated.
* `-DRE2C_BUILD_LIBS=yes`
Build the experimental libre2c library that provides POSIX
`regcomp`/`regexec`/`regfree` interface to re2c.
Cross-compile re2c for Windows using Mingw:
```
$ cmake . -DCMAKE_TOOLCHAIN_FILE=cmake/Toolchain-cross-mingw32-linux.cmake \
-DCMAKE_EXE_LINKER_FLAGS="-static -static-libstdc++ -static-libgcc" \
-DBUILD_SHARED_LIBS=no
```
There is a bunch of build scripts for specialized builds with Asan, Ubsan,
GLIBCXX_DEBUG, etc. in the ``build`` subdirectory.
Test
----
re2c has a main test suite and a number of unit tests. Run them all:
```
$ make check
```
Run only the main test suite and watch the progress dumped on stdout:
```
$ python3 run_tests.py -j<N>
```
Run the main test suite with `--skeleton` re2c option:
```
$ python3 run_tests.py --skeleton
```
Run the test suite under Valgrind (takes some time and memory):
```
$ python3 run_tests.py --valgrind
```
Test Mingw builds with Wine:
```
$ make wtests
```
Check the distribution (works with Autotools):
```
$ make distcheck
```
re2c provides a helper script `build/__alltest.sh` that builds and tests various
re2c build flavours with Asan, Ubsan, GLIBCXX_DEBUG, etc. There is a couple of
fuzz-testing Haskell scripts in the *fuzz* subdirectory; they are based on the
QuickCheck library and can be easily modified to fuzz-test various aspects of
re2c by comparing current re2c version against older versions or against other
regular expression libraries.
Packages
--------
[Repology](https://repology.org/project/re2c/versions)
has a list of re2c packages for different systems:
![re2c](https://repology.org/badge/vertical-allrepos/re2c.svg)
+49 -706
View File
@@ -1,711 +1,9 @@
Changelog
=========
4.6 (2026-08-29)
~~~~~~~~~~~~~~~~
- Added support for Zig labeled continue optimization.
(`#580 <https://github.com/skvadrik/re2c/pull/580>`_).
- Updated C/C++ examples to use re2c features available in version 4.0 or higher.
4.5.1 (2026-03-27)
~~~~~~~~~~~~~~~~~~
- Added missing include files to the distribution
(`#573 <https://github.com/skvadrik/re2c/issues/573>`_).
- Updated the documentation to mention the new include files.
4.5 (2026-03-23)
~~~~~~~~~~~~~~~~
- Migrated include files to Unicode 17.0.0 standard.
- Added Unicode include files:
+ `include/unicode_blocks.re <https://github.com/skvadrik/re2c/blob/master/include/unicode_blocks.re>`_
+ `include/unicode_properties.re <https://github.com/skvadrik/re2c/blob/master/include/unicode_properties.re>`_
- Implemented Unicode case mapping for case-insensitive string literals
(`#235 <https://github.com/skvadrik/re2c/issues/235>`_).
- Fixed `#571 <https://github.com/skvadrik/re2c/issues/571>`_
(segmentation fault on erroneous input during determinization).
- Updated paper `A closer look at TDFA <https://arxiv.org/abs/2206.01398>`_
(applied corrections by Lisa Felidae).
4.4 (2025-12-20)
~~~~~~~~~~~~~~~~
- Added generalized end-of-input symbol ``$``
(`#525 <https://github.com/skvadrik/re2c/issues/525>`_).
This change may break old code with conflicitng end-of-input rules,
as they now have position-based precedence. The broken cases were
reported with ``-Wdeprecated-eof-rule`` since version 4.3.
4.3.1 (2025-12-01)
~~~~~~~~~~~~~~~~~~
- Fixed bugs:
+ `#560 <https://github.com/skvadrik/re2c/issues/560>`_
(allow conditions that have no rules except for default rule)
+ `#561 <https://github.com/skvadrik/re2c/issues/561>`_
(use unsigned character type in C/C++ examples)
+ `#564 <https://github.com/skvadrik/re2c/issues/564>`_
(fix broken end of input rule $ with captures)
4.3 (2025-06-30)
~~~~~~~~~~~~~~~~
- Added warning ``-Wdeprecated-eof-rule``, this will be turned to error in the
future (`#525 <https://github.com/skvadrik/re2c/issues/525>`_).
- Improved re2c performance (made determinization faster,
`#544 <https://github.com/skvadrik/re2c/discussions/544>`_).
4.2 (2025-04-23)
~~~~~~~~~~~~~~~~
- Added Swift backend
(`#506 <https://github.com/skvadrik/re2c/issues/506>`_).
- Added options:
+ ``--lang swift``
+ ``--computed-gotos-relative``
- Added configurations:
+ ``re2c:cgoto:relative``, ``re2c:computed-gotos:relative``
+ ``re2c:yyfn:throw``
- Added syntax file code templates:
+ ``code:cgoto``
+ ``code:cgoto_data``
+ ``code:yytarget_filter``
+ ``code:type_yyctable``
- Added syntax file conditionals:
+ ``.cgoto.relative``
+ ``.yyfn.throw``
- Added some C++ benchmarks without submatch extraction.
4.1 (2025-02-16)
~~~~~~~~~~~~~~~~
- Added new syntax for actions
(`#521 <https://github.com/skvadrik/re2c/issues/521>`_).
- Added entry, pre-rule and post-rule actions
(`#521 <https://github.com/skvadrik/re2c/issues/521>`_):
+ ``!entry`` action binds code at the start of the current finite state machine
+ ``!pre_rule`` action prepernds code to semantic actions of all rules in the
current block or condiiton.
+ ``!post_rule`` action appernds code to semantic actions of all rules in the
current block or condiiton.
- Added syntax file option ``special_escapes`` that describes allowed escape
sequences (`#516 <https://github.com/skvadrik/re2c/issues/516>`_).
- Fixed bugs:
+ `#518 <https://github.com/skvadrik/re2c/issues/518>`_
(allow using lookahead operator with captures).
+ `#519 <https://github.com/skvadrik/re2c/issues/519>`_
(integer overflow caused a very long loop when generating tag names).
+ `#522 <https://github.com/skvadrik/re2c/issues/522>`_
(segfault on ``!use`` directive in a block with conditions).
+ `#523 <https://github.com/skvadrik/re2c/issues/523>`_
(regression with bit-vector optimization).
+ `#529 <https://github.com/skvadrik/re2c/issues/529>`_
(failure to recognize escaped double quotes in character literals).
- OCaml backend now uses ``unsafe_get`` instead of ``get`` as the default ``YYPEEK``
implementation.
- Zig backend now uses ``const`` for ``yych`` declaration in
``--recursive-functions`` mode.
- Benchmarks (C/C++):
+ Reimplemented benchmarks using google-benchmark library.
+ Added simple variants without buffer refill.
+ Removed Kleenex benchmarks.
+ Removed deprecated TDFA(0) and StaDFA algorithms.
+ Updated benchmark results.
- Build system:
+ Migrated to Bazel 8 using bzlmod.
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.1 (2023-07-19)
~~~~~~~~~~~~~~~~
- Added capturing groups with leftmost greedy semantics:
+ Enabled with ``--leftmost-captures`` option or ``re2c:leftmost_captures``
configuration
(`55de79d8 <https://github.com/skvadrik/re2c/commit/55de79d8>`_,
`3a98b543 <https://github.com/skvadrik/re2c/commit/3a98b543>`_).
- Added non-capturing groups:
+ Added new syntax ``(! ...)`` for non-capturing groups
(`1edd25d3 <https://github.com/skvadrik/re2c/commit/1edd25d3>`_,
`b813c9b4 <https://github.com/skvadrik/re2c/commit/b813c9b4>`_,
`338806b9 <https://github.com/skvadrik/re2c/commit/338806b9>`_).
+ Added the ability to flip defaults: make ``(...)`` capturing and ``(! ...)``
non-capturing with ``--invert-captures`` option or ``re2c:invert_captures``
configuration
(`20030ff1 <https://github.com/skvadrik/re2c/commit/20030ff1>`_,
`ce756195 <https://github.com/skvadrik/re2c/commit/ce756195>`_).
- Regenerated Unicode include header to support a newer standard
(`e3ec2597 <https://github.com/skvadrik/re2c/commit/e3ec2597>`_).
- Published TDFA paper: https://arxiv.org/abs/2206.01398, co-authored with
Angelo Borsotti
(`fa94d9c7 <https://github.com/skvadrik/re2c/commit/fa94d9c7>`_).
- Removed experimental algorithms that are superseded by TDFA(1) and
generally less efficient:
+ Removed staDFA algorithm and deprecated ``--stadfa`` option
(`ac5c06cc <https://github.com/skvadrik/re2c/commit/ac5c06cc>`_).
+ Removed TDFA(0) algorithm and deprecated ``--no-lookahead`` option
(`dc8f264a <https://github.com/skvadrik/re2c/commit/dc8f264a>`_).
+ (libre2c) Removed backward-matching algorithm
(`27256be1 <https://github.com/skvadrik/re2c/commit/27256be1>`_).
+ (libre2c) Removed Kuklewicz POSIX disambiguation algorithm
(`aa97b014 <https://github.com/skvadrik/re2c/commit/aa97b014>`_).
+ (libre2c) Removed GTOP shortest path finding algorithm
(`511a030c <https://github.com/skvadrik/re2c/commit/511a030c>`_).
- Bug fixes:
+ Fixed parsing of raw UTF-8 characters in Flex compatibility mode
(`d87f86ed <https://github.com/skvadrik/re2c/commit/d87f86ed>`_).
+ Added header file to the dependencies generated with ``--depfile`` option
(`f807f763 <https://github.com/skvadrik/re2c/commit/f807f763>`_
and `2dda36aa <https://github.com/skvadrik/re2c/commit/2dda36aa>`_).
+ Fixed stack overflow on large regular expressions by rewriting recursive
functions in iterative form
(`46a9b4c4 <https://github.com/skvadrik/re2c/commit/46a9b4c4>`_,
`aaf68292 <https://github.com/skvadrik/re2c/commit/aaf68292>`_,
`02e5d797 <https://github.com/skvadrik/re2c/commit/02e5d797>`_,
`5fffb187 <https://github.com/skvadrik/re2c/commit/5fffb187>`_)
and limited stack to 256K on GithubActions CI
(`111ee5da <https://github.com/skvadrik/re2c/commit/111ee5da>`_).
- Build system:
+ Added minimal http://bazel.build integration
(`3205c867 <https://github.com/skvadrik/re2c/commit/3205c867>`_).
+ Added configure option ``--enable-parsers`` that regenerates bison parsers
(`9e0dbd3c <https://github.com/skvadrik/re2c/commit/9e0dbd3c>`_).
+ Added CMake option ``RE2C_REBUILD_PARSERS``
(`6e91c22d <https://github.com/skvadrik/re2c/commit/6e91c22d>`_).
+ With CMake, fixed documentation generation on Windows.
- Codebase improvements:
+ Moved the entire codebase to C++11.
+ Added uniform error handling (return codes are now properly checked and
returned to the caller).
+ Reorganized codegen subsystem in four well-defined phases (analyze,
generate, fixup, render) and separated codegen from parsing phase.
+ Improved memory allocation by using slab allocators instead of global free
lists.
+ Moved to pure API for bison parsers.
+ Unified code style.
- Testing:
+ Added ``--verbose`` flag to run_tests.py and suppressed verbose output by
default.
+ Multiple improvements of continuous testing with GithubActions.
3.0 (2022-01-27)
~~~~~~~~~~~~~~~~
- Added code generation backend for Rust:
+ Enabled with ``--lang rust`` option.
+ A new ``re2rust`` binary (built by default, or configured with
``--enable-rust`` Autoconf option and ``RE2C_BUILD_RE2RUST`` CMake option).
- Added options:
+ ``--loop-switch``
+ ``--no-unsafe``
- Added configurations;
+ ``re2c:label:yyloop``
+ ``re2c:unsafe``
- Renamed options to use common naming scheme. The old names are supported as
aliases, so the change does not break existing code. Documentation has been
updated to use new names.
+ ``--api`` is a new alias for ``--input``
+ ``--ebcdic`` is a new alias for ``--ecb``
+ ``--ucs2`` is a new alias for ``--wide-chars``
+ ``--utf32`` is a new alias for ``--unicode``
+ ``--utf16`` is a new alias for ``--utf-16``
+ ``--utf8`` is a new alias for ``--utf-8``
+ ``--header`` is a new alias for ``--type-header``
- Renamed configurations to use common naming scheme and support proper scoping
under subcategories such as ``:define``, ``:label``, ``:variable``, etc. The
old names are supported as aliases, so the change does not break existing
code. Documentation has been updated to use new names.
+ ``re2c:api`` is a new alias for ``re2c:flags:input``
+ ``re2c:bit-vectors`` is a new alias for ``re2c:flags:bit-vectors``
+ ``re2c:case-insensitive`` is a new alias for ``re2c:flags:case-insensitive``
+ ``re2c:case-inverted`` is a new alias for ``re2c:flags:case-inverted``
+ ``re2c:case-ranges`` is a new alias for ``re2c:flags:case-ranges``
+ ``re2c:cond:prefix`` is a new alias for ``re2c:condprefix``
+ ``re2c:cond:enumprefix`` is a new alias for ``re2c:condenumprefix``
+ ``re2c:computed-gotos`` is a new alias for ``re2c:flags:computed-gotos``
+ ``re2c:computed-gotos:threshold`` is a new alias for ``re2c:cgoto:threshold``
+ ``re2c:debug-output`` is a new alias for ``re2c:flags:debug-output``
+ ``re2c:encoding:ebcdic`` is a new alias for ``re2c:flags:ecb``
+ ``re2c:encoding:utf32`` is a new alias for ``re2c:flags:unicode``
+ ``re2c:encoding:ucs2`` is a new alias for ``re2c:flags:wide-chars``
+ ``re2c:encoding:utf16`` is a new alias for ``re2c:flags:utf-16``
+ ``re2c:encoding:utf8`` is a new alias for ``re2c:flags:utf-8``
+ ``re2c:encoding-policy`` is a new alias for ``re2c:flags:encoding-policy``
+ ``re2c:empty-class`` is a new alias for ``re2c:flags:empty-class``
+ ``re2c:header`` is a new alias for ``re2c:flags:type-header``
+ ``re2c:label:prefix`` is a new alias for ``re2c:labelprefix``
+ ``re2c:label:yyfill`` is a new alias for ``re2c:label:yyFillLabel``
+ ``re2c:label:start`` is a new alias for ``re2c:startlabel``
+ ``re2c:nested-ifs`` is a new alias for ``re2c:flags:nested-ifs``
+ ``re2c:posix-captures`` is a new alias for ``re2c:flags:posix-captures``
+ ``re2c:tags`` is a new alias for ``re2c:flags:tags``
+ ``re2c:variable:yych:conversion`` is a new alias for ``re2c:yych:conversion``
+ ``re2c:variable:yych:emit`` is a new alias for ``re2c:yych:emit``
+ ``re2c:variable:yybm:hex`` is a new alias for ``re2c:yybm:hex``
+ ``re2c:unsafe`` is a new alias for ``re2c:flags:unsafe``
- Added directive alias ``conditions:re2c`` for ``types:re2c``.
- Multiple small changes in code generation, including some formatting changes
that result in large diffs in the generated code:
+ Do not allocate indices for unused state labels (this results in a change in
state enumeration), commits
`919570c4 <https://github.com/skvadrik/re2c/commit/919570c4>`_ and
`82b704f6 <https://github.com/skvadrik/re2c/commit/82b704f6>`_.
+ Do not generate redundant ``YYPEEK`` statements, commit
`cca31d22 <https://github.com/skvadrik/re2c/commit/cca31d22>`_.
+ Do not generate ``YYDEBUG`` statements for unused states labels, commit
`a46f01e6 <https://github.com/skvadrik/re2c/commit/a46f01e6>`_.
+ C backend: change formatting of switch statements, commit
`ed88e12e <https://github.com/skvadrik/re2c/commit/ed88e12e>`_.
+ Go backend: render continuous character ranges in compact form, commit
`09161b14 <https://github.com/skvadrik/re2c/commit/09161b14>`_.
+ Mark start and end of included .re files with line directives, commit
`48e83fca <https://github.com/skvadrik/re2c/commit/48e83fca>`_.
- A fix to limit maximum allowed NFA and DFA size (to avoid out of memory
crashes and stack overflows), commit
`a3473fd7 <https://github.com/skvadrik/re2c/commit/a3473fd7>`_.
- A fix to correctly compute fixed tags in trailing context, commit
`68e1ab71 <https://github.com/skvadrik/re2c/commit/68e1ab71>`_.
- A fix to generate non-overlapping names for s-tag and m-tag variables, commit
`7c6b5c95 <https://github.com/skvadrik/re2c/commit/7c6b5c95>`_.
- Infrastructural: added support for CMake presets.
- Updated documentation.
- Backwards-incompatible changes that are unlikely to affect any users:
+ Restrict lexical contexts where ``%{`` is recognized as a block start,
commit `dba7d055 <https://github.com/skvadrik/re2c/commit/dba7d055>`_.
+ Emit an error when repetition lower bound exceeds upper bound, commit
`039c1894 <https://github.com/skvadrik/re2c/commit/039c1894>`_.
2.2 (2021-08-01)
~~~~~~~~~~~~~~~~
- Added named blocks and block lists in directives.
- Added local blocks ``/*!local:re2c ... */``.
- Added in-block ``!include`` directive.
- Added in-block ``!use`` directive.
- Allowed reusable blocks without ``-r --reusable`` option.
- Allowed customizing the generated code with configurations for directives
``max:re2c``, ``maxnmatch:re2c``, ``stags:re2c``, ``mtags:re2c`` and
``types:re2c`` (see directive descriptions for details).
- Forbid arbitrary text at the end of ``max:re2c`` directive. This may break
backwards compatibility, although it is unlikely that this was used by anyone.
The change was necessary in order to allow customization of the generated code
with configurations.
- Deprecated configurations ``flags:i``, ``flags:no-debug-info`` in favour of
the global options ``-i``, ``--no-debug-info``.
- Reimplemented re2c test runner in Python (thanks to
`Serghei Iakovlev <https://github.com/sergeyklay>`_). Improved integration
with GitHub Actions.
- Changes in the experimental libre2c library: added new algorithms that
construct t-string or extract submatch on all repetitions; added TDFA
benchmark written in Java by Angelo Borsotti.
- Updated documentation.
2.1.1 (2021-03-27)
~~~~~~~~~~~~~~~~~~
- Added missing CMakeLists.txt to release tarballs
(`#346 <https://github.com/skvadrik/re2c/issues/346>`_).
2.1 (2021-03-26)
~~~~~~~~~~~~~~~~
- Added GitHub Actions CI for Linux, macOS and Windows and fixed numerous build
issues on those platforms (thanks to
`Serghei Iakovlev <https://github.com/sergeyklay>`_).
- Added benchmarks for submatch extraction in lexer generators (ragel vs.
kleenex vs. re2c with TDFA(0), TDFA(1) or sta-DFA algorithms).
+ New Autotools (configure) options: ``--enable-benchmarks``,
``--enable-benchmarks-regenerate``
+ New CMake options: ``-DRE2C_BUILD_BENCHMARKS``, ``-DRE2C_REGEN_BENCHMARKS``
+ New `json2pgfplot.py
<https://github.com/skvadrik/re2c/blob/master/benchmarks/json2pgfplot.py>`_
script that converts benchmark results in JSON to a PDF with bar charts
- Added option ``--depfile <filename>`` to generate build dependency files
(allows to track ``/*!include:re2c*/`` dependencies in the build system).
- Added option ``--fixed-tags <none | all | toplevel>`` and improved fixed-tag
optimization to work with nested tags.
- Added lzip to the distribution tarballs.
- Added registerless-TDFA algorithm in the experimental libre2c library.
- Explicitly disallowed invalid configuration when ``-f``, ``--storable-state``
option is used, but ``YYFILL`` is disabled
(`#306 <https://github.com/skvadrik/re2c/issues/306>`_).
- Fixed bug in UTF-8 decode for 4-bytes rune
(`#307 <https://github.com/skvadrik/re2c/pull/307>`_, thanks to
`Satoshi Yasushima <https://github.com/s-yasu>`_).
- Fixed bugs in rare cases of the end-of-input rule ``$`` usage
(`277f0295 <https://github.com/skvadrik/re2c/commit/277f0295fc77a2dad3b9838e45f787319b54a25f>`_,
`68611a57 <https://github.com/skvadrik/re2c/commit/68611a57a9683c05801255b35ba6217b91391dd8>`_
and `a9d582f9 <https://github.com/skvadrik/re2c/commit/a9d582f9d2a6d123aa55f3b8b73076aae7cb5616>`_).
- Optimized ``--skeleton`` generation time.
- Renamed internal option ``--dfa`` to ``--nested-negative-tags``.
- Updated documentation for end of input handling and submatch extraction.
----
2.0x
----
2.0.3 (2020-08-22)
~~~~~~~~~~~~~~~~~~
@@ -813,6 +111,9 @@ Changelog
- Major revision of the paper "Efficient POSIX submatch extraction on NFA".
----
1.3x
----
1.3 (2019-12-14)
~~~~~~~~~~~~~~~~
@@ -836,6 +137,9 @@ Changelog
(`#258 <https://github.com/skvadrik/re2c/pull/258>`_:
Make the build reproducible).
----
1.2x
----
1.2.1 (2019-08-11)
~~~~~~~~~~~~~~~~~~
@@ -1017,6 +321,9 @@ Changelog
- Updated documentation and website.
----
1.1x
----
1.1.1 (2018-08-30)
~~~~~~~~~~~~~~~~~~
@@ -1034,6 +341,9 @@ Changelog
Bugs with option: ``re2c:flags:no-debug-info``.
- Reworked first part of TDFA paper.
----
1.0x
----
1.0.3 (2017-11-08)
~~~~~~~~~~~~~~~~~~
@@ -1199,6 +509,10 @@ Changelog
Makefile.am: create target directory before writing into it
-----
0.16x
-----
0.16 (2016-01-21)
~~~~~~~~~~~~~~~~~
@@ -1211,6 +525,10 @@ Changelog
test failure on big endian archs with 0.15.3
-----
0.15x
-----
0.15.3 (2015-12-02)
~~~~~~~~~~~~~~~~~~~
@@ -1334,6 +652,10 @@ Changelog
keep a mirror on sourceforge.
-----
0.14x
-----
0.14.3 (2015-05-20)
~~~~~~~~~~~~~~~~~~~
@@ -1367,6 +689,10 @@ Changelog
Dot output label escaped characters
-----
0.13x
-----
0.13.7.5 (2014-08-22)
~~~~~~~~~~~~~~~~~~~~~
@@ -1477,6 +803,10 @@ Changelog
- Fixed #1708378 segfault ``in actions.cc``.
-----
0.12x
-----
0.12.3 (2007-08-24)
~~~~~~~~~~~~~~~~~~~
@@ -1528,6 +858,10 @@ Changelog
+ aCC: HP C/aC++ B3910B A.06.15 [Mar 28 2007] (HP-UX IA64)
-----
0.11x
-----
0.11.3 (2007-04-01)
~~~~~~~~~~~~~~~~~~~
@@ -1554,6 +888,10 @@ Changelog
- Added ``-u`` switch to support unicode.
-----
0.10x
-----
0.10.8 (2007-04-01)
~~~~~~~~~~~~~~~~~~~
@@ -1684,6 +1022,10 @@ Changelog
- Applied #1307467 Unicode patch for 0.9.7.
----
0.9x
----
0.9.12 (2005-12-28)
~~~~~~~~~~~~~~~~~~~
@@ -1777,8 +1119,9 @@ Changelog
- Removed rcs comments in source files.
-------------------------
re2c adopted (2003-12-09)
~~~~~~~~~~~~~~~~~~~~~~~~~
-------------------------
- Version 0.9.1 README::
+211 -380
View File
@@ -1,84 +1,61 @@
cmake_minimum_required(VERSION 3.15)
project(re2c VERSION 4.6 HOMEPAGE_URL "https://re2c.org/")
cmake_minimum_required(VERSION 3.12)
project(re2c VERSION 2.0.3 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")
endif()
option(RE2C_REBUILD_PARSERS "Regenerate parsers with Bison" OFF)
if(RE2C_REBUILD_PARSERS AND NOT RE2C_FOR_BUILD)
find_package(BISON REQUIRED)
option(RE2C_REBUILD_DOCS "Regenerate manpage" OFF)
if(RE2C_REBUILD_DOCS)
find_program(RST2MAN NAMES rst2man rst2man.py)
if(NOT RST2MAN)
message(FATAL_ERROR "rst2man (or rst2man.py) program is required for RE2C_REBUILD_DOCS")
endif()
# Windows does not have a native 'man' and 'sed' commands.
# Therefore, we are looking for the Cygwin versions of 'man' and 'sed'.
if (WIN32)
find_program(MAN_EXECUTABLE man)
if(NOT MAN_EXECUTABLE)
message(FATAL_ERROR "man program is required for RE2C_REBUILD_DOCS")
endif()
find_program(SED_EXECUTABLE sed)
if(NOT SED_EXECUTABLE)
message(FATAL_ERROR "sed program is required for RE2C_REBUILD_DOCS")
endif()
endif()
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_RE2SWIFT "Build re2swift executable (an alias for `re2c --lang swift`)" 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)
endif()
find_package(BISON)
if(RE2C_REBUILD_DOCS)
execute_process(
COMMAND "${Python3_EXECUTABLE}" -c "import docutils"
RESULT_VARIABLE EXIT_CODE
OUTPUT_QUIET
)
if (NOT ${EXIT_CODE} EQUAL 0)
message(FATAL_ERROR "python package docutils (needed for docs) not found")
endif()
endif()
# Use C++11 standard. Note that without `set(CMAKE_CXX_EXTENSIONS OFF)` this enables
# -std=gnu++11, not -std=c++11. Extensions are needed to enable POSIX functions on
# Cygwin and NetBSD.
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON) # fail if the C++ compiler does not support this standard
# make sure object libraries work with shared libraries
include(CheckPIESupported)
check_pie_supported()
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
# checks for C++ compiler flags
set(CMAKE_CXX_STANDARD 98)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_POSITION_INDEPENDENT_CODE ON) # make sure object libraries work with shared libraries
# use system stdint.h if present, otherwise fallback to src/c99_stdint.h
ac_check_headers("stdint.h")
# needed for POSIX file API
ac_check_headers("sys/types.h")
ac_check_headers("sys/stat.h")
@@ -87,67 +64,44 @@ ac_check_headers("unistd.h")
# windows POSIX-like API
ac_check_headers("io.h")
# list of possible types to use in typedefs
ac_check_sizeof("char")
ac_check_sizeof("short")
ac_check_sizeof("int")
ac_check_sizeof("long")
ac_check_sizeof("long long")
ac_check_sizeof("__int64")
ac_check_sizeof("void *")
# 64-bit integer constant suffix
ac_check_sizeof("0l")
ac_check_sizeof("0ll")
ac_check_sizeof("0i8")
# 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_swift "${CMAKE_CURRENT_BINARY_DIR}/doc/re2swift.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_swift "${CMAKE_CURRENT_BINARY_DIR}/src/msg/help_re2swift.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_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_help "${CMAKE_CURRENT_BINARY_DIR}/src/msg/help.cc")
set(re2c_genhelp "${CMAKE_CURRENT_SOURCE_DIR}/build/gen_help.sh")
set(re2c_splitman "${CMAKE_CURRENT_SOURCE_DIR}/build/split_man.sh")
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_RE2SWIFT}>:${re2c_manpage_swift}>"
"$<$<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}")
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.sh.in run_tests.sh @ONLY)
set(RE2C_RUN_TESTS "${CMAKE_CURRENT_BINARY_DIR}/run_tests.sh")
if(CMAKE_HOST_UNIX)
execute_process(COMMAND chmod +x "${RE2C_RUN_TESTS}")
endif()
ac_config_headers("config.h")
@@ -165,26 +119,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_swift.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
@@ -192,16 +132,21 @@ add_library(re2c_objects_autogen_ver_to_vernum OBJECT
)
set(re2c_sources
src/codegen/code_goto.cc
src/codegen/combine.cc
src/codegen/gen_bitmaps.cc
src/codegen/gen_delayed.cc
src/codegen/gen_dfa.cc
src/codegen/gen_goto.cc
src/codegen/gen_program.cc
src/codegen/gen_state.cc
src/codegen/helpers.cc
src/codegen/output.cc
src/codegen/pass1_analyze.cc
src/codegen/pass2_generate.cc
src/codegen/pass3_fixup.cc
src/codegen/pass4_render.cc
src/codegen/render.cc
src/options/opt.cc
src/options/symtab.cc
src/nfa/estimate_size.cc
src/nfa/re_to_nfa.cc
src/adfa/adfa.cc
src/adfa/prepare.cc
src/debug/dump_adfa.cc
src/debug/dump_cfg.cc
src/debug/dump_dfa.cc
@@ -225,22 +170,26 @@ set(re2c_sources
src/dfa/fillpoints.cc
src/dfa/find_state.cc
src/dfa/minimization.cc
src/dfa/stacmd.cc
src/dfa/tagver_table.cc
src/dfa/tcmd.cc
src/encoding/ebcdic.cc
src/encoding/ebcdic/ebcdic_regexp.cc
src/encoding/enc.cc
src/encoding/range_suffix.cc
src/encoding/unicode_casemap.cc
src/encoding/utf8.cc
src/encoding/utf16.cc
src/encoding/utf8/utf8_regexp.cc
src/encoding/utf8/utf8.cc
src/encoding/utf16/utf16_regexp.cc
src/encoding/utf16/utf16.cc
src/msg/msg.cc
src/msg/warn.cc
src/regexp/ast_to_re.cc
src/regexp/default_tags.cc
src/regexp/fixed_tags.cc
src/regexp/nullable.cc
src/regexp/regexp.cc
src/regexp/rule.cc
src/regexp/split_charset.cc
src/regexp/tag.cc
src/compile.cc
src/skeleton/control_flow.cc
src/skeleton/generate_code.cc
src/skeleton/generate_data.cc
@@ -248,233 +197,122 @@ set(re2c_sources
src/skeleton/skeleton.cc
src/parse/ast.cc
src/parse/input.cc
src/util/file_utils.cc
src/util/string_utils.cc
src/parse/normalize.cc
src/parse/scanner.cc
src/parse/unescape.cc
src/parse/validate.cc
src/util/get_dir.cc
src/util/s_to_n32_unsafe.cc
src/util/temp_file.cc
src/util/range.cc
src/main.cc
$<TARGET_OBJECTS:re2c_objects_autogen>
$<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/swift" "src/default_syntax_swift.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\""
)
add_executable(re2go ${re2c_sources})
target_compile_definitions(re2go PUBLIC "RE2C_LANG=LANG_GO")
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()
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")
# 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()
# docs
set(re2c_docs_sources
"${re2c_manpage_source}"
"doc/manual/api/api.rst_"
"doc/manual/api/interface.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.rst_"
"doc/manual/submatch/submatch_example_stags_fill.rst_"
"doc/manual/submatch/submatch.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/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/src/lexer/lexer.h"
"examples/c/includes/include.re"
"examples/c/includes/definitions.h"
"examples/c/reuse/reuse.re"
"examples/c/state/push.re"
"examples/c/submatch/01_stags.re"
"examples/c/submatch/01_stags_fill.re"
"examples/c/submatch/02_mtags.re"
"examples/c/submatch/03_posix.re"
"examples/go/01_basic.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/src/lexer/lexer.go"
"examples/go/includes/include.re"
"examples/go/includes/definitions.go"
"examples/go/reuse/reuse.re"
"examples/go/state/push.re"
"examples/go/submatch/01_stags.re"
"examples/go/submatch/02_mtags.re"
"examples/go/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_help("${re2c_help_source}" "${re2c_help}" "${re2c_help_bootstrap}")
add_custom_target(docs DEPENDS "${re2c_docs}")
# 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\""
)
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\""
)
endif()
if (RE2C_BUILD_RE2SWIFT)
re2c_gen_help("${re2c_help_source}" "${re2c_help_swift}")
re2c_gen_manpage("${re2c_manpage_source}" "${re2c_manpage_swift}")
add_executable(re2swift ${re2c_sources} "${re2c_help_swift}")
target_compile_definitions(re2swift PUBLIC
"RE2C_LANG=Lang::SWIFT"
"RE2C_PROG=\"re2swift\""
)
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()
# 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()
# 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_RE2SWIFT)
install(TARGETS re2swift RUNTIME DESTINATION bin)
install(FILES "${re2c_manpage_swift}" 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/swift
include/syntax/v
include/syntax/zig
include/unicode_blocks.re
include/unicode_categories.re
include/unicode_properties.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
@@ -482,41 +320,37 @@ 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}"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
COMMAND "${Python3_EXECUTABLE}" "${RE2C_RUN_TESTS}"
COMMAND "${RE2C_RUN_TESTS}"
)
add_dependencies(tests re2c)
add_custom_target(vtests
DEPENDS "${RE2C_RUN_TESTS}"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
COMMAND "${Python3_EXECUTABLE}" "${RE2C_RUN_TESTS}" --valgrind
COMMAND "${RE2C_RUN_TESTS}" --valgrind
)
add_dependencies(vtests re2c)
add_custom_target(wtests
DEPENDS "${RE2C_RUN_TESTS}"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
COMMAND "${Python3_EXECUTABLE}" "${RE2C_RUN_TESTS}" --wine -j1
COMMAND "${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
src/test/range/test.h
src/util/range.cc
src/util/range.h
src/util/static_assert.h
)
add_executable(re2c_test_s_to_n32_unsafe
src/test/s_to_n32_unsafe/test.cc
src/util/string_utils.cc
src/util/s_to_n32_unsafe.cc
)
add_executable(re2c_test_ver_to_vernum
src/test/ver_to_vernum/test.cc
@@ -524,9 +358,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
@@ -553,26 +387,22 @@ if (RE2C_BUILD_LIBS)
re2c_bootstrap_lexer("lib/lex.re" "lib/lex.cc")
re2c_bootstrap_parser("lib/parse.ypp" "lib/parse.cc" "lib/parse.h")
add_library(test_libre2c_objects_autogen OBJECT
"${CMAKE_CURRENT_BINARY_DIR}/lib/test_helper.cc"
)
re2c_bootstrap_lexer("lib/test_helper.re" "lib/test_helper.cc")
set(libre2c_sources
add_library(libre2c_objects OBJECT
lib/regcomp.cc
lib/regexec.cc
lib/regexec_dfa.cc
lib/regexec_dfa_multipass.cc
lib/regexec_dfa_regless.cc
lib/regexec_nfa_leftmost.cc
lib/regexec_nfa_leftmost_trie.cc
lib/regexec_nfa_posix.cc
lib/regexec_nfa_posix_trie.cc
lib/regexec_nfa_posix_backward.cc
lib/regexec_nfa_posix_kuklewicz.cc
lib/regfree.cc
lib/stubs.cc
src/parse/ast.cc
src/parse/input.cc
src/parse/unescape.cc
src/options/opt.cc
src/options/symtab.cc
src/cfg/cfg.cc
src/cfg/compact.cc
src/cfg/dce.cc
@@ -596,29 +426,35 @@ if (RE2C_BUILD_LIBS)
src/dfa/fillpoints.cc
src/dfa/find_state.cc
src/dfa/minimization.cc
src/dfa/stacmd.cc
src/dfa/tagver_table.cc
src/dfa/tcmd.cc
src/nfa/estimate_size.cc
src/nfa/re_to_nfa.cc
src/encoding/enc.cc
src/encoding/range_suffix.cc
src/encoding/unicode_casemap.cc
src/encoding/ebcdic.cc
src/encoding/utf16.cc
src/encoding/utf8.cc
src/encoding/ebcdic/ebcdic_regexp.cc
src/encoding/utf16/utf16.cc
src/encoding/utf16/utf16_regexp.cc
src/encoding/utf8/utf8.cc
src/encoding/utf8/utf8_regexp.cc
src/msg/msg.cc
src/msg/warn.cc
src/regexp/ast_to_re.cc
src/regexp/default_tags.cc
src/regexp/fixed_tags.cc
src/regexp/nullable.cc
src/regexp/regexp.cc
src/regexp/rule.cc
src/regexp/split_charset.cc
src/regexp/tag.cc
src/skeleton/control_flow.cc
src/skeleton/maxpath.cc
src/skeleton/skeleton.cc
src/util/range.cc
src/util/file_utils.cc
src/util/string_utils.cc
src/util/s_to_n32_unsafe.cc
)
set(libre2c_sources
$<TARGET_OBJECTS:libre2c_objects>
$<TARGET_OBJECTS:libre2c_objects_autogen>
$<TARGET_OBJECTS:re2c_objects_autogen_ver_to_vernum>
)
@@ -652,32 +488,27 @@ 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)
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)
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()
-606
View File
@@ -1,606 +0,0 @@
{
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 21,
"patch": 1
},
"configurePresets": [
{
"name": "default-full-configuration",
"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_RE2SWIFT": true,
"RE2C_BUILD_RE2V": true,
"RE2C_BUILD_RE2ZIG": true,
"RE2C_BUILD_LIBS": true,
"RE2C_REBUILD_LEXERS": true,
"RE2C_REBUILD_DOCS": true,
"RE2C_FOR_BUILD": "${sourceDir}/install/bin/re2c"
}
},
{
"name": "linux-config-base",
"hidden": true,
"generator": "Unix Makefiles",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
},
"architecture": {
"value": "x64",
"strategy": "external"
},
"cacheVariables": {
"CMAKE_C_COMPILER": "gcc",
"CMAKE_CXX_COMPILER": "g++"
}
},
{
"name": "linux-gcc-ubsan-ootree-fast",
"displayName": "Linux x86_64: GCC / Ubsan / Out of tree (fast)",
"inherits": "linux-config-base",
"binaryDir": "${sourceDir}/.build/${presetName}",
"installDir": "${sourceDir}/install",
"cacheVariables": {
"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_RE2SWIFT": false,
"RE2C_BUILD_RE2V": false,
"RE2C_BUILD_RE2ZIG": false
}
},
{
"name": "linux-gcc-ubsan-ootree-full",
"displayName": "Linux x86_64: GCC / Ubsan / Out of tree (full)",
"inherits": ["default-full-configuration", "linux-gcc-ubsan-ootree-fast"]
},
{
"name": "linux-gcc-asan-ootree-fast",
"displayName": "Linux x86_64: GCC / Asan / Out of tree (fast)",
"inherits": "linux-config-base",
"binaryDir": "${sourceDir}/.build/${presetName}",
"installDir": "${sourceDir}/install",
"cacheVariables": {
"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_RE2SWIFT": false,
"RE2C_BUILD_RE2V": false,
"RE2C_BUILD_RE2ZIG": false
}
},
{
"name": "linux-gcc-asan-ootree-full",
"displayName": "Linux x86_64: GCC / Asan / Out of tree (full)",
"inherits": ["default-full-configuration", "linux-gcc-asan-ootree-fast"]
},
{
"name": "linux-gcc-debug-ootree-skeleton-fast",
"displayName": "Linux x86_64: GCC / Debug / Skeleton / Out of tree (fast)",
"inherits": "linux-config-base",
"binaryDir": "${sourceDir}/.build/${presetName}",
"installDir": "${sourceDir}/install",
"cacheVariables": {
"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_RE2SWIFT": false,
"RE2C_BUILD_RE2V": false,
"RE2C_BUILD_RE2ZIG": false
}
},
{
"name": "linux-gcc-debug-ootree-skeleton-full",
"displayName": "Linux x86_64: GCC / Debug / Skeleton / Out of tree (full)",
"inherits": ["default-full-configuration", "linux-gcc-debug-ootree-skeleton-fast"]
},
{
"name": "linux-gcc-debug-intree-m32-skeleton-fast",
"displayName": "Linux x86: GCC / Debug / Skeleton / In tree (fast)",
"inherits": "linux-config-base",
"binaryDir": "${sourceDir}",
"installDir": "${sourceDir}/install",
"architecture": {
"value": "x86",
"strategy": "external"
},
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_C_FLAGS": "-O2 -m32",
"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_RE2SWIFT": false,
"RE2C_BUILD_RE2V": false,
"RE2C_BUILD_RE2ZIG": false
}
},
{
"name": "linux-gcc-debug-intree-m32-skeleton-full",
"displayName": "Linux x86: GCC / Debug / Skeleton / In tree (full)",
"inherits": ["default-full-configuration", "linux-gcc-debug-intree-m32-skeleton-fast"]
},
{
"name": "linux-gcc-release-ootree-skeleton-fast",
"displayName": "Linux x86_64: GCC / Release / Skeleton / Out of tree (fast)",
"inherits": "linux-config-base",
"binaryDir": "${sourceDir}/.build/${presetName}",
"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_RE2SWIFT": false,
"RE2C_BUILD_RE2V": false,
"RE2C_BUILD_RE2ZIG": false
}
},
{
"name": "linux-gcc-release-ootree-skeleton-full",
"displayName": "Linux x86_64: GCC / Release / Skeleton / Out of tree (full)",
"inherits": ["default-full-configuration", "linux-gcc-release-ootree-skeleton-fast"]
},
{
"name": "linux-gcc-valgrind-ootree-fast",
"displayName": "Linux x86_64: GCC / Valgrind / Out of tree (fast)",
"inherits": ["linux-gcc-release-ootree-skeleton-fast"]
},
{
"name": "linux-gcc-valgrind-ootree-full",
"displayName": "Linux x86_64: GCC / Valgrind / Out of tree (full)",
"inherits": ["linux-gcc-release-ootree-skeleton-full"]
},
{
"name": "macos-config-base",
"hidden": true,
"generator": "Unix Makefiles",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Darwin"
},
"architecture": {
"value": "x64",
"strategy": "external"
},
"cacheVariables": {
"CMAKE_C_COMPILER": "clang",
"CMAKE_CXX_COMPILER": "clang++"
}
},
{
"name": "macos-clang-debug-ootree-skeleton-fast",
"displayName": "macOS x86_64: Clang / Debug / Skeleton / Out of tree (fast)",
"inherits": "macos-config-base",
"binaryDir": "${sourceDir}/.build/${presetName}",
"installDir": "${sourceDir}/install",
"cacheVariables": {
"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_RE2SWIFT": false,
"RE2C_BUILD_RE2V": false,
"RE2C_BUILD_RE2ZIG": false
}
},
{
"name": "macos-clang-debug-ootree-skeleton-full",
"displayName": "macOS x86_64: Clang / Debug / Skeleton / Out of tree (full)",
"inherits": ["default-full-configuration", "macos-clang-debug-ootree-skeleton-fast"]
},
{
"name": "macos-clang-debug-intree-skeleton-fast",
"displayName": "macOS x86_64: Clang / Debug / Skeleton / In tree (fast)",
"inherits": "macos-config-base",
"binaryDir": "${sourceDir}",
"installDir": "${sourceDir}/install",
"cacheVariables": {
"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_RE2SWIFT": false,
"RE2C_BUILD_RE2V": false,
"RE2C_BUILD_RE2ZIG": false
}
},
{
"name": "macos-clang-debug-intree-skeleton-full",
"displayName": "macOS x86_64: Clang / Debug / Skeleton / In tree (full)",
"inherits": ["default-full-configuration", "macos-clang-debug-intree-skeleton-fast"]
},
{
"name": "macos-clang-release-ootree-skeleton-fast",
"displayName": "macOS x86_64: CLang / Release / Skeleton / Out of tree (fast)",
"inherits": "macos-config-base",
"binaryDir": "${sourceDir}/.build/${presetName}",
"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_RE2SWIFT": false,
"RE2C_BUILD_RE2V": false,
"RE2C_BUILD_RE2ZIG": false
}
},
{
"name": "macos-clang-release-ootree-skeleton-full",
"displayName": "macOS x86_64: CLang / Release / Skeleton / Out of tree (full)",
"inherits": ["default-full-configuration", "macos-clang-release-ootree-skeleton-fast"]
},
{
"name": "windows-config-base",
"hidden": true,
"generator": "Visual Studio 18 2026",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
},
"architecture": {
"value": "x64",
"strategy": "external"
},
"cacheVariables": {
"CMAKE_C_COMPILER": "cl",
"CMAKE_CXX_COMPILER": "cl"
}
},
{
"name": "windows-msvc-debug-ootree-fast",
"displayName": "Windows x86_64: MSVC / Debug / Out of tree (fast)",
"inherits": "windows-config-base",
"binaryDir": "${sourceDir}/.build/${presetName}",
"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_RE2SWIFT": false,
"RE2C_BUILD_RE2V": false,
"RE2C_BUILD_RE2ZIG": false
}
},
{
"name": "windows-msvc-debug-ootree-full",
"displayName": "Windows x86_64: MSVC / Debug / Out of tree (full)",
"inherits": ["default-full-configuration", "windows-msvc-debug-ootree-fast"]
},
{
"name": "windows-msvc-debug-intree-fast",
"displayName": "Windows x86_64: MSVC / Debug / In tree (fast)",
"inherits": "windows-config-base",
"binaryDir": "${sourceDir}",
"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_RE2SWIFT": false,
"RE2C_BUILD_RE2V": false,
"RE2C_BUILD_RE2ZIG": false
}
},
{
"name": "windows-msvc-debug-intree-full",
"displayName": "Windows x86_64: MSVC / Debug / In tree (full)",
"inherits": ["default-full-configuration", "windows-msvc-debug-intree-fast"]
},
{
"name": "windows-msvc-release-ootree-fast",
"displayName": "Windows x86_64: MSVC / Release / Out of tree (fast)",
"inherits": "windows-config-base",
"binaryDir": "${sourceDir}/.build/${presetName}",
"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_RE2SWIFT": false,
"RE2C_BUILD_RE2V": false,
"RE2C_BUILD_RE2ZIG": false
}
},
{
"name": "windows-msvc-release-ootree-full",
"displayName": "Windows x86_64: MSVC / Release / Out of tree (full)",
"inherits": ["default-full-configuration", "windows-msvc-release-ootree-fast"]
}
],
"buildPresets": [
{
"name": "linux-build-base",
"hidden": true,
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
}
},
{
"name": "linux-gcc-ubsan-ootree-fast",
"displayName": "Linux x86_64: GCC / Ubsan / Out of tree (fast)",
"configurePreset": "linux-gcc-ubsan-ootree-fast",
"inherits": "linux-build-base",
"configuration": "Ubsan"
},
{
"name": "linux-gcc-ubsan-ootree-full",
"displayName": "Linux x86_64: GCC / Ubsan / Out of tree (full)",
"configurePreset": "linux-gcc-ubsan-ootree-full",
"inherits": "linux-build-base",
"configuration": "Ubsan"
},
{
"name": "linux-gcc-asan-ootree-fast",
"displayName": "Linux x86_64: GCC / Asan / Out of tree (fast)",
"configurePreset": "linux-gcc-asan-ootree-fast",
"inherits": "linux-build-base",
"configuration": "Asan"
},
{
"name": "linux-gcc-asan-ootree-full",
"displayName": "Linux x86_64: GCC / Asan / Out of tree (full)",
"configurePreset": "linux-gcc-asan-ootree-full",
"inherits": "linux-build-base",
"configuration": "Asan"
},
{
"name": "linux-gcc-debug-ootree-skeleton-fast",
"displayName": "Linux x86_64: GCC / Debug / Skeleton / Out of tree (fast)",
"configurePreset": "linux-gcc-debug-ootree-skeleton-fast",
"inherits": "linux-build-base",
"configuration": "Debug"
},
{
"name": "linux-gcc-debug-ootree-skeleton-full",
"displayName": "Linux x86_64: GCC / Debug / Skeleton / Out of tree (full)",
"configurePreset": "linux-gcc-debug-ootree-skeleton-full",
"inherits": "linux-build-base",
"configuration": "Debug"
},
{
"name": "linux-gcc-debug-intree-m32-skeleton-fast",
"displayName": "Linux x86: GCC / Debug / Skeleton / In tree (fast)",
"configurePreset": "linux-gcc-debug-intree-m32-skeleton-fast",
"inherits": "linux-build-base",
"configuration": "Debug"
},
{
"name": "linux-gcc-debug-intree-m32-skeleton-full",
"displayName": "Linux x86: GCC / Debug / Skeleton / In tree (full)",
"configurePreset": "linux-gcc-debug-intree-m32-skeleton-full",
"inherits": "linux-build-base",
"configuration": "Debug"
},
{
"name": "linux-gcc-release-ootree-skeleton-fast",
"displayName": "Linux x86_64: GCC / Release / Skeleton / Out of tree (fast)",
"configurePreset": "linux-gcc-release-ootree-skeleton-fast",
"inherits": "linux-build-base",
"configuration": "Release"
},
{
"name": "linux-gcc-release-ootree-skeleton-full",
"displayName": "Linux x86_64: GCC / Release / Skeleton / Out of tree (full)",
"configurePreset": "linux-gcc-release-ootree-skeleton-full",
"inherits": "linux-build-base",
"configuration": "Release"
},
{
"name": "linux-gcc-valgrind-ootree-fast",
"displayName": "Linux x86_64: GCC / Valgrind / Out of tree (fast)",
"configurePreset": "linux-gcc-valgrind-ootree-fast",
"inherits": "linux-build-base",
"configuration": "Release"
},
{
"name": "linux-gcc-valgrind-ootree-full",
"displayName": "Linux x86_64: GCC / Valgrind / Out of tree (full)",
"configurePreset": "linux-gcc-valgrind-ootree-full",
"inherits": "linux-build-base",
"configuration": "Release"
},
{
"name": "macos-build-base",
"hidden": true,
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Darwin"
}
},
{
"name": "macos-clang-debug-ootree-skeleton-fast",
"displayName": "macOS x86_64: Clang / Debug / Skeleton / Out of tree (fast)",
"configurePreset": "macos-clang-debug-ootree-skeleton-fast",
"inherits": "macos-build-base",
"configuration": "Debug"
},
{
"name": "macos-clang-debug-ootree-skeleton-full",
"displayName": "macOS x86_64: Clang / Debug / Skeleton / Out of tree (full)",
"configurePreset": "macos-clang-debug-ootree-skeleton-full",
"inherits": "macos-build-base",
"configuration": "Debug"
},
{
"name": "macos-clang-debug-intree-skeleton-fast",
"displayName": "macOS x86_64: Clang / Debug / Skeleton / In tree (fast)",
"configurePreset": "macos-clang-debug-intree-skeleton-fast",
"inherits": "macos-build-base",
"configuration": "Debug"
},
{
"name": "macos-clang-debug-intree-skeleton-full",
"displayName": "macOS x86_64: Clang / Debug / Skeleton / In tree (full)",
"configurePreset": "macos-clang-debug-intree-skeleton-full",
"inherits": "macos-build-base",
"configuration": "Debug"
},
{
"name": "macos-clang-release-ootree-skeleton-fast",
"displayName": "macOS x86_64: CLang / Release / Skeleton / Out of tree (fast)",
"configurePreset": "macos-clang-release-ootree-skeleton-fast",
"inherits": "macos-build-base",
"configuration": "Release"
},
{
"name": "macos-clang-release-ootree-skeleton-full",
"displayName": "macOS x86_64: CLang / Release / Skeleton / Out of tree (full)",
"configurePreset": "macos-clang-release-ootree-skeleton-full",
"inherits": "macos-build-base",
"configuration": "Release"
},
{
"name": "windows-build-base",
"hidden": true,
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
},
{
"name": "windows-msvc-debug-ootree-fast",
"displayName": "Windows x86_64: MSVC / Debug / Out of tree (fast)",
"configurePreset": "windows-msvc-debug-ootree-fast",
"inherits": "windows-build-base",
"configuration": "Debug"
},
{
"name": "windows-msvc-debug-ootree-full",
"displayName": "Windows x86_64: MSVC / Debug / Out of tree (full)",
"configurePreset": "windows-msvc-debug-ootree-full",
"inherits": "windows-build-base",
"configuration": "Debug"
},
{
"name": "windows-msvc-debug-intree-fast",
"displayName": "Windows x86_64: MSVC / Debug / In tree (fast)",
"configurePreset": "windows-msvc-debug-intree-fast",
"inherits": "windows-build-base",
"configuration": "Debug"
},
{
"name": "windows-msvc-debug-intree-full",
"displayName": "Windows x86_64: MSVC / Debug / In tree (full)",
"configurePreset": "windows-msvc-debug-intree-full",
"inherits": "windows-build-base",
"configuration": "Debug"
},
{
"name": "windows-msvc-release-ootree-fast",
"displayName": "Windows x86_64: MSVC / Release / Out of tree (fast)",
"configurePreset": "windows-msvc-release-ootree-fast",
"inherits": "windows-build-base",
"configuration": "Release"
},
{
"name": "windows-msvc-release-ootree-full",
"displayName": "Windows x86_64: MSVC / Release / Out of tree (full)",
"configurePreset": "windows-msvc-release-ootree-full",
"inherits": "windows-build-base",
"configuration": "Release"
}
]
}
+19 -38
View File
@@ -11,49 +11,30 @@ convenient).
## Language guidelines
re2c is written in C++ (the current standard is C++11). The algorithms and
mathematical concepts used in the code are quite complex, so the code itself
should stay simple and let the developer focus on the underlying logic, without
the language getting in the way. For example, try to avoid complex object
hierarchies and excessive use of template metaprogramming.
re2c is written in C++. The project uses a conservative language subset (for
portability reasons the currently used standard is C++98). The code should stay
simple and avoid complex object hierarchies and excessive use of template
metaprogramming. It should allow the reader to concentrate on the underlying
algorithms, without the language getting in the way.
The line length limit is 100 characters, indentation is 4 spaces, and the
indentation style is egyptian (the opening brace is on the same line). This is
the approximate `astyle` command to auto-format re2c source code (it requires
manual tweaking for argument/initializer lists and multiline comments):
The line length limit is 90 characters, indentation is 4 spaces, and the
indentation style is more or less K&R (egyptian braces).
$ # run in source directory
$ astyle --style=google \
--max-code-length=100 \
--align-pointer=type \
--align-reference=type \
--keep-one-line-statements \
--suffix=none \
--recursive '*'
## Updating bootstrap files
## Regenerating bootstrap files
For changes that affect lexers (`.re` files), it is necessary to regenerate the
corresponding bootstrap files. This can be done by reconfiguring and
rebuilding re2c with options `--enable-lexers` (Autotools) or
`-DRE2C_REBUILD_LEXERS=ON` (CMake). `RE2C_FOR_BUILD` should be defined as a
path to an already existing re2c executable that will be used to regenerate
the lexers.
By default re2c uses bootstrap files for autogenerated sources (lexers, parsers,
docs) and does not attempt to regenerate them. Developers may need to enable
"regeneration mode" if they modify the corresponding source files.
For changes that affect parser (`.ypp` files), it is necessary to regenerate
bootstrap parser files. This happens automatically if bison is installed.
For changes that affect lexers (`.re` files), regeneration mode is configured
with options `--enable-lexers` (Autotools) or `-DRE2C_REBUILD_LEXERS=ON`
(CMake). `RE2C_FOR_BUILD` should be defined as a path to an existing re2c
executable that will be used to regenerate the lexers.
For changes that affect parsers (`.ypp` files), regeneration mode is configured
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).
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).
Please do not commit trivial updates to the bootstrap files, such as changes of
the generator version or generation date.
-46
View File
@@ -1,46 +0,0 @@
If you run out of ideas of how to make re2c better...
## Multibyte switch
Reading multiple characters at a time is problematic due to the absence of
alignment guarantees: even if unaligned reads are supported by the CPU, they are
still likely to be slow.
But it should be possible to read a few characters, combine them into one using
shifts and bitwise operations, and then switch on the combined character. It can
be done with existing API; no new primitives are needed.
Of course it will only help in cases when the underlying DFA has long "chains"
of transitions without branches that can be collapsed into one transition. But
the optimization can be local (applied to some parts of the DFA).
## User-defined language support
The idea originated in a linux.org.ru thread (in Russian):
https://www.linux.org.ru/news/development/16759268?cid=16762746
The original idea was to provide an API to render the generated AST into code
and let the user implement it in the form of a plugin/library. This is
problematic because 1) there is no stable AST, and 2) there are some language-
agnostic optimizations and decisions that re2c takes way before the final
rendering phase (so it is not as simple as providing a bunch or functions to
generate code for different AST nodes).
There may be another way to provide any-language support: let the user define a
set of primitives/configurations that re2c will use for language-agnostic
decisions and for code generation (some of them exist already, but not enough to
fully redefine the target language). This is akin to the idea of Midnight
Commander's skins or syntax files. re2c can provide default syntax files for
some languages (it already provides "standard" Unicode categories).
## Negation and complement
It would be good to support these operations on regular expressions, but it
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
large lexers.
-41
View File
@@ -1,41 +0,0 @@
If re2c is unmaintained for a long time and starts to bitrot, or if you have a
fork and need to make it as simple as possible, here is a list of things that
can be cut off rather safely vs. things that are essential.
## Things to remove
These are mostly experimental research projects that have never been used
outside of lab (to the best of author's knowledge, that is):
- Benchmarks: drop optional dependencies on re2, google-benchmark, Java (libre2c
has JNI bindings); simplify the build system(s).
- libre2c: drop static/dynamic libraries support in the build system(s), e.g.
Libtool; remove a few internal options and a bunch of explicit template
instantiations in TDFA construction code that exist only for libre2c.
- One of the build systems: Autotools or CMake, whichever you like less. Someone
will get unhappy in both cases (Windows is supported only by CMake, but distro
maintainers may have decades old recipes based on Autotools).
## Things to remove only as a last resort
- Skeleton: it is really useful for testing and codegen validation, but re2c can
live without it (and a few large tests can be dropped).
- Fuzzers: same here, they are really useful to find bugs and test hypotheses,
but re2c can function without them.
## Things to keep
- Existing configurations / options / syntax: re2c must stay backwards
compatible or it will become unusable. One exception is internal/debug options
which may be removed with caution. For the rest, keep them as deprecated even
if they do nothing.
- Language backends: they add little code complexity for a lot of value (and
discipline in the codegen subsystem).
- Documentation (both on `master` branch and the website on `gh-pages` and
`gh-pages-gen` branches). Without docs no one will know how to use re2c.
-9
View File
@@ -1,9 +0,0 @@
module(
name = "re2c",
version = "4.0.2",
compatibility_level = 4,
bazel_compatibility = [">=7.0.0"]
)
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "rules_cc", version = "0.0.17")
+200 -637
View File
File diff suppressed because it is too large Load Diff
+46 -40
View File
@@ -7,14 +7,12 @@ libre2c_la_LDFLAGS = -module -no-undefined
libre2c_la_HDR = \
lib/lex.h \
lib/regcomp_dfa_multipass.h \
lib/regcomp_dfa_regless.h \
lib/regex.h \
lib/regex_impl.h \
lib/regoff_trie.h \
src/constants.h \
src/codegen/code.h \
src/options/opt.h \
src/options/symtab.h \
src/adfa/action.h \
src/adfa/adfa.h \
src/cfg/cfg.h \
src/dfa/closure_leftmost.h \
@@ -22,55 +20,72 @@ libre2c_la_HDR = \
src/dfa/determinization.h \
src/dfa/dfa.h \
src/dfa/posix_precedence.h \
src/dfa/stacmd.h \
src/dfa/tag_history.h \
src/dfa/tagver_table.h \
src/dfa/tcmd.h \
src/nfa/nfa.h \
src/encoding/ebcdic.h \
src/encoding/case.h \
src/encoding/ebcdic/ebcdic.h \
src/encoding/ebcdic/ebcdic_regexp.h \
src/encoding/enc.h \
src/encoding/range_suffix.h \
src/encoding/utf8.h \
src/encoding/utf16.h \
src/encoding/utf8/utf8.h \
src/encoding/utf8/utf8_regexp.h \
src/encoding/utf16/utf16_regexp.h \
src/encoding/utf16/utf16.h \
src/msg/location.h \
src/msg/msg.h \
src/msg/ver_to_vernum.h \
src/msg/warn.h \
src/regexp/regexp.h \
src/regexp/empty_class_policy.h \
src/regexp/re.h \
src/regexp/rule.h \
src/regexp/tag.h \
src/compile.h \
src/skeleton/path.h \
src/skeleton/skeleton.h \
src/parse/ast.h \
src/parse/unescape.h \
src/parse/input.h \
src/parse/parser.h \
src/parse/scanner.h \
src/parse/unescape.h \
src/debug/debug.h \
src/util/allocator.h \
src/util/allocate.h \
src/util/attribute.h \
src/util/check.h \
src/util/containers.h \
src/util/file_utils.h \
src/util/c99_stdint.h \
src/util/forbid_copy.h \
src/util/free_list.h \
src/util/get_dir.h \
src/util/hash32.h \
src/util/nowarn_in_bison.h \
src/util/local_increment.h \
src/util/lookup.h \
src/util/range.h \
src/util/s_to_n32_unsafe.h \
src/util/slab_allocator.h \
src/util/smart_ptr.h \
src/util/static_assert.h \
src/util/string_utils.h \
src/util/u32lim.h
src/util/u32lim.h \
src/util/uniq_vector.h
libre2c_la_SRC = \
lib/regcomp.cc \
lib/regexec.cc \
lib/regexec_dfa.cc \
lib/regexec_dfa_multipass.cc \
lib/regexec_dfa_regless.cc \
lib/regexec_nfa_leftmost.cc \
lib/regexec_nfa_leftmost_trie.cc \
lib/regexec_nfa_posix.cc \
lib/regexec_nfa_posix_trie.cc \
lib/regexec_nfa_posix_backward.cc \
lib/regexec_nfa_posix_kuklewicz.cc \
lib/regfree.cc \
lib/stubs.cc \
src/parse/ast.cc \
src/parse/input.cc \
src/parse/unescape.cc \
src/options/opt.cc \
src/options/symtab.cc \
src/cfg/cfg.cc \
src/cfg/compact.cc \
src/cfg/dce.cc \
@@ -94,29 +109,32 @@ libre2c_la_SRC = \
src/dfa/fillpoints.cc \
src/dfa/find_state.cc \
src/dfa/minimization.cc \
src/dfa/stacmd.cc \
src/dfa/tagver_table.cc \
src/dfa/tcmd.cc \
src/nfa/estimate_size.cc \
src/nfa/re_to_nfa.cc \
src/encoding/enc.cc \
src/encoding/range_suffix.cc \
src/encoding/unicode_casemap.cc \
src/encoding/ebcdic.cc \
src/encoding/utf16.cc \
src/encoding/utf8.cc \
src/encoding/ebcdic/ebcdic_regexp.cc \
src/encoding/utf16/utf16.cc \
src/encoding/utf16/utf16_regexp.cc \
src/encoding/utf8/utf8.cc \
src/encoding/utf8/utf8_regexp.cc \
src/msg/msg.cc \
src/msg/warn.cc \
src/regexp/ast_to_re.cc \
src/regexp/default_tags.cc \
src/regexp/fixed_tags.cc \
src/regexp/nullable.cc \
src/regexp/regexp.cc \
src/regexp/rule.cc \
src/regexp/split_charset.cc \
src/regexp/tag.cc \
src/skeleton/control_flow.cc \
src/skeleton/maxpath.cc \
src/skeleton/skeleton.cc \
src/util/range.cc \
src/util/file_utils.cc \
src/util/string_utils.cc
src/util/s_to_n32_unsafe.cc
libre2c_la_SOURCES = \
$(libre2c_la_HDR) \
@@ -125,13 +143,11 @@ libre2c_la_SOURCES = \
libre2c_la_CUSTOM = \
lib/lex.re \
lib/parse.ypp \
lib/test_helper.re \
src/msg/ver_to_vernum.re
libre2c_la_GEN_SRC = \
lib/lex.cc \
lib/parse.cc \
lib/test_helper.cc \
src/msg/ver_to_vernum.cc
libre2c_la_GEN_HDR = \
lib/parse.h
@@ -146,7 +162,6 @@ libre2c_la_BOOTSTRAP = \
bootstrap/lib/parse.cc \
bootstrap/lib/parse.h \
bootstrap/lib/lex.cc \
bootstrap/lib/test_helper.cc \
bootstrap/src/msg/ver_to_vernum.cc
nodist_libre2c_la_SOURCES = $(libre2c_la_GEN)
@@ -161,21 +176,12 @@ CLEANFILES += $(libre2c_la_GEN)
lib/lex.cc: lib/parse.cc
# tests
test_libre2c_SOURCES = \
lib/test.cc \
lib/test_helper.h \
lib/test_helper.cc
test_libre2c_SOURCES = lib/test.cc
test_libre2c_LDADD = libre2c.la
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
if WITH_JAVA
SUBDIRS += benchmarks/c/libre2c/java
EXTRA_DIST += benchmarks/c/libre2c/java
endif # WITH_JAVA
endif # WITH_BENCHMARKS
SUBDIRS += benchmarks/submatch_nfa
SUBDIRS += benchmarks/submatch_dfa_jit
endif
+9 -10
View File
@@ -1,7 +1,7 @@
DESCRIPTION
-----------
re2c is a free and open-source lexer generator for C/C++, Go and Rust.
re2c is a free and open-source lexer generator for C, C++ and Go.
Its main goal is generating fast lexers: at least as fast as their reasonably
optimized hand-coded counterparts. Instead of using traditional table-driven
@@ -40,14 +40,15 @@ CONTRIBUTING
------------
re2c is an Open Source, community-driven project. See
[CONTRIBUTING.md](https://github.com/skvadrik/re2c/blob/master/CONTRIBUTING.md)
for details about contributions to this repository.
[CONTRIBUTING.md](https://github.com/skvadrik/re2c/blob/master/README.md) for
details about contributions to this repository.
BUILD
-----
See BUILD.md or the [online docs](https://re2c.org/build/build.html) for
re2c has two build systems: Autotools and CMake. Both are maintained and tested
on Travis CI. See [the documentation](http://re2c.org/install/install.html) for
instructions how to build re2c.
@@ -63,17 +64,15 @@ Mailing lists:
- re2c-general@lists.sourceforge.net
- re2c-devel@lists.sourceforge.net
IRC channels:
IRC channel:
- irc.oftc.net/#re2c
- irc.libera.chat/#re2c
- freenode/#re2c
You are welcome to ask for help or share your thoughts and ideas.
AUTHORS
-------
re2c was originally written by Peter Bumbulis <peter@csg.uwaterloo.ca>. Since
then many volunteers have contributed to the project. The current maintainer is
Re2c was originally written by Peter Bumbulis <peter@csg.uwaterloo.ca>.
Since then many people contributed to the project. The current maintainer is
Ulya Trofimovich <skvadrik@gmail.com>.
-16
View File
@@ -1,16 +0,0 @@
workspace(name = "re2c")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "bazel_skylib",
sha256 = "bc283cdfcd526a52c3201279cda4bc298652efa898b10b4db0837dc51652756f",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.7.1/bazel-skylib-1.7.1.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.7.1/bazel-skylib-1.7.1.tar.gz",
],
)
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
bazel_skylib_workspace()
View File
+2
View File
@@ -1,3 +1,5 @@
#!/bin/sh
git clean -fX
mkdir -p m4
autoreconf -i -W all
-13
View File
@@ -1,13 +0,0 @@
package(default_visibility = ["//visibility:private"])
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
exports_files([
"re2c_config.h",
])
bzl_library(
name = "re2c_bzl",
srcs = ["re2c.bzl"],
visibility = ["//visibility:public"],
)
-70
View File
@@ -1,70 +0,0 @@
# re2c generator rules - assuming that re2c is available as '@re2c//:re2c'.
load("@bazel_skylib//lib:paths.bzl", "paths")
visibility("public")
# Define supported extensions as defined by:
# . https://bazel.build/reference/be/c-cpp#cc_library_args
# . https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/rules/cpp/CppFileTypes.java
_C_SRC_EXT = [".c", ".cc", ".cpp", ".cxx", ".c++", ".C", ".cu", ".cl"]
_C_HDR_EXT = [".h", ".hh", ".hpp", ".ipp", ".hxx", ".h++", ".inc", ".inl", ".tlh", ".tli", ".H", ".tcc"]
_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)))
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)))
ctx.actions.run_shell(
outputs = outs,
tools = [ctx.executable._re2c_tool],
inputs = ctx.files.srcs + ctx.files.data,
command = """
"{re2c}" --no-generation-date "{src}" -o "{out}" {re2c_args} {includes}
""".format(
re2c = ctx.executable._re2c_tool.path,
src = srcs[0].path,
out = outs[0].path,
includes = " ".join(list(dict([("-I" + f.dirname, 1) for f in ctx.files.data]))),
re2c_args = " ".join(ctx.attr.re2c_args),
),
mnemonic = "RE2C",
progress_message = "Generating re2c %{label}",
)
_re2c_attr = {
"srcs": attr.label_list(
doc = "The re2c source.",
allow_files = _RE2C_EXT,
mandatory = True,
),
"data": attr.label_list(
doc = "Other input data files (e.g. include files).",
allow_files = _C_SRC_EXT + _C_HDR_EXT,
mandatory = False,
),
"outs": attr.output_list(
doc = "The generated output source.",
mandatory = True,
),
"re2c_args": attr.string_list(
doc = "Arguments to re2c invocation.",
),
"_re2c_tool": attr.label(
doc = "The target of the 're2c' executable.",
default = Label("//:re2c"),
allow_single_file = True,
executable = True,
cfg = "exec",
),
}
re2c_gen = rule(
attrs = _re2c_attr,
doc = """Use re2c tool to create an output file (e.g. '.cc') from a '.re' input.""",
output_to_genfiles = True,
implementation = _re2c_impl,
)
-4
View File
@@ -1,4 +0,0 @@
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_FCNTL_H 1
#define HAVE_UNISTD_H 1
-20
View File
@@ -1,20 +0,0 @@
1
12
123
1234
12345
123456
1234567
12345678
123456789
1234567890
12345678901
123456789012
1234567890123
12345678901234
123456789012345
1234567890123456
12345678901234567
123456789012345678
1234567890123456789
12345678901234567890
-97
View File
@@ -1,97 +0,0 @@
0b1
0b10
0b101
0b1010
0b10101
0b101010
0b1011010
0b10101010
0b101010101
0b1010101010
0b10101010101
0b101010101010
0b1010101010101
0b10101010101010
0b101010101010101
0b1010101010101010
0B1
0B10
0B111
0B1000
0B11111
0B100000
0B1111111
0B10000000
0B111111111
0B1000000000
0B11111111111
0B100000000000
0B1111111111111
0B10000000000000
0B111111111111111
0B1000000000000000
0
01
012
0123
01234
012345
0123456
01234567
012345670
1
12
123
1234
12345
123456
1234567
12345678
123456789
1234567890
0x1
0x12
0x123
0x1234
0x12345
0x123456
0x1234567
0x12345678
0x123456789
0x123456789a
0x123456789ab
0x123456789abc
0x123456789abcd
0x123456789abcde
0x123456789abcdef
0x123456789abcdef0
1.1e+1
12.12e-12
123.123e+123
1234.1234e-1234
12345.12345e+12345
123456.123456e-123456
1234567.1234567e+1234567
12345678.12345678e-12345678
123456789.123456789e+123456789
1234567890.1234567890e-1234567890
0.1
0.01
0.001
0.0001
0.00001
0.000001
0.0000001
0.00000001
0.000000001
0.0000000001
0.00000000001
0.000000000001
0.0000000000001
0.00000000000001
0.000000000000001
0.0000000000000001
0.00000000000000001
0.000000000000000001
0.0000000000000000001
0.00000000000000000001
-7
View File
@@ -1,7 +0,0 @@
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Sunday
-196
View File
@@ -1,196 +0,0 @@
Afghanistan
Albania
Algeria
Andorra
Angola
Antigua and Barbuda
Argentina
Armenia
Australia
Austria
Azerbaijan
The Bahamas
Bahrain
Bangladesh
Barbados
Belarus
Belgium
Belize
Benin
Bhutan
Bolivia
Bosnia and Herzegovina
Botswana
Brazil
Brunei
Bulgaria
Burkina Faso
Burundi
Cabo Verde
Cambodia
Cameroon
Canada
Central African Republic
Chad
Chile
China
Colombia
Comoros
Congo, Democratic Republic of the
Congo, Republic of the
Costa Rica
Cote d'Ivoire
Croatia
Cuba
Cyprus
Czech Republic
Denmark
Djibouti
Dominica
Dominican Republic
East Timor (Timor-Leste)
Ecuador
Egypt
El Salvador
Equatorial Guinea
Eritrea
Estonia
Eswatini
Ethiopia
Fiji
Finland
France
Gabon
The Gambia
Georgia
Germany
Ghana
Greece
Grenada
Guatemala
Guinea
Guinea-Bissau
Guyana
Haiti
Honduras
Hungary
Iceland
India
Indonesia
Iran
Iraq
Ireland
Israel
Italy
Jamaica
Japan
Jordan
Kazakhstan
Kenya
Kiribati
Korea, North
Korea, South
Kosovo
Kuwait
Kyrgyzstan
Laos
Latvia
Lebanon
Lesotho
Liberia
Libya
Liechtenstein
Lithuania
Luxembourg
Madagascar
Malawi
Malaysia
Maldives
Mali
Malta
Marshall Islands
Mauritania
Mauritius
Mexico
Micronesia, Federated States of
Moldova
Monaco
Mongolia
Montenegro
Morocco
Mozambique
Myanmar (Burma)
Namibia
Nauru
Nepal
Netherlands
New Zealand
Nicaragua
Niger
Nigeria
North Macedonia
Norway
Oman
Pakistan
Palau
Panama
Papua New Guinea
Paraguay
Peru
Philippines
Poland
Portugal
Qatar
Romania
Russia
Rwanda
Saint Kitts and Nevis
Saint Lucia
Saint Vincent and the Grenadines
Samoa
San Marino
Sao Tome and Principe
Saudi Arabia
Senegal
Serbia
Seychelles
Sierra Leone
Singapore
Slovakia
Slovenia
Solomon Islands
Somalia
South Africa
Spain
Sri Lanka
Sudan
Sudan, South
Suriname
Sweden
Switzerland
Syria
Taiwan
Tajikistan
Tanzania
Thailand
Togo
Tonga
Trinidad and Tobago
Tunisia
Turkey
Turkmenistan
Tuvalu
Uganda
Ukraine
United Arab Emirates
United Kingdom
United States
Uruguay
Uzbekistan
Vanuatu
Vatican City
Venezuela
Vietnam
Yemen
Zambia
Zimbabwe
File diff suppressed because it is too large Load Diff
-31
View File
@@ -1,31 +0,0 @@
set -ex
if [ -e ragel7 ] ; then
echo "ragel7 is already installed, quitting"
exit 0
fi
COLM_DIR=colm-0.14.7
RAGEL_DIR=ragel-7.0.4
wget http://www.colm.net/files/colm/"$COLM_DIR".tar.gz -O - | tar zx \
&& cd "$COLM_DIR" \
&& sed -i 's|^#!/bin/bash|#!/usr/bin/env bash|' src/colm-wrap.sh \
&& ./configure \
--prefix=$(pwd)/install \
--disable-manual \
&& make -j$(nproc) \
&& make install \
&& cd ..
wget http://www.colm.net/files/ragel/"$RAGEL_DIR".tar.gz -O - | tar zx \
&& cd "$RAGEL_DIR" \
&& ./configure \
--prefix=$(pwd)/install \
--with-colm="$(pwd)/../$COLM_DIR/install" \
--disable-manual \
&& make -j$(nproc) \
&& make install \
&& cd ..
ln -s "$RAGEL_DIR"/install/bin/ragel ragel7
-390
View File
@@ -1,390 +0,0 @@
#!/usr/bin/env python3
import argparse
import json
import math
import sys
from collections import OrderedDict
plot_preamble = """
\\documentclass[tikz]{standalone}
\\usepackage[utf8]{inputenc}
\\usepackage{amsmath, amssymb, amsfonts}
\\usepackage{xcolor}
\\usepackage{tikz, pgfplots, pgfplotstable}
\\usepackage{pifont}
\\definecolor{colorX}{HTML}{A1CAF1}
\\definecolor{colorY}{HTML}{FBCEB1}
"""
# Use Comic Neue font.
plot_font_comicneue = """
\\usepackage{comicneue}
\\usepackage[T1]{fontenc}
\\renewcommand{\\familydefault}{\\sfdefault}
"""
# Use Computer Modern Bright font.
plot_font_cmbright = """
\\usepackage{cmbright}
\\usepackage[T1]{fontenc}
\\renewcommand{\\familydefault}{\\sfdefault}
"""
# Counterintuitively, 'assume math mode' tricks pgfmathprintnumber into not
# setting math mode, which is needed because Comic Neue does not support math.
#
# Use 'fixed relative' number format with very high precision (the numbers have
# been previously rounded to a few non-zero digits in the fractional part, so
# the trailing zeroes will will not be printed).
plot_begin = """
\\begin{document}
\\def\\plotwidth{%lfin}
\\def\\barwidth{%lfin}
\\pgfplotsset{styleX/.style={
font=\\scriptsize,
xbar,
axis y line*=none,
axis x line=none,
y=0.12in,
width=\\plotwidth*1.15,
bar width=\\barwidth,
xshift=\\xplotshift,
yshift=\\yplotshift,
xmax=\\xmax,
xmin=0,
ymax=0.7,
ymin=0.3 - \\nrows,
ytick=data,
ytick style={draw=none},
yticklabels=\\empty,
title=\\empty,
clip=false,
visualization depends on={x > \\xmax \\as \\xoverflow},
visualization depends on={x > \\xmax ? -x + \\xmax : 0 \\as \\xshift},
nodes near coords={
\\ifdim \\xoverflow pt=1pt \\!\\ding{220}\\! \\scriptsize \\fi
\\pgfmathprintnumber[assume math mode=true]{\\pgfplotspointmeta}
},
nodes near coords style={shift={(axis direction cs:\\xshift,0)}},
nodes near coords style={/pgf/number format/.cd,
fixed relative,
precision = 10,
1000 sep = {\\,}
},%s}}
"""
plot_labels_and_title = """
yticklabels from table={\\table}{algo},
every axis title/.style={below %s, at={(-0.08in,0)}},
title=\\title,
"""
plot_begin_picture = """
\\begin{tikzpicture}
\\begin{scope}[xshift=-0.2in, yshift=%sin * 0.75]
%s
\\end{scope}
"""
plot_middle = """
\\def\\xplotshift{%lfin}
\\def\\yplotshift{%lfin}
\\def\\nrows{%d},
\\def\\title{%s},
\\def\\xmax{%lf}
\\pgfplotstableread {%s} \\table
\\begin{axis}[styleX,%s]
\\clip(current axis.south west) rectangle(current axis.north east);
\\addplot[fill=%s] table[x=value, y expr=-\\coordindex] from \\table;
\\end{axis}
"""
plot_end_picture = """
\\end{tikzpicture}
"""
plot_end = """
\\end{document}
"""
VARIANTS = ['aot', 'jit', 'nfa']
def parse_args():
variants = ', '.join(VARIANTS)
parser = argparse.ArgumentParser()
parser.add_argument("input", help="input JSON file")
parser.add_argument("output", help="output TeX file")
parser.add_argument("--variant",
help="variant of the benchmark, one of %s" % variants)
parser.add_argument("--relative-to",
help="output CPU time relative to the specified algorithm")
parser.add_argument("--font",
help="use the specified font (supported fonts: cmbright, comicneue)")
args = parser.parse_args()
if args.variant not in VARIANTS:
sys.exit("please specify --variant (possible values: %s)" % variants)
return args
# Generate benchmark title from benchmark name.
def gen_title(oldname, remove_suffix):
if remove_suffix:
# cut off the last sub-word after the dash
oldname = oldname[:oldname.rfind("-")]
# Name begins with a letter, so it must be a plain language word.
if oldname[0].isalpha():
return oldname
# Name begins with something else than a letter, treat it as a regexp and
# render as a TeX math formula. This requires adding a few metacharacters.
newname = ""
for char in oldname:
if char in "{*+?":
# Repetition counters must be in superscript.
newname += "^"
newname += char
return "$\\boldsymbol{" + newname + "}$"
# Find index of a group which algorithm contains the given string (stem).
def index_of_algo(group, stem):
if stem == None:
return 0;
for i in range(len(group)):
(algo, _, _, _, _) = group[i]
if stem in algo:
return i
return 0
# Time format: keep integer part precise, round fractional part relative to the
# exponent (similar to PGFPLOTS's "fixed relative, precision = 2" numer format,
# but doesn't round integer part). This is to reduce visual noise on the plot.
#
# Examples: 1004, 195, 13, 3.8, 0.85, 0.017, 0.0048
#
def time_format(time):
order = math.floor(math.log(time, 10))
if order > 0:
return '%.1lf'
else:
return '%%.%dlf' % (-order + 1)
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()
elif args.variant == 'nfa':
self.override_params_nfa()
self.font = ''
if args.font == 'comicneue':
self.font = plot_font_comicneue
elif args.font == 'cmbright':
self.font = plot_font_cmbright
elif args.font:
sys.exit('error: unsupported font: "%s"' % font)
if args.relative_to: # override only if set
self.relative_to = args.relative_to
def override_params_aot(self):
self.plotwidth = 1.5
self.xshift = 2 * self.plotwidth
self.header = """
\\node[anchor=west] (x0) at (0.15in,0) {\\small\\bf{gcc (time)}};
\\node[anchor=west] (x1) at (1.65in,0) {\\small\\bf{gcc (size)}};
\\node[anchor=west] (x2) at (3.15in,0) {\\small\\bf{clang (time)}};
\\node[anchor=west] (x3) at (4.65in,0) {\\small\\bf{clang (size)}};
"""
self.title_suffix = True
self.relative_to = None
self.title_annotate = False
self.global_styles = ""
self.local_styles = plot_labels_and_title % 'left'
def override_params_jit(self):
self.plotwidth = 2.7
self.xshift = self.plotwidth
self.header = """
\\node[anchor=west] (x0) at (0.15in,0) {\\small\\bf{regcomp (time)}};
\\node[anchor=west] (x1) at (2.85in,0) {\\small\\bf{regexec (time)}};
"""
self.title_suffix = True
self.relative_to = ''
self.title_annotate = False
self.global_styles = ""
self.local_styles = plot_labels_and_title % 'left'
def override_params_nfa(self):
self.plotwidth = 2.5
self.xshift = self.plotwidth + 1
self.header = ""
self.only_1st_col_with_labels = False
self.title_suffix = False
self.relative_to = 'LG'
self.title_annotate = True
self.global_styles = plot_labels_and_title % 'right'
self.local_styles = ""
# Split benchmarks into groups by regexp (the first component of the name).
# If the relative mode is on, normalize CPU time by the time of the first
# benchmark in each group.
#
# Expected JSON fomat:
# {
# "benchmarks": [
# {
# "name": <string>,
# ["cpu_time": <number>,]
# ["bin_size": <number>,]
# ["captures": <number>,]
# ["regsize": <number>,] ...
# }, ...
# ], ...
# }
#
def group_benchmarks(benchmarks, params):
benchcount = len(benchmarks)
groups = OrderedDict()
for bench in benchmarks:
name, algo = bench['name'].split('_')
cputime = bench['cpu_time'] if 'cpu_time' in bench else None
binsize = bench['bin_size'] if 'bin_size' in bench else None
captures = bench['captures'] if 'captures' in bench else None
regsize = bench['regsize'] if 'regsize' in bench else None
groups.setdefault(name, []).append(
(algo, cputime, binsize, captures, regsize))
maxtime = 0
avgtime = 0
maxsize = 0
avgsize = 0
maxrows = 0
nbench = 0
benchgroups = OrderedDict()
for name in groups:
group = groups[name]
relto = index_of_algo(group, params.relative_to)
(_, cputime0, binsize0, captures, regsize) = group[relto]
timetbl = None
if cputime0 != None:
table = 'algo value\n'
for (algo, time, _, _, _) in group:
time = time / (cputime0 if params.relative_to != None else 1)
maxtime = max(maxtime, time)
avgtime += time
table += ('{%s} ' + time_format(time) + '\n') % (algo, time)
timetbl = table
sizetbl = None
if binsize0 != None:
table = 'algo value\n'
for (algo, _, size, _, _) in group:
maxsize = max(maxsize, size)
avgsize += size
table += '{%s} %lf\n' % (algo, size)
sizetbl = table
title = gen_title(name, params.title_suffix)
nrows = len(group)
benchgroups[name] = (title, timetbl, sizetbl, nrows, regsize, captures)
nbench += nrows
maxrows = max(maxrows, nrows)
avgtime /= nbench
avgsize /= nbench
factor = 10 if params.relative_to != None else 5
maxtime = min(maxtime, factor * avgtime)
maxsize = min(maxsize, factor * avgsize)
params.plotheight = 0.15 + maxrows * params.barwidth * 0.75
params.maxtime = maxtime
params.maxsize = maxsize
return benchgroups
# Generate a Tikz picture with a PGF plot for each benchmark group. Crop
# very long bars, so that they do not squash other bars to the left.
def generate_plot(benchgroups, params):
plot = plot_preamble
plot += params.font
plot += plot_begin % (params.plotwidth, params.barwidth, params.global_styles)
plot += plot_begin_picture % (params.plotheight, params.header)
i = 0
for name, benchgroup in benchgroups.items():
even = i % 2 == 0
i += 1
(title, timetbl, sizetbl, nrows, regsize, captures) = benchgroup
xshift = 0 if even else params.xshift
yshift = -params.plotheight * (i if even else i - 1)
title = '\\textbf{%s}' % title
if params.title_annotate and regsize != None and captures != None:
title += ' \\, (%d symbol%s, %d capture%s)' % (
regsize, 's' if regsize > 1 else '',
captures, 's' if captures > 1 else '')
# Generate CPU time plots.
if timetbl != None:
plot += plot_middle % (xshift, yshift, nrows, title, params.maxtime,
timetbl, params.local_styles if even else '', 'colorX')
# Generate binary size plots.
if sizetbl != None:
xshift += params.plotwidth
plot += plot_middle % (xshift, yshift, nrows, title, params.maxsize,
sizetbl, '', 'colorY')
plot += plot_end_picture
plot += plot_end
return plot
def main():
args = parse_args()
with open(args.input) as f:
input = json.load(f)
params = Params(args)
groups = group_benchmarks(input['benchmarks'], params)
plot = generate_plot(groups, params)
with open(args.output, 'w') as f:
f.write(plot)
if __name__ == "__main__":
main()
-196
View File
@@ -1,196 +0,0 @@
find_package(PkgConfig REQUIRED)
pkg_check_modules(GBENCHMARK REQUIRED benchmark)
set(BENCHMARKS
"lex_00__numbers1"
"lex_01__numbers2"
"lex_02__words1"
"lex_03__words2"
"lex_04__words3"
"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"
"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"
"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"
"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"
)
set(SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src")
set(ENG_DIR "${CMAKE_CURRENT_BINARY_DIR}/engines")
set(GEN_DIR "${CMAKE_CURRENT_BINARY_DIR}/gen")
set(PREGEN_DIR "${CMAKE_CURRENT_SOURCE_DIR}/pregen")
set(GEN "")
# ragel
file(MAKE_DIRECTORY "${ENG_DIR}/ragel/")
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"
WORKING_DIRECTORY "${ENG_DIR}/ragel/"
)
foreach(bench ${BENCHMARKS})
set(src_file "${SRC_DIR}/ragel/${bench}.rl")
set(gen_file "${GEN_DIR}/ragel/${bench}.cc")
set(pregen_file "${PREGEN_DIR}/ragel/${bench}.cc")
# optionally regenerate ragel 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 "${RAGEL}" "-G2" "${rel_src_file}" -o "${rel_gen_file}"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${gen_file}" "${pregen_file}"
DEPENDS "${src_file}" "${RAGEL}"
)
else()
add_custom_command(
OUTPUT "${gen_file}"
COMMAND "${CMAKE_COMMAND}" -E copy "${pregen_file}" "${gen_file}"
DEPENDS "${pregen_file}"
)
endif()
list(APPEND GEN "${gen_file}")
endforeach()
# re2c
file(MAKE_DIRECTORY "${GEN_DIR}/re2c/")
set(RE2C "${CMAKE_BINARY_DIR}/re2c")
set(RE2C_FLAGS "--reusable" "--tags" "--no-generation-date" "--no-version" "-i")
# always regenerate re2c benchmarks
foreach(bench ${BENCHMARKS})
set(src_file "${SRC_DIR}/re2c/${bench}.re")
set(gen_file "${GEN_DIR}/re2c/${bench}.cc")
set(pregen_file "${PREGEN_DIR}/re2c/${bench}.cc")
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 "${RE2C}" ${RE2C_FLAGS} "${rel_src_file}" -o "${rel_gen_file}"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${gen_file}" "${pregen_file}"
DEPENDS "${src_file}" "${SRC_DIR}/re2c/base.re" "${RE2C}"
)
list(APPEND GEN "${gen_file}")
endforeach()
# binaries
if("${GBENCHMARK_INCLUDE_DIR}" STREQUAL "")
set(GBENCHMARK_INCLUDES "${GBENCHMARK_CFLAGS}")
else()
set(GBENCHMARK_INCLUDES "-I${GBENCHMARK_INCLUDE_DIR}")
endif()
set(RE2C_CXX_FLAGS "-O3" "-g" "-I" "${SRC_DIR}" "-Wall" "-Wno-unused-const-variable"
"${GBENCHMARK_INCLUDES}" "-std=c++11") # C++11 is needed for some google-benchmark features
list(APPEND COMPILERS "g++" "clang++")
list(APPEND COMPNAMES "gcc" "clang")
foreach(compiler IN ZIP_LISTS COMPILERS COMPNAMES)
set(objects "")
set(flags ${RE2C_CXX_FLAGS} "-DCXX=\\\"${compiler_1}\\\"")
foreach(gen_file ${GEN})
string(REGEX REPLACE
"^${GEN_DIR}(.+)\.cc$" "${GEN_DIR}\\1-${compiler_1}.o" obj_file "${gen_file}")
add_custom_command(
OUTPUT "${obj_file}"
COMMAND "${compiler_0}" ${flags} -c "${gen_file}" -o "${obj_file}"
DEPENDS "${gen_file}" "${SRC_DIR}/common.h"
)
list(APPEND objects "${obj_file}")
endforeach()
# don't use add_executable, as we need to mnually select the toolchain.
set(inputs ${objects} "${SRC_DIR}/bench.cc")
set(output "bench-${compiler_1}")
add_custom_command(
OUTPUT "${output}"
COMMAND "${compiler_0}" ${flags} ${inputs} "-o" "${output}" ${GBENCHMARK_LINK_LIBRARIES}
DEPENDS ${inputs}
)
if(compiler_1 STREQUAL "gcc") # build test only with GCC
set(test_inputs ${objects} "${SRC_DIR}/test.cc")
add_custom_command(
OUTPUT "test"
COMMAND "${compiler_0}" ${flags} ${test_inputs} "-o" "test" ${GBENCHMARK_LINK_LIBRARIES}
DEPENDS ${test_inputs}
)
endif()
endforeach()
# helper function to transform list
function(regex_replace_list regexp replace var)
set(result "")
foreach(arg ${ARGN})
string(REGEX REPLACE "${regexp}" "${replace}" x "${arg}")
list(APPEND result "${x}")
endforeach()
set(${var} "${result}" PARENT_SCOPE)
endfunction()
# input data
set(DAT)
# Some benchmarks share the same data, like submatch_03__uri_simple and submatch_02__uri_rfc3986.
regex_replace_list("^[a-z]+_[0-9]+__([^_]+).*" "\\1" INPUTS ${BENCHMARKS})
list(REMOVE_DUPLICATES INPUTS)
foreach(input ${INPUTS})
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")
add_custom_command(
OUTPUT "${dst_dir}/small"
COMMAND "${CMAKE_COMMAND}" -E copy "${src_dir}/small" "${dst_dir}/small"
DEPENDS "${src_dir}/small"
)
add_custom_command(
OUTPUT "${dst_dir}/big"
COMMAND "${script}"
DEPENDS "${script}" "${dst_dir}/small"
WORKING_DIRECTORY "${dst_dir}"
)
list(APPEND DAT "${dst_dir}/small" "${dst_dir}/big")
endforeach()
add_custom_target(bench_submatch_aot ALL DEPENDS bench-gcc bench-clang test ${DAT})
# benchmark scripts
set(srcdir "${CMAKE_CURRENT_SOURCE_DIR}")
set(builddir ".")
configure_file(run.py.in run.py @ONLY)
# override default clean command to keep engines
set_directory_properties(PROPERTY
CLEAN_NO_CUSTOM On
ADDITIONAL_CLEAN_FILES "${GEN};${OBJ};${BIN};${DAT}"
)
-146
View File
@@ -1,146 +0,0 @@
SRC_DIR = $(srcdir)/src
ENG_DIR = engines
GEN_DIR = gen
PREGEN_DIR = $(srcdir)/pregen
DAT_DIR = data
RAGEL = $(ENG_DIR)/ragel/ragel7
RE2C = $(top_builddir)/re2c
RE2C_FLAGS = --reusable --tags --no-generation-date --no-version -i
CXXFLAGS = $(AM_CXXFLAGS) -O3 -g -I $(SRC_DIR) -Wall -Wno-unused-const-variable
LDFLAGS = -lbenchmark -lpthread
BENCHMARKS = \
lex_00__numbers1 \
lex_01__numbers2 \
lex_02__words1 \
lex_03__words2 \
lex_04__words3 \
\
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 \
\
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 \
\
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 \
\
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
COMMON_SRC = $(SRC_DIR)/common.h
COMMON_RAGEL = \
$(COMMON_SRC) \
$(SRC_DIR)/ragel/base.h
COMMON_RE2C = \
$(COMMON_SRC) \
$(SRC_DIR)/re2c/base.re \
$(SRC_DIR)/re2c/base.h
GEN_RAGEL = $(patsubst %, $(GEN_DIR)/ragel/%.cc, $(BENCHMARKS))
GEN_RE2C = $(patsubst %, $(GEN_DIR)/re2c/%.cc, $(BENCHMARKS))
GEN = $(GEN_RAGEL) $(GEN_RE2C)
SRC = $(GEN_RAGEL) $(GEN_RE2C)
OBJ_GCC = $(patsubst %.cc, %-gcc.o, $(SRC))
OBJ_CLANG = $(patsubst %.cc, %-clang.o, $(SRC))
OBJ_TEST = $(patsubst %.cc, %-test.o, $(SRC))
OBJ = $(OBJ_GCC) $(OBJ_CLANG) $(OBJ_TEST)
# 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))))))
$(DAT): $(DAT_DIR)/%/big: $(srcdir)/../_data/%/small
$(AM_V_at)mkdir -p $(@D) && cp $< $(@D)
$(AM_V_GEN)( cd $(@D) && ../../$(srcdir)/../_data/gen.py )
all-local: bench-gcc bench-clang test $(DAT)
# compile
$(OBJ_GCC): %-gcc.o: %.cc
$(AM_V_at)mkdir -p $(@D)
$(AM_V_GEN)g++ $(CXXFLAGS) -c -o $@ $<
$(OBJ_CLANG): %-clang.o: %.cc
$(AM_V_at)mkdir -p $(@D)
$(AM_V_GEN)clang++ $(CXXFLAGS) -c -o $@ $<
$(OBJ_TEST): %-test.o: %.cc
$(AM_V_at)mkdir -p $(@D)
$(AM_V_GEN)g++ $(CXXFLAGS) -DRUN_IN_TEST_MODE -c -o $@ $<
bench-gcc: src/bench.cc $(OBJ_GCC)
$(AM_V_GEN)g++ -DCXX=\"gcc\" -o $@ $^ $(CXXFLAGS) $(LDFLAGS)
bench-clang: src/bench.cc $(OBJ_CLANG)
$(AM_V_GEN)clang++ -DCXX=\"clang\" -o $@ $^ $(CXXFLAGS) $(LDFLAGS)
test: src/test.cc $(OBJ_TEST)
$(AM_V_GEN)g++ -DRUN_IN_TEST_MODE -o $@ $^ $(CXXFLAGS) $(LDFLAGS)
# always regenerate re2c benchmarks (except for deprecated algorithms)
$(GEN_RE2C): $(GEN_DIR)/%.cc: $(SRC_DIR)/%.re $(COMMON_RE2C) $(RE2C)
$(AM_V_at)mkdir -p $(@D)
$(AM_V_GEN)$(RE2C) $(RE2C_FLAGS) $< -o $@
$(AM_V_at)if ! cmp -s $@ $(PREGEN_DIR)/re2c/$(@F) ; then cp -f $@ $(PREGEN_DIR)/re2c/$(@F) ; fi
# optionally regenerate other benchmarks
if REGEN_BENCHMARKS
$(GEN_RAGEL): $(GEN_DIR)/%.cc: $(SRC_DIR)/%.rl $(COMMON_RAGEL) $(RAGEL)
$(AM_V_at)mkdir -p $(@D)
$(AM_V_GEN)$(RAGEL) -G2 $< -o $@
$(AM_V_at)if ! cmp -s $@ $(PREGEN_DIR)/ragel/$(@F) ; then cp -f $@ $(PREGEN_DIR)/ragel/$(@F) ; fi
else
$(GEN_RAGEL) $(GEN_DIR)/%: $(PREGEN_DIR)/%
$(AM_V_at)mkdir -p $(@D)
$(AM_V_GEN)cp -f $< $@
endif
# engines
$(RAGEL):
$(AM_V_at)mkdir -p $(@D) && cp $(srcdir)/../_engines/ragel/getragel7.sh $(@D)
$(AM_V_GEN)( cd $(@D) && ./getragel7.sh )
# clean
clean-local:
rm -f $(GEN) $(OBJ) $(DAT) bench-gcc bench-clang test
-136
View File
@@ -1,136 +0,0 @@
#ifndef _RE2C_BENCHMRKS_COMMON_COMMON_
#define _RE2C_BENCHMRKS_COMMON_COMMON_
#include <benchmark/benchmark.h>
#include <string>
#include <vector>
#include <stdint.h>
enum engine_t {
ENGINE_RE2C,
ENGINE_RE2
};
struct alg_t {
const char *name;
engine_t engine;
int flags;
};
struct bench_t {
const char *name;
const char *regexp;
const char **strings;
};
// Need to define benchmarks as functors for benchmark::RegisterBenchmark.
struct bench_regcomp_t {
void operator()(benchmark::State&, const alg_t&, const bench_t&) const;
};
struct bench_regexec_t {
void operator()(benchmark::State&, const alg_t&, const bench_t&) const;
};
// RFC URI and HTTP
#define CRLF "[\\n]"
#define OCT "([0-9]|[1-9][0-9]|[1][0-9]{2}|[2][0-4][0-9]|[2][5][0-5])"
#define IPV4 "(" OCT "[.]" OCT "[.]" OCT "[.]" OCT ")"
#define H16 "[0-9a-fA-F]{1,4}"
#define LS32 "(" H16 ":" H16 "|" IPV4 ")"
#define IPV6 "((" H16 ":){6}" LS32 \
"|" "::(" H16 ":){5}" LS32 \
"|(" H16 ")?::(" H16 ":){4}" LS32 \
"|((" H16 ":){0,1}" H16 ")?::(" H16 ":){3}" LS32 \
"|((" H16 ":){0,2}" H16 ")?::(" H16 ":){2}" LS32 \
"|((" H16 ":){0,3}" H16 ")?::" H16 ":" LS32 \
"|((" H16 ":){0,4}" H16 ")?::" LS32 \
"|((" H16 ":){0,5}" H16 ")?::" H16 \
"|((" H16 ":){0,6}" H16 ")?::)"
#define IPVFUTURE "(v[0-9a-fA-F]+[.][-0-9a-zA-Z._~!$&'()*+,;=:]+)"
#define IPLITERAL "([[](" IPV6 "|" IPVFUTURE ")[\\]])"
#define REGNAME "(([-0-9a-zA-Z._~!$&'()*+,;=]|%[0-9a-fA-F]{2})*)"
#define HOST "(" IPLITERAL "|" IPV4 "|" REGNAME ")"
#define PORT "(:[0-9]*)?"
#define USERINFO "(([-a-zA-Z0-9._~!$&'()*+,;=:]|%[0-9a-fA-F]{2})*@)?"
#define SCHEME "([a-zA-Z][a-zA-Z0-9+.-]*):"
#define QUERY "([?]([-a-zA-Z0-9._~!$&'()*+,;=:@/?]|%[0-9a-fA-F]{2})*)?"
#define FRAGMENT "([#]([-a-zA-Z0-9._~!$&'()*+,;=:@/?]|%[0-9a-fA-F]{2})*)?"
#define PCHAR "([-0-9a-zA-Z._~!$&'()*+,;=:@]|%[0-9a-fA-F]{2})"
#define PATH_ABEMPTY "(/" PCHAR "*)*"
#define PATH_ABSOLUTE "/(" PCHAR "+(/" PCHAR "*)*)?"
#define PATH_ROOTLESS PCHAR "+(/" PCHAR "*)*"
#define PATH_EMPTY "([/]?)"
#define AUTHORITY "(" USERINFO HOST PORT ")"
#define HIER_PART "(//" AUTHORITY PATH_ABEMPTY "|" PATH_ABSOLUTE "|" PATH_ROOTLESS "|" PATH_EMPTY ")"
#define URI SCHEME HIER_PART QUERY FRAGMENT
#define ABSOLUTE_URI SCHEME HIER_PART QUERY
#define ORIGIN_FROM PATH_ABEMPTY QUERY
#define REQUEST_TARGET "(" AUTHORITY "|" ABSOLUTE_URI "|" ORIGIN_FROM "|([*]))"
#define METHOD "([-!#$%&'*+.^_`|~0-9a-zA-Z]+)"
#define HTTP_VERSION "(HTTP/[0-9][.][0-9])"
#define STATUS_CODE "([0-9]{3})"
#define REASON_PHRASE "([ \\t \\x1f-\\x7e\\x80-\\xff]*)"
#define REQUEST_LINE METHOD "[ ]" REQUEST_TARGET "[ ]" HTTP_VERSION CRLF
#define STATUS_LINE HTTP_VERSION "[ ]" STATUS_CODE "[ ]" REASON_PHRASE CRLF
#define FIELD_NAME "([-!#$%&'*+.^_`|~0-9a-zA-Z]+)"
#define FIELD_VCHAR "[\\x1f-\\x7e\\x80-\\xff]"
#define FIELD_CONTENT "(" FIELD_VCHAR "([ \\t]+" FIELD_VCHAR")?)"
#define FIELD_VALUE "(" FIELD_CONTENT "|" CRLF "[ \\t]+)*"
#define HEADER_FIELD "(" FIELD_NAME ":[ \\t]*" FIELD_VALUE "[ \\t]*)"
#define MESSAGE_HEAD "(" REQUEST_LINE "|" STATUS_LINE ")" "(" HEADER_FIELD CRLF ")*"
// simplified URI and HTTP
#define CHAR2 "[-._~%!$&'()*+,;=a-zA-Z0-9]"
#define SCHEME2 "([-+.a-zA-Z0-9]+):"
#define USERINFO2 "((" CHAR2 "|[:])+@)?"
#define HOST2 "((" CHAR2 "|[:[\\]])+)"
#define PORT2 "(:[0-9]*)?"
#define AUTHORITY2 USERINFO2 HOST2 PORT2
#define PATH2 "((" CHAR2 "|[:@/])*)"
#define QUERY2 "([?](" CHAR2 "|[:@?/])*)?"
#define FRAGMENT2 "([#](" CHAR2 "|[:@?/])*)?"
#define URI2 SCHEME2 "(//" AUTHORITY2 ")?" PATH2 QUERY2 FRAGMENT2
#define ABSOLUTE_URI2 SCHEME2 "(//" AUTHORITY2 PORT2 ")?" PATH2 QUERY2
#define ORIGIN_FROM2 "/" PATH2 QUERY2
#define REQUEST_TARGET2 "(" AUTHORITY2 "|" ABSOLUTE_URI2 "|" ORIGIN_FROM2 "|[*])"
#define HTTP_VERSION2 "(HTTP/[0-9][.][0-9])"
#define METHOD2 "([-._~%!$&'*+#^`|a-zA-Z0-9]+)"
#define REQUEST_LINE2 "(" METHOD2 "[ ]" REQUEST_TARGET2 "[ ]" HTTP_VERSION2 CRLF ")"
#define STATUS_LINE2 "(" HTTP_VERSION2 "[ ]([0-9]{3})[ ]([\\t \\x1f-\\x7e\\x80-\\xff]*)" CRLF ")"
#define HEADER_FIELD2 "([-._~%!$&'*+#^`|a-zA-Z0-9]+:[\\x1f-\\x7e\\x80-\\xff \\t\\n]*)"
#define MESSAGE_HEAD2 "(" REQUEST_LINE2 "|" STATUS_LINE2 ")" "(" HEADER_FIELD2 CRLF ")*"
// simplified IPv6
#define IPV62 "(((" H16 ":){0,7}" H16 ")?(::)?((" H16 ":){0,7}" H16 ")?)"
// simplified IPv4
#define IPV42 "([0-9]{1,3})[.]([0-9]{1,3})[.]([0-9]{1,3})[.]([0-9]{1,3})"
// date
#define DATE "(Mon|Tue|Wed|Thu|Fri|Sat|Sun)" \
"[ ]+(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)" \
"[ ]+([0-9]{2})" \
"[ ]+([0-9]{4})" \
"[ ]+([0-9]{2}):([0-5][0-9]):[0-5][0-9](-[0-5][0-9])?(:[0-5][0-9])?" \
"[ ]+(([A-Z]{3})([+-]([0-5][0-9]):([0-5][0-9]))?)"
// simplified date
#define DATE2 "([a-zA-Z]+)[ ]+([a-zA-Z]+)[ ]+([0-9]+)[ ]+([0-9]+)[ ]+([0-9:-]+)[ ]+([A-Z0-9+-]+)"
// Gentoo package atom
#define PACKAGE_STR "([a-zA-Z0-9_+-]+)"
#define PACKAGE_NUM "([0-9]+)"
#define PACKAGE_VER "(" PACKAGE_NUM "([.]" PACKAGE_NUM ")*)"
#define PACKAGE_SFX1 "([a-z])?"
#define PACKAGE_SFX2 "((alpha|beta|pre|rc|p)" PACKAGE_NUM "?)"
#define PACKAGE_REV "(-r" PACKAGE_NUM ")?"
#define PACKAGE_ATOM PACKAGE_STR "/" PACKAGE_STR "-" PACKAGE_VER PACKAGE_SFX1 "(_" PACKAGE_SFX2 ")*" PACKAGE_REV
// simplified Gentoo package atom
#define PACKAGE_STR2 "([a-zA-Z0-9_/+-]+)"
#define PACKAGE_VER2 "([0-9.a-z_]+)"
#define PACKAGE_ATOM2 PACKAGE_STR2 "-" PACKAGE_VER2 PACKAGE_REV
#endif // _RE2C_BENCHMRKS_COMMON_COMMON_
-44
View File
@@ -1,44 +0,0 @@
find_package(Java)
find_package(JNI)
if (Java_FOUND AND JNI_FOUND)
include(UseJava)
# Java bindings to libre2c.
# Generate header for libre2c_jni.
add_jar(RE2C
libre2c/RE2C.java
GENERATE_NATIVE_HEADERS RE2C-native
ENTRY_POINT re2c.RE2C
)
# Build libre2c_jni.
add_library(re2c_jni SHARED libre2c/RE2C.cpp)
target_include_directories(re2c_jni PRIVATE "${CMAKE_SOURCE_DIR}/lib")
target_link_libraries(re2c_jni RE2C-native libre2c_shared)
# Build ReTdfa library and the benchmark.
add_jar(ReTdfa
ReTdfa.java
INCLUDE_JARS RE2C
ENTRY_POINT ReTdfa
)
# Python script that runs the benchmark.
set(builddir ".")
configure_file(run.py.in run.py @ONLY)
# Benchmark input data.
set(samples "samples.ser")
file(ARCHIVE_EXTRACT
INPUT "${CMAKE_CURRENT_SOURCE_DIR}/${samples}.zip"
)
# JS chart for the benchmark results.
set(js_chart "chart.js")
configure_file("${js_chart}" "${js_chart}" COPYONLY)
# Cleanup.
set_directory_properties(PROPERTY
ADDITIONAL_CLEAN_FILES "${samples};${js_chart}"
)
endif()
-61
View File
@@ -1,61 +0,0 @@
CLASSES := classes
LIBRE2C_JNI := libre2c_jni.so
LIBRE2C_JNI_HDR := re2c_RE2C.h
LIBRE2C_CLASSES := $(CLASSES)/libre2c
LIBRE2C_JAR := RE2C.jar
RETDFA_CLASSES := $(CLASSES)/retdfa
RETDFA_JAR := ReTdfa.jar
SAMPLES := samples.ser
# Generate header for JNI bindings to libre2c.
$(LIBRE2C_JNI_HDR): $(srcdir)/libre2c/RE2C.java
$(AM_V_at)mkdir -p $(LIBRE2C_CLASSES)
$(AM_V_GEN)javac -d $(LIBRE2C_CLASSES) -h . $<
# Build RE2C jar. Depend on the autogenerated header, as the same rule that
# generates header also generates class file.
$(LIBRE2C_JAR): $(LIBRE2C_JNI_HDR)
$(AM_V_GEN)jar cf $@ -C $(LIBRE2C_CLASSES) .
# Build JNI bindings to libre2c.
$(LIBRE2C_JNI): $(srcdir)/libre2c/RE2C.cpp $(LIBRE2C_JNI_HDR)
$(AM_V_at)mkdir -p $(@D)
$(AM_V_GEN)$(CXX) -fPIC -Wall -O3 -g -shared \
-I $$JAVA_HOME/include \
-I $$JAVA_HOME/include/linux \
-I $(top_srcdir)/lib \
-I . \
-L $(top_builddir)/.libs \
-Wl,-rpath,$(top_builddir)/.libs \
-lre2c \
-o $@ $<
# Build ReTdfa jar.
$(RETDFA_JAR): $(srcdir)/ReTdfa.java $(LIBRE2C_JNI) $(LIBRE2C_JAR)
$(AM_V_at)rm -f $@
$(AM_V_at)mkdir -p $(RETDFA_CLASSES)
$(AM_V_GEN)javac \
-d $(RETDFA_CLASSES) \
-cp $(LIBRE2C_CLASSES) \
$< \
&& jar cf $@ -C $(RETDFA_CLASSES) .
# Touch extracted file to update timestamp and avoid reextracting on every make.
$(SAMPLES): $(srcdir)/$(SAMPLES).zip
$(AM_V_GEN)unzip -qo $< && touch $@
all-local: $(RETDFA_JAR) $(SAMPLES)
# Remove all autogenerated files.
clean-local:
$(AM_V_at)rm -rf \
$(CLASSES) \
$(LIBRE2C_JNI) \
$(LIBRE2C_JNI_HDR) \
$(LIBRE2C_JAR) \
$(RETDFA_JAR) \
$(SAMPLES)
-10
View File
@@ -1,10 +0,0 @@
ReTdfa is a Java library and benchmark for regular expression parsing
and submatch extraction. It contains a family of algorithms based on
TNFA and TDFA. It also contains a benchmark for various algorithms,
including libre2c.
ReTdfa is developed by Angelo Borsotti. The code here is a copy of the
original (slightly modified), and may be out of date.
Note: to rerun the benchmark, remove the autogenerated measure*.ser
files (otherwise ReTdfa will only regenerate the charts).
File diff suppressed because it is too large Load Diff
-140
View File
@@ -1,140 +0,0 @@
function svgAddBar(fig,x,y,w,h,color){
var bar = document.createElementNS("http://www.w3.org/2000/svg","rect");
bar.x.baseVal.value = x;
bar.y.baseVal.value = y;
bar.width.baseVal.value = w;
bar.height.baseVal.value = h;
bar.style.fill = color;
fig.appendChild(bar);
}
function svgAddHgridLine(fig,x,y,w,color,contents){
var bar = document.createElementNS("http://www.w3.org/2000/svg","rect");
bar.x.baseVal.value = x;
bar.y.baseVal.value = y;
bar.width.baseVal.value = w;
bar.height.baseVal.value = 1;
bar.style.fill = color;
fig.appendChild(bar);
var text = document.createElementNS("http://www.w3.org/2000/svg","text");
text.setAttributeNS(null,"font-size","7pt");
text.textContent = contents;
fig.appendChild(text);
var wt = text.getComputedTextLength();
text.setAttributeNS(null,"x",x-wt);
text.setAttributeNS(null,"y",y);
}
function svgAddLabel(fig,x,y,contents,fontsize){
var text = document.createElementNS("http://www.w3.org/2000/svg","text");
text.setAttributeNS(null,"x",x);
text.setAttributeNS(null,"y",y);
text.setAttributeNS(null,"font-size",fontsize);
text.textContent = contents;
fig.appendChild(text);
}
function svgAddLine(fig,x1,y1,x2,y2,w,color){
var line = document.createElementNS("http://www.w3.org/2000/svg","line");
line.x1.baseVal.value = x1;
line.y1.baseVal.value = y1;
line.x2.baseVal.value = x2;
line.y2.baseVal.value = y2;
line.setAttributeNS(null,"stroke",color);
line.setAttributeNS(null,"stroke-width",w);
fig.appendChild(line);
}
function svgAddVtick(fig,x,y){
var line = document.createElementNS("http://www.w3.org/2000/svg","line");
line.x1.baseVal.value = x;
line.y1.baseVal.value = y;
line.x2.baseVal.value = x;
line.y2.baseVal.value = y+5;
line.setAttributeNS(null,"stroke","darkgray");
line.setAttributeNS(null,"stroke-width",1);
fig.appendChild(line);
}
function svgAddLegend(svg,x,text,color,y){
svgAddBar(svg,x,y,20,2,color);
svgAddLabel(svg,x+25,y+5,text,"7pt");
}
var xAxisName = "text repetitions";
var yAxisName = "toks/msec";
var curvesLegend = "";
function svgChart(id,re,text,data){
var svg = document.getElementById(id);
var xorig = 60;
var yorig = 320;
var max = 0;
for (var i = 1; i < data.length; i++){
for (var j = 1; j < data[i].length; j++){
if (data[i][j] > max) max = data[i][j];
}
}
// draw horizontal grid
/*
var scale = 1;
for (var i = 0; i < 6; i++){
if (max < scale) break;
scale *= 10;
}
var scale10 = Math.floor(scale/10);
var scale = 1;
for (var i = 0; i <= 10; i++){
if (max < scale) break;
scale += scale10;
}
var factscale = Math.floor(scale/10);
if (factscale == 0) factscale = 1;
*/
var logm = Math.floor(Math.log10(max));
var tenpow = Math.pow(10,logm);
var higrid = Math.floor(max/tenpow + 1)*tenpow;
for (var i = 0; i <= 10; i++){
// svgAddHgridLine(svg,xorig,yorig-i*30,660,"darkgray",Math.floor(i * factscale));
// svgAddHgridLine(svg,xorig,yorig-i*30,660,"darkgray",Math.floor(i * (higrid/10)));
svgAddHgridLine(svg,xorig,yorig-i*30,660,"darkgray",i * higrid/10);
}
// draw x axis labels
for (var i = 0; i < data[0].length; i++){
svgAddLabel(svg,xorig+50*i,yorig+15,data[0][i],"7pt");
svgAddVtick(svg,xorig+50*i,yorig);
}
svgAddLabel(svg,xorig+50*data[0].length,yorig+20,xAxisName,"7pt");
svgAddLabel(svg,5,yorig-287,yAxisName,"7pt");
// legend for lines
for (var i = 1; i < data.length; i++){
var lab = data[i][0].split("|");
svgAddLegend(svg,730+xorig,lab[0],lab[1],20+(i*30));
}
if (curvesLegend != ""){
svgAddLabel(svg,730+xorig,30,curvesLegend,"8pt");
}
// title
if (text.length > 0){
svgAddLabel(svg,xorig,370,"RE: "+re+"\u2001\u2001\u2001 text: "+text,"11pt");
} else {
svgAddLabel(svg,xorig,370,re,"11pt");
}
// draw the lines
// var p = (scale/10)/30;
// var p = factscale/30;
var p = (higrid/10)/30;
for (var i = 1; i < data.length; i++){
var serie = data[i];
for (var j = 1; j < serie.length-1; j++){
if (isNaN(serie[j])) break;
if (isNaN(serie[j+1])) break;
var height1 = serie[j] / p;
var height2 = serie[j+1] / p;
var lab = data[i][0].split("|");
svgAddLine(svg,xorig+50*j,yorig-height1,
xorig+50*(j+1),yorig-height2,2,lab[1]);
}
}
}
-129
View File
@@ -1,129 +0,0 @@
#include <jni.h>
#include <assert.h>
#include "re2c_RE2C.h"
#include "regex.h"
JNIEXPORT jlong JNICALL Java_re2c_RE2C_regcomp(JNIEnv *env, jclass, jstring pattern,
jboolean nfa, jboolean regless, jboolean subhist, jboolean tstring, jboolean autotags)
{
const char *c_pattern = env->GetStringUTFChars(pattern, NULL);
if (c_pattern == NULL) return 1;
const int flags = (nfa ? REG_NFA : 0)
| (regless ? REG_MULTIPASS : 0)
| (subhist ? REG_SUBHIST : 0)
| (tstring ? REG_TSTRING : 0)
| (autotags ? REG_AUTOTAGS : 0);
regex_t *re = new regex_t;
int e = regcomp(re, c_pattern, flags);
if (e != 0) {
re = NULL;
goto end;
}
if (re->flags & REG_TSTRING) {
// allocated by the library
} else if (re->flags & REG_SUBHIST) {
// allocated by the library
} else {
// allocated by the user (pointer stored in regex_t)
re->pmatch = new regmatch_t[re->re_nsub];
}
end:
env->ReleaseStringUTFChars(pattern, c_pattern);
return (jlong)re;
}
JNIEXPORT jint JNICALL Java_re2c_RE2C_regexec(JNIEnv *env, jclass,
jlong reg, jstring str)
{
const char *c_str = env->GetStringUTFChars(str, NULL);
if (NULL == c_str) return 1;
regex_t *re = (regex_t*)reg;
int e;
if (re->flags & REG_TSTRING) {
const tstring_t *s = regtstring(re, c_str);
e = s ? 0 : 1;
} else if (re->flags & REG_SUBHIST) {
re->psubhist = regparse(re, c_str, re->re_nsub);
e = re->psubhist ? 0 : 1;
} else {
e = regexec(re, c_str, re->re_nsub, re->pmatch, 0);
}
env->ReleaseStringUTFChars(str, c_str);
return e;
}
JNIEXPORT void JNICALL Java_re2c_RE2C_regfree(JNIEnv *, jclass, jlong reg)
{
regex_t *re = (regex_t*)reg;
if (re->flags & REG_TSTRING) {
// freed by the library in regfree()
} else if (re->flags & REG_SUBHIST) {
// freed by the library in regfreesub()
} else {
// freed by the user (pointer stored in regex_t)
delete[] re->pmatch;
}
regfree(re);
delete re;
}
JNIEXPORT void JNICALL Java_re2c_RE2C_regfreesub(JNIEnv *, jclass, jlong reg)
{
regex_t *re = (regex_t*)reg;
if (re->flags & REG_TSTRING) {
// freed by the library in regfree()
} else if (re->flags & REG_SUBHIST) {
// freed by the library in regfreesub()
regfreesub(re->psubhist);
} else {
// freed by the user (pointer stored in regex_t)
}
}
JNIEXPORT jint JNICALL Java_re2c_RE2C_getNtags(JNIEnv *, jclass, jlong reg)
{
regex_t *re = (regex_t*)reg;
return static_cast<jint>(re->re_ntag);
}
JNIEXPORT jint JNICALL Java_re2c_RE2C_getNmatch(JNIEnv *, jclass, jlong reg)
{
regex_t *re = (regex_t*)reg;
return static_cast<jint>(re->re_nsub);
}
JNIEXPORT jlong JNICALL Java_re2c_RE2C_getStartOffset(JNIEnv *, jclass,
jlong reg, jint index)
{
regex_t *re = (regex_t*)reg;
return static_cast<jlong>(re->pmatch[index].rm_so);
}
JNIEXPORT jlong JNICALL Java_re2c_RE2C_getEndOffset(JNIEnv *, jclass,
jlong reg, jint index)
{
regex_t *re = (regex_t*)reg;
return static_cast<jlong>(re->pmatch[index].rm_eo);
}
JNIEXPORT jcharArray JNICALL Java_re2c_RE2C_getTstring(JNIEnv *env, jclass, jlong reg)
{
regex_t *re = (regex_t*)reg;
const tstring_t &s = re->tstring;
const jsize length = static_cast<jsize>(s.length);
jcharArray result = env->NewCharArray(length);
// C++ t-string character is also 16 bits.
env->SetCharArrayRegion(result, 0, length, s.string);
return result;
}
@@ -1,93 +0,0 @@
package re2c;
// JNI bindings to libre2c library.
public class RE2C {
static {
System.loadLibrary("re2c_jni");
}
// Must be in sync with libre2c.
public static final int TAG_BASE = 1 << 15;
public static native long regcomp(String pattern, boolean nfa,
boolean regless, boolean subhist, boolean tstring, boolean autotags);
public static native int regexec(long re, String string);
public static native void regfree(long re);
public static native void regfreesub(long re);
public static native int getNmatch(long re);
public static native int getNtags(long re);
public static native long getStartOffset(long re, int index);
public static native long getEndOffset(long re, int index);
public static native char[] getTstring(long re);
public static void printRegs(long re) {
int nmatch = getNmatch(re);
for (int j = 0; j < nmatch; ++j) {
System.out.printf("(%d,%d)", getStartOffset(re, j), getEndOffset(re, j));
}
System.out.printf("\n");
}
public static String showTstring(char[] tstring) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < tstring.length; i++){
char c = tstring[i];
if (c < TAG_BASE) {
// Alphabet character.
sb.append(c);
} else {
// Tag, shifted to the upper half of a t-string character.
if (i > 0 && tstring[i - 1] >= TAG_BASE) {
sb.append(' ');
}
sb.append(c - TAG_BASE);
}
}
return sb.toString();
}
public static void main(String[] args) {
final String[] res =
{"a"
, "ab"
, "[a-c]*"
, "()"
, "(a*)"
, "(a*)(a*)"
};
final String[][] ss =
{ {"a", "b"}
, {"ab", "aba"}
, {"", "a", "b", "c", "abc"}
, {""}
, {"", "a", "aaa"}
, {"", "a", "aaa"}
};
for (int k = 0; k < res.length; ++k) {
String re = res[k];
long reg = regcomp(re, false, false, false, false, false);
if (reg == 0) {
System.err.printf("regcomp failed on RE %s\n", re);
System.exit(1);
}
for (int i = 0; i < ss[k].length; ++i) {
String s = ss[k][i];
int e = regexec(reg, s);
System.out.printf("regexec on RE %s, string %s: ", re, s);
if (e != 0) {
System.out.printf("NOMATCH\n");
} else {
printRegs(reg);
}
}
regfree(reg);
System.out.printf("\n");
}
}
}
-1
View File
@@ -1 +0,0 @@
Java bindings to libre2c library.
@@ -1,6 +0,0 @@
The measurements have been taken on an Intel(R) Core(TM) i7-8750H CPU with
32 KiB L1 Data cache (x6 cores),
32 KiB L1 Instruction cache (x6 cores),
256 KiB L2 Unified cache (x6 cores),
9216 KiB L3 Unified cache,
32 GiB RAM.
@@ -1,106 +0,0 @@
\documentclass[tikz]{standalone}
\usepackage[utf8]{inputenc}
\usepackage{amsmath, amssymb, amsfonts}
\usepackage{tikz, pgfplots, pgfplotstable}
\begin{document}
\pgfplotstableread {
18.00 64067.60 42946.34 182933.76 105057.40 6229.27 22180.86 26243.90 32994.76 73211.37 97660.34
19.00 62548.54 42164.01 178722.37 103400.35 5770.58 20847.07 23890.54 30599.08 73046.09 97387.81
20.00 60048.83 40443.29 171833.91 100612.70 5015.70 18897.54 21808.86 28312.46 72539.33 96542.90
22.00 57079.79 38515.24 159793.27 96907.26 4217.08 16900.47 19528.35 25703.02 72258.85 95088.91
23.00 54436.63 36775.10 147812.44 93065.74 3584.12 15030.44 17188.28 22920.65 71393.41 94080.62
24.00 52415.17 35525.41 138862.51 90118.03 3143.60 13812.73 15617.56 21128.39 70804.77 93103.91
25.00 50851.49 34423.06 131785.43 88851.06 2671.71 12209.55 13325.01 18396.98 70234.27 92666.51
26.00 49875.77 33780.79 125493.62 87792.96 2410.59 11148.35 11685.93 16473.76 69745.11 92356.24
27.00 49120.55 33395.10 120200.73 86274.06 2395.18 11243.06 11809.34 16687.19 68995.42 92307.63
28.00 48941.82 33446.25 119836.68 86694.70 2445.77 11597.05 12206.75 17403.04 68681.69 92504.90
29.00 47242.85 32428.99 112650.91 84709.63 2194.40 10686.36 11067.65 16096.81 68017.29 92522.99
30.00 46547.71 31908.05 106896.82 83234.19 2060.92 10322.06 10615.28 15596.19 67661.79 92201.19
31.00 44746.78 30761.95 96590.88 79863.36 1893.17 9583.53 9831.02 14350.11 66572.29 90726.62
32.00 43436.08 30015.85 89575.18 77760.96 1782.59 9124.68 9183.95 13631.79 65740.34 89967.07
33.00 42483.05 29415.64 87542.50 76519.29 1692.18 8776.04 8789.94 13070.47 65460.19 89770.30
34.00 41734.65 28869.28 84681.78 74992.78 1605.51 8386.69 8342.75 12501.38 64854.47 88944.96
35.00 41119.13 28632.57 81703.60 74722.48 1497.51 7894.08 7611.52 11732.78 64085.34 88243.59
36.00 40704.36 28343.84 80300.17 73822.50 1498.01 7896.33 7613.06 11860.52 63595.18 87867.33
37.00 40065.40 27844.84 76968.74 72293.78 1406.94 7636.42 7447.81 11603.40 62937.90 86801.18
38.00 39294.27 27215.83 70966.47 70686.86 1350.01 7207.91 6881.68 10919.70 62590.66 85851.13
39.00 39098.45 27083.52 69155.33 69889.97 1321.95 7020.93 6731.99 10696.01 62042.75 85317.37
40.00 38196.73 26541.44 65568.32 68152.49 1265.99 6765.98 6426.98 10195.64 61179.72 83724.00
41.00 36471.62 25422.34 58940.92 65249.09 1184.08 6302.20 5953.32 9435.59 59935.34 81613.14
42.00 36716.62 25509.28 59561.80 65702.64 1216.76 6537.99 6220.15 10002.22 59544.22 80900.90
43.00 36617.92 25273.60 58865.21 65134.54 1226.27 6529.91 6198.52 9889.73 59192.09 80493.85
44.00 36150.33 24864.28 57058.67 64057.84 1183.46 6377.57 6040.99 9666.42 58676.93 79926.59
45.00 36182.35 24996.13 56715.01 64209.18 1188.66 6421.67 6135.37 9821.71 58395.16 79381.75
46.00 36443.85 24884.45 55786.43 63845.59 1149.77 6162.49 5895.39 9357.53 58500.98 79228.39
47.00 36058.47 24419.19 51646.99 63004.55 1095.61 5929.20 5597.65 8944.25 58246.49 79276.10
48.00 34956.31 23801.95 48932.21 61693.23 1011.48 5500.96 5029.95 8140.69 58036.83 79196.46
49.00 34277.03 23629.45 48088.23 60894.19 1018.97 5582.97 5111.21 8275.08 57724.55 78635.00
50.00 33246.76 22945.42 44546.84 59595.18 905.60 5086.73 4571.06 7410.58 57668.88 78301.40
51.00 33773.89 23190.66 44321.00 60535.16 885.48 5039.04 4540.15 7393.76 58323.35 78631.12
52.00 33337.63 22958.67 43083.19 59922.10 837.92 4822.92 4253.07 6963.98 58365.64 79467.41
53.00 32602.41 22650.08 41747.10 58711.50 791.56 4606.34 4051.73 6618.74 58248.54 79207.90
54.00 32021.90 22488.91 40203.96 58074.90 754.94 4415.61 3850.97 6310.81 58131.37 78549.87
55.00 32799.74 23152.05 41538.58 59410.15 784.08 4529.31 3842.67 6473.81 58196.56 78239.61
56.00 32629.68 23110.97 41488.36 59501.76 802.40 4536.56 3809.06 6459.95 58417.71 78993.91
57.00 31385.48 22496.83 39347.65 57967.45 770.21 4412.27 3698.44 6297.75 57922.23 78275.11
58.00 30680.96 22559.73 38096.34 57409.70 737.30 4230.11 3533.81 6005.96 57943.76 76944.89
59.00 31446.28 22839.60 38096.15 58277.81 764.03 4460.26 3814.62 6475.04 58093.17 77455.98
60.00 31067.82 22715.31 36172.22 58136.03 710.39 4153.83 3474.16 5924.73 58263.23 77761.50
61.00 30689.92 22441.92 34874.99 57353.23 687.94 4077.04 3382.82 5816.85 58186.13 77640.38
62.00 29916.43 21939.89 33817.99 55758.16 670.90 3927.07 3205.77 5512.63 57187.21 76937.32
63.00 29961.36 22164.15 34131.52 56447.34 675.59 4023.28 3295.78 5712.03 56930.67 75941.26
64.00 29651.76 21915.98 32842.30 55660.78 653.84 3903.05 3130.16 5402.50 56589.14 75840.17
65.00 30096.51 22293.16 32886.52 56660.89 638.10 3854.69 3132.62 5413.33 57112.42 76597.87
66.00 29546.36 21925.33 31172.53 56137.56 598.51 3639.77 2962.22 5056.47 57237.38 77300.51
67.00 29489.32 21914.59 30122.63 56272.61 565.86 3527.39 2817.11 4902.97 57319.13 77385.28
68.00 29519.33 22149.89 29778.41 57078.95 555.96 3494.03 2781.40 4838.88 57562.13 77899.66
69.00 29268.33 21855.40 30071.74 56633.31 558.78 3599.36 2866.62 4978.05 57774.46 78687.77
70.00 28712.40 22026.22 28757.99 56817.35 531.88 3404.62 2636.81 4696.89 57994.28 78935.42
71.00 28623.79 22021.90 27828.04 56346.02 532.71 3342.18 2634.22 4652.04 57881.34 78591.40
72.00 28453.65 22009.10 27358.01 56227.07 520.55 3267.49 2594.98 4545.64 57973.20 79095.49
73.00 27926.89 21898.66 26803.92 56104.33 509.09 3215.34 2526.01 4466.13 58263.83 79606.04
74.00 27890.34 21796.17 25780.69 55701.50 485.78 3056.41 2365.57 4181.06 58783.30 80228.20
75.00 27771.84 21793.06 24647.71 56153.07 468.49 2962.53 2286.49 4052.66 58865.13 80711.66
} \datatable
\begin{tikzpicture}
\begin{axis} [
font=\scriptsize,
scaled y ticks = false,
y tick label style = {/pgf/number format/.cd,fixed,1000 sep = {\,}},
ymajorgrids,
grid style={line width=.1pt, draw=gray!20},
legend pos=outer north east,
legend cell align = left,
legend style = {thick, draw = none},
xlabel = regular expression size (characters),
ylabel = parse speed (characters per second),
width = 5in
]
\addplot [line width=0.7pt, color=violet] table [x index=0, y index=1] from \datatable;
\addlegendentry{last-offset-java}
\addplot [line width=0.7pt, color=teal] table [x index=0, y index=2] from \datatable;
\addlegendentry{last-offset-multipass-java}
\addplot [line width=0.7pt, color=blue] table [x index=0, y index=3] from \datatable;
\addlegendentry{last-offset-re2c}
\addplot [line width=0.7pt, color=cyan] table [x index=0, y index=4] from \datatable;
\addlegendentry{last-offset-multipass-re2c}
\addplot [line width=0.7pt, color=lightgray] table [x index=0, y index=5] from \datatable;
\addlegendentry{all-offsets-java}
\addplot [line width=0.7pt, color=pink] table [x index=0, y index=6] from \datatable;
\addlegendentry{all-offsets-multipass-java}
\addplot [line width=0.7pt, color=gray] table [x index=0, y index=7] from \datatable;
\addlegendentry{all-offsets-re2c}
\addplot [line width=0.7pt, color=purple] table [x index=0, y index=8] from \datatable;
\addlegendentry{all-offsets-multipass-re2c}
\addplot [line width=0.7pt, color=orange] table [x index=0, y index=9] from \datatable;
\addlegendentry{tagged-string-multipass-java}
\addplot [line width=0.7pt, color=olive] table [x index=0, y index=10] from \datatable;
\addlegendentry{tagged-string-multipass-re2c}
\end{axis}
\end{tikzpicture}
\end{document}
@@ -1,106 +0,0 @@
\documentclass[tikz]{standalone}
\usepackage[utf8]{inputenc}
\usepackage{amsmath, amssymb, amsfonts}
\usepackage{tikz, pgfplots, pgfplotstable}
\begin{document}
\pgfplotstableread {
18.00 77594.81 51424.59 202781.71 122255.25 13391.78 32436.12 93838.33 65352.91 81385.82 100029.52
19.00 73778.38 49193.48 201226.52 119932.12 12427.55 30789.67 90207.09 62057.45 80696.01 100001.57
20.00 68598.33 45313.31 199038.73 116879.33 9779.37 27609.39 83788.03 57103.94 78705.31 99578.88
22.00 62094.95 40611.16 195320.45 112322.17 6817.72 23787.60 76318.91 51559.50 76104.81 98604.00
23.00 59685.51 38868.61 193951.49 110531.28 6054.46 22321.52 71496.68 49149.24 75141.38 98153.73
24.00 57919.84 37570.77 193959.47 108887.92 5566.88 21339.09 68563.67 47238.86 74504.28 97825.43
25.00 54729.44 35519.66 190951.64 108377.86 5081.34 19948.73 64985.29 44812.02 74510.63 98446.81
26.00 53889.17 35043.71 190534.09 108943.25 4974.79 19575.42 64173.63 44156.63 74396.88 98868.71
27.00 53972.18 34940.15 189604.95 109075.69 4991.53 19685.01 64533.47 43911.21 74026.11 98884.19
28.00 51677.15 34148.21 189807.01 107070.06 4696.17 19200.68 64421.79 42800.69 73770.16 98203.95
29.00 50981.66 33481.24 190440.69 107817.52 4562.04 18797.15 62962.60 42641.34 73677.70 98734.47
30.00 51012.97 33422.60 189987.41 107898.59 4529.17 18755.21 63182.28 42456.92 73693.00 99013.87
31.00 51447.73 33418.47 189874.71 107319.28 4591.04 18760.34 62872.03 42570.92 73412.16 98292.07
32.00 49959.28 32571.09 188258.74 106806.76 4433.92 18287.30 61437.20 41966.99 73167.12 98076.14
33.00 50491.42 32701.29 190458.88 108591.88 4477.34 18392.31 61445.25 42367.95 73623.08 98717.22
34.00 48137.78 31388.15 189331.30 106272.84 4180.48 17615.45 60073.29 40638.50 73377.88 98514.42
35.00 45720.16 29940.55 186112.45 104916.90 3912.74 16692.92 57813.18 39078.92 73049.46 97983.58
36.00 46016.79 30211.96 188227.09 104823.62 3899.43 16829.86 57644.40 38966.99 73057.45 97444.05
37.00 44640.77 29459.22 185966.34 103308.30 3716.86 16393.91 56824.13 37809.63 72736.91 96742.83
38.00 43829.60 28951.22 183638.55 101928.33 3647.35 16089.67 55640.13 37301.34 72416.42 96497.18
39.00 42651.68 28023.83 181633.84 100526.99 3555.32 15554.73 55565.79 36234.74 72133.25 95956.64
40.00 42129.18 27689.50 180641.57 100440.26 3530.57 15331.44 54898.74 35680.42 72197.65 95892.56
41.00 39529.78 26071.10 178680.81 98367.20 3226.95 14368.76 52840.98 33779.61 72026.62 95236.18
42.00 38479.04 25783.16 175481.55 97117.73 3080.63 14178.11 51951.28 33288.53 71565.33 94697.91
43.00 37676.67 25394.52 175021.87 95720.28 3011.24 13943.19 51921.41 32659.88 71336.49 94472.22
44.00 34991.38 23959.28 171886.62 92252.57 2722.21 13049.85 50259.07 30741.44 70568.38 93669.95
45.00 34165.65 23466.72 167800.34 92487.25 2649.59 12798.30 49300.31 30303.29 70227.83 93100.29
46.00 33444.64 23021.17 166785.14 92211.05 2580.73 12572.76 48848.65 29502.10 70192.46 93003.41
47.00 32778.35 22557.57 165867.30 91204.14 2492.84 12348.95 48376.54 29257.43 69917.55 93233.97
48.00 30710.59 21224.27 163747.55 89474.47 2288.47 11559.17 45756.85 27451.26 69872.49 93616.63
49.00 30324.96 21033.06 164086.33 89333.25 2226.44 11408.11 45953.43 26927.54 70033.38 93211.68
50.00 28961.94 20121.55 160111.62 89202.28 2086.82 10857.46 43798.37 25714.91 70106.27 93359.73
51.00 26563.74 18913.19 156965.70 86824.70 1806.15 10099.12 42250.25 24145.96 69544.12 92530.46
52.00 25153.97 18001.19 155564.89 85211.96 1701.37 9590.67 41862.18 23304.04 69182.62 92466.66
53.00 24519.40 17616.96 157148.12 85449.94 1626.37 9394.67 41858.09 23036.94 69662.26 93046.68
54.00 23643.88 17041.50 153919.71 84191.72 1544.42 9050.56 40971.95 22059.34 69320.06 92749.13
55.00 23756.97 17317.91 153586.07 85154.63 1594.03 9204.95 41451.99 22432.80 69675.14 92794.70
56.00 23600.84 17188.94 153292.10 84890.03 1605.10 9092.85 40942.48 22245.50 69874.46 93139.78
57.00 22912.77 16765.70 150786.18 83578.35 1546.94 8824.80 39671.36 21687.28 69677.13 93162.14
58.00 21559.32 15878.42 146909.50 82843.64 1464.39 8289.27 37967.48 20343.59 69615.87 92659.51
59.00 22147.44 16445.21 146336.19 83638.61 1508.75 8616.36 38782.21 21180.32 69974.59 92477.79
60.00 20734.23 15351.76 140006.00 82554.20 1434.14 8051.80 36922.29 20012.74 69406.74 92080.61
61.00 19910.09 14976.77 138024.46 81202.11 1364.36 7830.45 35802.78 19454.87 68954.08 92110.22
62.00 19640.55 14788.54 136548.53 80166.50 1344.14 7735.37 35390.46 19260.55 68659.56 92354.74
63.00 20450.27 15466.44 136567.18 81901.54 1413.37 8108.19 34691.18 19770.11 68869.02 92408.59
64.00 18977.32 14357.22 132431.47 81476.92 1308.58 7475.16 32965.95 18143.17 68931.05 92649.27
65.00 18483.82 13970.31 131639.73 83849.35 1266.76 7253.87 32134.77 17812.73 69666.02 93113.23
66.00 17575.93 13269.76 128523.85 82949.61 1181.90 6852.48 30312.31 16878.36 69540.52 92648.37
67.00 17025.49 13024.66 126292.89 81863.68 1138.11 6701.23 30092.51 16573.23 69375.29 92351.89
68.00 17636.20 13362.69 126077.77 83119.45 1179.52 6910.53 30240.87 16994.03 69604.33 92638.66
69.00 18595.50 14128.87 127252.00 83490.95 1246.90 7332.97 31441.90 18145.91 69592.81 92747.82
70.00 18433.97 13728.82 124454.12 82980.33 1237.80 7112.65 30400.05 17456.83 69126.98 92485.97
71.00 18147.59 13546.32 123926.12 82356.85 1191.15 7003.25 30143.97 17218.75 69088.17 92097.08
72.00 18117.52 13383.66 122834.63 82087.67 1188.82 6933.67 30185.92 17353.59 69053.54 92100.82
73.00 17435.05 12876.20 119406.59 81578.44 1153.69 6660.49 29806.57 16546.17 69154.79 91334.41
74.00 16388.19 12103.48 113225.95 79286.00 1073.92 6257.82 29029.85 15621.33 68518.77 90520.91
75.00 15717.38 11688.79 107030.45 76881.02 1028.43 6038.20 28352.02 15172.25 67457.34 89242.56
} \datatable
\begin{tikzpicture}
\begin{axis} [
font=\scriptsize,
scaled y ticks = false,
y tick label style = {/pgf/number format/.cd,fixed,1000 sep = {\,}},
ymajorgrids,
grid style={line width=.1pt, draw=gray!20},
legend pos=outer north east,
legend cell align = left,
legend style = {thick, draw = none},
xlabel = regular expression size (characters),
ylabel = parse speed (characters per second),
width = 5in
]
\addplot [line width=0.7pt, color=violet] table [x index=0, y index=1] from \datatable;
\addlegendentry{last-offset-java}
\addplot [line width=0.7pt, color=teal] table [x index=0, y index=2] from \datatable;
\addlegendentry{last-offset-multipass-java}
\addplot [line width=0.7pt, color=blue] table [x index=0, y index=3] from \datatable;
\addlegendentry{last-offset-re2c}
\addplot [line width=0.7pt, color=cyan] table [x index=0, y index=4] from \datatable;
\addlegendentry{last-offset-multipass-re2c}
\addplot [line width=0.7pt, color=lightgray] table [x index=0, y index=5] from \datatable;
\addlegendentry{all-offsets-java}
\addplot [line width=0.7pt, color=pink] table [x index=0, y index=6] from \datatable;
\addlegendentry{all-offsets-multipass-java}
\addplot [line width=0.7pt, color=gray] table [x index=0, y index=7] from \datatable;
\addlegendentry{all-offsets-re2c}
\addplot [line width=0.7pt, color=purple] table [x index=0, y index=8] from \datatable;
\addlegendentry{all-offsets-multipass-re2c}
\addplot [line width=0.7pt, color=orange] table [x index=0, y index=9] from \datatable;
\addlegendentry{tagged-string-multipass-java}
\addplot [line width=0.7pt, color=olive] table [x index=0, y index=10] from \datatable;
\addlegendentry{tagged-string-multipass-re2c}
\end{axis}
\end{tikzpicture}
\end{document}
-46
View File
@@ -1,46 +0,0 @@
#!/usr/bin/env python3
import glob
import os
import psutil
import subprocess
import sys
builddir = "@builddir@"
def main():
# Limit the benchmark to a single CPU (not working on macOS).
try:
psutil.Process().cpu_affinity([1])
except AttributeError as error:
sys.stderr.write("warning: cannot set CPU affinity\n")
# Run a small check for Java bindings to libre2c.
subprocess.run(['java',
'-cp', '%s/*' % builddir,
'-Djava.library.path=%s' % builddir,
'-Dfile.encoding=UTF8',
're2c.RE2C'
])
# Remove previous measurements (otherwise ReTdfa will not rerun the
# benchmark, it will only regenerate charts).
for f in glob.glob('./measure_*.ser'):
os.remove(f)
# Run the benchmark.
subprocess.run(['java',
'-cp', '%s/*' % builddir,
'-Djava.library.path=%s' % builddir,
'-Dfile.encoding=UTF8',
'-Xmx1000m',
'-Xss10m',
'ReTdfa'
])
if __name__ == "__main__":
main()
Binary file not shown.
-21
View File
@@ -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()
-17
View File
@@ -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
-66
View File
@@ -1,66 +0,0 @@
#include <benchmark/benchmark.h>
#include <string.h>
#include "benchmarks/c/common/common.h"
#include "benchmarks/c/common/strings_atom.h"
#include "benchmarks/c/common/strings_date.h"
#include "benchmarks/c/common/strings_http.h"
#include "benchmarks/c/common/strings_ipv4.h"
#include "benchmarks/c/common/strings_ipv6.h"
#include "benchmarks/c/common/strings_uri.h"
#include "lib/regex.h"
int main(int argc, char** argv)
{
static const size_t MAX_TITLE = 1024;
char title[MAX_TITLE];
static const size_t AAA_LEN = 1 << 14;
char *aaa = new char[AAA_LEN + 1];
memset(aaa, 'a', AAA_LEN);
const char *aaa_strings[] = {aaa, NULL};
const std::vector<bench_t> benches {
{"http-rfc7230", MESSAGE_HEAD, http_strings},
{"http-simple", MESSAGE_HEAD2, http_strings},
{"uri-rfc3986", URI, uri_strings},
{"uri-simple", URI2, uri_strings},
{"ipv6", IPV6, ipv6_strings},
{"ipv4", IPV4, ipv4_strings},
{"date", DATE, date_strings},
{"package", PACKAGE_ATOM, atom_strings},
{NULL, "(a)*a{10}", aaa_strings},
{NULL, "(a)*a{100}", aaa_strings},
{NULL, "(a)*a{1000}", aaa_strings},
};
const std::vector<alg_t> algs {
{"last-offset", ENGINE_RE2C, 0},
{"multipass-last-offset", ENGINE_RE2C, REG_MULTIPASS},
{"all-offsets", ENGINE_RE2C, REG_SUBHIST},
{"multipass-all-offsets", ENGINE_RE2C, REG_SUBHIST | REG_MULTIPASS},
};
benchmark::Initialize(&argc, argv);
for (const bench_t &bench : benches) {
for (const alg_t &alg : algs) {
const char *name = bench.name ? bench.name : bench.regexp;
snprintf(title, MAX_TITLE, "%s-regcomp_%s", name, alg.name);
benchmark::RegisterBenchmark(title, bench_regcomp_t(), alg, bench)
->Unit(benchmark::kMicrosecond);
}
for (const alg_t &alg : algs) {
const char *name = bench.name ? bench.name : bench.regexp;
snprintf(title, MAX_TITLE, "%s-regexec_%s", name, alg.name);
benchmark::RegisterBenchmark(title, bench_regexec_t(), alg, bench)
->Unit(benchmark::kMicrosecond);
}
}
benchmark::RunSpecifiedBenchmarks();
delete[] aaa;
}
@@ -1,8 +0,0 @@
The measurements have been taken on an Intel(R) Core(TM) i7-8750H CPU with
32 KiB L1 Data cache (x6 cores),
32 KiB L1 Instruction cache (x6 cores),
256 KiB L2 Unified cache (x6 cores),
9216 KiB L3 Unified cache,
32 GiB RAM.
Software versions:
re2c built from Git at commit `b55ab37 <https://github.com/skvadrik/re2c/commit/b55ab37a220f5f2950b9ebc323bc0d010a715220>`_.
@@ -1,8 +0,0 @@
The measurements have been taken on an Intel(R) Core(TM) i7-8750H CPU with
32 KiB L1 Data cache (x6 cores),
32 KiB L1 Instruction cache (x6 cores),
256 KiB L2 Unified cache (x6 cores),
9216 KiB L3 Unified cache,
32 GiB RAM.
Software versions:
re2c built from Git at commit `814d38f <https://github.com/skvadrik/re2c/commit/814d38f7eb19130a926f8d06172a00088967779f>`_.
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-21
View File
@@ -1,21 +0,0 @@
add_executable(bench_submatch_nfa
"bench.cc"
"${CMAKE_SOURCE_DIR}/benchmarks/c/common/common.cc"
)
target_link_libraries(bench_submatch_nfa libre2c)
find_package(benchmark REQUIRED)
target_link_libraries(bench_submatch_nfa 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_nfa PROPERTIES
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON)
target_compile_definitions(bench_submatch_nfa PRIVATE "HAVE_RE2_RE2_H=1")
target_include_directories(bench_submatch_nfa PRIVATE "${RE2_INCLUDE_DIRECTORY}")
target_link_libraries(bench_submatch_nfa "${RE2_LIBRARY}")
endif()
-17
View File
@@ -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
-103
View File
@@ -1,103 +0,0 @@
#include <benchmark/benchmark.h>
#include <string.h>
#include "benchmarks/c/common/common.h"
#include "benchmarks/c/common/strings_atom.h"
#include "benchmarks/c/common/strings_date.h"
#include "benchmarks/c/common/strings_http.h"
#include "benchmarks/c/common/strings_ipv4.h"
#include "benchmarks/c/common/strings_ipv6.h"
#include "benchmarks/c/common/strings_uri.h"
#include "lib/regex.h"
int main(int argc, char** argv)
{
static const size_t MAX_TITLE = 1024;
char title[MAX_TITLE];
static const size_t AAA_LEN = 1 << 13;
char *aaa = new char[AAA_LEN + 1];
memset(aaa, 'a', AAA_LEN);
const char *aaa_strings[] = {aaa, NULL};
const std::vector<bench_t> benches = {
{"HTTP-RFC7230", MESSAGE_HEAD, http_strings},
{"HTTP-simple", MESSAGE_HEAD2, http_strings},
{"URI-RFC3986", URI, uri_strings},
{"URI-simple", URI2, uri_strings},
{"IPv6", IPV6, ipv6_strings},
{"IPv6-simple", IPV62, ipv6_strings},
{"IPv4", IPV4, ipv4_strings},
{"IPv4-simple", IPV42, ipv4_strings},
{"date", DATE, date_strings},
{"date-simple", DATE2, date_strings},
{"package", PACKAGE_ATOM, atom_strings},
{"package-simple", PACKAGE_ATOM2, atom_strings},
{NULL, "(a{2}|a{3}|a{5})*", aaa_strings},
{NULL, "(a{7}|a{13}|a{19})*", aaa_strings},
{NULL, "(a{29}|a{41}|a{53})*", aaa_strings},
{NULL, "(a{67}|a{83}|a{103})*", aaa_strings},
{NULL, "(a{127}|a{151}|a{179})*", aaa_strings},
{NULL, "(a{199}|a{239}|a{271})*", aaa_strings},
{NULL, "(((a){2})|((a){3})|((a){5}))*", aaa_strings},
{NULL, "(((a){7})|((a){13})|((a){19}))*", aaa_strings},
{NULL, "(((a){29})|((a){41})|((a){53}))*", aaa_strings},
{NULL, "(((a){67})|((a){83})|((a){103}))*", aaa_strings},
{NULL, "(((a){127})|((a){151})|((a){179}))*", aaa_strings},
{NULL, "(((a){199})|((a){239})|((a){271}))*", aaa_strings},
{NULL, "(a{0,16})*", aaa_strings},
{NULL, "((a){0,16})*", aaa_strings},
{NULL, "(a{0,64})*", aaa_strings},
{NULL, "((a){0,64})*", aaa_strings},
{NULL, "(a{0,256})*", aaa_strings},
{NULL, "((a){0,256})*", aaa_strings},
// Pathological case for constant-memory POSIX algorithms that use naive
// (worst-case cubic in the size of TNFA) algorithm for precedence matrix
// computation. Cubic behaviour is caused by quadratic-time computation
// of precedence matrix on each step (the number of core items in closure
// approaches TNFA size), multiplied by the length of compared histores
// (which also approaches TNFA size). Trie-based algorithms are not
// affected, but they consume memory proportional to the length of input,
// and so are also not practical.
{NULL, "((a?){0,16})*", aaa_strings},
{NULL, "((a*){0,16})*", aaa_strings},
{NULL, "((a?){0,64})*", aaa_strings},
{NULL, "((a*){0,64})*", aaa_strings},
{NULL, "((a?){0,256})*", aaa_strings},
{NULL, "((a*){0,256})*", aaa_strings},
};
const std::vector<alg_t> algs = {
{"LG", ENGINE_RE2C, REG_NFA | REG_LEFTMOST},
{"lazy-LG", ENGINE_RE2C, REG_NFA | REG_LEFTMOST | REG_TRIE},
{"OS", ENGINE_RE2C, REG_NFA},
{"simple-OS", ENGINE_RE2C, REG_NFA | REG_SLOWPREC},
{"lazy-OS", ENGINE_RE2C, REG_NFA | REG_TRIE},
#ifdef HAVE_RE2_RE2_H
{"re2-LG", ENGINE_RE2, 0},
#endif
};
benchmark::Initialize(&argc, argv);
for (const bench_t &bench : benches) {
for (const alg_t &alg : algs) {
const char *name = bench.name ? bench.name : bench.regexp;
snprintf(title, MAX_TITLE, "%s_%s", name, alg.name);
benchmark::RegisterBenchmark(title, bench_regexec_t(), alg, bench)
->Unit(benchmark::kMicrosecond);
}
}
benchmark::RunSpecifiedBenchmarks();
delete[] aaa;
}
@@ -1,9 +0,0 @@
The measurements have been taken on an Intel(R) Core(TM) i7-8750H CPU with
32 KiB L1 Data cache (x6 cores),
32 KiB L1 Instruction cache (x6 cores),
256 KiB L2 Unified cache (x6 cores),
9216 KiB L3 Unified cache,
32 GiB RAM.
Software versions:
re2c built from Git at commit `b55ab37 <https://github.com/skvadrik/re2c/commit/b55ab37a220f5f2950b9ebc323bc0d010a715220>`_,
`re2-2020-11-01 <https://github.com/google/re2/releases/tag/2020-11-01>`_.
File diff suppressed because it is too large Load Diff
@@ -1,120 +0,0 @@
#line 1 "../../../benchmarks/c/src/ragel/lex_00__numbers1.rl"
#include "ragel/base.h"
namespace ragel_lex_00__numbers1 {
const char *delim = "\n";
#line 13 "../../../benchmarks/c/src/ragel/lex_00__numbers1.rl"
#line 11 "gen/ragel/lex_00__numbers1.cc"
static const int lex_numbers_start = 2;
static const int lex_numbers_first_final = 2;
static const int lex_numbers_error = 0;
static const int lex_numbers_en_main = 2;
#line 15 "../../../benchmarks/c/src/ragel/lex_00__numbers1.rl"
static int lex(Input *in, int count) {
char *p = in->p;
char *ts = in->ts;
char *te = in->te;
char *pe = in->pe;
int act = in->act;
int cs;
#line 28 "gen/ragel/lex_00__numbers1.cc"
{
cs = (int)lex_numbers_start;
ts = 0;
te = 0;
}
#line 25 "../../../benchmarks/c/src/ragel/lex_00__numbers1.rl"
#line 35 "gen/ragel/lex_00__numbers1.cc"
{
switch ( cs ) {
case 2:
goto st_case_2;
case 0:
goto st_case_0;
case 1:
goto st_case_1;
}
_ctr2:
{
#line 12 "../../../benchmarks/c/src/ragel/lex_00__numbers1.rl"
{te = p+1;{
#line 12 "../../../benchmarks/c/src/ragel/lex_00__numbers1.rl"
OUTS(ts, te); }
}}
#line 52 "gen/ragel/lex_00__numbers1.cc"
goto _st2;
_st2:
{
#line 1 "NONE"
{ts = 0;}}
#line 59 "gen/ragel/lex_00__numbers1.cc"
p+= 1;
st_case_2:
if ( p == pe )
goto _out2;
{
#line 1 "NONE"
{ts = p;}}
#line 68 "gen/ragel/lex_00__numbers1.cc"
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st1;
}
goto _st0;
_st0:
st_case_0:
goto _out0;
_st1:
p+= 1;
st_case_1:
if ( p == pe )
goto _out1;
if ( ( (*( p))) == 10 ) {
goto _ctr2;
}
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st1;
}
goto _st0;
_out2: cs = 2; goto _out;
_out0: cs = 0; goto _out;
_out1: cs = 1; goto _out;
_out: {}
}
#line 26 "../../../benchmarks/c/src/ragel/lex_00__numbers1.rl"
in->p = p;
in->ts = ts;
in->te = te;
in->pe = pe;
in->act = act;
return count;
}
RAGEL_BENCH_AND_TEST()
} // namespace ragel_lex_00__numbers1
@@ -1,410 +0,0 @@
#line 1 "../../../benchmarks/c/src/ragel/lex_01__numbers2.rl"
#include "ragel/base.h"
namespace ragel_lex_01__numbers2 {
const char *delim = "\n";
#line 24 "../../../benchmarks/c/src/ragel/lex_01__numbers2.rl"
#line 11 "gen/ragel/lex_01__numbers2.cc"
static const int lex_numbers_start = 14;
static const int lex_numbers_first_final = 14;
static const int lex_numbers_error = 0;
static const int lex_numbers_en_main = 14;
#line 26 "../../../benchmarks/c/src/ragel/lex_01__numbers2.rl"
static int lex(Input *in, int count) {
char *p = in->p;
char *ts = in->ts;
char *te = in->te;
char *pe = in->pe;
int act = in->act;
int cs;
#line 28 "gen/ragel/lex_01__numbers2.cc"
{
cs = (int)lex_numbers_start;
ts = 0;
te = 0;
}
#line 36 "../../../benchmarks/c/src/ragel/lex_01__numbers2.rl"
#line 35 "gen/ragel/lex_01__numbers2.cc"
{
switch ( cs ) {
case 14:
goto st_case_14;
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;
case 9:
goto st_case_9;
case 10:
goto st_case_10;
case 11:
goto st_case_11;
case 12:
goto st_case_12;
case 13:
goto st_case_13;
}
_ctr3:
{
#line 22 "../../../benchmarks/c/src/ragel/lex_01__numbers2.rl"
{te = p+1;{
#line 22 "../../../benchmarks/c/src/ragel/lex_01__numbers2.rl"
OUTX(ts, te, 1); }
}}
#line 76 "gen/ragel/lex_01__numbers2.cc"
goto _st14;
_ctr8:
{
#line 19 "../../../benchmarks/c/src/ragel/lex_01__numbers2.rl"
{te = p+1;{
#line 19 "../../../benchmarks/c/src/ragel/lex_01__numbers2.rl"
OUTX(ts, te, 8); }
}}
#line 86 "gen/ragel/lex_01__numbers2.cc"
goto _st14;
_ctr14:
{
#line 18 "../../../benchmarks/c/src/ragel/lex_01__numbers2.rl"
{te = p+1;{
#line 18 "../../../benchmarks/c/src/ragel/lex_01__numbers2.rl"
OUTX(ts, te, 2); }
}}
#line 96 "gen/ragel/lex_01__numbers2.cc"
goto _st14;
_ctr16:
{
#line 21 "../../../benchmarks/c/src/ragel/lex_01__numbers2.rl"
{te = p+1;{
#line 21 "../../../benchmarks/c/src/ragel/lex_01__numbers2.rl"
OUTX(ts, te, 16); }
}}
#line 106 "gen/ragel/lex_01__numbers2.cc"
goto _st14;
_ctr18:
{
#line 20 "../../../benchmarks/c/src/ragel/lex_01__numbers2.rl"
{te = p+1;{
#line 20 "../../../benchmarks/c/src/ragel/lex_01__numbers2.rl"
OUTX(ts, te, 10); }
}}
#line 116 "gen/ragel/lex_01__numbers2.cc"
goto _st14;
_st14:
{
#line 1 "NONE"
{ts = 0;}}
#line 123 "gen/ragel/lex_01__numbers2.cc"
p+= 1;
st_case_14:
if ( p == pe )
goto _out14;
{
#line 1 "NONE"
{ts = p;}}
#line 132 "gen/ragel/lex_01__numbers2.cc"
switch( ( (*( p))) ) {
case 46: {
goto _st1;
}
case 48: {
goto _st6;
}
}
if ( 49 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st13;
}
goto _st0;
_st0:
st_case_0:
goto _out0;
_st1:
p+= 1;
st_case_1:
if ( p == pe )
goto _out1;
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st2;
}
goto _st0;
_st2:
p+= 1;
st_case_2:
if ( p == pe )
goto _out2;
switch( ( (*( p))) ) {
case 10: {
goto _ctr3;
}
case 69: {
goto _st3;
}
case 101: {
goto _st3;
}
}
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st2;
}
goto _st0;
_st3:
p+= 1;
st_case_3:
if ( p == pe )
goto _out3;
switch( ( (*( p))) ) {
case 43: {
goto _st4;
}
case 45: {
goto _st4;
}
}
if ( 49 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st5;
}
goto _st0;
_st4:
p+= 1;
st_case_4:
if ( p == pe )
goto _out4;
if ( 49 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st5;
}
goto _st0;
_st5:
p+= 1;
st_case_5:
if ( p == pe )
goto _out5;
if ( ( (*( p))) == 10 ) {
goto _ctr3;
}
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st5;
}
goto _st0;
_st6:
p+= 1;
st_case_6:
if ( p == pe )
goto _out6;
switch( ( (*( p))) ) {
case 10: {
goto _ctr8;
}
case 46: {
goto _st1;
}
case 66: {
goto _st9;
}
case 88: {
goto _st11;
}
case 98: {
goto _st9;
}
case 120: {
goto _st11;
}
}
if ( ( (*( p))) > 55 ) {
if ( ( (*( p))) <= 57 ) {
goto _st8;
}
} else if ( ( (*( p))) >= 48 ) {
goto _st7;
}
goto _st0;
_st7:
p+= 1;
st_case_7:
if ( p == pe )
goto _out7;
switch( ( (*( p))) ) {
case 10: {
goto _ctr8;
}
case 46: {
goto _st1;
}
}
if ( ( (*( p))) > 55 ) {
if ( ( (*( p))) <= 57 ) {
goto _st8;
}
} else if ( ( (*( p))) >= 48 ) {
goto _st7;
}
goto _st0;
_st8:
p+= 1;
st_case_8:
if ( p == pe )
goto _out8;
if ( ( (*( p))) == 46 ) {
goto _st1;
}
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st8;
}
goto _st0;
_st9:
p+= 1;
st_case_9:
if ( p == pe )
goto _out9;
if ( 48 <= ( (*( p))) && ( (*( p))) <= 49 ) {
goto _st10;
}
goto _st0;
_st10:
p+= 1;
st_case_10:
if ( p == pe )
goto _out10;
if ( ( (*( p))) == 10 ) {
goto _ctr14;
}
if ( 48 <= ( (*( p))) && ( (*( p))) <= 49 ) {
goto _st10;
}
goto _st0;
_st11:
p+= 1;
st_case_11:
if ( p == pe )
goto _out11;
if ( ( (*( p))) < 65 ) {
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st12;
}
} else if ( ( (*( p))) > 70 ) {
if ( 97 <= ( (*( p))) && ( (*( p))) <= 102 ) {
goto _st12;
}
} else {
goto _st12;
}
goto _st0;
_st12:
p+= 1;
st_case_12:
if ( p == pe )
goto _out12;
if ( ( (*( p))) == 10 ) {
goto _ctr16;
}
if ( ( (*( p))) < 65 ) {
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st12;
}
} else if ( ( (*( p))) > 70 ) {
if ( 97 <= ( (*( p))) && ( (*( p))) <= 102 ) {
goto _st12;
}
} else {
goto _st12;
}
goto _st0;
_st13:
p+= 1;
st_case_13:
if ( p == pe )
goto _out13;
switch( ( (*( p))) ) {
case 10: {
goto _ctr18;
}
case 46: {
goto _st1;
}
case 69: {
goto _st3;
}
case 101: {
goto _st3;
}
}
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st13;
}
goto _st0;
_out14: cs = 14; 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;
_out9: cs = 9; goto _out;
_out10: cs = 10; goto _out;
_out11: cs = 11; goto _out;
_out12: cs = 12; goto _out;
_out13: cs = 13; goto _out;
_out: {}
}
#line 37 "../../../benchmarks/c/src/ragel/lex_01__numbers2.rl"
in->p = p;
in->ts = ts;
in->te = te;
in->pe = pe;
in->act = act;
return count;
}
RAGEL_BENCH_AND_TEST()
} // namespace ragel_lex_01__numbers2
-369
View File
@@ -1,369 +0,0 @@
#line 1 "../../../benchmarks/c/src/ragel/lex_02__words1.rl"
#include "ragel/base.h"
namespace ragel_lex_02__words1 {
const char *delim = "\n";
#line 20 "../../../benchmarks/c/src/ragel/lex_02__words1.rl"
#line 11 "gen/ragel/lex_02__words1.cc"
static const int lex_words_start = 21;
static const int lex_words_first_final = 21;
static const int lex_words_error = 0;
static const int lex_words_en_main = 21;
#line 22 "../../../benchmarks/c/src/ragel/lex_02__words1.rl"
static int lex(Input *in, int count) {
char *p = in->p;
char *ts = in->ts;
char *te = in->te;
char *pe = in->pe;
int act = in->act;
int cs;
#line 28 "gen/ragel/lex_02__words1.cc"
{
cs = (int)lex_words_start;
ts = 0;
te = 0;
}
#line 32 "../../../benchmarks/c/src/ragel/lex_02__words1.rl"
#line 35 "gen/ragel/lex_02__words1.cc"
{
switch ( cs ) {
case 21:
goto st_case_21;
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;
case 9:
goto st_case_9;
case 10:
goto st_case_10;
case 11:
goto st_case_11;
case 12:
goto st_case_12;
case 13:
goto st_case_13;
case 14:
goto st_case_14;
case 15:
goto st_case_15;
case 16:
goto st_case_16;
case 17:
goto st_case_17;
case 18:
goto st_case_18;
case 19:
goto st_case_19;
case 20:
goto st_case_20;
}
_ctr7:
{
#line 19 "../../../benchmarks/c/src/ragel/lex_02__words1.rl"
{te = p+1;{
#line 19 "../../../benchmarks/c/src/ragel/lex_02__words1.rl"
OUTS(ts, te); }
}}
#line 90 "gen/ragel/lex_02__words1.cc"
goto _st21;
_st21:
{
#line 1 "NONE"
{ts = 0;}}
#line 97 "gen/ragel/lex_02__words1.cc"
p+= 1;
st_case_21:
if ( p == pe )
goto _out21;
{
#line 1 "NONE"
{ts = p;}}
#line 106 "gen/ragel/lex_02__words1.cc"
switch( ( (*( p))) ) {
case 70: {
goto _st1;
}
case 77: {
goto _st7;
}
case 83: {
goto _st9;
}
case 84: {
goto _st13;
}
case 87: {
goto _st18;
}
}
goto _st0;
_st0:
st_case_0:
goto _out0;
_st1:
p+= 1;
st_case_1:
if ( p == pe )
goto _out1;
if ( ( (*( p))) == 114 ) {
goto _st2;
}
goto _st0;
_st2:
p+= 1;
st_case_2:
if ( p == pe )
goto _out2;
if ( ( (*( p))) == 105 ) {
goto _st3;
}
goto _st0;
_st3:
p+= 1;
st_case_3:
if ( p == pe )
goto _out3;
if ( ( (*( p))) == 100 ) {
goto _st4;
}
goto _st0;
_st4:
p+= 1;
st_case_4:
if ( p == pe )
goto _out4;
if ( ( (*( p))) == 97 ) {
goto _st5;
}
goto _st0;
_st5:
p+= 1;
st_case_5:
if ( p == pe )
goto _out5;
if ( ( (*( p))) == 121 ) {
goto _st6;
}
goto _st0;
_st6:
p+= 1;
st_case_6:
if ( p == pe )
goto _out6;
if ( ( (*( p))) == 10 ) {
goto _ctr7;
}
goto _st0;
_st7:
p+= 1;
st_case_7:
if ( p == pe )
goto _out7;
if ( ( (*( p))) == 111 ) {
goto _st8;
}
goto _st0;
_st8:
p+= 1;
st_case_8:
if ( p == pe )
goto _out8;
if ( ( (*( p))) == 110 ) {
goto _st3;
}
goto _st0;
_st9:
p+= 1;
st_case_9:
if ( p == pe )
goto _out9;
switch( ( (*( p))) ) {
case 97: {
goto _st10;
}
case 117: {
goto _st8;
}
}
goto _st0;
_st10:
p+= 1;
st_case_10:
if ( p == pe )
goto _out10;
if ( ( (*( p))) == 116 ) {
goto _st11;
}
goto _st0;
_st11:
p+= 1;
st_case_11:
if ( p == pe )
goto _out11;
if ( ( (*( p))) == 117 ) {
goto _st12;
}
goto _st0;
_st12:
p+= 1;
st_case_12:
if ( p == pe )
goto _out12;
if ( ( (*( p))) == 114 ) {
goto _st3;
}
goto _st0;
_st13:
p+= 1;
st_case_13:
if ( p == pe )
goto _out13;
switch( ( (*( p))) ) {
case 104: {
goto _st14;
}
case 117: {
goto _st17;
}
}
goto _st0;
_st14:
p+= 1;
st_case_14:
if ( p == pe )
goto _out14;
if ( ( (*( p))) == 117 ) {
goto _st15;
}
goto _st0;
_st15:
p+= 1;
st_case_15:
if ( p == pe )
goto _out15;
if ( ( (*( p))) == 114 ) {
goto _st16;
}
goto _st0;
_st16:
p+= 1;
st_case_16:
if ( p == pe )
goto _out16;
if ( ( (*( p))) == 115 ) {
goto _st3;
}
goto _st0;
_st17:
p+= 1;
st_case_17:
if ( p == pe )
goto _out17;
if ( ( (*( p))) == 101 ) {
goto _st16;
}
goto _st0;
_st18:
p+= 1;
st_case_18:
if ( p == pe )
goto _out18;
if ( ( (*( p))) == 101 ) {
goto _st19;
}
goto _st0;
_st19:
p+= 1;
st_case_19:
if ( p == pe )
goto _out19;
if ( ( (*( p))) == 100 ) {
goto _st20;
}
goto _st0;
_st20:
p+= 1;
st_case_20:
if ( p == pe )
goto _out20;
if ( ( (*( p))) == 110 ) {
goto _st17;
}
goto _st0;
_out21: cs = 21; 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;
_out9: cs = 9; goto _out;
_out10: cs = 10; goto _out;
_out11: cs = 11; goto _out;
_out12: cs = 12; goto _out;
_out13: cs = 13; goto _out;
_out14: cs = 14; goto _out;
_out15: cs = 15; goto _out;
_out16: cs = 16; goto _out;
_out17: cs = 17; goto _out;
_out18: cs = 18; goto _out;
_out19: cs = 19; goto _out;
_out20: cs = 20; goto _out;
_out: {}
}
#line 33 "../../../benchmarks/c/src/ragel/lex_02__words1.rl"
in->p = p;
in->ts = ts;
in->te = te;
in->pe = pe;
in->act = act;
return count;
}
RAGEL_BENCH_AND_TEST()
} // namespace ragel_lex_02__words1
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,709 +0,0 @@
#line 1 "../../../benchmarks/c/src/ragel/submatch_04__apache_log.rl"
#include "ragel/base.h"
namespace ragel_submatch_04__apache_log {
const char *delim = "\n";
#line 44 "../../../benchmarks/c/src/ragel/submatch_04__apache_log.rl"
#line 11 "gen/ragel/submatch_04__apache_log.cc"
static const int apache_log_start = 25;
static const int apache_log_first_final = 25;
static const int apache_log_error = 0;
static const int apache_log_en_main = 25;
#line 46 "../../../benchmarks/c/src/ragel/submatch_04__apache_log.rl"
static int lex(Input *in, int count) {
char *p = in->p;
char *pe = in->pe;
const char
*h1, *i1, *a1, *d1, *r1, *s1, *z1, *u1, *g1,
*h2, *i2, *a2, *d2, *r2, *s2, *z2, *u2, *g2;
int cs;
#line 28 "gen/ragel/submatch_04__apache_log.cc"
{
cs = (int)apache_log_start;
}
#line 56 "../../../benchmarks/c/src/ragel/submatch_04__apache_log.rl"
#line 33 "gen/ragel/submatch_04__apache_log.cc"
{
switch ( cs ) {
case 25:
goto st_case_25;
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;
case 9:
goto st_case_9;
case 10:
goto st_case_10;
case 11:
goto st_case_11;
case 12:
goto st_case_12;
case 13:
goto st_case_13;
case 14:
goto st_case_14;
case 15:
goto st_case_15;
case 16:
goto st_case_16;
case 17:
goto st_case_17;
case 18:
goto st_case_18;
case 19:
goto st_case_19;
case 20:
goto st_case_20;
case 21:
goto st_case_21;
case 22:
goto st_case_22;
case 23:
goto st_case_23;
case 24:
goto st_case_24;
}
_ctr41:
{
#line 29 "../../../benchmarks/c/src/ragel/submatch_04__apache_log.rl"
g2 = p; }
#line 93 "gen/ragel/submatch_04__apache_log.cc"
{
#line 30 "../../../benchmarks/c/src/ragel/submatch_04__apache_log.rl"
OUT("host: ", h1, h2);
OUT("userid: ", i1, i2);
OUT("authuser: ", a1, a2);
OUT("date: ", d1, d2);
OUT("request: ", r1, r2);
OUT("status: ", s1, s2);
OUT("size: ", z1, z2);
OUT("url: ", u1, u2);
OUT("agent: ", g1, g2);
OUTC('\n');
}
#line 109 "gen/ragel/submatch_04__apache_log.cc"
goto _st25;
_st25:
p+= 1;
st_case_25:
if ( p == pe )
goto _out25;
if ( ( (*( p))) == 46 ) {
goto _ctr44;
}
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _ctr44;
}
goto _st0;
_st0:
st_case_0:
goto _out0;
_ctr44:
{
#line 21 "../../../benchmarks/c/src/ragel/submatch_04__apache_log.rl"
h1 = p; }
#line 131 "gen/ragel/submatch_04__apache_log.cc"
goto _st1;
_st1:
p+= 1;
st_case_1:
if ( p == pe )
goto _out1;
switch( ( (*( p))) ) {
case 9: {
goto _ctr2;
}
case 32: {
goto _ctr2;
}
case 46: {
goto _st1;
}
}
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st1;
}
goto _st0;
_ctr2:
{
#line 21 "../../../benchmarks/c/src/ragel/submatch_04__apache_log.rl"
h2 = p; }
#line 158 "gen/ragel/submatch_04__apache_log.cc"
goto _st2;
_st2:
p+= 1;
st_case_2:
if ( p == pe )
goto _out2;
switch( ( (*( p))) ) {
case 9: {
goto _st2;
}
case 32: {
goto _st2;
}
case 45: {
goto _ctr4;
}
}
goto _st0;
_ctr4:
{
#line 22 "../../../benchmarks/c/src/ragel/submatch_04__apache_log.rl"
i1 = p; }
#line 182 "gen/ragel/submatch_04__apache_log.cc"
goto _st3;
_st3:
p+= 1;
st_case_3:
if ( p == pe )
goto _out3;
switch( ( (*( p))) ) {
case 9: {
goto _ctr6;
}
case 32: {
goto _ctr6;
}
}
goto _st0;
_ctr6:
{
#line 22 "../../../benchmarks/c/src/ragel/submatch_04__apache_log.rl"
i2 = p; }
#line 203 "gen/ragel/submatch_04__apache_log.cc"
goto _st4;
_st4:
p+= 1;
st_case_4:
if ( p == pe )
goto _out4;
switch( ( (*( p))) ) {
case 9: {
goto _st4;
}
case 32: {
goto _st4;
}
case 45: {
goto _ctr8;
}
}
goto _st0;
_ctr8:
{
#line 23 "../../../benchmarks/c/src/ragel/submatch_04__apache_log.rl"
a1 = p; }
#line 227 "gen/ragel/submatch_04__apache_log.cc"
goto _st5;
_st5:
p+= 1;
st_case_5:
if ( p == pe )
goto _out5;
switch( ( (*( p))) ) {
case 9: {
goto _ctr10;
}
case 32: {
goto _ctr10;
}
}
goto _st0;
_ctr10:
{
#line 23 "../../../benchmarks/c/src/ragel/submatch_04__apache_log.rl"
a2 = p; }
#line 248 "gen/ragel/submatch_04__apache_log.cc"
goto _st6;
_st6:
p+= 1;
st_case_6:
if ( p == pe )
goto _out6;
switch( ( (*( p))) ) {
case 9: {
goto _st6;
}
case 32: {
goto _st6;
}
case 91: {
goto _ctr12;
}
}
goto _st0;
_ctr12:
{
#line 24 "../../../benchmarks/c/src/ragel/submatch_04__apache_log.rl"
d1 = p; }
#line 272 "gen/ragel/submatch_04__apache_log.cc"
goto _st7;
_st7:
p+= 1;
st_case_7:
if ( p == pe )
goto _out7;
switch( ( (*( p))) ) {
case 0: {
goto _st0;
}
case 10: {
goto _st0;
}
case 93: {
goto _st0;
}
}
goto _st8;
_st8:
p+= 1;
st_case_8:
if ( p == pe )
goto _out8;
switch( ( (*( p))) ) {
case 0: {
goto _st0;
}
case 10: {
goto _st0;
}
case 93: {
goto _st9;
}
}
goto _st8;
_st9:
p+= 1;
st_case_9:
if ( p == pe )
goto _out9;
switch( ( (*( p))) ) {
case 9: {
goto _ctr16;
}
case 32: {
goto _ctr16;
}
}
goto _st0;
_ctr16:
{
#line 24 "../../../benchmarks/c/src/ragel/submatch_04__apache_log.rl"
d2 = p; }
#line 327 "gen/ragel/submatch_04__apache_log.cc"
goto _st10;
_st10:
p+= 1;
st_case_10:
if ( p == pe )
goto _out10;
switch( ( (*( p))) ) {
case 9: {
goto _st10;
}
case 32: {
goto _st10;
}
case 34: {
goto _ctr18;
}
}
goto _st0;
_ctr18:
{
#line 25 "../../../benchmarks/c/src/ragel/submatch_04__apache_log.rl"
r1 = p; }
#line 351 "gen/ragel/submatch_04__apache_log.cc"
goto _st11;
_st11:
p+= 1;
st_case_11:
if ( p == pe )
goto _out11;
switch( ( (*( p))) ) {
case 0: {
goto _st0;
}
case 10: {
goto _st0;
}
case 34: {
goto _st0;
}
}
goto _st12;
_st12:
p+= 1;
st_case_12:
if ( p == pe )
goto _out12;
switch( ( (*( p))) ) {
case 0: {
goto _st0;
}
case 10: {
goto _st0;
}
case 34: {
goto _st13;
}
}
goto _st12;
_st13:
p+= 1;
st_case_13:
if ( p == pe )
goto _out13;
switch( ( (*( p))) ) {
case 9: {
goto _ctr22;
}
case 32: {
goto _ctr22;
}
}
goto _st0;
_ctr22:
{
#line 25 "../../../benchmarks/c/src/ragel/submatch_04__apache_log.rl"
r2 = p; }
#line 406 "gen/ragel/submatch_04__apache_log.cc"
goto _st14;
_st14:
p+= 1;
st_case_14:
if ( p == pe )
goto _out14;
switch( ( (*( p))) ) {
case 9: {
goto _st14;
}
case 32: {
goto _st14;
}
}
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _ctr24;
}
goto _st0;
_ctr24:
{
#line 26 "../../../benchmarks/c/src/ragel/submatch_04__apache_log.rl"
s1 = p; }
#line 430 "gen/ragel/submatch_04__apache_log.cc"
goto _st15;
_st15:
p+= 1;
st_case_15:
if ( p == pe )
goto _out15;
switch( ( (*( p))) ) {
case 9: {
goto _ctr26;
}
case 32: {
goto _ctr26;
}
}
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st15;
}
goto _st0;
_ctr26:
{
#line 26 "../../../benchmarks/c/src/ragel/submatch_04__apache_log.rl"
s2 = p; }
#line 454 "gen/ragel/submatch_04__apache_log.cc"
goto _st16;
_st16:
p+= 1;
st_case_16:
if ( p == pe )
goto _out16;
switch( ( (*( p))) ) {
case 9: {
goto _st16;
}
case 32: {
goto _st16;
}
case 45: {
goto _ctr28;
}
}
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _ctr29;
}
goto _st0;
_ctr28:
{
#line 27 "../../../benchmarks/c/src/ragel/submatch_04__apache_log.rl"
z1 = p; }
#line 481 "gen/ragel/submatch_04__apache_log.cc"
goto _st17;
_st17:
p+= 1;
st_case_17:
if ( p == pe )
goto _out17;
switch( ( (*( p))) ) {
case 9: {
goto _ctr31;
}
case 32: {
goto _ctr31;
}
}
goto _st0;
_ctr31:
{
#line 27 "../../../benchmarks/c/src/ragel/submatch_04__apache_log.rl"
z2 = p; }
#line 502 "gen/ragel/submatch_04__apache_log.cc"
goto _st18;
_st18:
p+= 1;
st_case_18:
if ( p == pe )
goto _out18;
switch( ( (*( p))) ) {
case 9: {
goto _st18;
}
case 32: {
goto _st18;
}
case 34: {
goto _ctr33;
}
}
goto _st0;
_ctr33:
{
#line 28 "../../../benchmarks/c/src/ragel/submatch_04__apache_log.rl"
u1 = p; }
#line 526 "gen/ragel/submatch_04__apache_log.cc"
goto _st19;
_st19:
p+= 1;
st_case_19:
if ( p == pe )
goto _out19;
switch( ( (*( p))) ) {
case 0: {
goto _st0;
}
case 10: {
goto _st0;
}
case 34: {
goto _st20;
}
}
goto _st19;
_st20:
p+= 1;
st_case_20:
if ( p == pe )
goto _out20;
switch( ( (*( p))) ) {
case 9: {
goto _ctr36;
}
case 32: {
goto _ctr36;
}
}
goto _st0;
_ctr36:
{
#line 28 "../../../benchmarks/c/src/ragel/submatch_04__apache_log.rl"
u2 = p; }
#line 564 "gen/ragel/submatch_04__apache_log.cc"
goto _st21;
_st21:
p+= 1;
st_case_21:
if ( p == pe )
goto _out21;
switch( ( (*( p))) ) {
case 9: {
goto _st21;
}
case 32: {
goto _st21;
}
case 34: {
goto _ctr38;
}
}
goto _st0;
_ctr38:
{
#line 29 "../../../benchmarks/c/src/ragel/submatch_04__apache_log.rl"
g1 = p; }
#line 588 "gen/ragel/submatch_04__apache_log.cc"
goto _st22;
_st22:
p+= 1;
st_case_22:
if ( p == pe )
goto _out22;
switch( ( (*( p))) ) {
case 0: {
goto _st0;
}
case 10: {
goto _st0;
}
case 34: {
goto _st23;
}
}
goto _st22;
_st23:
p+= 1;
st_case_23:
if ( p == pe )
goto _out23;
if ( ( (*( p))) == 10 ) {
goto _ctr41;
}
goto _st0;
_ctr29:
{
#line 27 "../../../benchmarks/c/src/ragel/submatch_04__apache_log.rl"
z1 = p; }
#line 621 "gen/ragel/submatch_04__apache_log.cc"
goto _st24;
_st24:
p+= 1;
st_case_24:
if ( p == pe )
goto _out24;
switch( ( (*( p))) ) {
case 9: {
goto _ctr31;
}
case 32: {
goto _ctr31;
}
}
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st24;
}
goto _st0;
_out25: cs = 25; 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;
_out9: cs = 9; goto _out;
_out10: cs = 10; goto _out;
_out11: cs = 11; goto _out;
_out12: cs = 12; goto _out;
_out13: cs = 13; goto _out;
_out14: cs = 14; goto _out;
_out15: cs = 15; goto _out;
_out16: cs = 16; goto _out;
_out17: cs = 17; goto _out;
_out18: cs = 18; goto _out;
_out19: cs = 19; goto _out;
_out20: cs = 20; goto _out;
_out21: cs = 21; goto _out;
_out22: cs = 22; goto _out;
_out23: cs = 23; goto _out;
_out24: cs = 24; goto _out;
_out: {}
}
#line 57 "../../../benchmarks/c/src/ragel/submatch_04__apache_log.rl"
in->p = p;
in->pe = pe;
return count;
}
RAGEL_BENCH_AND_TEST()
} // namespace ragel_submatch_04__apache_log
@@ -1,697 +0,0 @@
#line 1 "../../../benchmarks/c/src/ragel/submatch_05__datetime.rl"
#include "ragel/base.h"
namespace ragel_submatch_05__datetime {
const char *delim = "\n";
#line 37 "../../../benchmarks/c/src/ragel/submatch_05__datetime.rl"
#line 11 "gen/ragel/submatch_05__datetime.cc"
static const int datetime_start = 35;
static const int datetime_first_final = 35;
static const int datetime_error = 0;
static const int datetime_en_main = 35;
#line 39 "../../../benchmarks/c/src/ragel/submatch_05__datetime.rl"
static int lex(Input *in, int count) {
char *p = in->p;
char *pe = in->pe;
const char
*s1, *y1, *h1, *m1, *d1, *M1, *z1,
*s2, *y2, *h2, *m2, *d2, *M2, *z2;
int cs;
#line 28 "gen/ragel/submatch_05__datetime.cc"
{
cs = (int)datetime_start;
}
#line 49 "../../../benchmarks/c/src/ragel/submatch_05__datetime.rl"
#line 33 "gen/ragel/submatch_05__datetime.cc"
{
switch ( cs ) {
case 35:
goto st_case_35;
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;
case 9:
goto st_case_9;
case 10:
goto st_case_10;
case 11:
goto st_case_11;
case 12:
goto st_case_12;
case 13:
goto st_case_13;
case 14:
goto st_case_14;
case 15:
goto st_case_15;
case 16:
goto st_case_16;
case 17:
goto st_case_17;
case 18:
goto st_case_18;
case 19:
goto st_case_19;
case 20:
goto st_case_20;
case 21:
goto st_case_21;
case 22:
goto st_case_22;
case 23:
goto st_case_23;
case 24:
goto st_case_24;
case 25:
goto st_case_25;
case 26:
goto st_case_26;
case 27:
goto st_case_27;
case 28:
goto st_case_28;
case 29:
goto st_case_29;
case 30:
goto st_case_30;
case 31:
goto st_case_31;
case 32:
goto st_case_32;
case 33:
goto st_case_33;
case 34:
goto st_case_34;
}
_ctr43:
{
#line 24 "../../../benchmarks/c/src/ragel/submatch_05__datetime.rl"
z2 = p; }
#line 113 "gen/ragel/submatch_05__datetime.cc"
{
#line 25 "../../../benchmarks/c/src/ragel/submatch_05__datetime.rl"
OUT("year: ", y1, y2);
OUT("month: ", m1, m2);
OUT("day: ", d1, d2);
OUT("hours: ", h1, h2);
OUT("minutes: ", M1, M2);
OUT("seconds: ", s1, s2);
OUT("tz: ", z1, z2);
OUTC('\n');
}
#line 127 "gen/ragel/submatch_05__datetime.cc"
goto _st35;
_st35:
p+= 1;
st_case_35:
if ( p == pe )
goto _out35;
if ( ( (*( p))) == 48 ) {
goto _ctr53;
}
if ( 49 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _ctr54;
}
goto _st0;
_st0:
st_case_0:
goto _out0;
_ctr53:
{
#line 18 "../../../benchmarks/c/src/ragel/submatch_05__datetime.rl"
y1 = p; }
#line 149 "gen/ragel/submatch_05__datetime.cc"
goto _st1;
_st1:
p+= 1;
st_case_1:
if ( p == pe )
goto _out1;
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st2;
}
goto _st0;
_st2:
p+= 1;
st_case_2:
if ( p == pe )
goto _out2;
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st3;
}
goto _st0;
_st3:
p+= 1;
st_case_3:
if ( p == pe )
goto _out3;
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st4;
}
goto _st0;
_st4:
p+= 1;
st_case_4:
if ( p == pe )
goto _out4;
if ( ( (*( p))) == 45 ) {
goto _ctr5;
}
goto _st0;
_ctr5:
{
#line 18 "../../../benchmarks/c/src/ragel/submatch_05__datetime.rl"
y2 = p; }
#line 192 "gen/ragel/submatch_05__datetime.cc"
goto _st5;
_st5:
p+= 1;
st_case_5:
if ( p == pe )
goto _out5;
switch( ( (*( p))) ) {
case 48: {
goto _ctr7;
}
case 49: {
goto _ctr8;
}
}
goto _st0;
_ctr7:
{
#line 19 "../../../benchmarks/c/src/ragel/submatch_05__datetime.rl"
m1 = p; }
#line 213 "gen/ragel/submatch_05__datetime.cc"
goto _st6;
_st6:
p+= 1;
st_case_6:
if ( p == pe )
goto _out6;
if ( 49 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st7;
}
goto _st0;
_st7:
p+= 1;
st_case_7:
if ( p == pe )
goto _out7;
if ( ( (*( p))) == 45 ) {
goto _ctr11;
}
goto _st0;
_ctr11:
{
#line 19 "../../../benchmarks/c/src/ragel/submatch_05__datetime.rl"
m2 = p; }
#line 238 "gen/ragel/submatch_05__datetime.cc"
goto _st8;
_st8:
p+= 1;
st_case_8:
if ( p == pe )
goto _out8;
switch( ( (*( p))) ) {
case 48: {
goto _ctr13;
}
case 51: {
goto _ctr15;
}
}
if ( 49 <= ( (*( p))) && ( (*( p))) <= 50 ) {
goto _ctr14;
}
goto _st0;
_ctr13:
{
#line 20 "../../../benchmarks/c/src/ragel/submatch_05__datetime.rl"
d1 = p; }
#line 262 "gen/ragel/submatch_05__datetime.cc"
goto _st9;
_st9:
p+= 1;
st_case_9:
if ( p == pe )
goto _out9;
if ( 49 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st10;
}
goto _st0;
_st10:
p+= 1;
st_case_10:
if ( p == pe )
goto _out10;
if ( ( (*( p))) == 84 ) {
goto _ctr18;
}
goto _st0;
_ctr18:
{
#line 20 "../../../benchmarks/c/src/ragel/submatch_05__datetime.rl"
d2 = p; }
#line 287 "gen/ragel/submatch_05__datetime.cc"
goto _st11;
_st11:
p+= 1;
st_case_11:
if ( p == pe )
goto _out11;
if ( ( (*( p))) == 50 ) {
goto _ctr21;
}
if ( 48 <= ( (*( p))) && ( (*( p))) <= 49 ) {
goto _ctr20;
}
goto _st0;
_ctr20:
{
#line 21 "../../../benchmarks/c/src/ragel/submatch_05__datetime.rl"
h1 = p; }
#line 306 "gen/ragel/submatch_05__datetime.cc"
goto _st12;
_st12:
p+= 1;
st_case_12:
if ( p == pe )
goto _out12;
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st13;
}
goto _st0;
_st13:
p+= 1;
st_case_13:
if ( p == pe )
goto _out13;
if ( ( (*( p))) == 58 ) {
goto _ctr24;
}
goto _st0;
_ctr24:
{
#line 21 "../../../benchmarks/c/src/ragel/submatch_05__datetime.rl"
h2 = p; }
#line 331 "gen/ragel/submatch_05__datetime.cc"
goto _st14;
_st14:
p+= 1;
st_case_14:
if ( p == pe )
goto _out14;
if ( 48 <= ( (*( p))) && ( (*( p))) <= 53 ) {
goto _ctr26;
}
goto _st0;
_ctr26:
{
#line 22 "../../../benchmarks/c/src/ragel/submatch_05__datetime.rl"
M1 = p; }
#line 347 "gen/ragel/submatch_05__datetime.cc"
goto _st15;
_st15:
p+= 1;
st_case_15:
if ( p == pe )
goto _out15;
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st16;
}
goto _st0;
_st16:
p+= 1;
st_case_16:
if ( p == pe )
goto _out16;
if ( ( (*( p))) == 58 ) {
goto _ctr29;
}
goto _st0;
_ctr29:
{
#line 22 "../../../benchmarks/c/src/ragel/submatch_05__datetime.rl"
M2 = p; }
#line 372 "gen/ragel/submatch_05__datetime.cc"
goto _st17;
_st17:
p+= 1;
st_case_17:
if ( p == pe )
goto _out17;
if ( 48 <= ( (*( p))) && ( (*( p))) <= 53 ) {
goto _ctr31;
}
goto _st0;
_ctr31:
{
#line 23 "../../../benchmarks/c/src/ragel/submatch_05__datetime.rl"
s1 = p; }
#line 388 "gen/ragel/submatch_05__datetime.cc"
goto _st18;
_st18:
p+= 1;
st_case_18:
if ( p == pe )
goto _out18;
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st19;
}
goto _st0;
_st19:
p+= 1;
st_case_19:
if ( p == pe )
goto _out19;
switch( ( (*( p))) ) {
case 43: {
goto _ctr34;
}
case 45: {
goto _ctr34;
}
case 90: {
goto _ctr35;
}
}
goto _st0;
_ctr34:
{
#line 23 "../../../benchmarks/c/src/ragel/submatch_05__datetime.rl"
s2 = p; }
#line 421 "gen/ragel/submatch_05__datetime.cc"
{
#line 24 "../../../benchmarks/c/src/ragel/submatch_05__datetime.rl"
z1 = p; }
#line 426 "gen/ragel/submatch_05__datetime.cc"
goto _st20;
_st20:
p+= 1;
st_case_20:
if ( p == pe )
goto _out20;
if ( ( (*( p))) == 50 ) {
goto _st26;
}
if ( 48 <= ( (*( p))) && ( (*( p))) <= 49 ) {
goto _st21;
}
goto _st0;
_st21:
p+= 1;
st_case_21:
if ( p == pe )
goto _out21;
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st22;
}
goto _st0;
_st22:
p+= 1;
st_case_22:
if ( p == pe )
goto _out22;
if ( ( (*( p))) == 58 ) {
goto _st23;
}
goto _st0;
_st23:
p+= 1;
st_case_23:
if ( p == pe )
goto _out23;
if ( 48 <= ( (*( p))) && ( (*( p))) <= 53 ) {
goto _st24;
}
goto _st0;
_st24:
p+= 1;
st_case_24:
if ( p == pe )
goto _out24;
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st25;
}
goto _st0;
_ctr35:
{
#line 23 "../../../benchmarks/c/src/ragel/submatch_05__datetime.rl"
s2 = p; }
#line 481 "gen/ragel/submatch_05__datetime.cc"
{
#line 24 "../../../benchmarks/c/src/ragel/submatch_05__datetime.rl"
z1 = p; }
#line 486 "gen/ragel/submatch_05__datetime.cc"
goto _st25;
_st25:
p+= 1;
st_case_25:
if ( p == pe )
goto _out25;
if ( ( (*( p))) == 10 ) {
goto _ctr43;
}
goto _st0;
_st26:
p+= 1;
st_case_26:
if ( p == pe )
goto _out26;
if ( 48 <= ( (*( p))) && ( (*( p))) <= 51 ) {
goto _st22;
}
goto _st0;
_ctr21:
{
#line 21 "../../../benchmarks/c/src/ragel/submatch_05__datetime.rl"
h1 = p; }
#line 511 "gen/ragel/submatch_05__datetime.cc"
goto _st27;
_st27:
p+= 1;
st_case_27:
if ( p == pe )
goto _out27;
if ( 48 <= ( (*( p))) && ( (*( p))) <= 51 ) {
goto _st13;
}
goto _st0;
_ctr14:
{
#line 20 "../../../benchmarks/c/src/ragel/submatch_05__datetime.rl"
d1 = p; }
#line 527 "gen/ragel/submatch_05__datetime.cc"
goto _st28;
_st28:
p+= 1;
st_case_28:
if ( p == pe )
goto _out28;
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st10;
}
goto _st0;
_ctr15:
{
#line 20 "../../../benchmarks/c/src/ragel/submatch_05__datetime.rl"
d1 = p; }
#line 543 "gen/ragel/submatch_05__datetime.cc"
goto _st29;
_st29:
p+= 1;
st_case_29:
if ( p == pe )
goto _out29;
if ( 48 <= ( (*( p))) && ( (*( p))) <= 49 ) {
goto _st10;
}
goto _st0;
_ctr8:
{
#line 19 "../../../benchmarks/c/src/ragel/submatch_05__datetime.rl"
m1 = p; }
#line 559 "gen/ragel/submatch_05__datetime.cc"
goto _st30;
_st30:
p+= 1;
st_case_30:
if ( p == pe )
goto _out30;
if ( 48 <= ( (*( p))) && ( (*( p))) <= 50 ) {
goto _st7;
}
goto _st0;
_ctr54:
{
#line 18 "../../../benchmarks/c/src/ragel/submatch_05__datetime.rl"
y1 = p; }
#line 575 "gen/ragel/submatch_05__datetime.cc"
goto _st31;
_st31:
p+= 1;
st_case_31:
if ( p == pe )
goto _out31;
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st32;
}
goto _st0;
_st32:
p+= 1;
st_case_32:
if ( p == pe )
goto _out32;
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st33;
}
goto _st0;
_st33:
p+= 1;
st_case_33:
if ( p == pe )
goto _out33;
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st34;
}
goto _st0;
_st34:
p+= 1;
st_case_34:
if ( p == pe )
goto _out34;
if ( ( (*( p))) == 45 ) {
goto _ctr5;
}
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st34;
}
goto _st0;
_out35: cs = 35; 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;
_out9: cs = 9; goto _out;
_out10: cs = 10; goto _out;
_out11: cs = 11; goto _out;
_out12: cs = 12; goto _out;
_out13: cs = 13; goto _out;
_out14: cs = 14; goto _out;
_out15: cs = 15; goto _out;
_out16: cs = 16; goto _out;
_out17: cs = 17; goto _out;
_out18: cs = 18; goto _out;
_out19: cs = 19; goto _out;
_out20: cs = 20; goto _out;
_out21: cs = 21; goto _out;
_out22: cs = 22; goto _out;
_out23: cs = 23; goto _out;
_out24: cs = 24; goto _out;
_out25: cs = 25; goto _out;
_out26: cs = 26; goto _out;
_out27: cs = 27; goto _out;
_out28: cs = 28; goto _out;
_out29: cs = 29; goto _out;
_out30: cs = 30; goto _out;
_out31: cs = 31; goto _out;
_out32: cs = 32; goto _out;
_out33: cs = 33; goto _out;
_out34: cs = 34; goto _out;
_out: {}
}
#line 50 "../../../benchmarks/c/src/ragel/submatch_05__datetime.rl"
in->p = p;
in->pe = pe;
return count;
}
RAGEL_BENCH_AND_TEST()
} // namespace ragel_submatch_05__datetime
@@ -1,407 +0,0 @@
#line 1 "../../../benchmarks/c/src/ragel/submatch_06__email.rl"
#include "ragel/base.h"
namespace ragel_submatch_06__email {
const char *delim = "\n";
#line 28 "../../../benchmarks/c/src/ragel/submatch_06__email.rl"
#line 11 "gen/ragel/submatch_06__email.cc"
static const int email_start = 10;
static const int email_first_final = 10;
static const int email_error = 0;
static const int email_en_main = 10;
#line 30 "../../../benchmarks/c/src/ragel/submatch_06__email.rl"
static int lex(Input *in, int count) {
char *p = in->p;
char *pe = in->pe;
char *p1, *p2;
int cs;
#line 26 "gen/ragel/submatch_06__email.cc"
{
cs = (int)email_start;
}
#line 38 "../../../benchmarks/c/src/ragel/submatch_06__email.rl"
#line 31 "gen/ragel/submatch_06__email.cc"
{
switch ( cs ) {
case 10:
goto st_case_10;
case 1:
goto st_case_1;
case 0:
goto st_case_0;
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;
case 9:
goto st_case_9;
}
_ctr11:
{
#line 19 "../../../benchmarks/c/src/ragel/submatch_06__email.rl"
OUTC(' ');
OUTS(p1, p2 - 1);
OUTC(' ');
OUTS(p2, p);
OUTC('\n');
}
#line 67 "gen/ragel/submatch_06__email.cc"
goto _st10;
_st10:
p+= 1;
st_case_10:
if ( p == pe )
goto _out10;
switch( ( (*( p))) ) {
case 0: {
goto _st0;
}
case 10: {
goto _st10;
}
case 33: {
goto _ctr13;
}
case 45: {
goto _ctr13;
}
case 61: {
goto _ctr13;
}
case 63: {
goto _ctr13;
}
}
if ( ( (*( p))) < 42 ) {
if ( 35 <= ( (*( p))) && ( (*( p))) <= 39 ) {
goto _ctr13;
}
} else if ( ( (*( p))) > 43 ) {
if ( ( (*( p))) > 57 ) {
if ( 94 <= ( (*( p))) && ( (*( p))) <= 126 ) {
goto _ctr13;
}
} else if ( ( (*( p))) >= 47 ) {
goto _ctr13;
}
} else {
goto _ctr13;
}
goto _st1;
_st1:
p+= 1;
st_case_1:
if ( p == pe )
goto _out1;
switch( ( (*( p))) ) {
case 0: {
goto _st0;
}
case 10: {
goto _st10;
}
}
goto _st1;
_st0:
st_case_0:
goto _out0;
_ctr13:
{
#line 17 "../../../benchmarks/c/src/ragel/submatch_06__email.rl"
p1 = p; }
#line 132 "gen/ragel/submatch_06__email.cc"
goto _st2;
_st2:
p+= 1;
st_case_2:
if ( p == pe )
goto _out2;
switch( ( (*( p))) ) {
case 0: {
goto _st0;
}
case 10: {
goto _st10;
}
case 33: {
goto _st2;
}
case 46: {
goto _st3;
}
case 61: {
goto _st2;
}
case 63: {
goto _st2;
}
case 64: {
goto _st4;
}
}
if ( ( (*( p))) < 42 ) {
if ( 35 <= ( (*( p))) && ( (*( p))) <= 39 ) {
goto _st2;
}
} else if ( ( (*( p))) > 43 ) {
if ( ( (*( p))) > 57 ) {
if ( 94 <= ( (*( p))) && ( (*( p))) <= 126 ) {
goto _st2;
}
} else if ( ( (*( p))) >= 45 ) {
goto _st2;
}
} else {
goto _st2;
}
goto _st1;
_st3:
p+= 1;
st_case_3:
if ( p == pe )
goto _out3;
switch( ( (*( p))) ) {
case 0: {
goto _st0;
}
case 10: {
goto _st10;
}
case 33: {
goto _st2;
}
case 45: {
goto _st2;
}
case 61: {
goto _st2;
}
case 63: {
goto _st2;
}
}
if ( ( (*( p))) < 42 ) {
if ( 35 <= ( (*( p))) && ( (*( p))) <= 39 ) {
goto _st2;
}
} else if ( ( (*( p))) > 43 ) {
if ( ( (*( p))) > 57 ) {
if ( 94 <= ( (*( p))) && ( (*( p))) <= 126 ) {
goto _st2;
}
} else if ( ( (*( p))) >= 47 ) {
goto _st2;
}
} else {
goto _st2;
}
goto _st1;
_st4:
p+= 1;
st_case_4:
if ( p == pe )
goto _out4;
switch( ( (*( p))) ) {
case 0: {
goto _st0;
}
case 10: {
goto _st10;
}
}
if ( ( (*( p))) > 57 ) {
if ( 97 <= ( (*( p))) && ( (*( p))) <= 122 ) {
goto _ctr6;
}
} else if ( ( (*( p))) >= 48 ) {
goto _ctr6;
}
goto _st1;
_ctr6:
{
#line 18 "../../../benchmarks/c/src/ragel/submatch_06__email.rl"
p2 = p; }
#line 245 "gen/ragel/submatch_06__email.cc"
goto _st5;
_st5:
p+= 1;
st_case_5:
if ( p == pe )
goto _out5;
switch( ( (*( p))) ) {
case 0: {
goto _st0;
}
case 10: {
goto _st10;
}
case 45: {
goto _st6;
}
case 46: {
goto _st7;
}
}
if ( ( (*( p))) > 57 ) {
if ( 97 <= ( (*( p))) && ( (*( p))) <= 122 ) {
goto _st5;
}
} else if ( ( (*( p))) >= 48 ) {
goto _st5;
}
goto _st1;
_st6:
p+= 1;
st_case_6:
if ( p == pe )
goto _out6;
switch( ( (*( p))) ) {
case 0: {
goto _st0;
}
case 10: {
goto _st10;
}
case 45: {
goto _st6;
}
}
if ( ( (*( p))) > 57 ) {
if ( 97 <= ( (*( p))) && ( (*( p))) <= 122 ) {
goto _st5;
}
} else if ( ( (*( p))) >= 48 ) {
goto _st5;
}
goto _st1;
_st7:
p+= 1;
st_case_7:
if ( p == pe )
goto _out7;
switch( ( (*( p))) ) {
case 0: {
goto _st0;
}
case 10: {
goto _st10;
}
}
if ( ( (*( p))) > 57 ) {
if ( 97 <= ( (*( p))) && ( (*( p))) <= 122 ) {
goto _st8;
}
} else if ( ( (*( p))) >= 48 ) {
goto _st8;
}
goto _st1;
_st8:
p+= 1;
st_case_8:
if ( p == pe )
goto _out8;
switch( ( (*( p))) ) {
case 0: {
goto _st0;
}
case 10: {
goto _ctr11;
}
case 45: {
goto _st9;
}
case 46: {
goto _st7;
}
}
if ( ( (*( p))) > 57 ) {
if ( 97 <= ( (*( p))) && ( (*( p))) <= 122 ) {
goto _st8;
}
} else if ( ( (*( p))) >= 48 ) {
goto _st8;
}
goto _st1;
_st9:
p+= 1;
st_case_9:
if ( p == pe )
goto _out9;
switch( ( (*( p))) ) {
case 0: {
goto _st0;
}
case 10: {
goto _st10;
}
case 45: {
goto _st9;
}
}
if ( ( (*( p))) > 57 ) {
if ( 97 <= ( (*( p))) && ( (*( p))) <= 122 ) {
goto _st8;
}
} else if ( ( (*( p))) >= 48 ) {
goto _st8;
}
goto _st1;
_out10: cs = 10; goto _out;
_out1: cs = 1; goto _out;
_out0: cs = 0; 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;
_out9: cs = 9; goto _out;
_out: {}
}
#line 39 "../../../benchmarks/c/src/ragel/submatch_06__email.rl"
in->p = p;
in->pe = pe;
return count;
}
RAGEL_BENCH_AND_TEST()
} // namespace ragel_submatch_06__email
@@ -1,328 +0,0 @@
#line 1 "../../../benchmarks/c/src/ragel/submatch_07__ipv4.rl"
#include "ragel/base.h"
namespace ragel_submatch_07__ipv4 {
const char *delim = "\n";
#line 29 "../../../benchmarks/c/src/ragel/submatch_07__ipv4.rl"
#line 11 "gen/ragel/submatch_07__ipv4.cc"
static const int ipv4_start = 16;
static const int ipv4_first_final = 16;
static const int ipv4_error = 0;
static const int ipv4_en_main = 16;
#line 31 "../../../benchmarks/c/src/ragel/submatch_07__ipv4.rl"
static int lex(Input *in, int count) {
char *p = in->p;
char *pe = in->pe;
const char *p1, *p2, *p3, *p4;
int cs;
#line 26 "gen/ragel/submatch_07__ipv4.cc"
{
cs = (int)ipv4_start;
}
#line 39 "../../../benchmarks/c/src/ragel/submatch_07__ipv4.rl"
#line 31 "gen/ragel/submatch_07__ipv4.cc"
{
switch ( cs ) {
case 16:
goto st_case_16;
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;
case 9:
goto st_case_9;
case 10:
goto st_case_10;
case 11:
goto st_case_11;
case 12:
goto st_case_12;
case 13:
goto st_case_13;
case 14:
goto st_case_14;
case 15:
goto st_case_15;
}
_ctr14:
{
#line 17 "../../../benchmarks/c/src/ragel/submatch_07__ipv4.rl"
OUTS(p1, p2 - 1);
OUTC(',');
OUTS(p2, p3 - 1);
OUTC(',');
OUTS(p3, p4 - 1);
OUTC(',');
OUTS(p4, p);
OUTC('\n');
}
#line 82 "gen/ragel/submatch_07__ipv4.cc"
goto _st16;
_st16:
p+= 1;
st_case_16:
if ( p == pe )
goto _out16;
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _ctr21;
}
goto _st0;
_st0:
st_case_0:
goto _out0;
_ctr21:
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_07__ipv4.rl"
p1 = p; }
#line 101 "gen/ragel/submatch_07__ipv4.cc"
goto _st1;
_st1:
p+= 1;
st_case_1:
if ( p == pe )
goto _out1;
if ( ( (*( p))) == 46 ) {
goto _st2;
}
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st14;
}
goto _st0;
_st2:
p+= 1;
st_case_2:
if ( p == pe )
goto _out2;
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _ctr4;
}
goto _st0;
_ctr4:
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_07__ipv4.rl"
p2 = p; }
#line 129 "gen/ragel/submatch_07__ipv4.cc"
goto _st3;
_st3:
p+= 1;
st_case_3:
if ( p == pe )
goto _out3;
if ( ( (*( p))) == 46 ) {
goto _st4;
}
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st12;
}
goto _st0;
_st4:
p+= 1;
st_case_4:
if ( p == pe )
goto _out4;
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _ctr8;
}
goto _st0;
_ctr8:
{
#line 15 "../../../benchmarks/c/src/ragel/submatch_07__ipv4.rl"
p3 = p; }
#line 157 "gen/ragel/submatch_07__ipv4.cc"
goto _st5;
_st5:
p+= 1;
st_case_5:
if ( p == pe )
goto _out5;
if ( ( (*( p))) == 46 ) {
goto _st6;
}
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st10;
}
goto _st0;
_st6:
p+= 1;
st_case_6:
if ( p == pe )
goto _out6;
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _ctr12;
}
goto _st0;
_ctr12:
{
#line 16 "../../../benchmarks/c/src/ragel/submatch_07__ipv4.rl"
p4 = p; }
#line 185 "gen/ragel/submatch_07__ipv4.cc"
goto _st7;
_st7:
p+= 1;
st_case_7:
if ( p == pe )
goto _out7;
if ( ( (*( p))) == 10 ) {
goto _ctr14;
}
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st8;
}
goto _st0;
_st8:
p+= 1;
st_case_8:
if ( p == pe )
goto _out8;
if ( ( (*( p))) == 10 ) {
goto _ctr14;
}
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st9;
}
goto _st0;
_st9:
p+= 1;
st_case_9:
if ( p == pe )
goto _out9;
if ( ( (*( p))) == 10 ) {
goto _ctr14;
}
goto _st0;
_st10:
p+= 1;
st_case_10:
if ( p == pe )
goto _out10;
if ( ( (*( p))) == 46 ) {
goto _st6;
}
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st11;
}
goto _st0;
_st11:
p+= 1;
st_case_11:
if ( p == pe )
goto _out11;
if ( ( (*( p))) == 46 ) {
goto _st6;
}
goto _st0;
_st12:
p+= 1;
st_case_12:
if ( p == pe )
goto _out12;
if ( ( (*( p))) == 46 ) {
goto _st4;
}
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st13;
}
goto _st0;
_st13:
p+= 1;
st_case_13:
if ( p == pe )
goto _out13;
if ( ( (*( p))) == 46 ) {
goto _st4;
}
goto _st0;
_st14:
p+= 1;
st_case_14:
if ( p == pe )
goto _out14;
if ( ( (*( p))) == 46 ) {
goto _st2;
}
if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto _st15;
}
goto _st0;
_st15:
p+= 1;
st_case_15:
if ( p == pe )
goto _out15;
if ( ( (*( p))) == 46 ) {
goto _st2;
}
goto _st0;
_out16: cs = 16; 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;
_out9: cs = 9; goto _out;
_out10: cs = 10; goto _out;
_out11: cs = 11; goto _out;
_out12: cs = 12; goto _out;
_out13: cs = 13; goto _out;
_out14: cs = 14; goto _out;
_out15: cs = 15; goto _out;
_out: {}
}
#line 40 "../../../benchmarks/c/src/ragel/submatch_07__ipv4.rl"
in->p = p;
in->pe = pe;
return count;
}
RAGEL_BENCH_AND_TEST()
} // namespace ragel_submatch_07__ipv4
@@ -1,207 +0,0 @@
#line 1 "../../../benchmarks/c/src/ragel/submatch_10__alt1_2.rl"
#include "ragel/base.h"
namespace ragel_submatch_10__alt1_2 {
const char *delim = "\n";
#line 23 "../../../benchmarks/c/src/ragel/submatch_10__alt1_2.rl"
#line 11 "gen/ragel/submatch_10__alt1_2.cc"
static const int m_start = 3;
static const int m_first_final = 3;
static const int m_error = 0;
static const int m_en_main = 3;
#line 25 "../../../benchmarks/c/src/ragel/submatch_10__alt1_2.rl"
static int lex(Input *in, int count) {
char *p = in->p;
char *pe = in->pe;
const char
*a1, *b1,
*a2, *b2;
int cs;
#line 28 "gen/ragel/submatch_10__alt1_2.cc"
{
cs = (int)m_start;
}
#line 35 "../../../benchmarks/c/src/ragel/submatch_10__alt1_2.rl"
#line 33 "gen/ragel/submatch_10__alt1_2.cc"
{
switch ( cs ) {
case 3:
goto st_case_3;
case 0:
goto st_case_0;
case 1:
goto st_case_1;
case 2:
goto st_case_2;
}
_ctr2:
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_10__alt1_2.rl"
a2 = p; b1 = b2 = NULL; }
#line 49 "gen/ragel/submatch_10__alt1_2.cc"
{
#line 16 "../../../benchmarks/c/src/ragel/submatch_10__alt1_2.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
OUTC('\n');
}
#line 58 "gen/ragel/submatch_10__alt1_2.cc"
goto _st3;
_ctr4:
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_10__alt1_2.rl"
b2 = p; a1 = a2 = NULL; }
#line 65 "gen/ragel/submatch_10__alt1_2.cc"
{
#line 16 "../../../benchmarks/c/src/ragel/submatch_10__alt1_2.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
OUTC('\n');
}
#line 74 "gen/ragel/submatch_10__alt1_2.cc"
goto _st3;
_ctr6:
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_10__alt1_2.rl"
b1 = p; }
#line 81 "gen/ragel/submatch_10__alt1_2.cc"
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_10__alt1_2.rl"
b2 = p; a1 = a2 = NULL; }
#line 86 "gen/ragel/submatch_10__alt1_2.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_10__alt1_2.rl"
a1 = p; }
#line 91 "gen/ragel/submatch_10__alt1_2.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_10__alt1_2.rl"
a2 = p; b1 = b2 = NULL; }
#line 96 "gen/ragel/submatch_10__alt1_2.cc"
{
#line 16 "../../../benchmarks/c/src/ragel/submatch_10__alt1_2.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
OUTC('\n');
}
#line 105 "gen/ragel/submatch_10__alt1_2.cc"
goto _st3;
_st3:
p+= 1;
st_case_3:
if ( p == pe )
goto _out3;
switch( ( (*( p))) ) {
case 10: {
goto _ctr6;
}
case 97: {
goto _ctr7;
}
case 98: {
goto _ctr8;
}
}
goto _st0;
_st0:
st_case_0:
goto _out0;
_ctr7:
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_10__alt1_2.rl"
a1 = p; }
#line 132 "gen/ragel/submatch_10__alt1_2.cc"
goto _st1;
_st1:
p+= 1;
st_case_1:
if ( p == pe )
goto _out1;
switch( ( (*( p))) ) {
case 10: {
goto _ctr2;
}
case 97: {
goto _st1;
}
}
goto _st0;
_ctr8:
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_10__alt1_2.rl"
b1 = p; }
#line 153 "gen/ragel/submatch_10__alt1_2.cc"
goto _st2;
_st2:
p+= 1;
st_case_2:
if ( p == pe )
goto _out2;
switch( ( (*( p))) ) {
case 10: {
goto _ctr4;
}
case 98: {
goto _st2;
}
}
goto _st0;
_out3: cs = 3; goto _out;
_out0: cs = 0; goto _out;
_out1: cs = 1; goto _out;
_out2: cs = 2; goto _out;
_out: {}
}
#line 36 "../../../benchmarks/c/src/ragel/submatch_10__alt1_2.rl"
in->p = p;
in->pe = pe;
return count;
}
RAGEL_BENCH_AND_TEST()
} // namespace ragel_submatch_10__alt1_2
@@ -1,333 +0,0 @@
#line 1 "../../../benchmarks/c/src/ragel/submatch_11__alt1_4.rl"
#include "ragel/base.h"
namespace ragel_submatch_11__alt1_4 {
const char *delim = "\n";
#line 27 "../../../benchmarks/c/src/ragel/submatch_11__alt1_4.rl"
#line 11 "gen/ragel/submatch_11__alt1_4.cc"
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 29 "../../../benchmarks/c/src/ragel/submatch_11__alt1_4.rl"
static int lex(Input *in, int count) {
char *p = in->p;
char *pe = in->pe;
const char
*a1, *b1, *c1, *d1,
*a2, *b2, *c2, *d2;
int cs;
#line 28 "gen/ragel/submatch_11__alt1_4.cc"
{
cs = (int)m_start;
}
#line 39 "../../../benchmarks/c/src/ragel/submatch_11__alt1_4.rl"
#line 33 "gen/ragel/submatch_11__alt1_4.cc"
{
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 16 "../../../benchmarks/c/src/ragel/submatch_11__alt1_4.rl"
a2 = p; b1 = b2 = c1 = c2 = d1 = d2 = NULL; }
#line 53 "gen/ragel/submatch_11__alt1_4.cc"
{
#line 18 "../../../benchmarks/c/src/ragel/submatch_11__alt1_4.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
else if (c1) { OUTC('C'); OUTS(c1, c2); }
else if (d1) { OUTC('D'); OUTS(d1, d2); }
OUTC('\n');
}
#line 64 "gen/ragel/submatch_11__alt1_4.cc"
goto _st5;
_ctr4:
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_11__alt1_4.rl"
b2 = p; a1 = a2 = c1 = c2 = d1 = d2 = NULL; }
#line 71 "gen/ragel/submatch_11__alt1_4.cc"
{
#line 18 "../../../benchmarks/c/src/ragel/submatch_11__alt1_4.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
else if (c1) { OUTC('C'); OUTS(c1, c2); }
else if (d1) { OUTC('D'); OUTS(d1, d2); }
OUTC('\n');
}
#line 82 "gen/ragel/submatch_11__alt1_4.cc"
goto _st5;
_ctr6:
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_11__alt1_4.rl"
c2 = p; a1 = a2 = b1 = b2 = d1 = d2 = NULL; }
#line 89 "gen/ragel/submatch_11__alt1_4.cc"
{
#line 18 "../../../benchmarks/c/src/ragel/submatch_11__alt1_4.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
else if (c1) { OUTC('C'); OUTS(c1, c2); }
else if (d1) { OUTC('D'); OUTS(d1, d2); }
OUTC('\n');
}
#line 100 "gen/ragel/submatch_11__alt1_4.cc"
goto _st5;
_ctr8:
{
#line 15 "../../../benchmarks/c/src/ragel/submatch_11__alt1_4.rl"
d2 = p; a1 = a2 = b1 = b2 = c1 = c2 = NULL; }
#line 107 "gen/ragel/submatch_11__alt1_4.cc"
{
#line 18 "../../../benchmarks/c/src/ragel/submatch_11__alt1_4.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
else if (c1) { OUTC('C'); OUTS(c1, c2); }
else if (d1) { OUTC('D'); OUTS(d1, d2); }
OUTC('\n');
}
#line 118 "gen/ragel/submatch_11__alt1_4.cc"
goto _st5;
_ctr10:
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_11__alt1_4.rl"
b1 = p; }
#line 125 "gen/ragel/submatch_11__alt1_4.cc"
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_11__alt1_4.rl"
b2 = p; a1 = a2 = c1 = c2 = d1 = d2 = NULL; }
#line 130 "gen/ragel/submatch_11__alt1_4.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_11__alt1_4.rl"
c1 = p; }
#line 135 "gen/ragel/submatch_11__alt1_4.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_11__alt1_4.rl"
c2 = p; a1 = a2 = b1 = b2 = d1 = d2 = NULL; }
#line 140 "gen/ragel/submatch_11__alt1_4.cc"
{
#line 15 "../../../benchmarks/c/src/ragel/submatch_11__alt1_4.rl"
d1 = p; }
#line 145 "gen/ragel/submatch_11__alt1_4.cc"
{
#line 15 "../../../benchmarks/c/src/ragel/submatch_11__alt1_4.rl"
d2 = p; a1 = a2 = b1 = b2 = c1 = c2 = NULL; }
#line 150 "gen/ragel/submatch_11__alt1_4.cc"
{
#line 16 "../../../benchmarks/c/src/ragel/submatch_11__alt1_4.rl"
a1 = p; }
#line 155 "gen/ragel/submatch_11__alt1_4.cc"
{
#line 16 "../../../benchmarks/c/src/ragel/submatch_11__alt1_4.rl"
a2 = p; b1 = b2 = c1 = c2 = d1 = d2 = NULL; }
#line 160 "gen/ragel/submatch_11__alt1_4.cc"
{
#line 18 "../../../benchmarks/c/src/ragel/submatch_11__alt1_4.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
else if (c1) { OUTC('C'); OUTS(c1, c2); }
else if (d1) { OUTC('D'); OUTS(d1, d2); }
OUTC('\n');
}
#line 171 "gen/ragel/submatch_11__alt1_4.cc"
goto _st5;
_st5:
p+= 1;
st_case_5:
if ( p == pe )
goto _out5;
switch( ( (*( p))) ) {
case 10: {
goto _ctr10;
}
case 97: {
goto _ctr11;
}
case 98: {
goto _ctr12;
}
case 99: {
goto _ctr13;
}
case 100: {
goto _ctr14;
}
}
goto _st0;
_st0:
st_case_0:
goto _out0;
_ctr11:
{
#line 16 "../../../benchmarks/c/src/ragel/submatch_11__alt1_4.rl"
a1 = p; }
#line 204 "gen/ragel/submatch_11__alt1_4.cc"
goto _st1;
_st1:
p+= 1;
st_case_1:
if ( p == pe )
goto _out1;
switch( ( (*( p))) ) {
case 10: {
goto _ctr2;
}
case 97: {
goto _st1;
}
}
goto _st0;
_ctr12:
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_11__alt1_4.rl"
b1 = p; }
#line 225 "gen/ragel/submatch_11__alt1_4.cc"
goto _st2;
_st2:
p+= 1;
st_case_2:
if ( p == pe )
goto _out2;
switch( ( (*( p))) ) {
case 10: {
goto _ctr4;
}
case 98: {
goto _st2;
}
}
goto _st0;
_ctr13:
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_11__alt1_4.rl"
c1 = p; }
#line 246 "gen/ragel/submatch_11__alt1_4.cc"
goto _st3;
_st3:
p+= 1;
st_case_3:
if ( p == pe )
goto _out3;
switch( ( (*( p))) ) {
case 10: {
goto _ctr6;
}
case 99: {
goto _st3;
}
}
goto _st0;
_ctr14:
{
#line 15 "../../../benchmarks/c/src/ragel/submatch_11__alt1_4.rl"
d1 = p; }
#line 267 "gen/ragel/submatch_11__alt1_4.cc"
goto _st4;
_st4:
p+= 1;
st_case_4:
if ( p == pe )
goto _out4;
switch( ( (*( p))) ) {
case 10: {
goto _ctr8;
}
case 100: {
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 40 "../../../benchmarks/c/src/ragel/submatch_11__alt1_4.rl"
in->p = p;
in->pe = pe;
return count;
}
RAGEL_BENCH_AND_TEST()
} // namespace ragel_submatch_11__alt1_4
@@ -1,609 +0,0 @@
#line 1 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
#include "ragel/base.h"
namespace ragel_submatch_12__alt1_8 {
const char *delim = "\n";
#line 35 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
#line 11 "gen/ragel/submatch_12__alt1_8.cc"
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 37 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
static int lex(Input *in, int count) {
char *p = in->p;
char *pe = in->pe;
const char
*a1, *b1, *c1, *d1, *e1, *f1, *g1, *h1,
*a2, *b2, *c2, *d2, *e2, *f2, *g2, *h2;
int cs;
#line 28 "gen/ragel/submatch_12__alt1_8.cc"
{
cs = (int)m_start;
}
#line 47 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
#line 33 "gen/ragel/submatch_12__alt1_8.cc"
{
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 20 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
a2 = p; b1 = b2 = c1 = c2 = d1 = d2 = e1 = e2 = f1 = f2 = g1 = g2 = h1 = h2 = NULL; }
#line 61 "gen/ragel/submatch_12__alt1_8.cc"
{
#line 22 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
else if (c1) { OUTC('C'); OUTS(c1, c2); }
else if (d1) { OUTC('D'); OUTS(d1, d2); }
else if (e1) { OUTC('E'); OUTS(e1, e2); }
else if (f1) { OUTC('F'); OUTS(f1, f2); }
else if (g1) { OUTC('G'); OUTS(g1, g2); }
else if (h1) { OUTC('H'); OUTS(h1, h2); }
OUTC('\n');
}
#line 76 "gen/ragel/submatch_12__alt1_8.cc"
goto _st9;
_ctr4:
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
b2 = p; a1 = a2 = c1 = c2 = d1 = d2 = e1 = e2 = f1 = f2 = g1 = g2 = h1 = h2 = NULL; }
#line 83 "gen/ragel/submatch_12__alt1_8.cc"
{
#line 22 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
else if (c1) { OUTC('C'); OUTS(c1, c2); }
else if (d1) { OUTC('D'); OUTS(d1, d2); }
else if (e1) { OUTC('E'); OUTS(e1, e2); }
else if (f1) { OUTC('F'); OUTS(f1, f2); }
else if (g1) { OUTC('G'); OUTS(g1, g2); }
else if (h1) { OUTC('H'); OUTS(h1, h2); }
OUTC('\n');
}
#line 98 "gen/ragel/submatch_12__alt1_8.cc"
goto _st9;
_ctr6:
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
c2 = p; a1 = a2 = b1 = b2 = d1 = d2 = e1 = e2 = f1 = f2 = g1 = g2 = h1 = h2 = NULL; }
#line 105 "gen/ragel/submatch_12__alt1_8.cc"
{
#line 22 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
else if (c1) { OUTC('C'); OUTS(c1, c2); }
else if (d1) { OUTC('D'); OUTS(d1, d2); }
else if (e1) { OUTC('E'); OUTS(e1, e2); }
else if (f1) { OUTC('F'); OUTS(f1, f2); }
else if (g1) { OUTC('G'); OUTS(g1, g2); }
else if (h1) { OUTC('H'); OUTS(h1, h2); }
OUTC('\n');
}
#line 120 "gen/ragel/submatch_12__alt1_8.cc"
goto _st9;
_ctr8:
{
#line 15 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
d2 = p; a1 = a2 = b1 = b2 = c1 = c2 = e1 = e2 = f1 = f2 = g1 = g2 = h1 = h2 = NULL; }
#line 127 "gen/ragel/submatch_12__alt1_8.cc"
{
#line 22 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
else if (c1) { OUTC('C'); OUTS(c1, c2); }
else if (d1) { OUTC('D'); OUTS(d1, d2); }
else if (e1) { OUTC('E'); OUTS(e1, e2); }
else if (f1) { OUTC('F'); OUTS(f1, f2); }
else if (g1) { OUTC('G'); OUTS(g1, g2); }
else if (h1) { OUTC('H'); OUTS(h1, h2); }
OUTC('\n');
}
#line 142 "gen/ragel/submatch_12__alt1_8.cc"
goto _st9;
_ctr10:
{
#line 16 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
e2 = p; a1 = a2 = b1 = b2 = c1 = c2 = d1 = d2 = f1 = f2 = g1 = g2 = h1 = h2 = NULL; }
#line 149 "gen/ragel/submatch_12__alt1_8.cc"
{
#line 22 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
else if (c1) { OUTC('C'); OUTS(c1, c2); }
else if (d1) { OUTC('D'); OUTS(d1, d2); }
else if (e1) { OUTC('E'); OUTS(e1, e2); }
else if (f1) { OUTC('F'); OUTS(f1, f2); }
else if (g1) { OUTC('G'); OUTS(g1, g2); }
else if (h1) { OUTC('H'); OUTS(h1, h2); }
OUTC('\n');
}
#line 164 "gen/ragel/submatch_12__alt1_8.cc"
goto _st9;
_ctr12:
{
#line 17 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
f2 = p; a1 = a2 = b1 = b2 = c1 = c2 = d1 = d2 = e1 = e2 = g1 = g2 = h1 = h2 = NULL; }
#line 171 "gen/ragel/submatch_12__alt1_8.cc"
{
#line 22 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
else if (c1) { OUTC('C'); OUTS(c1, c2); }
else if (d1) { OUTC('D'); OUTS(d1, d2); }
else if (e1) { OUTC('E'); OUTS(e1, e2); }
else if (f1) { OUTC('F'); OUTS(f1, f2); }
else if (g1) { OUTC('G'); OUTS(g1, g2); }
else if (h1) { OUTC('H'); OUTS(h1, h2); }
OUTC('\n');
}
#line 186 "gen/ragel/submatch_12__alt1_8.cc"
goto _st9;
_ctr14:
{
#line 18 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
g2 = p; a1 = a2 = b1 = b2 = c1 = c2 = d1 = d2 = e1 = e2 = f1 = f2 = h1 = h2 = NULL; }
#line 193 "gen/ragel/submatch_12__alt1_8.cc"
{
#line 22 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
else if (c1) { OUTC('C'); OUTS(c1, c2); }
else if (d1) { OUTC('D'); OUTS(d1, d2); }
else if (e1) { OUTC('E'); OUTS(e1, e2); }
else if (f1) { OUTC('F'); OUTS(f1, f2); }
else if (g1) { OUTC('G'); OUTS(g1, g2); }
else if (h1) { OUTC('H'); OUTS(h1, h2); }
OUTC('\n');
}
#line 208 "gen/ragel/submatch_12__alt1_8.cc"
goto _st9;
_ctr16:
{
#line 19 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
h2 = p; a1 = a2 = b1 = b2 = c1 = c2 = d1 = d2 = e1 = e2 = f1 = f2 = g1 = g2 = NULL; }
#line 215 "gen/ragel/submatch_12__alt1_8.cc"
{
#line 22 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
else if (c1) { OUTC('C'); OUTS(c1, c2); }
else if (d1) { OUTC('D'); OUTS(d1, d2); }
else if (e1) { OUTC('E'); OUTS(e1, e2); }
else if (f1) { OUTC('F'); OUTS(f1, f2); }
else if (g1) { OUTC('G'); OUTS(g1, g2); }
else if (h1) { OUTC('H'); OUTS(h1, h2); }
OUTC('\n');
}
#line 230 "gen/ragel/submatch_12__alt1_8.cc"
goto _st9;
_ctr18:
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
b1 = p; }
#line 237 "gen/ragel/submatch_12__alt1_8.cc"
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
b2 = p; a1 = a2 = c1 = c2 = d1 = d2 = e1 = e2 = f1 = f2 = g1 = g2 = h1 = h2 = NULL; }
#line 242 "gen/ragel/submatch_12__alt1_8.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
c1 = p; }
#line 247 "gen/ragel/submatch_12__alt1_8.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
c2 = p; a1 = a2 = b1 = b2 = d1 = d2 = e1 = e2 = f1 = f2 = g1 = g2 = h1 = h2 = NULL; }
#line 252 "gen/ragel/submatch_12__alt1_8.cc"
{
#line 15 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
d1 = p; }
#line 257 "gen/ragel/submatch_12__alt1_8.cc"
{
#line 15 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
d2 = p; a1 = a2 = b1 = b2 = c1 = c2 = e1 = e2 = f1 = f2 = g1 = g2 = h1 = h2 = NULL; }
#line 262 "gen/ragel/submatch_12__alt1_8.cc"
{
#line 16 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
e1 = p; }
#line 267 "gen/ragel/submatch_12__alt1_8.cc"
{
#line 16 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
e2 = p; a1 = a2 = b1 = b2 = c1 = c2 = d1 = d2 = f1 = f2 = g1 = g2 = h1 = h2 = NULL; }
#line 272 "gen/ragel/submatch_12__alt1_8.cc"
{
#line 17 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
f1 = p; }
#line 277 "gen/ragel/submatch_12__alt1_8.cc"
{
#line 17 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
f2 = p; a1 = a2 = b1 = b2 = c1 = c2 = d1 = d2 = e1 = e2 = g1 = g2 = h1 = h2 = NULL; }
#line 282 "gen/ragel/submatch_12__alt1_8.cc"
{
#line 18 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
g1 = p; }
#line 287 "gen/ragel/submatch_12__alt1_8.cc"
{
#line 18 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
g2 = p; a1 = a2 = b1 = b2 = c1 = c2 = d1 = d2 = e1 = e2 = f1 = f2 = h1 = h2 = NULL; }
#line 292 "gen/ragel/submatch_12__alt1_8.cc"
{
#line 19 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
h1 = p; }
#line 297 "gen/ragel/submatch_12__alt1_8.cc"
{
#line 19 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
h2 = p; a1 = a2 = b1 = b2 = c1 = c2 = d1 = d2 = e1 = e2 = f1 = f2 = g1 = g2 = NULL; }
#line 302 "gen/ragel/submatch_12__alt1_8.cc"
{
#line 20 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
a1 = p; }
#line 307 "gen/ragel/submatch_12__alt1_8.cc"
{
#line 20 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
a2 = p; b1 = b2 = c1 = c2 = d1 = d2 = e1 = e2 = f1 = f2 = g1 = g2 = h1 = h2 = NULL; }
#line 312 "gen/ragel/submatch_12__alt1_8.cc"
{
#line 22 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
else if (c1) { OUTC('C'); OUTS(c1, c2); }
else if (d1) { OUTC('D'); OUTS(d1, d2); }
else if (e1) { OUTC('E'); OUTS(e1, e2); }
else if (f1) { OUTC('F'); OUTS(f1, f2); }
else if (g1) { OUTC('G'); OUTS(g1, g2); }
else if (h1) { OUTC('H'); OUTS(h1, h2); }
OUTC('\n');
}
#line 327 "gen/ragel/submatch_12__alt1_8.cc"
goto _st9;
_st9:
p+= 1;
st_case_9:
if ( p == pe )
goto _out9;
switch( ( (*( p))) ) {
case 10: {
goto _ctr18;
}
case 97: {
goto _ctr19;
}
case 98: {
goto _ctr20;
}
case 99: {
goto _ctr21;
}
case 100: {
goto _ctr22;
}
case 101: {
goto _ctr23;
}
case 102: {
goto _ctr24;
}
case 103: {
goto _ctr25;
}
case 104: {
goto _ctr26;
}
}
goto _st0;
_st0:
st_case_0:
goto _out0;
_ctr19:
{
#line 20 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
a1 = p; }
#line 372 "gen/ragel/submatch_12__alt1_8.cc"
goto _st1;
_st1:
p+= 1;
st_case_1:
if ( p == pe )
goto _out1;
switch( ( (*( p))) ) {
case 10: {
goto _ctr2;
}
case 97: {
goto _st1;
}
}
goto _st0;
_ctr20:
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
b1 = p; }
#line 393 "gen/ragel/submatch_12__alt1_8.cc"
goto _st2;
_st2:
p+= 1;
st_case_2:
if ( p == pe )
goto _out2;
switch( ( (*( p))) ) {
case 10: {
goto _ctr4;
}
case 98: {
goto _st2;
}
}
goto _st0;
_ctr21:
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
c1 = p; }
#line 414 "gen/ragel/submatch_12__alt1_8.cc"
goto _st3;
_st3:
p+= 1;
st_case_3:
if ( p == pe )
goto _out3;
switch( ( (*( p))) ) {
case 10: {
goto _ctr6;
}
case 99: {
goto _st3;
}
}
goto _st0;
_ctr22:
{
#line 15 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
d1 = p; }
#line 435 "gen/ragel/submatch_12__alt1_8.cc"
goto _st4;
_st4:
p+= 1;
st_case_4:
if ( p == pe )
goto _out4;
switch( ( (*( p))) ) {
case 10: {
goto _ctr8;
}
case 100: {
goto _st4;
}
}
goto _st0;
_ctr23:
{
#line 16 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
e1 = p; }
#line 456 "gen/ragel/submatch_12__alt1_8.cc"
goto _st5;
_st5:
p+= 1;
st_case_5:
if ( p == pe )
goto _out5;
switch( ( (*( p))) ) {
case 10: {
goto _ctr10;
}
case 101: {
goto _st5;
}
}
goto _st0;
_ctr24:
{
#line 17 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
f1 = p; }
#line 477 "gen/ragel/submatch_12__alt1_8.cc"
goto _st6;
_st6:
p+= 1;
st_case_6:
if ( p == pe )
goto _out6;
switch( ( (*( p))) ) {
case 10: {
goto _ctr12;
}
case 102: {
goto _st6;
}
}
goto _st0;
_ctr25:
{
#line 18 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
g1 = p; }
#line 498 "gen/ragel/submatch_12__alt1_8.cc"
goto _st7;
_st7:
p+= 1;
st_case_7:
if ( p == pe )
goto _out7;
switch( ( (*( p))) ) {
case 10: {
goto _ctr14;
}
case 103: {
goto _st7;
}
}
goto _st0;
_ctr26:
{
#line 19 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
h1 = p; }
#line 519 "gen/ragel/submatch_12__alt1_8.cc"
goto _st8;
_st8:
p+= 1;
st_case_8:
if ( p == pe )
goto _out8;
switch( ( (*( p))) ) {
case 10: {
goto _ctr16;
}
case 104: {
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 48 "../../../benchmarks/c/src/ragel/submatch_12__alt1_8.rl"
in->p = p;
in->pe = pe;
return count;
}
RAGEL_BENCH_AND_TEST()
} // namespace ragel_submatch_12__alt1_8
@@ -1,395 +0,0 @@
#line 1 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
#include "ragel/base.h"
namespace ragel_submatch_13__alt2_2 {
const char *delim = "\n";
#line 36 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
#line 11 "gen/ragel/submatch_13__alt2_2.cc"
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 38 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
static int lex(Input *in, int count) {
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.cc"
{
cs = (int)m_start;
}
#line 50 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
#line 35 "gen/ragel/submatch_13__alt2_2.cc"
{
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 21 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
a2 = p; b1 = b2 = NULL; }
#line 55 "gen/ragel/submatch_13__alt2_2.cc"
{
#line 24 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
b3 = p; }
#line 60 "gen/ragel/submatch_13__alt2_2.cc"
{
#line 24 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
b4 = p; a3 = a4 = NULL; }
#line 65 "gen/ragel/submatch_13__alt2_2.cc"
{
#line 25 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
a3 = p; }
#line 70 "gen/ragel/submatch_13__alt2_2.cc"
{
#line 25 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
a4 = p; b3 = b4 = NULL; }
#line 75 "gen/ragel/submatch_13__alt2_2.cc"
{
#line 27 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
if (a3) { OUTC('A'); OUTS(a3, a4); }
else if (b3) { OUTC('B'); OUTS(b3, b4); }
OUTC('\n');
}
#line 86 "gen/ragel/submatch_13__alt2_2.cc"
goto _st5;
_ctr5:
{
#line 24 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
b4 = p; a3 = a4 = NULL; }
#line 93 "gen/ragel/submatch_13__alt2_2.cc"
{
#line 27 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
if (a3) { OUTC('A'); OUTS(a3, a4); }
else if (b3) { OUTC('B'); OUTS(b3, b4); }
OUTC('\n');
}
#line 104 "gen/ragel/submatch_13__alt2_2.cc"
goto _st5;
_ctr7:
{
#line 20 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
b2 = p; a1 = a2 = NULL; }
#line 111 "gen/ragel/submatch_13__alt2_2.cc"
{
#line 24 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
b3 = p; }
#line 116 "gen/ragel/submatch_13__alt2_2.cc"
{
#line 24 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
b4 = p; a3 = a4 = NULL; }
#line 121 "gen/ragel/submatch_13__alt2_2.cc"
{
#line 25 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
a3 = p; }
#line 126 "gen/ragel/submatch_13__alt2_2.cc"
{
#line 25 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
a4 = p; b3 = b4 = NULL; }
#line 131 "gen/ragel/submatch_13__alt2_2.cc"
{
#line 27 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
if (a3) { OUTC('A'); OUTS(a3, a4); }
else if (b3) { OUTC('B'); OUTS(b3, b4); }
OUTC('\n');
}
#line 142 "gen/ragel/submatch_13__alt2_2.cc"
goto _st5;
_ctr10:
{
#line 25 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
a4 = p; b3 = b4 = NULL; }
#line 149 "gen/ragel/submatch_13__alt2_2.cc"
{
#line 27 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
if (a3) { OUTC('A'); OUTS(a3, a4); }
else if (b3) { OUTC('B'); OUTS(b3, b4); }
OUTC('\n');
}
#line 160 "gen/ragel/submatch_13__alt2_2.cc"
goto _st5;
_ctr12:
{
#line 20 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
b1 = p; }
#line 167 "gen/ragel/submatch_13__alt2_2.cc"
{
#line 20 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
b2 = p; a1 = a2 = NULL; }
#line 172 "gen/ragel/submatch_13__alt2_2.cc"
{
#line 21 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
a1 = p; }
#line 177 "gen/ragel/submatch_13__alt2_2.cc"
{
#line 21 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
a2 = p; b1 = b2 = NULL; }
#line 182 "gen/ragel/submatch_13__alt2_2.cc"
{
#line 24 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
b3 = p; }
#line 187 "gen/ragel/submatch_13__alt2_2.cc"
{
#line 24 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
b4 = p; a3 = a4 = NULL; }
#line 192 "gen/ragel/submatch_13__alt2_2.cc"
{
#line 25 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
a3 = p; }
#line 197 "gen/ragel/submatch_13__alt2_2.cc"
{
#line 25 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
a4 = p; b3 = b4 = NULL; }
#line 202 "gen/ragel/submatch_13__alt2_2.cc"
{
#line 27 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
if (a3) { OUTC('A'); OUTS(a3, a4); }
else if (b3) { OUTC('B'); OUTS(b3, b4); }
OUTC('\n');
}
#line 213 "gen/ragel/submatch_13__alt2_2.cc"
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 21 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
a1 = p; }
#line 240 "gen/ragel/submatch_13__alt2_2.cc"
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_13__alt2_2.rl"
a2 = p; b1 = b2 = NULL; }
#line 264 "gen/ragel/submatch_13__alt2_2.cc"
{
#line 24 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
b3 = p; }
#line 269 "gen/ragel/submatch_13__alt2_2.cc"
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 20 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
b1 = p; }
#line 290 "gen/ragel/submatch_13__alt2_2.cc"
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 20 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
b2 = p; a1 = a2 = NULL; }
#line 314 "gen/ragel/submatch_13__alt2_2.cc"
{
#line 25 "../../../benchmarks/c/src/ragel/submatch_13__alt2_2.rl"
a3 = p; }
#line 319 "gen/ragel/submatch_13__alt2_2.cc"
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;
return count;
}
RAGEL_BENCH_AND_TEST()
} // namespace ragel_submatch_13__alt2_2
@@ -1,963 +0,0 @@
#line 1 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
#include "ragel/base.h"
namespace ragel_submatch_14__alt2_4 {
const char *delim = "\n";
#line 44 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
#line 11 "gen/ragel/submatch_14__alt2_4.cc"
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 46 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
static int lex(Input *in, int count) {
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.cc"
{
cs = (int)m_start;
}
#line 58 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
#line 35 "gen/ragel/submatch_14__alt2_4.cc"
{
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 23 "../../../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.cc"
{
#line 26 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
b3 = p; }
#line 68 "gen/ragel/submatch_14__alt2_4.cc"
{
#line 26 "../../../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.cc"
{
#line 27 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
c3 = p; }
#line 78 "gen/ragel/submatch_14__alt2_4.cc"
{
#line 27 "../../../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.cc"
{
#line 28 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
d3 = p; }
#line 88 "gen/ragel/submatch_14__alt2_4.cc"
{
#line 28 "../../../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.cc"
{
#line 29 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
a3 = p; }
#line 98 "gen/ragel/submatch_14__alt2_4.cc"
{
#line 29 "../../../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.cc"
{
#line 31 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
else if (c1) { OUTC('C'); OUTS(c1, c2); }
else if (d1) { OUTC('D'); OUTS(d1, d2); }
if (a3) { OUTC('A'); OUTS(a3, a4); }
else if (b3) { OUTC('B'); OUTS(b3, b4); }
else if (c3) { OUTC('C'); OUTS(c3, c4); }
else if (d3) { OUTC('D'); OUTS(d3, d4); }
OUTC('\n');
}
#line 118 "gen/ragel/submatch_14__alt2_4.cc"
goto _st9;
_ctr7:
{
#line 26 "../../../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.cc"
{
#line 31 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
else if (c1) { OUTC('C'); OUTS(c1, c2); }
else if (d1) { OUTC('D'); OUTS(d1, d2); }
if (a3) { OUTC('A'); OUTS(a3, a4); }
else if (b3) { OUTC('B'); OUTS(b3, b4); }
else if (c3) { OUTC('C'); OUTS(c3, c4); }
else if (d3) { OUTC('D'); OUTS(d3, d4); }
OUTC('\n');
}
#line 140 "gen/ragel/submatch_14__alt2_4.cc"
goto _st9;
_ctr9:
{
#line 27 "../../../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.cc"
{
#line 31 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
else if (c1) { OUTC('C'); OUTS(c1, c2); }
else if (d1) { OUTC('D'); OUTS(d1, d2); }
if (a3) { OUTC('A'); OUTS(a3, a4); }
else if (b3) { OUTC('B'); OUTS(b3, b4); }
else if (c3) { OUTC('C'); OUTS(c3, c4); }
else if (d3) { OUTC('D'); OUTS(d3, d4); }
OUTC('\n');
}
#line 162 "gen/ragel/submatch_14__alt2_4.cc"
goto _st9;
_ctr11:
{
#line 28 "../../../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.cc"
{
#line 31 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
else if (c1) { OUTC('C'); OUTS(c1, c2); }
else if (d1) { OUTC('D'); OUTS(d1, d2); }
if (a3) { OUTC('A'); OUTS(a3, a4); }
else if (b3) { OUTC('B'); OUTS(b3, b4); }
else if (c3) { OUTC('C'); OUTS(c3, c4); }
else if (d3) { OUTC('D'); OUTS(d3, d4); }
OUTC('\n');
}
#line 184 "gen/ragel/submatch_14__alt2_4.cc"
goto _st9;
_ctr13:
{
#line 20 "../../../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.cc"
{
#line 26 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
b3 = p; }
#line 196 "gen/ragel/submatch_14__alt2_4.cc"
{
#line 26 "../../../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.cc"
{
#line 27 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
c3 = p; }
#line 206 "gen/ragel/submatch_14__alt2_4.cc"
{
#line 27 "../../../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.cc"
{
#line 28 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
d3 = p; }
#line 216 "gen/ragel/submatch_14__alt2_4.cc"
{
#line 28 "../../../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.cc"
{
#line 29 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
a3 = p; }
#line 226 "gen/ragel/submatch_14__alt2_4.cc"
{
#line 29 "../../../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.cc"
{
#line 31 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
else if (c1) { OUTC('C'); OUTS(c1, c2); }
else if (d1) { OUTC('D'); OUTS(d1, d2); }
if (a3) { OUTC('A'); OUTS(a3, a4); }
else if (b3) { OUTC('B'); OUTS(b3, b4); }
else if (c3) { OUTC('C'); OUTS(c3, c4); }
else if (d3) { OUTC('D'); OUTS(d3, d4); }
OUTC('\n');
}
#line 246 "gen/ragel/submatch_14__alt2_4.cc"
goto _st9;
_ctr18:
{
#line 29 "../../../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.cc"
{
#line 31 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
else if (c1) { OUTC('C'); OUTS(c1, c2); }
else if (d1) { OUTC('D'); OUTS(d1, d2); }
if (a3) { OUTC('A'); OUTS(a3, a4); }
else if (b3) { OUTC('B'); OUTS(b3, b4); }
else if (c3) { OUTC('C'); OUTS(c3, c4); }
else if (d3) { OUTC('D'); OUTS(d3, d4); }
OUTC('\n');
}
#line 268 "gen/ragel/submatch_14__alt2_4.cc"
goto _st9;
_ctr20:
{
#line 21 "../../../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.cc"
{
#line 26 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
b3 = p; }
#line 280 "gen/ragel/submatch_14__alt2_4.cc"
{
#line 26 "../../../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.cc"
{
#line 27 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
c3 = p; }
#line 290 "gen/ragel/submatch_14__alt2_4.cc"
{
#line 27 "../../../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.cc"
{
#line 28 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
d3 = p; }
#line 300 "gen/ragel/submatch_14__alt2_4.cc"
{
#line 28 "../../../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.cc"
{
#line 29 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
a3 = p; }
#line 310 "gen/ragel/submatch_14__alt2_4.cc"
{
#line 29 "../../../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.cc"
{
#line 31 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
else if (c1) { OUTC('C'); OUTS(c1, c2); }
else if (d1) { OUTC('D'); OUTS(d1, d2); }
if (a3) { OUTC('A'); OUTS(a3, a4); }
else if (b3) { OUTC('B'); OUTS(b3, b4); }
else if (c3) { OUTC('C'); OUTS(c3, c4); }
else if (d3) { OUTC('D'); OUTS(d3, d4); }
OUTC('\n');
}
#line 330 "gen/ragel/submatch_14__alt2_4.cc"
goto _st9;
_ctr25:
{
#line 22 "../../../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.cc"
{
#line 26 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
b3 = p; }
#line 342 "gen/ragel/submatch_14__alt2_4.cc"
{
#line 26 "../../../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.cc"
{
#line 27 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
c3 = p; }
#line 352 "gen/ragel/submatch_14__alt2_4.cc"
{
#line 27 "../../../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.cc"
{
#line 28 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
d3 = p; }
#line 362 "gen/ragel/submatch_14__alt2_4.cc"
{
#line 28 "../../../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.cc"
{
#line 29 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
a3 = p; }
#line 372 "gen/ragel/submatch_14__alt2_4.cc"
{
#line 29 "../../../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.cc"
{
#line 31 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
else if (c1) { OUTC('C'); OUTS(c1, c2); }
else if (d1) { OUTC('D'); OUTS(d1, d2); }
if (a3) { OUTC('A'); OUTS(a3, a4); }
else if (b3) { OUTC('B'); OUTS(b3, b4); }
else if (c3) { OUTC('C'); OUTS(c3, c4); }
else if (d3) { OUTC('D'); OUTS(d3, d4); }
OUTC('\n');
}
#line 392 "gen/ragel/submatch_14__alt2_4.cc"
goto _st9;
_ctr30:
{
#line 20 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
b1 = p; }
#line 399 "gen/ragel/submatch_14__alt2_4.cc"
{
#line 20 "../../../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.cc"
{
#line 21 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
c1 = p; }
#line 409 "gen/ragel/submatch_14__alt2_4.cc"
{
#line 21 "../../../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.cc"
{
#line 22 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
d1 = p; }
#line 419 "gen/ragel/submatch_14__alt2_4.cc"
{
#line 22 "../../../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.cc"
{
#line 23 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
a1 = p; }
#line 429 "gen/ragel/submatch_14__alt2_4.cc"
{
#line 23 "../../../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.cc"
{
#line 26 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
b3 = p; }
#line 439 "gen/ragel/submatch_14__alt2_4.cc"
{
#line 26 "../../../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.cc"
{
#line 27 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
c3 = p; }
#line 449 "gen/ragel/submatch_14__alt2_4.cc"
{
#line 27 "../../../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.cc"
{
#line 28 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
d3 = p; }
#line 459 "gen/ragel/submatch_14__alt2_4.cc"
{
#line 28 "../../../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.cc"
{
#line 29 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
a3 = p; }
#line 469 "gen/ragel/submatch_14__alt2_4.cc"
{
#line 29 "../../../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.cc"
{
#line 31 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
else if (c1) { OUTC('C'); OUTS(c1, c2); }
else if (d1) { OUTC('D'); OUTS(d1, d2); }
if (a3) { OUTC('A'); OUTS(a3, a4); }
else if (b3) { OUTC('B'); OUTS(b3, b4); }
else if (c3) { OUTC('C'); OUTS(c3, c4); }
else if (d3) { OUTC('D'); OUTS(d3, d4); }
OUTC('\n');
}
#line 489 "gen/ragel/submatch_14__alt2_4.cc"
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 23 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
a1 = p; }
#line 522 "gen/ragel/submatch_14__alt2_4.cc"
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 23 "../../../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.cc"
{
#line 26 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
b3 = p; }
#line 557 "gen/ragel/submatch_14__alt2_4.cc"
goto _st2;
_ctr22:
{
#line 21 "../../../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.cc"
{
#line 26 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
b3 = p; }
#line 569 "gen/ragel/submatch_14__alt2_4.cc"
goto _st2;
_ctr27:
{
#line 22 "../../../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.cc"
{
#line 26 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
b3 = p; }
#line 581 "gen/ragel/submatch_14__alt2_4.cc"
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 23 "../../../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.cc"
{
#line 27 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
c3 = p; }
#line 607 "gen/ragel/submatch_14__alt2_4.cc"
goto _st3;
_ctr15:
{
#line 20 "../../../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.cc"
{
#line 27 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
c3 = p; }
#line 619 "gen/ragel/submatch_14__alt2_4.cc"
goto _st3;
_ctr28:
{
#line 22 "../../../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.cc"
{
#line 27 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
c3 = p; }
#line 631 "gen/ragel/submatch_14__alt2_4.cc"
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 23 "../../../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.cc"
{
#line 28 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
d3 = p; }
#line 657 "gen/ragel/submatch_14__alt2_4.cc"
goto _st4;
_ctr16:
{
#line 20 "../../../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.cc"
{
#line 28 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
d3 = p; }
#line 669 "gen/ragel/submatch_14__alt2_4.cc"
goto _st4;
_ctr23:
{
#line 21 "../../../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.cc"
{
#line 28 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
d3 = p; }
#line 681 "gen/ragel/submatch_14__alt2_4.cc"
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 20 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
b1 = p; }
#line 702 "gen/ragel/submatch_14__alt2_4.cc"
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 20 "../../../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.cc"
{
#line 29 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
a3 = p; }
#line 737 "gen/ragel/submatch_14__alt2_4.cc"
goto _st6;
_ctr21:
{
#line 21 "../../../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.cc"
{
#line 29 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
a3 = p; }
#line 749 "gen/ragel/submatch_14__alt2_4.cc"
goto _st6;
_ctr26:
{
#line 22 "../../../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.cc"
{
#line 29 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
a3 = p; }
#line 761 "gen/ragel/submatch_14__alt2_4.cc"
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 21 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
c1 = p; }
#line 782 "gen/ragel/submatch_14__alt2_4.cc"
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 22 "../../../benchmarks/c/src/ragel/submatch_14__alt2_4.rl"
d1 = p; }
#line 812 "gen/ragel/submatch_14__alt2_4.cc"
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;
return count;
}
RAGEL_BENCH_AND_TEST()
} // namespace ragel_submatch_14__alt2_4
File diff suppressed because it is too large Load Diff
@@ -1,939 +0,0 @@
#line 1 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
#include "ragel/base.h"
namespace ragel_submatch_16__alt4_2 {
const char *delim = "\n";
#line 49 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
#line 11 "gen/ragel/submatch_16__alt4_2.cc"
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 51 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
static int lex(Input *in, int count) {
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.cc"
{
cs = (int)m_start;
}
#line 67 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
#line 39 "gen/ragel/submatch_16__alt4_2.cc"
{
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_16__alt4_2.rl"
a2 = p; b1 = b2 = NULL; }
#line 67 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 25 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b3 = p; }
#line 72 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 25 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b4 = p; a3 = a4 = NULL; }
#line 77 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 26 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a3 = p; }
#line 82 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 26 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a4 = p; b3 = b4 = NULL; }
#line 87 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 29 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b5 = p; }
#line 92 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 29 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b6 = p; a5 = a6 = NULL; }
#line 97 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 30 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a5 = p; }
#line 102 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 30 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a6 = p; b5 = b6 = NULL; }
#line 107 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 33 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b7 = p; }
#line 112 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 33 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b8 = p; a7 = a8 = NULL; }
#line 117 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 34 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a7 = p; }
#line 122 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 34 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a8 = p; b7 = b8 = NULL; }
#line 127 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 36 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
if (a3) { OUTC('A'); OUTS(a3, a4); }
else if (b3) { OUTC('B'); OUTS(b3, b4); }
if (a5) { OUTC('A'); OUTS(a5, a6); }
else if (b5) { OUTC('B'); OUTS(b5, b6); }
if (a7) { OUTC('A'); OUTS(a7, a8); }
else if (b7) { OUTC('B'); OUTS(b7, b8); }
OUTC('\n');
}
#line 142 "gen/ragel/submatch_16__alt4_2.cc"
goto _st9;
_ctr5:
{
#line 25 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b4 = p; a3 = a4 = NULL; }
#line 149 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 29 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b5 = p; }
#line 154 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 29 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b6 = p; a5 = a6 = NULL; }
#line 159 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 30 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a5 = p; }
#line 164 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 30 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a6 = p; b5 = b6 = NULL; }
#line 169 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 33 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b7 = p; }
#line 174 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 33 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b8 = p; a7 = a8 = NULL; }
#line 179 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 34 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a7 = p; }
#line 184 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 34 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a8 = p; b7 = b8 = NULL; }
#line 189 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 36 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
if (a3) { OUTC('A'); OUTS(a3, a4); }
else if (b3) { OUTC('B'); OUTS(b3, b4); }
if (a5) { OUTC('A'); OUTS(a5, a6); }
else if (b5) { OUTC('B'); OUTS(b5, b6); }
if (a7) { OUTC('A'); OUTS(a7, a8); }
else if (b7) { OUTC('B'); OUTS(b7, b8); }
OUTC('\n');
}
#line 204 "gen/ragel/submatch_16__alt4_2.cc"
goto _st9;
_ctr8:
{
#line 30 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a6 = p; b5 = b6 = NULL; }
#line 211 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 33 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b7 = p; }
#line 216 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 33 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b8 = p; a7 = a8 = NULL; }
#line 221 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 34 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a7 = p; }
#line 226 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 34 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a8 = p; b7 = b8 = NULL; }
#line 231 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 36 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
if (a3) { OUTC('A'); OUTS(a3, a4); }
else if (b3) { OUTC('B'); OUTS(b3, b4); }
if (a5) { OUTC('A'); OUTS(a5, a6); }
else if (b5) { OUTC('B'); OUTS(b5, b6); }
if (a7) { OUTC('A'); OUTS(a7, a8); }
else if (b7) { OUTC('B'); OUTS(b7, b8); }
OUTC('\n');
}
#line 246 "gen/ragel/submatch_16__alt4_2.cc"
goto _st9;
_ctr11:
{
#line 33 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b8 = p; a7 = a8 = NULL; }
#line 253 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 36 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
if (a3) { OUTC('A'); OUTS(a3, a4); }
else if (b3) { OUTC('B'); OUTS(b3, b4); }
if (a5) { OUTC('A'); OUTS(a5, a6); }
else if (b5) { OUTC('B'); OUTS(b5, b6); }
if (a7) { OUTC('A'); OUTS(a7, a8); }
else if (b7) { OUTC('B'); OUTS(b7, b8); }
OUTC('\n');
}
#line 268 "gen/ragel/submatch_16__alt4_2.cc"
goto _st9;
_ctr13:
{
#line 21 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b2 = p; a1 = a2 = NULL; }
#line 275 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 25 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b3 = p; }
#line 280 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 25 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b4 = p; a3 = a4 = NULL; }
#line 285 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 26 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a3 = p; }
#line 290 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 26 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a4 = p; b3 = b4 = NULL; }
#line 295 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 29 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b5 = p; }
#line 300 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 29 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b6 = p; a5 = a6 = NULL; }
#line 305 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 30 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a5 = p; }
#line 310 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 30 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a6 = p; b5 = b6 = NULL; }
#line 315 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 33 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b7 = p; }
#line 320 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 33 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b8 = p; a7 = a8 = NULL; }
#line 325 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 34 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a7 = p; }
#line 330 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 34 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a8 = p; b7 = b8 = NULL; }
#line 335 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 36 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
if (a3) { OUTC('A'); OUTS(a3, a4); }
else if (b3) { OUTC('B'); OUTS(b3, b4); }
if (a5) { OUTC('A'); OUTS(a5, a6); }
else if (b5) { OUTC('B'); OUTS(b5, b6); }
if (a7) { OUTC('A'); OUTS(a7, a8); }
else if (b7) { OUTC('B'); OUTS(b7, b8); }
OUTC('\n');
}
#line 350 "gen/ragel/submatch_16__alt4_2.cc"
goto _st9;
_ctr16:
{
#line 26 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a4 = p; b3 = b4 = NULL; }
#line 357 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 29 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b5 = p; }
#line 362 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 29 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b6 = p; a5 = a6 = NULL; }
#line 367 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 30 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a5 = p; }
#line 372 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 30 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a6 = p; b5 = b6 = NULL; }
#line 377 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 33 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b7 = p; }
#line 382 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 33 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b8 = p; a7 = a8 = NULL; }
#line 387 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 34 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a7 = p; }
#line 392 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 34 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a8 = p; b7 = b8 = NULL; }
#line 397 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 36 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
if (a3) { OUTC('A'); OUTS(a3, a4); }
else if (b3) { OUTC('B'); OUTS(b3, b4); }
if (a5) { OUTC('A'); OUTS(a5, a6); }
else if (b5) { OUTC('B'); OUTS(b5, b6); }
if (a7) { OUTC('A'); OUTS(a7, a8); }
else if (b7) { OUTC('B'); OUTS(b7, b8); }
OUTC('\n');
}
#line 412 "gen/ragel/submatch_16__alt4_2.cc"
goto _st9;
_ctr19:
{
#line 29 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b6 = p; a5 = a6 = NULL; }
#line 419 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 33 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b7 = p; }
#line 424 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 33 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b8 = p; a7 = a8 = NULL; }
#line 429 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 34 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a7 = p; }
#line 434 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 34 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a8 = p; b7 = b8 = NULL; }
#line 439 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 36 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
if (a3) { OUTC('A'); OUTS(a3, a4); }
else if (b3) { OUTC('B'); OUTS(b3, b4); }
if (a5) { OUTC('A'); OUTS(a5, a6); }
else if (b5) { OUTC('B'); OUTS(b5, b6); }
if (a7) { OUTC('A'); OUTS(a7, a8); }
else if (b7) { OUTC('B'); OUTS(b7, b8); }
OUTC('\n');
}
#line 454 "gen/ragel/submatch_16__alt4_2.cc"
goto _st9;
_ctr22:
{
#line 34 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a8 = p; b7 = b8 = NULL; }
#line 461 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 36 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
if (a3) { OUTC('A'); OUTS(a3, a4); }
else if (b3) { OUTC('B'); OUTS(b3, b4); }
if (a5) { OUTC('A'); OUTS(a5, a6); }
else if (b5) { OUTC('B'); OUTS(b5, b6); }
if (a7) { OUTC('A'); OUTS(a7, a8); }
else if (b7) { OUTC('B'); OUTS(b7, b8); }
OUTC('\n');
}
#line 476 "gen/ragel/submatch_16__alt4_2.cc"
goto _st9;
_ctr24:
{
#line 21 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b1 = p; }
#line 483 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 21 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b2 = p; a1 = a2 = NULL; }
#line 488 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 22 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a1 = p; }
#line 493 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 22 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a2 = p; b1 = b2 = NULL; }
#line 498 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 25 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b3 = p; }
#line 503 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 25 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b4 = p; a3 = a4 = NULL; }
#line 508 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 26 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a3 = p; }
#line 513 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 26 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a4 = p; b3 = b4 = NULL; }
#line 518 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 29 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b5 = p; }
#line 523 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 29 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b6 = p; a5 = a6 = NULL; }
#line 528 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 30 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a5 = p; }
#line 533 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 30 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a6 = p; b5 = b6 = NULL; }
#line 538 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 33 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b7 = p; }
#line 543 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 33 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b8 = p; a7 = a8 = NULL; }
#line 548 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 34 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a7 = p; }
#line 553 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 34 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a8 = p; b7 = b8 = NULL; }
#line 558 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 36 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
if (a1) { OUTC('A'); OUTS(a1, a2); }
else if (b1) { OUTC('B'); OUTS(b1, b2); }
if (a3) { OUTC('A'); OUTS(a3, a4); }
else if (b3) { OUTC('B'); OUTS(b3, b4); }
if (a5) { OUTC('A'); OUTS(a5, a6); }
else if (b5) { OUTC('B'); OUTS(b5, b6); }
if (a7) { OUTC('A'); OUTS(a7, a8); }
else if (b7) { OUTC('B'); OUTS(b7, b8); }
OUTC('\n');
}
#line 573 "gen/ragel/submatch_16__alt4_2.cc"
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 22 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a1 = p; }
#line 600 "gen/ragel/submatch_16__alt4_2.cc"
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 22 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a2 = p; b1 = b2 = NULL; }
#line 624 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 25 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b3 = p; }
#line 629 "gen/ragel/submatch_16__alt4_2.cc"
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 25 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b4 = p; a3 = a4 = NULL; }
#line 653 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 30 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a5 = p; }
#line 658 "gen/ragel/submatch_16__alt4_2.cc"
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 30 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a6 = p; b5 = b6 = NULL; }
#line 682 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 33 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b7 = p; }
#line 687 "gen/ragel/submatch_16__alt4_2.cc"
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 21 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b1 = p; }
#line 708 "gen/ragel/submatch_16__alt4_2.cc"
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 21 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b2 = p; a1 = a2 = NULL; }
#line 732 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 26 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a3 = p; }
#line 737 "gen/ragel/submatch_16__alt4_2.cc"
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 26 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a4 = p; b3 = b4 = NULL; }
#line 761 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 29 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b5 = p; }
#line 766 "gen/ragel/submatch_16__alt4_2.cc"
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 29 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
b6 = p; a5 = a6 = NULL; }
#line 790 "gen/ragel/submatch_16__alt4_2.cc"
{
#line 34 "../../../benchmarks/c/src/ragel/submatch_16__alt4_2.rl"
a7 = p; }
#line 795 "gen/ragel/submatch_16__alt4_2.cc"
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;
return count;
}
RAGEL_BENCH_AND_TEST()
} // namespace ragel_submatch_16__alt4_2
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -1,387 +0,0 @@
#line 1 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
#include "ragel/base.h"
namespace ragel_submatch_20__cat2_0 {
const char *delim = "\n";
#line 19 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
#line 11 "gen/ragel/submatch_20__cat2_0.cc"
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 21 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
static int lex(Input *in, int count) {
char *p = in->p;
char *pe = in->pe;
const char
*a0, *a1,
*b0, *b1;
int cs;
#line 28 "gen/ragel/submatch_20__cat2_0.cc"
{
cs = (int)abcd_start;
}
#line 31 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
#line 33 "gen/ragel/submatch_20__cat2_0.cc"
{
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 11 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
b0 = p; }
#line 53 "gen/ragel/submatch_20__cat2_0.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
a1 = p; }
#line 58 "gen/ragel/submatch_20__cat2_0.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
b1 = p; }
#line 63 "gen/ragel/submatch_20__cat2_0.cc"
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
OUTS(a0, b0); OUTC('.'); OUTS(b0, a1); OUTC('.');
OUTS(a1, b1); OUTC('.'); OUTS(b1, p + 1);
}
#line 71 "gen/ragel/submatch_20__cat2_0.cc"
goto _st5;
_ctr6:
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
a1 = p; }
#line 78 "gen/ragel/submatch_20__cat2_0.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
b1 = p; }
#line 83 "gen/ragel/submatch_20__cat2_0.cc"
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
OUTS(a0, b0); OUTC('.'); OUTS(b0, a1); OUTC('.');
OUTS(a1, b1); OUTC('.'); OUTS(b1, p + 1);
}
#line 91 "gen/ragel/submatch_20__cat2_0.cc"
goto _st5;
_ctr10:
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
b1 = p; }
#line 98 "gen/ragel/submatch_20__cat2_0.cc"
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
OUTS(a0, b0); OUTC('.'); OUTS(b0, a1); OUTC('.');
OUTS(a1, b1); OUTC('.'); OUTS(b1, p + 1);
}
#line 106 "gen/ragel/submatch_20__cat2_0.cc"
goto _st5;
_ctr13:
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
OUTS(a0, b0); OUTC('.'); OUTS(b0, a1); OUTC('.');
OUTS(a1, b1); OUTC('.'); OUTS(b1, p + 1);
}
#line 116 "gen/ragel/submatch_20__cat2_0.cc"
goto _st5;
_ctr15:
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
a0 = p; }
#line 123 "gen/ragel/submatch_20__cat2_0.cc"
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
b0 = p; }
#line 128 "gen/ragel/submatch_20__cat2_0.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
a1 = p; }
#line 133 "gen/ragel/submatch_20__cat2_0.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
b1 = p; }
#line 138 "gen/ragel/submatch_20__cat2_0.cc"
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
OUTS(a0, b0); OUTC('.'); OUTS(b0, a1); OUTC('.');
OUTS(a1, b1); OUTC('.'); OUTS(b1, p + 1);
}
#line 146 "gen/ragel/submatch_20__cat2_0.cc"
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 11 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
b0 = p; }
#line 173 "gen/ragel/submatch_20__cat2_0.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
a1 = p; }
#line 178 "gen/ragel/submatch_20__cat2_0.cc"
goto _st1;
_ctr16:
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
a0 = p; }
#line 185 "gen/ragel/submatch_20__cat2_0.cc"
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
b0 = p; }
#line 190 "gen/ragel/submatch_20__cat2_0.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
a1 = p; }
#line 195 "gen/ragel/submatch_20__cat2_0.cc"
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 11 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
b0 = p; }
#line 219 "gen/ragel/submatch_20__cat2_0.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
a1 = p; }
#line 224 "gen/ragel/submatch_20__cat2_0.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
b1 = p; }
#line 229 "gen/ragel/submatch_20__cat2_0.cc"
goto _st2;
_ctr8:
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
a1 = p; }
#line 236 "gen/ragel/submatch_20__cat2_0.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
b1 = p; }
#line 241 "gen/ragel/submatch_20__cat2_0.cc"
goto _st2;
_ctr17:
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
a0 = p; }
#line 248 "gen/ragel/submatch_20__cat2_0.cc"
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
b0 = p; }
#line 253 "gen/ragel/submatch_20__cat2_0.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
a1 = p; }
#line 258 "gen/ragel/submatch_20__cat2_0.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
b1 = p; }
#line 263 "gen/ragel/submatch_20__cat2_0.cc"
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 12 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
a1 = p; }
#line 287 "gen/ragel/submatch_20__cat2_0.cc"
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 12 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
b1 = p; }
#line 311 "gen/ragel/submatch_20__cat2_0.cc"
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 32 "../../../benchmarks/c/src/ragel/submatch_20__cat2_0.rl"
in->p = p;
in->pe = pe;
return count;
}
RAGEL_BENCH_AND_TEST()
} // namespace ragel_submatch_20__cat2_0
@@ -1,478 +0,0 @@
#line 1 "../../../benchmarks/c/src/ragel/submatch_21__cat2_4.rl"
#include "ragel/base.h"
namespace ragel_submatch_21__cat2_4 {
const char *delim = "\n";
#line 19 "../../../benchmarks/c/src/ragel/submatch_21__cat2_4.rl"
#line 11 "gen/ragel/submatch_21__cat2_4.cc"
static const int abcd_start = 16;
static const int abcd_first_final = 16;
static const int abcd_error = 0;
static const int abcd_en_main = 16;
#line 21 "../../../benchmarks/c/src/ragel/submatch_21__cat2_4.rl"
static int lex(Input *in, int count) {
char *p = in->p;
char *pe = in->pe;
const char
*a0, *a1,
*b0, *b1;
int cs;
#line 28 "gen/ragel/submatch_21__cat2_4.cc"
{
cs = (int)abcd_start;
}
#line 31 "../../../benchmarks/c/src/ragel/submatch_21__cat2_4.rl"
#line 33 "gen/ragel/submatch_21__cat2_4.cc"
{
switch ( cs ) {
case 16:
goto st_case_16;
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;
case 9:
goto st_case_9;
case 10:
goto st_case_10;
case 11:
goto st_case_11;
case 12:
goto st_case_12;
case 13:
goto st_case_13;
case 14:
goto st_case_14;
case 15:
goto st_case_15;
}
_ctr17:
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_21__cat2_4.rl"
OUTS(a0, b0); OUTC('.'); OUTS(b0, a1); OUTC('.');
OUTS(a1, b1); OUTC('.'); OUTS(b1, p + 1);
}
#line 78 "gen/ragel/submatch_21__cat2_4.cc"
goto _st16;
_st16:
p+= 1;
st_case_16:
if ( p == pe )
goto _out16;
if ( ( (*( p))) == 97 ) {
goto _ctr29;
}
goto _st0;
_st0:
st_case_0:
goto _out0;
_ctr29:
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_21__cat2_4.rl"
a0 = p; }
#line 97 "gen/ragel/submatch_21__cat2_4.cc"
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_21__cat2_4.rl"
b0 = p; }
#line 102 "gen/ragel/submatch_21__cat2_4.cc"
goto _st1;
_st1:
p+= 1;
st_case_1:
if ( p == pe )
goto _out1;
if ( ( (*( p))) == 97 ) {
goto _ctr2;
}
goto _st0;
_ctr2:
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_21__cat2_4.rl"
b0 = p; }
#line 118 "gen/ragel/submatch_21__cat2_4.cc"
goto _st2;
_st2:
p+= 1;
st_case_2:
if ( p == pe )
goto _out2;
if ( ( (*( p))) == 97 ) {
goto _ctr4;
}
goto _st0;
_ctr4:
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_21__cat2_4.rl"
b0 = p; }
#line 134 "gen/ragel/submatch_21__cat2_4.cc"
goto _st3;
_st3:
p+= 1;
st_case_3:
if ( p == pe )
goto _out3;
if ( ( (*( p))) == 97 ) {
goto _ctr6;
}
goto _st0;
_ctr6:
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_21__cat2_4.rl"
b0 = p; }
#line 150 "gen/ragel/submatch_21__cat2_4.cc"
goto _st4;
_st4:
p+= 1;
st_case_4:
if ( p == pe )
goto _out4;
switch( ( (*( p))) ) {
case 97: {
goto _ctr8;
}
case 98: {
goto _st15;
}
}
goto _st0;
_ctr8:
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_21__cat2_4.rl"
b0 = p; }
#line 171 "gen/ragel/submatch_21__cat2_4.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_21__cat2_4.rl"
a1 = p; }
#line 176 "gen/ragel/submatch_21__cat2_4.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_21__cat2_4.rl"
b1 = p; }
#line 181 "gen/ragel/submatch_21__cat2_4.cc"
goto _st5;
_st5:
p+= 1;
st_case_5:
if ( p == pe )
goto _out5;
switch( ( (*( p))) ) {
case 97: {
goto _ctr11;
}
case 98: {
goto _st15;
}
}
goto _st0;
_ctr11:
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_21__cat2_4.rl"
b0 = p; }
#line 202 "gen/ragel/submatch_21__cat2_4.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_21__cat2_4.rl"
a1 = p; }
#line 207 "gen/ragel/submatch_21__cat2_4.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_21__cat2_4.rl"
b1 = p; }
#line 212 "gen/ragel/submatch_21__cat2_4.cc"
goto _st6;
_st6:
p+= 1;
st_case_6:
if ( p == pe )
goto _out6;
switch( ( (*( p))) ) {
case 97: {
goto _ctr13;
}
case 98: {
goto _st15;
}
}
goto _st0;
_ctr13:
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_21__cat2_4.rl"
b0 = p; }
#line 233 "gen/ragel/submatch_21__cat2_4.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_21__cat2_4.rl"
a1 = p; }
#line 238 "gen/ragel/submatch_21__cat2_4.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_21__cat2_4.rl"
b1 = p; }
#line 243 "gen/ragel/submatch_21__cat2_4.cc"
goto _st7;
_st7:
p+= 1;
st_case_7:
if ( p == pe )
goto _out7;
switch( ( (*( p))) ) {
case 97: {
goto _ctr15;
}
case 98: {
goto _st15;
}
}
goto _st0;
_ctr15:
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_21__cat2_4.rl"
b0 = p; }
#line 264 "gen/ragel/submatch_21__cat2_4.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_21__cat2_4.rl"
a1 = p; }
#line 269 "gen/ragel/submatch_21__cat2_4.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_21__cat2_4.rl"
b1 = p; }
#line 274 "gen/ragel/submatch_21__cat2_4.cc"
goto _st8;
_st8:
p+= 1;
st_case_8:
if ( p == pe )
goto _out8;
switch( ( (*( p))) ) {
case 10: {
goto _ctr17;
}
case 97: {
goto _ctr15;
}
case 98: {
goto _st9;
}
}
goto _st0;
_st9:
p+= 1;
st_case_9:
if ( p == pe )
goto _out9;
switch( ( (*( p))) ) {
case 10: {
goto _ctr17;
}
case 97: {
goto _ctr19;
}
case 98: {
goto _st9;
}
}
goto _st0;
_ctr19:
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_21__cat2_4.rl"
a1 = p; }
#line 315 "gen/ragel/submatch_21__cat2_4.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_21__cat2_4.rl"
b1 = p; }
#line 320 "gen/ragel/submatch_21__cat2_4.cc"
goto _st10;
_st10:
p+= 1;
st_case_10:
if ( p == pe )
goto _out10;
if ( ( (*( p))) == 97 ) {
goto _ctr21;
}
goto _st0;
_ctr21:
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_21__cat2_4.rl"
b1 = p; }
#line 336 "gen/ragel/submatch_21__cat2_4.cc"
goto _st11;
_st11:
p+= 1;
st_case_11:
if ( p == pe )
goto _out11;
if ( ( (*( p))) == 97 ) {
goto _ctr23;
}
goto _st0;
_ctr23:
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_21__cat2_4.rl"
b1 = p; }
#line 352 "gen/ragel/submatch_21__cat2_4.cc"
goto _st12;
_st12:
p+= 1;
st_case_12:
if ( p == pe )
goto _out12;
if ( ( (*( p))) == 97 ) {
goto _ctr25;
}
goto _st0;
_ctr25:
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_21__cat2_4.rl"
b1 = p; }
#line 368 "gen/ragel/submatch_21__cat2_4.cc"
goto _st13;
_st13:
p+= 1;
st_case_13:
if ( p == pe )
goto _out13;
switch( ( (*( p))) ) {
case 10: {
goto _ctr17;
}
case 97: {
goto _ctr25;
}
case 98: {
goto _st14;
}
}
goto _st0;
_st14:
p+= 1;
st_case_14:
if ( p == pe )
goto _out14;
switch( ( (*( p))) ) {
case 10: {
goto _ctr17;
}
case 98: {
goto _st14;
}
}
goto _st0;
_st15:
p+= 1;
st_case_15:
if ( p == pe )
goto _out15;
switch( ( (*( p))) ) {
case 97: {
goto _ctr19;
}
case 98: {
goto _st15;
}
}
goto _st0;
_out16: cs = 16; 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;
_out9: cs = 9; goto _out;
_out10: cs = 10; goto _out;
_out11: cs = 11; goto _out;
_out12: cs = 12; goto _out;
_out13: cs = 13; goto _out;
_out14: cs = 14; goto _out;
_out15: cs = 15; goto _out;
_out: {}
}
#line 32 "../../../benchmarks/c/src/ragel/submatch_21__cat2_4.rl"
in->p = p;
in->pe = pe;
return count;
}
RAGEL_BENCH_AND_TEST()
} // namespace ragel_submatch_21__cat2_4
@@ -1,786 +0,0 @@
#line 1 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
#include "ragel/base.h"
namespace ragel_submatch_22__cat2_8 {
const char *delim = "\n";
#line 19 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
#line 11 "gen/ragel/submatch_22__cat2_8.cc"
static const int abcd_start = 28;
static const int abcd_first_final = 28;
static const int abcd_error = 0;
static const int abcd_en_main = 28;
#line 21 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
static int lex(Input *in, int count) {
char *p = in->p;
char *pe = in->pe;
const char
*a0, *a1,
*b0, *b1;
int cs;
#line 28 "gen/ragel/submatch_22__cat2_8.cc"
{
cs = (int)abcd_start;
}
#line 31 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
#line 33 "gen/ragel/submatch_22__cat2_8.cc"
{
switch ( cs ) {
case 28:
goto st_case_28;
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;
case 9:
goto st_case_9;
case 10:
goto st_case_10;
case 11:
goto st_case_11;
case 12:
goto st_case_12;
case 13:
goto st_case_13;
case 14:
goto st_case_14;
case 15:
goto st_case_15;
case 16:
goto st_case_16;
case 17:
goto st_case_17;
case 18:
goto st_case_18;
case 19:
goto st_case_19;
case 20:
goto st_case_20;
case 21:
goto st_case_21;
case 22:
goto st_case_22;
case 23:
goto st_case_23;
case 24:
goto st_case_24;
case 25:
goto st_case_25;
case 26:
goto st_case_26;
case 27:
goto st_case_27;
}
_ctr33:
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
OUTS(a0, b0); OUTC('.'); OUTS(b0, a1); OUTC('.');
OUTS(a1, b1); OUTC('.'); OUTS(b1, p + 1);
}
#line 102 "gen/ragel/submatch_22__cat2_8.cc"
goto _st28;
_st28:
p+= 1;
st_case_28:
if ( p == pe )
goto _out28;
if ( ( (*( p))) == 97 ) {
goto _ctr53;
}
goto _st0;
_st0:
st_case_0:
goto _out0;
_ctr53:
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
a0 = p; }
#line 121 "gen/ragel/submatch_22__cat2_8.cc"
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
b0 = p; }
#line 126 "gen/ragel/submatch_22__cat2_8.cc"
goto _st1;
_st1:
p+= 1;
st_case_1:
if ( p == pe )
goto _out1;
if ( ( (*( p))) == 97 ) {
goto _ctr2;
}
goto _st0;
_ctr2:
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
b0 = p; }
#line 142 "gen/ragel/submatch_22__cat2_8.cc"
goto _st2;
_st2:
p+= 1;
st_case_2:
if ( p == pe )
goto _out2;
if ( ( (*( p))) == 97 ) {
goto _ctr4;
}
goto _st0;
_ctr4:
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
b0 = p; }
#line 158 "gen/ragel/submatch_22__cat2_8.cc"
goto _st3;
_st3:
p+= 1;
st_case_3:
if ( p == pe )
goto _out3;
if ( ( (*( p))) == 97 ) {
goto _ctr6;
}
goto _st0;
_ctr6:
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
b0 = p; }
#line 174 "gen/ragel/submatch_22__cat2_8.cc"
goto _st4;
_st4:
p+= 1;
st_case_4:
if ( p == pe )
goto _out4;
if ( ( (*( p))) == 97 ) {
goto _ctr8;
}
goto _st0;
_ctr8:
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
b0 = p; }
#line 190 "gen/ragel/submatch_22__cat2_8.cc"
goto _st5;
_st5:
p+= 1;
st_case_5:
if ( p == pe )
goto _out5;
if ( ( (*( p))) == 97 ) {
goto _ctr10;
}
goto _st0;
_ctr10:
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
b0 = p; }
#line 206 "gen/ragel/submatch_22__cat2_8.cc"
goto _st6;
_st6:
p+= 1;
st_case_6:
if ( p == pe )
goto _out6;
if ( ( (*( p))) == 97 ) {
goto _ctr12;
}
goto _st0;
_ctr12:
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
b0 = p; }
#line 222 "gen/ragel/submatch_22__cat2_8.cc"
goto _st7;
_st7:
p+= 1;
st_case_7:
if ( p == pe )
goto _out7;
if ( ( (*( p))) == 97 ) {
goto _ctr14;
}
goto _st0;
_ctr14:
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
b0 = p; }
#line 238 "gen/ragel/submatch_22__cat2_8.cc"
goto _st8;
_st8:
p+= 1;
st_case_8:
if ( p == pe )
goto _out8;
switch( ( (*( p))) ) {
case 97: {
goto _ctr16;
}
case 98: {
goto _st27;
}
}
goto _st0;
_ctr16:
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
b0 = p; }
#line 259 "gen/ragel/submatch_22__cat2_8.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
a1 = p; }
#line 264 "gen/ragel/submatch_22__cat2_8.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
b1 = p; }
#line 269 "gen/ragel/submatch_22__cat2_8.cc"
goto _st9;
_st9:
p+= 1;
st_case_9:
if ( p == pe )
goto _out9;
switch( ( (*( p))) ) {
case 97: {
goto _ctr19;
}
case 98: {
goto _st27;
}
}
goto _st0;
_ctr19:
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
b0 = p; }
#line 290 "gen/ragel/submatch_22__cat2_8.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
a1 = p; }
#line 295 "gen/ragel/submatch_22__cat2_8.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
b1 = p; }
#line 300 "gen/ragel/submatch_22__cat2_8.cc"
goto _st10;
_st10:
p+= 1;
st_case_10:
if ( p == pe )
goto _out10;
switch( ( (*( p))) ) {
case 97: {
goto _ctr21;
}
case 98: {
goto _st27;
}
}
goto _st0;
_ctr21:
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
b0 = p; }
#line 321 "gen/ragel/submatch_22__cat2_8.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
a1 = p; }
#line 326 "gen/ragel/submatch_22__cat2_8.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
b1 = p; }
#line 331 "gen/ragel/submatch_22__cat2_8.cc"
goto _st11;
_st11:
p+= 1;
st_case_11:
if ( p == pe )
goto _out11;
switch( ( (*( p))) ) {
case 97: {
goto _ctr23;
}
case 98: {
goto _st27;
}
}
goto _st0;
_ctr23:
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
b0 = p; }
#line 352 "gen/ragel/submatch_22__cat2_8.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
a1 = p; }
#line 357 "gen/ragel/submatch_22__cat2_8.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
b1 = p; }
#line 362 "gen/ragel/submatch_22__cat2_8.cc"
goto _st12;
_st12:
p+= 1;
st_case_12:
if ( p == pe )
goto _out12;
switch( ( (*( p))) ) {
case 97: {
goto _ctr25;
}
case 98: {
goto _st27;
}
}
goto _st0;
_ctr25:
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
b0 = p; }
#line 383 "gen/ragel/submatch_22__cat2_8.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
a1 = p; }
#line 388 "gen/ragel/submatch_22__cat2_8.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
b1 = p; }
#line 393 "gen/ragel/submatch_22__cat2_8.cc"
goto _st13;
_st13:
p+= 1;
st_case_13:
if ( p == pe )
goto _out13;
switch( ( (*( p))) ) {
case 97: {
goto _ctr27;
}
case 98: {
goto _st27;
}
}
goto _st0;
_ctr27:
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
b0 = p; }
#line 414 "gen/ragel/submatch_22__cat2_8.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
a1 = p; }
#line 419 "gen/ragel/submatch_22__cat2_8.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
b1 = p; }
#line 424 "gen/ragel/submatch_22__cat2_8.cc"
goto _st14;
_st14:
p+= 1;
st_case_14:
if ( p == pe )
goto _out14;
switch( ( (*( p))) ) {
case 97: {
goto _ctr29;
}
case 98: {
goto _st27;
}
}
goto _st0;
_ctr29:
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
b0 = p; }
#line 445 "gen/ragel/submatch_22__cat2_8.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
a1 = p; }
#line 450 "gen/ragel/submatch_22__cat2_8.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
b1 = p; }
#line 455 "gen/ragel/submatch_22__cat2_8.cc"
goto _st15;
_st15:
p+= 1;
st_case_15:
if ( p == pe )
goto _out15;
switch( ( (*( p))) ) {
case 97: {
goto _ctr31;
}
case 98: {
goto _st27;
}
}
goto _st0;
_ctr31:
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
b0 = p; }
#line 476 "gen/ragel/submatch_22__cat2_8.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
a1 = p; }
#line 481 "gen/ragel/submatch_22__cat2_8.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
b1 = p; }
#line 486 "gen/ragel/submatch_22__cat2_8.cc"
goto _st16;
_st16:
p+= 1;
st_case_16:
if ( p == pe )
goto _out16;
switch( ( (*( p))) ) {
case 10: {
goto _ctr33;
}
case 97: {
goto _ctr31;
}
case 98: {
goto _st17;
}
}
goto _st0;
_st17:
p+= 1;
st_case_17:
if ( p == pe )
goto _out17;
switch( ( (*( p))) ) {
case 10: {
goto _ctr33;
}
case 97: {
goto _ctr35;
}
case 98: {
goto _st17;
}
}
goto _st0;
_ctr35:
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
a1 = p; }
#line 527 "gen/ragel/submatch_22__cat2_8.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
b1 = p; }
#line 532 "gen/ragel/submatch_22__cat2_8.cc"
goto _st18;
_st18:
p+= 1;
st_case_18:
if ( p == pe )
goto _out18;
if ( ( (*( p))) == 97 ) {
goto _ctr37;
}
goto _st0;
_ctr37:
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
b1 = p; }
#line 548 "gen/ragel/submatch_22__cat2_8.cc"
goto _st19;
_st19:
p+= 1;
st_case_19:
if ( p == pe )
goto _out19;
if ( ( (*( p))) == 97 ) {
goto _ctr39;
}
goto _st0;
_ctr39:
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
b1 = p; }
#line 564 "gen/ragel/submatch_22__cat2_8.cc"
goto _st20;
_st20:
p+= 1;
st_case_20:
if ( p == pe )
goto _out20;
if ( ( (*( p))) == 97 ) {
goto _ctr41;
}
goto _st0;
_ctr41:
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
b1 = p; }
#line 580 "gen/ragel/submatch_22__cat2_8.cc"
goto _st21;
_st21:
p+= 1;
st_case_21:
if ( p == pe )
goto _out21;
if ( ( (*( p))) == 97 ) {
goto _ctr43;
}
goto _st0;
_ctr43:
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
b1 = p; }
#line 596 "gen/ragel/submatch_22__cat2_8.cc"
goto _st22;
_st22:
p+= 1;
st_case_22:
if ( p == pe )
goto _out22;
if ( ( (*( p))) == 97 ) {
goto _ctr45;
}
goto _st0;
_ctr45:
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
b1 = p; }
#line 612 "gen/ragel/submatch_22__cat2_8.cc"
goto _st23;
_st23:
p+= 1;
st_case_23:
if ( p == pe )
goto _out23;
if ( ( (*( p))) == 97 ) {
goto _ctr47;
}
goto _st0;
_ctr47:
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
b1 = p; }
#line 628 "gen/ragel/submatch_22__cat2_8.cc"
goto _st24;
_st24:
p+= 1;
st_case_24:
if ( p == pe )
goto _out24;
if ( ( (*( p))) == 97 ) {
goto _ctr49;
}
goto _st0;
_ctr49:
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
b1 = p; }
#line 644 "gen/ragel/submatch_22__cat2_8.cc"
goto _st25;
_st25:
p+= 1;
st_case_25:
if ( p == pe )
goto _out25;
switch( ( (*( p))) ) {
case 10: {
goto _ctr33;
}
case 97: {
goto _ctr49;
}
case 98: {
goto _st26;
}
}
goto _st0;
_st26:
p+= 1;
st_case_26:
if ( p == pe )
goto _out26;
switch( ( (*( p))) ) {
case 10: {
goto _ctr33;
}
case 98: {
goto _st26;
}
}
goto _st0;
_st27:
p+= 1;
st_case_27:
if ( p == pe )
goto _out27;
switch( ( (*( p))) ) {
case 97: {
goto _ctr35;
}
case 98: {
goto _st27;
}
}
goto _st0;
_out28: cs = 28; 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;
_out9: cs = 9; goto _out;
_out10: cs = 10; goto _out;
_out11: cs = 11; goto _out;
_out12: cs = 12; goto _out;
_out13: cs = 13; goto _out;
_out14: cs = 14; goto _out;
_out15: cs = 15; goto _out;
_out16: cs = 16; goto _out;
_out17: cs = 17; goto _out;
_out18: cs = 18; goto _out;
_out19: cs = 19; goto _out;
_out20: cs = 20; goto _out;
_out21: cs = 21; goto _out;
_out22: cs = 22; goto _out;
_out23: cs = 23; goto _out;
_out24: cs = 24; goto _out;
_out25: cs = 25; goto _out;
_out26: cs = 26; goto _out;
_out27: cs = 27; goto _out;
_out: {}
}
#line 32 "../../../benchmarks/c/src/ragel/submatch_22__cat2_8.rl"
in->p = p;
in->pe = pe;
return count;
}
RAGEL_BENCH_AND_TEST()
} // namespace ragel_submatch_22__cat2_8
@@ -1,989 +0,0 @@
#line 1 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
#include "ragel/base.h"
namespace ragel_submatch_23__cat4_0 {
const char *delim = "\n";
#line 23 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
#line 11 "gen/ragel/submatch_23__cat4_0.cc"
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 25 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
static int lex(Input *in, int count) {
char *p = in->p;
char *pe = in->pe;
const char
*a0, *a1, *a2, *a3,
*b0, *b1, *b2, *b3;
int cs;
#line 28 "gen/ragel/submatch_23__cat4_0.cc"
{
cs = (int)abcd_start;
}
#line 35 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
#line 33 "gen/ragel/submatch_23__cat4_0.cc"
{
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 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b0 = p; }
#line 61 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a1 = p; }
#line 66 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b1 = p; }
#line 71 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a2 = p; }
#line 76 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b2 = p; }
#line 81 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a3 = p; }
#line 86 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b3 = p; }
#line 91 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 15 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
OUTS(a0, b0); OUTC('.'); OUTS(b0, a1); OUTC('.');
OUTS(a1, b1); OUTC('.'); OUTS(b1, a2); OUTC('.');
OUTS(a2, b2); OUTC('.'); OUTS(b2, a3); OUTC('.');
OUTS(a3, b3); OUTC('.'); OUTS(b3, p + 1);
}
#line 101 "gen/ragel/submatch_23__cat4_0.cc"
goto _st9;
_ctr6:
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a1 = p; }
#line 108 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b1 = p; }
#line 113 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a2 = p; }
#line 118 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b2 = p; }
#line 123 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a3 = p; }
#line 128 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b3 = p; }
#line 133 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 15 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
OUTS(a0, b0); OUTC('.'); OUTS(b0, a1); OUTC('.');
OUTS(a1, b1); OUTC('.'); OUTS(b1, a2); OUTC('.');
OUTS(a2, b2); OUTC('.'); OUTS(b2, a3); OUTC('.');
OUTS(a3, b3); OUTC('.'); OUTS(b3, p + 1);
}
#line 143 "gen/ragel/submatch_23__cat4_0.cc"
goto _st9;
_ctr10:
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b1 = p; }
#line 150 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a2 = p; }
#line 155 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b2 = p; }
#line 160 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a3 = p; }
#line 165 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b3 = p; }
#line 170 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 15 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
OUTS(a0, b0); OUTC('.'); OUTS(b0, a1); OUTC('.');
OUTS(a1, b1); OUTC('.'); OUTS(b1, a2); OUTC('.');
OUTS(a2, b2); OUTC('.'); OUTS(b2, a3); OUTC('.');
OUTS(a3, b3); OUTC('.'); OUTS(b3, p + 1);
}
#line 180 "gen/ragel/submatch_23__cat4_0.cc"
goto _st9;
_ctr14:
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a2 = p; }
#line 187 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b2 = p; }
#line 192 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a3 = p; }
#line 197 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b3 = p; }
#line 202 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 15 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
OUTS(a0, b0); OUTC('.'); OUTS(b0, a1); OUTC('.');
OUTS(a1, b1); OUTC('.'); OUTS(b1, a2); OUTC('.');
OUTS(a2, b2); OUTC('.'); OUTS(b2, a3); OUTC('.');
OUTS(a3, b3); OUTC('.'); OUTS(b3, p + 1);
}
#line 212 "gen/ragel/submatch_23__cat4_0.cc"
goto _st9;
_ctr18:
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b2 = p; }
#line 219 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a3 = p; }
#line 224 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b3 = p; }
#line 229 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 15 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
OUTS(a0, b0); OUTC('.'); OUTS(b0, a1); OUTC('.');
OUTS(a1, b1); OUTC('.'); OUTS(b1, a2); OUTC('.');
OUTS(a2, b2); OUTC('.'); OUTS(b2, a3); OUTC('.');
OUTS(a3, b3); OUTC('.'); OUTS(b3, p + 1);
}
#line 239 "gen/ragel/submatch_23__cat4_0.cc"
goto _st9;
_ctr22:
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a3 = p; }
#line 246 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b3 = p; }
#line 251 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 15 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
OUTS(a0, b0); OUTC('.'); OUTS(b0, a1); OUTC('.');
OUTS(a1, b1); OUTC('.'); OUTS(b1, a2); OUTC('.');
OUTS(a2, b2); OUTC('.'); OUTS(b2, a3); OUTC('.');
OUTS(a3, b3); OUTC('.'); OUTS(b3, p + 1);
}
#line 261 "gen/ragel/submatch_23__cat4_0.cc"
goto _st9;
_ctr26:
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b3 = p; }
#line 268 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 15 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
OUTS(a0, b0); OUTC('.'); OUTS(b0, a1); OUTC('.');
OUTS(a1, b1); OUTC('.'); OUTS(b1, a2); OUTC('.');
OUTS(a2, b2); OUTC('.'); OUTS(b2, a3); OUTC('.');
OUTS(a3, b3); OUTC('.'); OUTS(b3, p + 1);
}
#line 278 "gen/ragel/submatch_23__cat4_0.cc"
goto _st9;
_ctr29:
{
#line 15 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
OUTS(a0, b0); OUTC('.'); OUTS(b0, a1); OUTC('.');
OUTS(a1, b1); OUTC('.'); OUTS(b1, a2); OUTC('.');
OUTS(a2, b2); OUTC('.'); OUTS(b2, a3); OUTC('.');
OUTS(a3, b3); OUTC('.'); OUTS(b3, p + 1);
}
#line 290 "gen/ragel/submatch_23__cat4_0.cc"
goto _st9;
_ctr31:
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a0 = p; }
#line 297 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b0 = p; }
#line 302 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a1 = p; }
#line 307 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b1 = p; }
#line 312 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a2 = p; }
#line 317 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b2 = p; }
#line 322 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a3 = p; }
#line 327 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b3 = p; }
#line 332 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 15 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
OUTS(a0, b0); OUTC('.'); OUTS(b0, a1); OUTC('.');
OUTS(a1, b1); OUTC('.'); OUTS(b1, a2); OUTC('.');
OUTS(a2, b2); OUTC('.'); OUTS(b2, a3); OUTC('.');
OUTS(a3, b3); OUTC('.'); OUTS(b3, p + 1);
}
#line 342 "gen/ragel/submatch_23__cat4_0.cc"
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 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b0 = p; }
#line 369 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a1 = p; }
#line 374 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b1 = p; }
#line 379 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a2 = p; }
#line 384 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b2 = p; }
#line 389 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a3 = p; }
#line 394 "gen/ragel/submatch_23__cat4_0.cc"
goto _st1;
_ctr32:
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a0 = p; }
#line 401 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b0 = p; }
#line 406 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a1 = p; }
#line 411 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b1 = p; }
#line 416 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a2 = p; }
#line 421 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b2 = p; }
#line 426 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a3 = p; }
#line 431 "gen/ragel/submatch_23__cat4_0.cc"
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 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b0 = p; }
#line 455 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a1 = p; }
#line 460 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b1 = p; }
#line 465 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a2 = p; }
#line 470 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b2 = p; }
#line 475 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a3 = p; }
#line 480 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b3 = p; }
#line 485 "gen/ragel/submatch_23__cat4_0.cc"
goto _st2;
_ctr8:
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a1 = p; }
#line 492 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b1 = p; }
#line 497 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a2 = p; }
#line 502 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b2 = p; }
#line 507 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a3 = p; }
#line 512 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b3 = p; }
#line 517 "gen/ragel/submatch_23__cat4_0.cc"
goto _st2;
_ctr33:
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a0 = p; }
#line 524 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b0 = p; }
#line 529 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a1 = p; }
#line 534 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b1 = p; }
#line 539 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a2 = p; }
#line 544 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b2 = p; }
#line 549 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a3 = p; }
#line 554 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b3 = p; }
#line 559 "gen/ragel/submatch_23__cat4_0.cc"
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 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a1 = p; }
#line 583 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b1 = p; }
#line 588 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a2 = p; }
#line 593 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b2 = p; }
#line 598 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a3 = p; }
#line 603 "gen/ragel/submatch_23__cat4_0.cc"
goto _st3;
_ctr11:
{
#line 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b1 = p; }
#line 610 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a2 = p; }
#line 615 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b2 = p; }
#line 620 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a3 = p; }
#line 625 "gen/ragel/submatch_23__cat4_0.cc"
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 12 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b1 = p; }
#line 649 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a2 = p; }
#line 654 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b2 = p; }
#line 659 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a3 = p; }
#line 664 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b3 = p; }
#line 669 "gen/ragel/submatch_23__cat4_0.cc"
goto _st4;
_ctr16:
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a2 = p; }
#line 676 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b2 = p; }
#line 681 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a3 = p; }
#line 686 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b3 = p; }
#line 691 "gen/ragel/submatch_23__cat4_0.cc"
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 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a2 = p; }
#line 715 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b2 = p; }
#line 720 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a3 = p; }
#line 725 "gen/ragel/submatch_23__cat4_0.cc"
goto _st5;
_ctr19:
{
#line 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b2 = p; }
#line 732 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a3 = p; }
#line 737 "gen/ragel/submatch_23__cat4_0.cc"
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 13 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b2 = p; }
#line 761 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a3 = p; }
#line 766 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b3 = p; }
#line 771 "gen/ragel/submatch_23__cat4_0.cc"
goto _st6;
_ctr24:
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a3 = p; }
#line 778 "gen/ragel/submatch_23__cat4_0.cc"
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b3 = p; }
#line 783 "gen/ragel/submatch_23__cat4_0.cc"
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 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
a3 = p; }
#line 807 "gen/ragel/submatch_23__cat4_0.cc"
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 14 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
b3 = p; }
#line 831 "gen/ragel/submatch_23__cat4_0.cc"
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 36 "../../../benchmarks/c/src/ragel/submatch_23__cat4_0.rl"
in->p = p;
in->pe = pe;
return count;
}
RAGEL_BENCH_AND_TEST()
} // namespace ragel_submatch_23__cat4_0
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,267 +0,0 @@
#line 1 "../../../benchmarks/c/src/ragel/submatch_30__rep_cat_5_3_2.rl"
#include "ragel/base.h"
namespace ragel_submatch_30__rep_cat_5_3_2 {
const char *delim = "\n";
#line 30 "../../../benchmarks/c/src/ragel/submatch_30__rep_cat_5_3_2.rl"
#line 11 "gen/ragel/submatch_30__rep_cat_5_3_2.cc"
static const int aaa_start = 11;
static const int aaa_first_final = 11;
static const int aaa_error = 0;
static const int aaa_en_main = 11;
#line 32 "../../../benchmarks/c/src/ragel/submatch_30__rep_cat_5_3_2.rl"
static int lex(Input *in, int count) {
char *p = in->p;
char *pe = in->pe;
const char *s = p;
int cs;
#line 26 "gen/ragel/submatch_30__rep_cat_5_3_2.cc"
{
cs = (int)aaa_start;
}
#line 40 "../../../benchmarks/c/src/ragel/submatch_30__rep_cat_5_3_2.rl"
#line 31 "gen/ragel/submatch_30__rep_cat_5_3_2.cc"
{
switch ( cs ) {
case 11:
goto st_case_11;
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;
case 9:
goto st_case_9;
case 10:
goto st_case_10;
}
_ctr13:
{
#line 21 "../../../benchmarks/c/src/ragel/submatch_30__rep_cat_5_3_2.rl"
OUTS(s, p);
OUTC(';');
s = p;
}
#line 67 "gen/ragel/submatch_30__rep_cat_5_3_2.cc"
{
#line 27 "../../../benchmarks/c/src/ragel/submatch_30__rep_cat_5_3_2.rl"
OUTC('\n'); }
#line 72 "gen/ragel/submatch_30__rep_cat_5_3_2.cc"
goto _st11;
_ctr16:
{
#line 27 "../../../benchmarks/c/src/ragel/submatch_30__rep_cat_5_3_2.rl"
OUTC('\n'); }
#line 79 "gen/ragel/submatch_30__rep_cat_5_3_2.cc"
goto _st11;
_st11:
p+= 1;
st_case_11:
if ( p == pe )
goto _out11;
switch( ( (*( p))) ) {
case 10: {
goto _ctr16;
}
case 97: {
goto _st1;
}
}
goto _st0;
_st0:
st_case_0:
goto _out0;
_ctr14:
{
#line 21 "../../../benchmarks/c/src/ragel/submatch_30__rep_cat_5_3_2.rl"
OUTS(s, p);
OUTC(';');
s = p;
}
#line 107 "gen/ragel/submatch_30__rep_cat_5_3_2.cc"
goto _st1;
_st1:
p+= 1;
st_case_1:
if ( p == pe )
goto _out1;
if ( ( (*( p))) == 97 ) {
goto _st2;
}
goto _st0;
_st2:
p+= 1;
st_case_2:
if ( p == pe )
goto _out2;
if ( ( (*( p))) == 97 ) {
goto _st3;
}
goto _st0;
_st3:
p+= 1;
st_case_3:
if ( p == pe )
goto _out3;
if ( ( (*( p))) == 97 ) {
goto _st4;
}
goto _st0;
_st4:
p+= 1;
st_case_4:
if ( p == pe )
goto _out4;
if ( ( (*( p))) == 97 ) {
goto _st5;
}
goto _st0;
_st5:
p+= 1;
st_case_5:
if ( p == pe )
goto _out5;
if ( ( (*( p))) == 97 ) {
goto _ctr6;
}
goto _st0;
_ctr6:
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_30__rep_cat_5_3_2.rl"
OUTS(s, p);
OUTC('.');
s = p;
}
#line 163 "gen/ragel/submatch_30__rep_cat_5_3_2.cc"
goto _st6;
_st6:
p+= 1;
st_case_6:
if ( p == pe )
goto _out6;
if ( ( (*( p))) == 97 ) {
goto _st7;
}
goto _st0;
_st7:
p+= 1;
st_case_7:
if ( p == pe )
goto _out7;
if ( ( (*( p))) == 97 ) {
goto _st8;
}
goto _st0;
_st8:
p+= 1;
st_case_8:
if ( p == pe )
goto _out8;
if ( ( (*( p))) == 97 ) {
goto _ctr10;
}
goto _st0;
_ctr10:
{
#line 16 "../../../benchmarks/c/src/ragel/submatch_30__rep_cat_5_3_2.rl"
OUTS(s, p);
OUTC('.');
s = p;
}
#line 201 "gen/ragel/submatch_30__rep_cat_5_3_2.cc"
goto _st9;
_st9:
p+= 1;
st_case_9:
if ( p == pe )
goto _out9;
if ( ( (*( p))) == 97 ) {
goto _st10;
}
goto _st0;
_st10:
p+= 1;
st_case_10:
if ( p == pe )
goto _out10;
switch( ( (*( p))) ) {
case 10: {
goto _ctr13;
}
case 97: {
goto _ctr14;
}
}
goto _st0;
_out11: cs = 11; 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;
_out9: cs = 9; goto _out;
_out10: cs = 10; goto _out;
_out: {}
}
#line 41 "../../../benchmarks/c/src/ragel/submatch_30__rep_cat_5_3_2.rl"
in->p = p;
in->pe = pe;
return count;
}
RAGEL_BENCH_AND_TEST()
} // namespace ragel_submatch_30__rep_cat_5_3_2
@@ -1,519 +0,0 @@
#line 1 "../../../benchmarks/c/src/ragel/submatch_31__rep_cat_13_11_7.rl"
#include "ragel/base.h"
namespace ragel_submatch_31__rep_cat_13_11_7 {
const char *delim = "\n";
#line 30 "../../../benchmarks/c/src/ragel/submatch_31__rep_cat_13_11_7.rl"
#line 11 "gen/ragel/submatch_31__rep_cat_13_11_7.cc"
static const int aaa_start = 32;
static const int aaa_first_final = 32;
static const int aaa_error = 0;
static const int aaa_en_main = 32;
#line 32 "../../../benchmarks/c/src/ragel/submatch_31__rep_cat_13_11_7.rl"
static int lex(Input *in, int count) {
char *p = in->p;
char *pe = in->pe;
const char *s = p;
int cs;
#line 26 "gen/ragel/submatch_31__rep_cat_13_11_7.cc"
{
cs = (int)aaa_start;
}
#line 40 "../../../benchmarks/c/src/ragel/submatch_31__rep_cat_13_11_7.rl"
#line 31 "gen/ragel/submatch_31__rep_cat_13_11_7.cc"
{
switch ( cs ) {
case 32:
goto st_case_32;
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;
case 9:
goto st_case_9;
case 10:
goto st_case_10;
case 11:
goto st_case_11;
case 12:
goto st_case_12;
case 13:
goto st_case_13;
case 14:
goto st_case_14;
case 15:
goto st_case_15;
case 16:
goto st_case_16;
case 17:
goto st_case_17;
case 18:
goto st_case_18;
case 19:
goto st_case_19;
case 20:
goto st_case_20;
case 21:
goto st_case_21;
case 22:
goto st_case_22;
case 23:
goto st_case_23;
case 24:
goto st_case_24;
case 25:
goto st_case_25;
case 26:
goto st_case_26;
case 27:
goto st_case_27;
case 28:
goto st_case_28;
case 29:
goto st_case_29;
case 30:
goto st_case_30;
case 31:
goto st_case_31;
}
_ctr34:
{
#line 21 "../../../benchmarks/c/src/ragel/submatch_31__rep_cat_13_11_7.rl"
OUTS(s, p);
OUTC(';');
s = p;
}
#line 109 "gen/ragel/submatch_31__rep_cat_13_11_7.cc"
{
#line 27 "../../../benchmarks/c/src/ragel/submatch_31__rep_cat_13_11_7.rl"
OUTC('\n'); }
#line 114 "gen/ragel/submatch_31__rep_cat_13_11_7.cc"
goto _st32;
_ctr37:
{
#line 27 "../../../benchmarks/c/src/ragel/submatch_31__rep_cat_13_11_7.rl"
OUTC('\n'); }
#line 121 "gen/ragel/submatch_31__rep_cat_13_11_7.cc"
goto _st32;
_st32:
p+= 1;
st_case_32:
if ( p == pe )
goto _out32;
switch( ( (*( p))) ) {
case 10: {
goto _ctr37;
}
case 97: {
goto _st1;
}
}
goto _st0;
_st0:
st_case_0:
goto _out0;
_ctr35:
{
#line 21 "../../../benchmarks/c/src/ragel/submatch_31__rep_cat_13_11_7.rl"
OUTS(s, p);
OUTC(';');
s = p;
}
#line 149 "gen/ragel/submatch_31__rep_cat_13_11_7.cc"
goto _st1;
_st1:
p+= 1;
st_case_1:
if ( p == pe )
goto _out1;
if ( ( (*( p))) == 97 ) {
goto _st2;
}
goto _st0;
_st2:
p+= 1;
st_case_2:
if ( p == pe )
goto _out2;
if ( ( (*( p))) == 97 ) {
goto _st3;
}
goto _st0;
_st3:
p+= 1;
st_case_3:
if ( p == pe )
goto _out3;
if ( ( (*( p))) == 97 ) {
goto _st4;
}
goto _st0;
_st4:
p+= 1;
st_case_4:
if ( p == pe )
goto _out4;
if ( ( (*( p))) == 97 ) {
goto _st5;
}
goto _st0;
_st5:
p+= 1;
st_case_5:
if ( p == pe )
goto _out5;
if ( ( (*( p))) == 97 ) {
goto _st6;
}
goto _st0;
_st6:
p+= 1;
st_case_6:
if ( p == pe )
goto _out6;
if ( ( (*( p))) == 97 ) {
goto _st7;
}
goto _st0;
_st7:
p+= 1;
st_case_7:
if ( p == pe )
goto _out7;
if ( ( (*( p))) == 97 ) {
goto _st8;
}
goto _st0;
_st8:
p+= 1;
st_case_8:
if ( p == pe )
goto _out8;
if ( ( (*( p))) == 97 ) {
goto _st9;
}
goto _st0;
_st9:
p+= 1;
st_case_9:
if ( p == pe )
goto _out9;
if ( ( (*( p))) == 97 ) {
goto _st10;
}
goto _st0;
_st10:
p+= 1;
st_case_10:
if ( p == pe )
goto _out10;
if ( ( (*( p))) == 97 ) {
goto _st11;
}
goto _st0;
_st11:
p+= 1;
st_case_11:
if ( p == pe )
goto _out11;
if ( ( (*( p))) == 97 ) {
goto _st12;
}
goto _st0;
_st12:
p+= 1;
st_case_12:
if ( p == pe )
goto _out12;
if ( ( (*( p))) == 97 ) {
goto _st13;
}
goto _st0;
_st13:
p+= 1;
st_case_13:
if ( p == pe )
goto _out13;
if ( ( (*( p))) == 97 ) {
goto _ctr14;
}
goto _st0;
_ctr14:
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_31__rep_cat_13_11_7.rl"
OUTS(s, p);
OUTC('.');
s = p;
}
#line 277 "gen/ragel/submatch_31__rep_cat_13_11_7.cc"
goto _st14;
_st14:
p+= 1;
st_case_14:
if ( p == pe )
goto _out14;
if ( ( (*( p))) == 97 ) {
goto _st15;
}
goto _st0;
_st15:
p+= 1;
st_case_15:
if ( p == pe )
goto _out15;
if ( ( (*( p))) == 97 ) {
goto _st16;
}
goto _st0;
_st16:
p+= 1;
st_case_16:
if ( p == pe )
goto _out16;
if ( ( (*( p))) == 97 ) {
goto _st17;
}
goto _st0;
_st17:
p+= 1;
st_case_17:
if ( p == pe )
goto _out17;
if ( ( (*( p))) == 97 ) {
goto _st18;
}
goto _st0;
_st18:
p+= 1;
st_case_18:
if ( p == pe )
goto _out18;
if ( ( (*( p))) == 97 ) {
goto _st19;
}
goto _st0;
_st19:
p+= 1;
st_case_19:
if ( p == pe )
goto _out19;
if ( ( (*( p))) == 97 ) {
goto _st20;
}
goto _st0;
_st20:
p+= 1;
st_case_20:
if ( p == pe )
goto _out20;
if ( ( (*( p))) == 97 ) {
goto _st21;
}
goto _st0;
_st21:
p+= 1;
st_case_21:
if ( p == pe )
goto _out21;
if ( ( (*( p))) == 97 ) {
goto _st22;
}
goto _st0;
_st22:
p+= 1;
st_case_22:
if ( p == pe )
goto _out22;
if ( ( (*( p))) == 97 ) {
goto _st23;
}
goto _st0;
_st23:
p+= 1;
st_case_23:
if ( p == pe )
goto _out23;
if ( ( (*( p))) == 97 ) {
goto _st24;
}
goto _st0;
_st24:
p+= 1;
st_case_24:
if ( p == pe )
goto _out24;
if ( ( (*( p))) == 97 ) {
goto _ctr26;
}
goto _st0;
_ctr26:
{
#line 16 "../../../benchmarks/c/src/ragel/submatch_31__rep_cat_13_11_7.rl"
OUTS(s, p);
OUTC('.');
s = p;
}
#line 387 "gen/ragel/submatch_31__rep_cat_13_11_7.cc"
goto _st25;
_st25:
p+= 1;
st_case_25:
if ( p == pe )
goto _out25;
if ( ( (*( p))) == 97 ) {
goto _st26;
}
goto _st0;
_st26:
p+= 1;
st_case_26:
if ( p == pe )
goto _out26;
if ( ( (*( p))) == 97 ) {
goto _st27;
}
goto _st0;
_st27:
p+= 1;
st_case_27:
if ( p == pe )
goto _out27;
if ( ( (*( p))) == 97 ) {
goto _st28;
}
goto _st0;
_st28:
p+= 1;
st_case_28:
if ( p == pe )
goto _out28;
if ( ( (*( p))) == 97 ) {
goto _st29;
}
goto _st0;
_st29:
p+= 1;
st_case_29:
if ( p == pe )
goto _out29;
if ( ( (*( p))) == 97 ) {
goto _st30;
}
goto _st0;
_st30:
p+= 1;
st_case_30:
if ( p == pe )
goto _out30;
if ( ( (*( p))) == 97 ) {
goto _st31;
}
goto _st0;
_st31:
p+= 1;
st_case_31:
if ( p == pe )
goto _out31;
switch( ( (*( p))) ) {
case 10: {
goto _ctr34;
}
case 97: {
goto _ctr35;
}
}
goto _st0;
_out32: cs = 32; 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;
_out9: cs = 9; goto _out;
_out10: cs = 10; goto _out;
_out11: cs = 11; goto _out;
_out12: cs = 12; goto _out;
_out13: cs = 13; goto _out;
_out14: cs = 14; goto _out;
_out15: cs = 15; goto _out;
_out16: cs = 16; goto _out;
_out17: cs = 17; goto _out;
_out18: cs = 18; goto _out;
_out19: cs = 19; goto _out;
_out20: cs = 20; goto _out;
_out21: cs = 21; goto _out;
_out22: cs = 22; goto _out;
_out23: cs = 23; goto _out;
_out24: cs = 24; goto _out;
_out25: cs = 25; goto _out;
_out26: cs = 26; goto _out;
_out27: cs = 27; goto _out;
_out28: cs = 28; goto _out;
_out29: cs = 29; goto _out;
_out30: cs = 30; goto _out;
_out31: cs = 31; goto _out;
_out: {}
}
#line 41 "../../../benchmarks/c/src/ragel/submatch_31__rep_cat_13_11_7.rl"
in->p = p;
in->pe = pe;
return count;
}
RAGEL_BENCH_AND_TEST()
} // namespace ragel_submatch_31__rep_cat_13_11_7
@@ -1,855 +0,0 @@
#line 1 "../../../benchmarks/c/src/ragel/submatch_32__rep_cat_23_19_17.rl"
#include "ragel/base.h"
namespace ragel_submatch_32__rep_cat_23_19_17 {
const char *delim = "\n";
#line 30 "../../../benchmarks/c/src/ragel/submatch_32__rep_cat_23_19_17.rl"
#line 11 "gen/ragel/submatch_32__rep_cat_23_19_17.cc"
static const int aaa_start = 60;
static const int aaa_first_final = 60;
static const int aaa_error = 0;
static const int aaa_en_main = 60;
#line 32 "../../../benchmarks/c/src/ragel/submatch_32__rep_cat_23_19_17.rl"
static int lex(Input *in, int count) {
char *p = in->p;
char *pe = in->pe;
const char *s = p;
int cs;
#line 26 "gen/ragel/submatch_32__rep_cat_23_19_17.cc"
{
cs = (int)aaa_start;
}
#line 40 "../../../benchmarks/c/src/ragel/submatch_32__rep_cat_23_19_17.rl"
#line 31 "gen/ragel/submatch_32__rep_cat_23_19_17.cc"
{
switch ( cs ) {
case 60:
goto st_case_60;
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;
case 9:
goto st_case_9;
case 10:
goto st_case_10;
case 11:
goto st_case_11;
case 12:
goto st_case_12;
case 13:
goto st_case_13;
case 14:
goto st_case_14;
case 15:
goto st_case_15;
case 16:
goto st_case_16;
case 17:
goto st_case_17;
case 18:
goto st_case_18;
case 19:
goto st_case_19;
case 20:
goto st_case_20;
case 21:
goto st_case_21;
case 22:
goto st_case_22;
case 23:
goto st_case_23;
case 24:
goto st_case_24;
case 25:
goto st_case_25;
case 26:
goto st_case_26;
case 27:
goto st_case_27;
case 28:
goto st_case_28;
case 29:
goto st_case_29;
case 30:
goto st_case_30;
case 31:
goto st_case_31;
case 32:
goto st_case_32;
case 33:
goto st_case_33;
case 34:
goto st_case_34;
case 35:
goto st_case_35;
case 36:
goto st_case_36;
case 37:
goto st_case_37;
case 38:
goto st_case_38;
case 39:
goto st_case_39;
case 40:
goto st_case_40;
case 41:
goto st_case_41;
case 42:
goto st_case_42;
case 43:
goto st_case_43;
case 44:
goto st_case_44;
case 45:
goto st_case_45;
case 46:
goto st_case_46;
case 47:
goto st_case_47;
case 48:
goto st_case_48;
case 49:
goto st_case_49;
case 50:
goto st_case_50;
case 51:
goto st_case_51;
case 52:
goto st_case_52;
case 53:
goto st_case_53;
case 54:
goto st_case_54;
case 55:
goto st_case_55;
case 56:
goto st_case_56;
case 57:
goto st_case_57;
case 58:
goto st_case_58;
case 59:
goto st_case_59;
}
_ctr62:
{
#line 21 "../../../benchmarks/c/src/ragel/submatch_32__rep_cat_23_19_17.rl"
OUTS(s, p);
OUTC(';');
s = p;
}
#line 165 "gen/ragel/submatch_32__rep_cat_23_19_17.cc"
{
#line 27 "../../../benchmarks/c/src/ragel/submatch_32__rep_cat_23_19_17.rl"
OUTC('\n'); }
#line 170 "gen/ragel/submatch_32__rep_cat_23_19_17.cc"
goto _st60;
_ctr65:
{
#line 27 "../../../benchmarks/c/src/ragel/submatch_32__rep_cat_23_19_17.rl"
OUTC('\n'); }
#line 177 "gen/ragel/submatch_32__rep_cat_23_19_17.cc"
goto _st60;
_st60:
p+= 1;
st_case_60:
if ( p == pe )
goto _out60;
switch( ( (*( p))) ) {
case 10: {
goto _ctr65;
}
case 97: {
goto _st1;
}
}
goto _st0;
_st0:
st_case_0:
goto _out0;
_ctr63:
{
#line 21 "../../../benchmarks/c/src/ragel/submatch_32__rep_cat_23_19_17.rl"
OUTS(s, p);
OUTC(';');
s = p;
}
#line 205 "gen/ragel/submatch_32__rep_cat_23_19_17.cc"
goto _st1;
_st1:
p+= 1;
st_case_1:
if ( p == pe )
goto _out1;
if ( ( (*( p))) == 97 ) {
goto _st2;
}
goto _st0;
_st2:
p+= 1;
st_case_2:
if ( p == pe )
goto _out2;
if ( ( (*( p))) == 97 ) {
goto _st3;
}
goto _st0;
_st3:
p+= 1;
st_case_3:
if ( p == pe )
goto _out3;
if ( ( (*( p))) == 97 ) {
goto _st4;
}
goto _st0;
_st4:
p+= 1;
st_case_4:
if ( p == pe )
goto _out4;
if ( ( (*( p))) == 97 ) {
goto _st5;
}
goto _st0;
_st5:
p+= 1;
st_case_5:
if ( p == pe )
goto _out5;
if ( ( (*( p))) == 97 ) {
goto _st6;
}
goto _st0;
_st6:
p+= 1;
st_case_6:
if ( p == pe )
goto _out6;
if ( ( (*( p))) == 97 ) {
goto _st7;
}
goto _st0;
_st7:
p+= 1;
st_case_7:
if ( p == pe )
goto _out7;
if ( ( (*( p))) == 97 ) {
goto _st8;
}
goto _st0;
_st8:
p+= 1;
st_case_8:
if ( p == pe )
goto _out8;
if ( ( (*( p))) == 97 ) {
goto _st9;
}
goto _st0;
_st9:
p+= 1;
st_case_9:
if ( p == pe )
goto _out9;
if ( ( (*( p))) == 97 ) {
goto _st10;
}
goto _st0;
_st10:
p+= 1;
st_case_10:
if ( p == pe )
goto _out10;
if ( ( (*( p))) == 97 ) {
goto _st11;
}
goto _st0;
_st11:
p+= 1;
st_case_11:
if ( p == pe )
goto _out11;
if ( ( (*( p))) == 97 ) {
goto _st12;
}
goto _st0;
_st12:
p+= 1;
st_case_12:
if ( p == pe )
goto _out12;
if ( ( (*( p))) == 97 ) {
goto _st13;
}
goto _st0;
_st13:
p+= 1;
st_case_13:
if ( p == pe )
goto _out13;
if ( ( (*( p))) == 97 ) {
goto _st14;
}
goto _st0;
_st14:
p+= 1;
st_case_14:
if ( p == pe )
goto _out14;
if ( ( (*( p))) == 97 ) {
goto _st15;
}
goto _st0;
_st15:
p+= 1;
st_case_15:
if ( p == pe )
goto _out15;
if ( ( (*( p))) == 97 ) {
goto _st16;
}
goto _st0;
_st16:
p+= 1;
st_case_16:
if ( p == pe )
goto _out16;
if ( ( (*( p))) == 97 ) {
goto _st17;
}
goto _st0;
_st17:
p+= 1;
st_case_17:
if ( p == pe )
goto _out17;
if ( ( (*( p))) == 97 ) {
goto _st18;
}
goto _st0;
_st18:
p+= 1;
st_case_18:
if ( p == pe )
goto _out18;
if ( ( (*( p))) == 97 ) {
goto _st19;
}
goto _st0;
_st19:
p+= 1;
st_case_19:
if ( p == pe )
goto _out19;
if ( ( (*( p))) == 97 ) {
goto _st20;
}
goto _st0;
_st20:
p+= 1;
st_case_20:
if ( p == pe )
goto _out20;
if ( ( (*( p))) == 97 ) {
goto _st21;
}
goto _st0;
_st21:
p+= 1;
st_case_21:
if ( p == pe )
goto _out21;
if ( ( (*( p))) == 97 ) {
goto _st22;
}
goto _st0;
_st22:
p+= 1;
st_case_22:
if ( p == pe )
goto _out22;
if ( ( (*( p))) == 97 ) {
goto _st23;
}
goto _st0;
_st23:
p+= 1;
st_case_23:
if ( p == pe )
goto _out23;
if ( ( (*( p))) == 97 ) {
goto _ctr24;
}
goto _st0;
_ctr24:
{
#line 11 "../../../benchmarks/c/src/ragel/submatch_32__rep_cat_23_19_17.rl"
OUTS(s, p);
OUTC('.');
s = p;
}
#line 423 "gen/ragel/submatch_32__rep_cat_23_19_17.cc"
goto _st24;
_st24:
p+= 1;
st_case_24:
if ( p == pe )
goto _out24;
if ( ( (*( p))) == 97 ) {
goto _st25;
}
goto _st0;
_st25:
p+= 1;
st_case_25:
if ( p == pe )
goto _out25;
if ( ( (*( p))) == 97 ) {
goto _st26;
}
goto _st0;
_st26:
p+= 1;
st_case_26:
if ( p == pe )
goto _out26;
if ( ( (*( p))) == 97 ) {
goto _st27;
}
goto _st0;
_st27:
p+= 1;
st_case_27:
if ( p == pe )
goto _out27;
if ( ( (*( p))) == 97 ) {
goto _st28;
}
goto _st0;
_st28:
p+= 1;
st_case_28:
if ( p == pe )
goto _out28;
if ( ( (*( p))) == 97 ) {
goto _st29;
}
goto _st0;
_st29:
p+= 1;
st_case_29:
if ( p == pe )
goto _out29;
if ( ( (*( p))) == 97 ) {
goto _st30;
}
goto _st0;
_st30:
p+= 1;
st_case_30:
if ( p == pe )
goto _out30;
if ( ( (*( p))) == 97 ) {
goto _st31;
}
goto _st0;
_st31:
p+= 1;
st_case_31:
if ( p == pe )
goto _out31;
if ( ( (*( p))) == 97 ) {
goto _st32;
}
goto _st0;
_st32:
p+= 1;
st_case_32:
if ( p == pe )
goto _out32;
if ( ( (*( p))) == 97 ) {
goto _st33;
}
goto _st0;
_st33:
p+= 1;
st_case_33:
if ( p == pe )
goto _out33;
if ( ( (*( p))) == 97 ) {
goto _st34;
}
goto _st0;
_st34:
p+= 1;
st_case_34:
if ( p == pe )
goto _out34;
if ( ( (*( p))) == 97 ) {
goto _st35;
}
goto _st0;
_st35:
p+= 1;
st_case_35:
if ( p == pe )
goto _out35;
if ( ( (*( p))) == 97 ) {
goto _st36;
}
goto _st0;
_st36:
p+= 1;
st_case_36:
if ( p == pe )
goto _out36;
if ( ( (*( p))) == 97 ) {
goto _st37;
}
goto _st0;
_st37:
p+= 1;
st_case_37:
if ( p == pe )
goto _out37;
if ( ( (*( p))) == 97 ) {
goto _st38;
}
goto _st0;
_st38:
p+= 1;
st_case_38:
if ( p == pe )
goto _out38;
if ( ( (*( p))) == 97 ) {
goto _st39;
}
goto _st0;
_st39:
p+= 1;
st_case_39:
if ( p == pe )
goto _out39;
if ( ( (*( p))) == 97 ) {
goto _st40;
}
goto _st0;
_st40:
p+= 1;
st_case_40:
if ( p == pe )
goto _out40;
if ( ( (*( p))) == 97 ) {
goto _st41;
}
goto _st0;
_st41:
p+= 1;
st_case_41:
if ( p == pe )
goto _out41;
if ( ( (*( p))) == 97 ) {
goto _st42;
}
goto _st0;
_st42:
p+= 1;
st_case_42:
if ( p == pe )
goto _out42;
if ( ( (*( p))) == 97 ) {
goto _ctr44;
}
goto _st0;
_ctr44:
{
#line 16 "../../../benchmarks/c/src/ragel/submatch_32__rep_cat_23_19_17.rl"
OUTS(s, p);
OUTC('.');
s = p;
}
#line 605 "gen/ragel/submatch_32__rep_cat_23_19_17.cc"
goto _st43;
_st43:
p+= 1;
st_case_43:
if ( p == pe )
goto _out43;
if ( ( (*( p))) == 97 ) {
goto _st44;
}
goto _st0;
_st44:
p+= 1;
st_case_44:
if ( p == pe )
goto _out44;
if ( ( (*( p))) == 97 ) {
goto _st45;
}
goto _st0;
_st45:
p+= 1;
st_case_45:
if ( p == pe )
goto _out45;
if ( ( (*( p))) == 97 ) {
goto _st46;
}
goto _st0;
_st46:
p+= 1;
st_case_46:
if ( p == pe )
goto _out46;
if ( ( (*( p))) == 97 ) {
goto _st47;
}
goto _st0;
_st47:
p+= 1;
st_case_47:
if ( p == pe )
goto _out47;
if ( ( (*( p))) == 97 ) {
goto _st48;
}
goto _st0;
_st48:
p+= 1;
st_case_48:
if ( p == pe )
goto _out48;
if ( ( (*( p))) == 97 ) {
goto _st49;
}
goto _st0;
_st49:
p+= 1;
st_case_49:
if ( p == pe )
goto _out49;
if ( ( (*( p))) == 97 ) {
goto _st50;
}
goto _st0;
_st50:
p+= 1;
st_case_50:
if ( p == pe )
goto _out50;
if ( ( (*( p))) == 97 ) {
goto _st51;
}
goto _st0;
_st51:
p+= 1;
st_case_51:
if ( p == pe )
goto _out51;
if ( ( (*( p))) == 97 ) {
goto _st52;
}
goto _st0;
_st52:
p+= 1;
st_case_52:
if ( p == pe )
goto _out52;
if ( ( (*( p))) == 97 ) {
goto _st53;
}
goto _st0;
_st53:
p+= 1;
st_case_53:
if ( p == pe )
goto _out53;
if ( ( (*( p))) == 97 ) {
goto _st54;
}
goto _st0;
_st54:
p+= 1;
st_case_54:
if ( p == pe )
goto _out54;
if ( ( (*( p))) == 97 ) {
goto _st55;
}
goto _st0;
_st55:
p+= 1;
st_case_55:
if ( p == pe )
goto _out55;
if ( ( (*( p))) == 97 ) {
goto _st56;
}
goto _st0;
_st56:
p+= 1;
st_case_56:
if ( p == pe )
goto _out56;
if ( ( (*( p))) == 97 ) {
goto _st57;
}
goto _st0;
_st57:
p+= 1;
st_case_57:
if ( p == pe )
goto _out57;
if ( ( (*( p))) == 97 ) {
goto _st58;
}
goto _st0;
_st58:
p+= 1;
st_case_58:
if ( p == pe )
goto _out58;
if ( ( (*( p))) == 97 ) {
goto _st59;
}
goto _st0;
_st59:
p+= 1;
st_case_59:
if ( p == pe )
goto _out59;
switch( ( (*( p))) ) {
case 10: {
goto _ctr62;
}
case 97: {
goto _ctr63;
}
}
goto _st0;
_out60: cs = 60; 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;
_out9: cs = 9; goto _out;
_out10: cs = 10; goto _out;
_out11: cs = 11; goto _out;
_out12: cs = 12; goto _out;
_out13: cs = 13; goto _out;
_out14: cs = 14; goto _out;
_out15: cs = 15; goto _out;
_out16: cs = 16; goto _out;
_out17: cs = 17; goto _out;
_out18: cs = 18; goto _out;
_out19: cs = 19; goto _out;
_out20: cs = 20; goto _out;
_out21: cs = 21; goto _out;
_out22: cs = 22; goto _out;
_out23: cs = 23; goto _out;
_out24: cs = 24; goto _out;
_out25: cs = 25; goto _out;
_out26: cs = 26; goto _out;
_out27: cs = 27; goto _out;
_out28: cs = 28; goto _out;
_out29: cs = 29; goto _out;
_out30: cs = 30; goto _out;
_out31: cs = 31; goto _out;
_out32: cs = 32; goto _out;
_out33: cs = 33; goto _out;
_out34: cs = 34; goto _out;
_out35: cs = 35; goto _out;
_out36: cs = 36; goto _out;
_out37: cs = 37; goto _out;
_out38: cs = 38; goto _out;
_out39: cs = 39; goto _out;
_out40: cs = 40; goto _out;
_out41: cs = 41; goto _out;
_out42: cs = 42; goto _out;
_out43: cs = 43; goto _out;
_out44: cs = 44; goto _out;
_out45: cs = 45; goto _out;
_out46: cs = 46; goto _out;
_out47: cs = 47; goto _out;
_out48: cs = 48; goto _out;
_out49: cs = 49; goto _out;
_out50: cs = 50; goto _out;
_out51: cs = 51; goto _out;
_out52: cs = 52; goto _out;
_out53: cs = 53; goto _out;
_out54: cs = 54; goto _out;
_out55: cs = 55; goto _out;
_out56: cs = 56; goto _out;
_out57: cs = 57; goto _out;
_out58: cs = 58; goto _out;
_out59: cs = 59; goto _out;
_out: {}
}
#line 41 "../../../benchmarks/c/src/ragel/submatch_32__rep_cat_23_19_17.rl"
in->p = p;
in->pe = pe;
return count;
}
RAGEL_BENCH_AND_TEST()
} // namespace ragel_submatch_32__rep_cat_23_19_17
@@ -1,207 +0,0 @@
#line 1 "../../../benchmarks/c/src/ragel/submatch_33__rep_alt_5_3_2.rl"
#include "ragel/base.h"
namespace ragel_submatch_33__rep_alt_5_3_2 {
const char *delim = "\n";
#line 23 "../../../benchmarks/c/src/ragel/submatch_33__rep_alt_5_3_2.rl"
#line 11 "gen/ragel/submatch_33__rep_alt_5_3_2.cc"
static const int aaa_start = 6;
static const int aaa_first_final = 6;
static const int aaa_error = 0;
static const int aaa_en_main = 6;
#line 25 "../../../benchmarks/c/src/ragel/submatch_33__rep_alt_5_3_2.rl"
static int lex(Input *in, int count) {
char *p = in->p;
char *pe = in->pe;
const char *s;
int cs;
#line 26 "gen/ragel/submatch_33__rep_alt_5_3_2.cc"
{
cs = (int)aaa_start;
}
#line 33 "../../../benchmarks/c/src/ragel/submatch_33__rep_alt_5_3_2.rl"
#line 31 "gen/ragel/submatch_33__rep_alt_5_3_2.cc"
{
switch ( cs ) {
case 6:
goto st_case_6;
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;
}
_ctr3:
{
#line 15 "../../../benchmarks/c/src/ragel/submatch_33__rep_alt_5_3_2.rl"
OUTS(s, p);
OUTC('.');
s = p;
}
#line 57 "gen/ragel/submatch_33__rep_alt_5_3_2.cc"
{
#line 20 "../../../benchmarks/c/src/ragel/submatch_33__rep_alt_5_3_2.rl"
OUTC('\n'); }
#line 62 "gen/ragel/submatch_33__rep_alt_5_3_2.cc"
goto _st6;
_ctr9:
{
#line 19 "../../../benchmarks/c/src/ragel/submatch_33__rep_alt_5_3_2.rl"
s = p; }
#line 69 "gen/ragel/submatch_33__rep_alt_5_3_2.cc"
{
#line 20 "../../../benchmarks/c/src/ragel/submatch_33__rep_alt_5_3_2.rl"
OUTC('\n'); }
#line 74 "gen/ragel/submatch_33__rep_alt_5_3_2.cc"
goto _st6;
_st6:
p+= 1;
st_case_6:
if ( p == pe )
goto _out6;
switch( ( (*( p))) ) {
case 10: {
goto _ctr9;
}
case 97: {
goto _ctr10;
}
}
goto _st0;
_st0:
st_case_0:
goto _out0;
_ctr7:
{
#line 15 "../../../benchmarks/c/src/ragel/submatch_33__rep_alt_5_3_2.rl"
OUTS(s, p);
OUTC('.');
s = p;
}
#line 102 "gen/ragel/submatch_33__rep_alt_5_3_2.cc"
goto _st1;
_ctr10:
{
#line 19 "../../../benchmarks/c/src/ragel/submatch_33__rep_alt_5_3_2.rl"
s = p; }
#line 109 "gen/ragel/submatch_33__rep_alt_5_3_2.cc"
goto _st1;
_st1:
p+= 1;
st_case_1:
if ( p == pe )
goto _out1;
if ( ( (*( p))) == 97 ) {
goto _st2;
}
goto _st0;
_st2:
p+= 1;
st_case_2:
if ( p == pe )
goto _out2;
switch( ( (*( p))) ) {
case 10: {
goto _ctr3;
}
case 97: {
goto _st3;
}
}
goto _st0;
_st3:
p+= 1;
st_case_3:
if ( p == pe )
goto _out3;
switch( ( (*( p))) ) {
case 10: {
goto _ctr3;
}
case 97: {
goto _st4;
}
}
goto _st0;
_st4:
p+= 1;
st_case_4:
if ( p == pe )
goto _out4;
if ( ( (*( p))) == 97 ) {
goto _st5;
}
goto _st0;
_st5:
p+= 1;
st_case_5:
if ( p == pe )
goto _out5;
switch( ( (*( p))) ) {
case 10: {
goto _ctr3;
}
case 97: {
goto _ctr7;
}
}
goto _st0;
_out6: cs = 6; 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;
_out: {}
}
#line 34 "../../../benchmarks/c/src/ragel/submatch_33__rep_alt_5_3_2.rl"
in->p = p;
in->pe = pe;
return count;
}
RAGEL_BENCH_AND_TEST()
} // namespace ragel_submatch_33__rep_alt_5_3_2
@@ -1,747 +0,0 @@
#line 1 "../../../benchmarks/c/src/ragel/submatch_34__rep_alt_13_11_7.rl"
#include "ragel/base.h"
namespace ragel_submatch_34__rep_alt_13_11_7 {
const char *delim = "\n";
#line 18 "../../../benchmarks/c/src/ragel/submatch_34__rep_alt_13_11_7.rl"
#line 11 "gen/ragel/submatch_34__rep_alt_13_11_7.cc"
static const int aaa_start = 32;
static const int aaa_first_final = 32;
static const int aaa_error = 0;
static const int aaa_en_main = 32;
#line 20 "../../../benchmarks/c/src/ragel/submatch_34__rep_alt_13_11_7.rl"
static int lex(Input *in, int count) {
char *p = in->p;
char *pe = in->pe;
const char *s;
int cs;
#line 26 "gen/ragel/submatch_34__rep_alt_13_11_7.cc"
{
cs = (int)aaa_start;
}
#line 28 "../../../benchmarks/c/src/ragel/submatch_34__rep_alt_13_11_7.rl"
#line 31 "gen/ragel/submatch_34__rep_alt_13_11_7.cc"
{
switch ( cs ) {
case 32:
goto st_case_32;
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;
case 9:
goto st_case_9;
case 10:
goto st_case_10;
case 11:
goto st_case_11;
case 12:
goto st_case_12;
case 13:
goto st_case_13;
case 14:
goto st_case_14;
case 15:
goto st_case_15;
case 16:
goto st_case_16;
case 17:
goto st_case_17;
case 18:
goto st_case_18;
case 19:
goto st_case_19;
case 20:
goto st_case_20;
case 21:
goto st_case_21;
case 22:
goto st_case_22;
case 23:
goto st_case_23;
case 24:
goto st_case_24;
case 25:
goto st_case_25;
case 26:
goto st_case_26;
case 27:
goto st_case_27;
case 28:
goto st_case_28;
case 29:
goto st_case_29;
case 30:
goto st_case_30;
case 31:
goto st_case_31;
}
_ctr8:
{
#line 10 "../../../benchmarks/c/src/ragel/submatch_34__rep_alt_13_11_7.rl"
OUTS(s, p);
OUTC('.');
s = p;
}
#line 109 "gen/ragel/submatch_34__rep_alt_13_11_7.cc"
{
#line 15 "../../../benchmarks/c/src/ragel/submatch_34__rep_alt_13_11_7.rl"
OUTC('\n'); }
#line 114 "gen/ragel/submatch_34__rep_alt_13_11_7.cc"
goto _st32;
_ctr49:
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_34__rep_alt_13_11_7.rl"
s = p; }
#line 121 "gen/ragel/submatch_34__rep_alt_13_11_7.cc"
{
#line 15 "../../../benchmarks/c/src/ragel/submatch_34__rep_alt_13_11_7.rl"
OUTC('\n'); }
#line 126 "gen/ragel/submatch_34__rep_alt_13_11_7.cc"
goto _st32;
_st32:
p+= 1;
st_case_32:
if ( p == pe )
goto _out32;
switch( ( (*( p))) ) {
case 10: {
goto _ctr49;
}
case 97: {
goto _ctr50;
}
}
goto _st0;
_st0:
st_case_0:
goto _out0;
_ctr50:
{
#line 14 "../../../benchmarks/c/src/ragel/submatch_34__rep_alt_13_11_7.rl"
s = p; }
#line 150 "gen/ragel/submatch_34__rep_alt_13_11_7.cc"
goto _st1;
_st1:
p+= 1;
st_case_1:
if ( p == pe )
goto _out1;
if ( ( (*( p))) == 97 ) {
goto _st2;
}
goto _st0;
_st2:
p+= 1;
st_case_2:
if ( p == pe )
goto _out2;
if ( ( (*( p))) == 97 ) {
goto _st3;
}
goto _st0;
_st3:
p+= 1;
st_case_3:
if ( p == pe )
goto _out3;
if ( ( (*( p))) == 97 ) {
goto _st4;
}
goto _st0;
_st4:
p+= 1;
st_case_4:
if ( p == pe )
goto _out4;
if ( ( (*( p))) == 97 ) {
goto _st5;
}
goto _st0;
_st5:
p+= 1;
st_case_5:
if ( p == pe )
goto _out5;
if ( ( (*( p))) == 97 ) {
goto _st6;
}
goto _st0;
_st6:
p+= 1;
st_case_6:
if ( p == pe )
goto _out6;
if ( ( (*( p))) == 97 ) {
goto _st7;
}
goto _st0;
_st7:
p+= 1;
st_case_7:
if ( p == pe )
goto _out7;
switch( ( (*( p))) ) {
case 10: {
goto _ctr8;
}
case 97: {
goto _ctr9;
}
}
goto _st0;
_ctr9:
{
#line 10 "../../../benchmarks/c/src/ragel/submatch_34__rep_alt_13_11_7.rl"
OUTS(s, p);
OUTC('.');
s = p;
}
#line 229 "gen/ragel/submatch_34__rep_alt_13_11_7.cc"
goto _st8;
_st8:
p+= 1;
st_case_8:
if ( p == pe )
goto _out8;
if ( ( (*( p))) == 97 ) {
goto _st9;
}
goto _st0;
_st9:
p+= 1;
st_case_9:
if ( p == pe )
goto _out9;
if ( ( (*( p))) == 97 ) {
goto _st10;
}
goto _st0;
_st10:
p+= 1;
st_case_10:
if ( p == pe )
goto _out10;
if ( ( (*( p))) == 97 ) {
goto _st11;
}
goto _st0;
_st11:
p+= 1;
st_case_11:
if ( p == pe )
goto _out11;
switch( ( (*( p))) ) {
case 10: {
goto _ctr8;
}
case 97: {
goto _ctr14;
}
}
goto _st0;
_ctr14:
{
#line 10 "../../../benchmarks/c/src/ragel/submatch_34__rep_alt_13_11_7.rl"
OUTS(s, p);
OUTC('.');
s = p;
}
#line 281 "gen/ragel/submatch_34__rep_alt_13_11_7.cc"
goto _st12;
_st12:
p+= 1;
st_case_12:
if ( p == pe )
goto _out12;
if ( ( (*( p))) == 97 ) {
goto _st13;
}
goto _st0;
_st13:
p+= 1;
st_case_13:
if ( p == pe )
goto _out13;
switch( ( (*( p))) ) {
case 10: {
goto _ctr8;
}
case 97: {
goto _ctr17;
}
}
goto _st0;
_ctr17:
{
#line 10 "../../../benchmarks/c/src/ragel/submatch_34__rep_alt_13_11_7.rl"
OUTS(s, p);
OUTC('.');
s = p;
}
#line 315 "gen/ragel/submatch_34__rep_alt_13_11_7.cc"
goto _st14;
_st14:
p+= 1;
st_case_14:
if ( p == pe )
goto _out14;
switch( ( (*( p))) ) {
case 10: {
goto _ctr8;
}
case 97: {
goto _ctr19;
}
}
goto _st0;
_ctr19:
{
#line 10 "../../../benchmarks/c/src/ragel/submatch_34__rep_alt_13_11_7.rl"
OUTS(s, p);
OUTC('.');
s = p;
}
#line 340 "gen/ragel/submatch_34__rep_alt_13_11_7.cc"
goto _st15;
_st15:
p+= 1;
st_case_15:
if ( p == pe )
goto _out15;
if ( ( (*( p))) == 97 ) {
goto _st16;
}
goto _st0;
_st16:
p+= 1;
st_case_16:
if ( p == pe )
goto _out16;
if ( ( (*( p))) == 97 ) {
goto _st17;
}
goto _st0;
_st17:
p+= 1;
st_case_17:
if ( p == pe )
goto _out17;
if ( ( (*( p))) == 97 ) {
goto _st18;
}
goto _st0;
_st18:
p+= 1;
st_case_18:
if ( p == pe )
goto _out18;
switch( ( (*( p))) ) {
case 10: {
goto _ctr8;
}
case 97: {
goto _ctr24;
}
}
goto _st0;
_ctr24:
{
#line 10 "../../../benchmarks/c/src/ragel/submatch_34__rep_alt_13_11_7.rl"
OUTS(s, p);
OUTC('.');
s = p;
}
#line 392 "gen/ragel/submatch_34__rep_alt_13_11_7.cc"
goto _st19;
_st19:
p+= 1;
st_case_19:
if ( p == pe )
goto _out19;
if ( ( (*( p))) == 97 ) {
goto _st20;
}
goto _st0;
_st20:
p+= 1;
st_case_20:
if ( p == pe )
goto _out20;
switch( ( (*( p))) ) {
case 10: {
goto _ctr8;
}
case 97: {
goto _ctr27;
}
}
goto _st0;
_ctr27:
{
#line 10 "../../../benchmarks/c/src/ragel/submatch_34__rep_alt_13_11_7.rl"
OUTS(s, p);
OUTC('.');
s = p;
}
#line 426 "gen/ragel/submatch_34__rep_alt_13_11_7.cc"
goto _st21;
_st21:
p+= 1;
st_case_21:
if ( p == pe )
goto _out21;
switch( ( (*( p))) ) {
case 10: {
goto _ctr8;
}
case 97: {
goto _ctr29;
}
}
goto _st0;
_ctr29:
{
#line 10 "../../../benchmarks/c/src/ragel/submatch_34__rep_alt_13_11_7.rl"
OUTS(s, p);
OUTC('.');
s = p;
}
#line 451 "gen/ragel/submatch_34__rep_alt_13_11_7.cc"
goto _st22;
_st22:
p+= 1;
st_case_22:
if ( p == pe )
goto _out22;
switch( ( (*( p))) ) {
case 10: {
goto _ctr8;
}
case 97: {
goto _ctr31;
}
}
goto _st0;
_ctr31:
{
#line 10 "../../../benchmarks/c/src/ragel/submatch_34__rep_alt_13_11_7.rl"
OUTS(s, p);
OUTC('.');
s = p;
}
#line 476 "gen/ragel/submatch_34__rep_alt_13_11_7.cc"
goto _st23;
_st23:
p+= 1;
st_case_23:
if ( p == pe )
goto _out23;
if ( ( (*( p))) == 97 ) {
goto _st24;
}
goto _st0;
_st24:
p+= 1;
st_case_24:
if ( p == pe )
goto _out24;
switch( ( (*( p))) ) {
case 10: {
goto _ctr8;
}
case 97: {
goto _ctr34;
}
}
goto _st0;
_ctr34:
{
#line 10 "../../../benchmarks/c/src/ragel/submatch_34__rep_alt_13_11_7.rl"
OUTS(s, p);
OUTC('.');
s = p;
}
#line 510 "gen/ragel/submatch_34__rep_alt_13_11_7.cc"
goto _st25;
_st25:
p+= 1;
st_case_25:
if ( p == pe )
goto _out25;
switch( ( (*( p))) ) {
case 10: {
goto _ctr8;
}
case 97: {
goto _ctr36;
}
}
goto _st0;
_ctr36:
{
#line 10 "../../../benchmarks/c/src/ragel/submatch_34__rep_alt_13_11_7.rl"
OUTS(s, p);
OUTC('.');
s = p;
}
#line 535 "gen/ragel/submatch_34__rep_alt_13_11_7.cc"
goto _st26;
_st26:
p+= 1;
st_case_26:
if ( p == pe )
goto _out26;
switch( ( (*( p))) ) {
case 10: {
goto _ctr8;
}
case 97: {
goto _ctr38;
}
}
goto _st0;
_ctr38:
{
#line 10 "../../../benchmarks/c/src/ragel/submatch_34__rep_alt_13_11_7.rl"
OUTS(s, p);
OUTC('.');
s = p;
}
#line 560 "gen/ragel/submatch_34__rep_alt_13_11_7.cc"
goto _st27;
_st27:
p+= 1;
st_case_27:
if ( p == pe )
goto _out27;
switch( ( (*( p))) ) {
case 10: {
goto _ctr8;
}
case 97: {
goto _ctr40;
}
}
goto _st0;
_ctr40:
{
#line 10 "../../../benchmarks/c/src/ragel/submatch_34__rep_alt_13_11_7.rl"
OUTS(s, p);
OUTC('.');
s = p;
}
#line 585 "gen/ragel/submatch_34__rep_alt_13_11_7.cc"
goto _st28;
_st28:
p+= 1;
st_case_28:
if ( p == pe )
goto _out28;
switch( ( (*( p))) ) {
case 10: {
goto _ctr8;
}
case 97: {
goto _ctr42;
}
}
goto _st0;
_ctr42:
{
#line 10 "../../../benchmarks/c/src/ragel/submatch_34__rep_alt_13_11_7.rl"
OUTS(s, p);
OUTC('.');
s = p;
}
#line 610 "gen/ragel/submatch_34__rep_alt_13_11_7.cc"
goto _st29;
_st29:
p+= 1;
st_case_29:
if ( p == pe )
goto _out29;
switch( ( (*( p))) ) {
case 10: {
goto _ctr8;
}
case 97: {
goto _ctr44;
}
}
goto _st0;
_ctr44:
{
#line 10 "../../../benchmarks/c/src/ragel/submatch_34__rep_alt_13_11_7.rl"
OUTS(s, p);
OUTC('.');
s = p;
}
#line 635 "gen/ragel/submatch_34__rep_alt_13_11_7.cc"
goto _st30;
_st30:
p+= 1;
st_case_30:
if ( p == pe )
goto _out30;
if ( ( (*( p))) == 97 ) {
goto _st31;
}
goto _st0;
_ctr47:
{
#line 10 "../../../benchmarks/c/src/ragel/submatch_34__rep_alt_13_11_7.rl"
OUTS(s, p);
OUTC('.');
s = p;
}
#line 655 "gen/ragel/submatch_34__rep_alt_13_11_7.cc"
goto _st31;
_st31:
p+= 1;
st_case_31:
if ( p == pe )
goto _out31;
switch( ( (*( p))) ) {
case 10: {
goto _ctr8;
}
case 97: {
goto _ctr47;
}
}
goto _st0;
_out32: cs = 32; 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;
_out9: cs = 9; goto _out;
_out10: cs = 10; goto _out;
_out11: cs = 11; goto _out;
_out12: cs = 12; goto _out;
_out13: cs = 13; goto _out;
_out14: cs = 14; goto _out;
_out15: cs = 15; goto _out;
_out16: cs = 16; goto _out;
_out17: cs = 17; goto _out;
_out18: cs = 18; goto _out;
_out19: cs = 19; goto _out;
_out20: cs = 20; goto _out;
_out21: cs = 21; goto _out;
_out22: cs = 22; goto _out;
_out23: cs = 23; goto _out;
_out24: cs = 24; goto _out;
_out25: cs = 25; goto _out;
_out26: cs = 26; goto _out;
_out27: cs = 27; goto _out;
_out28: cs = 28; goto _out;
_out29: cs = 29; goto _out;
_out30: cs = 30; goto _out;
_out31: cs = 31; goto _out;
_out: {}
}
#line 29 "../../../benchmarks/c/src/ragel/submatch_34__rep_alt_13_11_7.rl"
in->p = p;
in->pe = pe;
return count;
}
RAGEL_BENCH_AND_TEST()
} // namespace ragel_submatch_34__rep_alt_13_11_7
File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More