]> granicus.if.org Git - re2c/commitdiff
Added tests for POSIX captures.
authorUlya Trofimovich <skvadrik@gmail.com>
Fri, 3 Mar 2017 23:21:38 +0000 (23:21 +0000)
committerUlya Trofimovich <skvadrik@gmail.com>
Sat, 4 Mar 2017 11:48:49 +0000 (11:48 +0000)
Tests are adopted from Glenn Fowler's testregex suite and its derivative
regex-posix-unittest by Christopher Kuklewicz.

Irrelevant tests have been dropped:

    - tests for specific POSIX features not supported by RE2C, like
      begin/end markers '$' and '^', backreferences, predefined character
      classes (most of them come from 'basic' subdirectory)

    - all 'leftassoc' tests: they are exact copies of 'rightassoc' tests,
      differ only in match results and are supposed to fail

    - all tests from 'categorize' that are supposed to fail

I also added a few tests of my own (in the 'other' subdirectory).

Tests are arranged as a bunch of '.dat' files (each file contains lines of
the form '<regexp> <string> <match>' or blank lines) and two scripts.

    - '__run.sh' runs all tests (generates temporary '.re' file with the
      given regexp, compiles it, runs against the given string and checks
      that the result coincides with the given result)

    - '__gen.sh' regenerates '.re' files for regular RE2C test suite (the
      generated files do not contain any code, just the bare regexp)

All regexps are pre-patched to exclude '\x00' (terminating NULL) character
from subregexps like '.' or '[^a]: otherwise RE2C-generated programs would
greedily consume all characters and fail. Note that if only '.' was present
in the original tests, we might have used '\n' as terminator, but '[^a]'
includes newline. Also '()' subregexp was substituted with '("")'.

613 files changed:
re2c/test/posix_captures/.dat/basic.dat [new file with mode: 0644]
re2c/test/posix_captures/.dat/categorize.dat [new file with mode: 0644]
re2c/test/posix_captures/.dat/forcedassoc.dat [new file with mode: 0644]
re2c/test/posix_captures/.dat/glennfowler.dat [new file with mode: 0644]
re2c/test/posix_captures/.dat/nullsubexpr.dat [new file with mode: 0644]
re2c/test/posix_captures/.dat/osxbsdcritical.dat [new file with mode: 0644]
re2c/test/posix_captures/.dat/other.dat [new file with mode: 0644]
re2c/test/posix_captures/.dat/repetition.dat [new file with mode: 0644]
re2c/test/posix_captures/.dat/rightassoc.dat [new file with mode: 0644]
re2c/test/posix_captures/.gen/__gen.sh [new file with mode: 0755]
re2c/test/posix_captures/.gen/template [new file with mode: 0644]
re2c/test/posix_captures/.run/__run.sh [new file with mode: 0755]
re2c/test/posix_captures/.run/template [new file with mode: 0644]
re2c/test/posix_captures/basic/01.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/01.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/02.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/02.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/03.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/03.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/04.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/04.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/05.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/05.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/06.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/06.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/07.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/07.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/08.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/08.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/09.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/09.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/10.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/10.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/11.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/11.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/12.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/12.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/13.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/13.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/14.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/14.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/15.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/15.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/16.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/16.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/17.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/17.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/18.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/18.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/19.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/19.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/20.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/20.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/21.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/21.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/22.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/22.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/23.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/23.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/24.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/24.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/25.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/25.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/26.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/26.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/27.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/27.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/28.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/28.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/29.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/29.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/30.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/30.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/31.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/31.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/32.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/32.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/33.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/33.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/34.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/34.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/35.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/35.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/36.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/36.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/37.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/37.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/38.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/38.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/39.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/39.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/40.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/40.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/41.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/41.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/42.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/42.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/43.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/43.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/44.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/44.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/45.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/45.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/46.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/46.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/47.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/47.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/48.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/48.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/49.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/49.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/50.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/50.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/51.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/51.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/52.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/52.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/53.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/53.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/54.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/54.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/55.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/55.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/56.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/56.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/57.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/57.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/58.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/58.i.re [new file with mode: 0644]
re2c/test/posix_captures/basic/59.i.c [new file with mode: 0644]
re2c/test/posix_captures/basic/59.i.re [new file with mode: 0644]
re2c/test/posix_captures/categorize/01.i.c [new file with mode: 0644]
re2c/test/posix_captures/categorize/01.i.re [new file with mode: 0644]
re2c/test/posix_captures/categorize/02.i.c [new file with mode: 0644]
re2c/test/posix_captures/categorize/02.i.re [new file with mode: 0644]
re2c/test/posix_captures/categorize/03.i.c [new file with mode: 0644]
re2c/test/posix_captures/categorize/03.i.re [new file with mode: 0644]
re2c/test/posix_captures/categorize/04.i.c [new file with mode: 0644]
re2c/test/posix_captures/categorize/04.i.re [new file with mode: 0644]
re2c/test/posix_captures/categorize/05.i.c [new file with mode: 0644]
re2c/test/posix_captures/categorize/05.i.re [new file with mode: 0644]
re2c/test/posix_captures/categorize/06.i.c [new file with mode: 0644]
re2c/test/posix_captures/categorize/06.i.re [new file with mode: 0644]
re2c/test/posix_captures/categorize/07.i.c [new file with mode: 0644]
re2c/test/posix_captures/categorize/07.i.re [new file with mode: 0644]
re2c/test/posix_captures/categorize/08.i.c [new file with mode: 0644]
re2c/test/posix_captures/categorize/08.i.re [new file with mode: 0644]
re2c/test/posix_captures/categorize/09.i.c [new file with mode: 0644]
re2c/test/posix_captures/categorize/09.i.re [new file with mode: 0644]
re2c/test/posix_captures/categorize/10.i.c [new file with mode: 0644]
re2c/test/posix_captures/categorize/10.i.re [new file with mode: 0644]
re2c/test/posix_captures/categorize/11.i.c [new file with mode: 0644]
re2c/test/posix_captures/categorize/11.i.re [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/01.i.c [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/01.i.re [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/02.i.c [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/02.i.re [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/03.i.c [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/03.i.re [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/04.i.c [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/04.i.re [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/05.i.c [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/05.i.re [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/06.i.c [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/06.i.re [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/07.i.c [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/07.i.re [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/08.i.c [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/08.i.re [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/09.i.c [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/09.i.re [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/10.i.c [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/10.i.re [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/11.i.c [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/11.i.re [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/12.i.c [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/12.i.re [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/13.i.c [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/13.i.re [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/14.i.c [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/14.i.re [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/15.i.c [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/15.i.re [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/16.i.c [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/16.i.re [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/17.i.c [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/17.i.re [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/18.i.c [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/18.i.re [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/19.i.c [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/19.i.re [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/20.i.c [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/20.i.re [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/21.i.c [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/21.i.re [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/22.i.c [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/22.i.re [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/23.i.c [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/23.i.re [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/24.i.c [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/24.i.re [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/25.i.c [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/25.i.re [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/26.i.c [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/26.i.re [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/27.i.c [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/27.i.re [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/28.i.c [new file with mode: 0644]
re2c/test/posix_captures/forcedassoc/28.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/01.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/01.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/02.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/02.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/03.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/03.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/04.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/04.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/05.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/05.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/06.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/06.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/07.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/07.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/08.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/08.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/09.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/09.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/10.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/10.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/11.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/11.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/12.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/12.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/13.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/13.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/14.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/14.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/15.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/15.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/16.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/16.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/17.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/17.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/18.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/18.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/19.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/19.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/20.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/20.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/21.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/21.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/22.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/22.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/23.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/23.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/24.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/24.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/25.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/25.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/26.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/26.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/27.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/27.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/28.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/28.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/29.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/29.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/30.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/30.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/31.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/31.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/32.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/32.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/33.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/33.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/34.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/34.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/35.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/35.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/36.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/36.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/37.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/37.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/38.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/38.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/39.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/39.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/40.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/40.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/41.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/41.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/42.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/42.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/43.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/43.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/44.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/44.i.re [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/45.i.c [new file with mode: 0644]
re2c/test/posix_captures/glennfowler/45.i.re [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/01.i.c [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/01.i.re [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/02.i.c [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/02.i.re [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/03.i.c [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/03.i.re [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/04.i.c [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/04.i.re [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/05.i.c [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/05.i.re [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/06.i.c [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/06.i.re [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/07.i.c [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/07.i.re [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/08.i.c [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/08.i.re [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/09.i.c [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/09.i.re [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/10.i.c [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/10.i.re [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/11.i.c [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/11.i.re [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/12.i.c [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/12.i.re [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/13.i.c [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/13.i.re [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/14.i.c [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/14.i.re [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/15.i.c [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/15.i.re [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/16.i.c [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/16.i.re [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/17.i.c [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/17.i.re [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/18.i.c [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/18.i.re [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/19.i.c [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/19.i.re [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/20.i.c [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/20.i.re [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/21.i.c [new file with mode: 0644]
re2c/test/posix_captures/nullsubexpr/21.i.re [new file with mode: 0644]
re2c/test/posix_captures/osxbsdcritical/01.i.c [new file with mode: 0644]
re2c/test/posix_captures/osxbsdcritical/01.i.re [new file with mode: 0644]
re2c/test/posix_captures/osxbsdcritical/02.i.c [new file with mode: 0644]
re2c/test/posix_captures/osxbsdcritical/02.i.re [new file with mode: 0644]
re2c/test/posix_captures/osxbsdcritical/03.i.c [new file with mode: 0644]
re2c/test/posix_captures/osxbsdcritical/03.i.re [new file with mode: 0644]
re2c/test/posix_captures/osxbsdcritical/04.i.c [new file with mode: 0644]
re2c/test/posix_captures/osxbsdcritical/04.i.re [new file with mode: 0644]
re2c/test/posix_captures/osxbsdcritical/05.i.c [new file with mode: 0644]
re2c/test/posix_captures/osxbsdcritical/05.i.re [new file with mode: 0644]
re2c/test/posix_captures/osxbsdcritical/06.i.c [new file with mode: 0644]
re2c/test/posix_captures/osxbsdcritical/06.i.re [new file with mode: 0644]
re2c/test/posix_captures/osxbsdcritical/07.i.c [new file with mode: 0644]
re2c/test/posix_captures/osxbsdcritical/07.i.re [new file with mode: 0644]
re2c/test/posix_captures/other/01.i.c [new file with mode: 0644]
re2c/test/posix_captures/other/01.i.re [new file with mode: 0644]
re2c/test/posix_captures/other/02.i.c [new file with mode: 0644]
re2c/test/posix_captures/other/02.i.re [new file with mode: 0644]
re2c/test/posix_captures/other/03.i.c [new file with mode: 0644]
re2c/test/posix_captures/other/03.i.re [new file with mode: 0644]
re2c/test/posix_captures/other/04.i.c [new file with mode: 0644]
re2c/test/posix_captures/other/04.i.re [new file with mode: 0644]
re2c/test/posix_captures/other/05.i.c [new file with mode: 0644]
re2c/test/posix_captures/other/05.i.re [new file with mode: 0644]
re2c/test/posix_captures/other/06.i.c [new file with mode: 0644]
re2c/test/posix_captures/other/06.i.re [new file with mode: 0644]
re2c/test/posix_captures/other/07.i.c [new file with mode: 0644]
re2c/test/posix_captures/other/07.i.re [new file with mode: 0644]
re2c/test/posix_captures/other/08.i.c [new file with mode: 0644]
re2c/test/posix_captures/other/08.i.re [new file with mode: 0644]
re2c/test/posix_captures/other/09.i.c [new file with mode: 0644]
re2c/test/posix_captures/other/09.i.re [new file with mode: 0644]
re2c/test/posix_captures/other/10.i.c [new file with mode: 0644]
re2c/test/posix_captures/other/10.i.re [new file with mode: 0644]
re2c/test/posix_captures/other/11.i.c [new file with mode: 0644]
re2c/test/posix_captures/other/11.i.re [new file with mode: 0644]
re2c/test/posix_captures/other/12.i.c [new file with mode: 0644]
re2c/test/posix_captures/other/12.i.re [new file with mode: 0644]
re2c/test/posix_captures/other/13.i.c [new file with mode: 0644]
re2c/test/posix_captures/other/13.i.re [new file with mode: 0644]
re2c/test/posix_captures/other/14.i.c [new file with mode: 0644]
re2c/test/posix_captures/other/14.i.re [new file with mode: 0644]
re2c/test/posix_captures/other/15.i.c [new file with mode: 0644]
re2c/test/posix_captures/other/15.i.re [new file with mode: 0644]
re2c/test/posix_captures/other/16.i.c [new file with mode: 0644]
re2c/test/posix_captures/other/16.i.re [new file with mode: 0644]
re2c/test/posix_captures/other/17.i.c [new file with mode: 0644]
re2c/test/posix_captures/other/17.i.re [new file with mode: 0644]
re2c/test/posix_captures/other/18.i.c [new file with mode: 0644]
re2c/test/posix_captures/other/18.i.re [new file with mode: 0644]
re2c/test/posix_captures/other/19.i.c [new file with mode: 0644]
re2c/test/posix_captures/other/19.i.re [new file with mode: 0644]
re2c/test/posix_captures/other/20.i.c [new file with mode: 0644]
re2c/test/posix_captures/other/20.i.re [new file with mode: 0644]
re2c/test/posix_captures/other/21.i.c [new file with mode: 0644]
re2c/test/posix_captures/other/21.i.re [new file with mode: 0644]
re2c/test/posix_captures/other/22.i.c [new file with mode: 0644]
re2c/test/posix_captures/other/22.i.re [new file with mode: 0644]
re2c/test/posix_captures/other/23.i.c [new file with mode: 0644]
re2c/test/posix_captures/other/23.i.re [new file with mode: 0644]
re2c/test/posix_captures/other/24.i.c [new file with mode: 0644]
re2c/test/posix_captures/other/24.i.re [new file with mode: 0644]
re2c/test/posix_captures/other/25.i.c [new file with mode: 0644]
re2c/test/posix_captures/other/25.i.re [new file with mode: 0644]
re2c/test/posix_captures/other/26.i.c [new file with mode: 0644]
re2c/test/posix_captures/other/26.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/01.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/01.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/02.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/02.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/03.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/03.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/04.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/04.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/05.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/05.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/06.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/06.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/07.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/07.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/08.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/08.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/09.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/09.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/10.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/10.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/11.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/11.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/12.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/12.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/13.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/13.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/14.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/14.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/15.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/15.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/16.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/16.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/17.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/17.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/18.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/18.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/19.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/19.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/20.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/20.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/21.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/21.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/22.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/22.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/23.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/23.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/24.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/24.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/25.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/25.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/26.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/26.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/27.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/27.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/28.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/28.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/29.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/29.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/30.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/30.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/31.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/31.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/32.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/32.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/33.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/33.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/34.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/34.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/35.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/35.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/36.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/36.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/37.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/37.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/38.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/38.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/39.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/39.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/40.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/40.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/41.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/41.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/42.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/42.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/43.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/43.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/44.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/44.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/45.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/45.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/46.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/46.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/47.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/47.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/48.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/48.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/49.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/49.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/50.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/50.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/51.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/51.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/52.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/52.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/53.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/53.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/54.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/54.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/55.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/55.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/56.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/56.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/57.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/57.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/58.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/58.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/59.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/59.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/60.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/60.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/61.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/61.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/62.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/62.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/63.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/63.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/64.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/64.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/65.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/65.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/66.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/66.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/67.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/67.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/68.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/68.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/69.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/69.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/70.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/70.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/71.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/71.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/72.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/72.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/73.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/73.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/74.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/74.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/75.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/75.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/76.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/76.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/77.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/77.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/78.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/78.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/79.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/79.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/80.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/80.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/81.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/81.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/82.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/82.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/83.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/83.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/84.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/84.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/85.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/85.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/86.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/86.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/87.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/87.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/88.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/88.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/89.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/89.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/90.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/90.i.re [new file with mode: 0644]
re2c/test/posix_captures/repetition/91.i.c [new file with mode: 0644]
re2c/test/posix_captures/repetition/91.i.re [new file with mode: 0644]
re2c/test/posix_captures/rightassoc/01.i.c [new file with mode: 0644]
re2c/test/posix_captures/rightassoc/01.i.re [new file with mode: 0644]
re2c/test/posix_captures/rightassoc/02.i.c [new file with mode: 0644]
re2c/test/posix_captures/rightassoc/02.i.re [new file with mode: 0644]
re2c/test/posix_captures/rightassoc/03.i.c [new file with mode: 0644]
re2c/test/posix_captures/rightassoc/03.i.re [new file with mode: 0644]
re2c/test/posix_captures/rightassoc/04.i.c [new file with mode: 0644]
re2c/test/posix_captures/rightassoc/04.i.re [new file with mode: 0644]
re2c/test/posix_captures/rightassoc/05.i.c [new file with mode: 0644]
re2c/test/posix_captures/rightassoc/05.i.re [new file with mode: 0644]
re2c/test/posix_captures/rightassoc/06.i.c [new file with mode: 0644]
re2c/test/posix_captures/rightassoc/06.i.re [new file with mode: 0644]
re2c/test/posix_captures/rightassoc/07.i.c [new file with mode: 0644]
re2c/test/posix_captures/rightassoc/07.i.re [new file with mode: 0644]
re2c/test/posix_captures/rightassoc/08.i.c [new file with mode: 0644]
re2c/test/posix_captures/rightassoc/08.i.re [new file with mode: 0644]
re2c/test/posix_captures/rightassoc/09.i.c [new file with mode: 0644]
re2c/test/posix_captures/rightassoc/09.i.re [new file with mode: 0644]
re2c/test/posix_captures/rightassoc/10.i.c [new file with mode: 0644]
re2c/test/posix_captures/rightassoc/10.i.re [new file with mode: 0644]
re2c/test/posix_captures/rightassoc/11.i.c [new file with mode: 0644]
re2c/test/posix_captures/rightassoc/11.i.re [new file with mode: 0644]
re2c/test/posix_captures/rightassoc/12.i.c [new file with mode: 0644]
re2c/test/posix_captures/rightassoc/12.i.re [new file with mode: 0644]

diff --git a/re2c/test/posix_captures/.dat/basic.dat b/re2c/test/posix_captures/.dat/basic.dat
new file mode 100644 (file)
index 0000000..3ed2993
--- /dev/null
@@ -0,0 +1,59 @@
+(..)*(...)*                    a               (0,0)(?,?)(?,?)
+(..)*(...)*                    abcd            (0,4)(2,4)(?,?)
+(ab|a)(bc|c)                   abc             (0,3)(0,2)(2,3)
+(ab)c|abc                      abc             (0,3)(0,2)
+(a*)(b?)(b+)b{3}               aaabbbbbbb      (0,10)(0,3)(3,4)(4,7)
+(a*)(b{0,1})(b{1,})b{3}                aaabbbbbbb      (0,10)(0,3)(3,4)(4,7)
+((a|a)|a)                      a               (0,1)(0,1)(0,1)
+(a*)(a|aa)                     aaaa            (0,4)(0,3)(3,4)
+a*(a.|aa)                      aaaa            (0,4)(2,4)
+a(b)|c(d)|a(e)f                        aef             (0,3)(?,?)(?,?)(1,2)
+(a|b)?.*                       b               (0,1)(0,1)
+(a|b)c|a(b|c)                  ac              (0,2)(0,1)(?,?)
+(a|b)c|a(b|c)                  ab              (0,2)(?,?)(1,2)
+(a|b)*c|(a|ab)*c               abc             (0,3)(1,2)(?,?)
+(.a|.b).*|.*(.a|.b)            xa              (0,2)(0,2)(?,?)
+a?(ab|ba)ab                    abab            (0,4)(0,2)
+a?(a[c]{0}b|ba)ab              abab            (0,4)(0,2)
+ab|abab                                abbabab         (0,2)
+(aa|aaa)*|(a|aaaaa)            aa              (0,2)(0,2)(?,?)
+(a.|.a.)*|(a|.a...)            aa              (0,2)(0,2)(?,?)
+(a)(b)(c)                      abc             (0,3)(0,1)(1,2)(2,3)
+((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))          x       (0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)
+((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))*         xx      (0,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)
+a?(ab|ba)*                                                             ababababababababababababababababababababababababababababababababababababababababa       (0,81)(79,81)
+a*a*a*a*a*b            aaaaaaaaab      (0,10)
+a[b]+bc                        abbc            (0,4)
+a[b]+bc                        abbbbc          (0,6)
+a[b]?bc                        abbc            (0,4)
+a[b]?bc                        abc             (0,3)
+a[b]?c                 abc             (0,3)
+ab|cd                  abc             (0,2)
+ab|cd                  abcd            (0,2)
+((a))                  abc             (0,1)(0,1)(0,1)
+(a)b(c)                        abc             (0,3)(0,1)(2,3)
+a*                     aaa             (0,3)
+(a*)*                  -               (0,0)(0,0)
+(a*)+                  -               (0,0)(0,0)
+(a*|b)*                        -               (0,0)(0,0)
+(a+|b)*                        ab              (0,2)(1,2)
+(a+|b)+                        ab              (0,2)(1,2)
+(a+|b)?                        ab              (0,1)(0,1)
+([abc])*d              abbbcd          (0,6)(4,5)
+([abc])*bcd            abcd            (0,4)(0,1)
+a|b|c|d|e              e               (0,1)
+(a|b|c|d|e)f           ef              (0,2)(0,1)
+((a*|b))*              -               (0,0)(0,0)(0,0)
+(ab|a[b]*)bc           abc             (0,3)(0,1)
+a([bc]*)c*             abc             (0,3)(1,3)
+a([bc]*)(c*d)          abcd            (0,4)(1,3)(3,4)
+a([bc]+)(c*d)          abcd            (0,4)(1,3)(3,4)
+a([bc]*)(c+d)          abcd            (0,4)(1,2)(2,4)
+a[bcd]*dcdcde          adcdcde         (0,7)
+(ab|a)b*c              abc             (0,3)(0,2)
+((a)(b)c)(d)           abcd            (0,4)(0,3)(0,1)(1,2)(3,4)
+(((((((((a)))))))))    a               (0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)
+(.*)c(.*)              abcde           (0,5)(0,2)(3,5)
+a(bc)d                 abcd            (0,4)(1,3)
+a[\ 1-\ 3]?c               a\ 2c             (0,3)
+a+(b|c)*d+             aabcdd                  (0,6)(3,4)
diff --git a/re2c/test/posix_captures/.dat/categorize.dat b/re2c/test/posix_captures/.dat/categorize.dat
new file mode 100644 (file)
index 0000000..959646f
--- /dev/null
@@ -0,0 +1,11 @@
+(a*)(ab)*(b*)                  abc     (0,2)(0,1)(?,?)(1,2)
+((a*)(ab)*)((b*)(a*))          aba     (0,3)(0,2)(0,0)(0,2)(2,3)(2,2)(2,3)
+(...?.?)*                      xxxxxx  (0,6)(4,6)
+(a|ab)(bc|c)                   abcabc  (0,3)(0,2)(2,3)
+(aba|a*b)(aba|a*b)             ababa   (0,5)(0,2)(2,5)
+(a*){2}                                xxxxx   (0,0)(0,0)
+(a*)*                          a       (0,1)(0,1)
+(aba|a*b)*                     ababa   (0,5)(2,5)
+(a(b)?)+                       aba     (0,3)(2,3)(?,?)
+.*(.*)                         ab      (0,2)(2,2)
+(a?)((ab)?)(b?)a?(ab)?b?       abab    (0,4)(0,1)(1,1)(?,?)(1,2)(?,?)
diff --git a/re2c/test/posix_captures/.dat/forcedassoc.dat b/re2c/test/posix_captures/.dat/forcedassoc.dat
new file mode 100644 (file)
index 0000000..a7c7fb2
--- /dev/null
@@ -0,0 +1,28 @@
+(a|ab)(c|bcd)          abcd    (0,4)(0,1)(1,4)
+(a|ab)(bcd|c)          abcd    (0,4)(0,1)(1,4)
+(ab|a)(c|bcd)          abcd    (0,4)(0,1)(1,4)
+(ab|a)(bcd|c)          abcd    (0,4)(0,1)(1,4)
+((a|ab)(c|bcd))(d*)    abcd    (0,4)(0,4)(0,1)(1,4)(4,4)
+((a|ab)(bcd|c))(d*)    abcd    (0,4)(0,4)(0,1)(1,4)(4,4)
+((ab|a)(c|bcd))(d*)    abcd    (0,4)(0,4)(0,1)(1,4)(4,4)
+((ab|a)(bcd|c))(d*)    abcd    (0,4)(0,4)(0,1)(1,4)(4,4)
+(a|ab)((c|bcd)(d*))    abcd    (0,4)(0,2)(2,4)(2,3)(3,4)
+(a|ab)((bcd|c)(d*))    abcd    (0,4)(0,2)(2,4)(2,3)(3,4)
+(ab|a)((c|bcd)(d*))    abcd    (0,4)(0,2)(2,4)(2,3)(3,4)
+(ab|a)((bcd|c)(d*))    abcd    (0,4)(0,2)(2,4)(2,3)(3,4)
+(a*)(b|abc)            abc     (0,3)(0,0)(0,3)
+(a*)(abc|b)            abc     (0,3)(0,0)(0,3)
+((a*)(b|abc))(c*)      abc     (0,3)(0,3)(0,0)(0,3)(3,3)
+((a*)(abc|b))(c*)      abc     (0,3)(0,3)(0,0)(0,3)(3,3)
+(a*)((b|abc)(c*))      abc     (0,3)(0,1)(1,3)(1,2)(2,3)
+(a*)((abc|b)(c*))      abc     (0,3)(0,1)(1,3)(1,2)(2,3)
+(a*)(b|abc)            abc     (0,3)(0,0)(0,3)
+(a*)(abc|b)            abc     (0,3)(0,0)(0,3)
+((a*)(b|abc))(c*)      abc     (0,3)(0,3)(0,0)(0,3)(3,3)
+((a*)(abc|b))(c*)      abc     (0,3)(0,3)(0,0)(0,3)(3,3)
+(a*)((b|abc)(c*))      abc     (0,3)(0,1)(1,3)(1,2)(2,3)
+(a*)((abc|b)(c*))      abc     (0,3)(0,1)(1,3)(1,2)(2,3)
+(a|ab)                 ab      (0,2)(0,2)
+(ab|a)                 ab      (0,2)(0,2)
+(a|ab)(b*)             ab      (0,2)(0,2)(2,2)
+(ab|a)(b*)             ab      (0,2)(0,2)(2,2)
diff --git a/re2c/test/posix_captures/.dat/glennfowler.dat b/re2c/test/posix_captures/.dat/glennfowler.dat
new file mode 100644 (file)
index 0000000..f789c49
--- /dev/null
@@ -0,0 +1,59 @@
+(a?)((ab)?)                    ab              (0,2)(0,0)(0,2)(0,2)
+(a?)((ab)?)(b?)                        ab              (0,2)(0,1)(1,1)(?,?)(1,2)
+((a?)((ab)?))(b?)              ab              (0,2)(0,2)(0,0)(0,2)(0,2)(2,2)
+(a?)(((ab)?)(b?))              ab              (0,2)(0,1)(1,2)(1,1)(?,?)(1,2)
+
+(.?)                           x               (0,1)(0,1)
+(.?){1}                                x               (0,1)(0,1)
+(.?)(.?)                       x               (0,1)(0,1)(1,1)
+(.?){2}                                x               (0,1)(1,1)
+(.?)*                          x               (0,1)(0,1)
+
+(.?.?)                         xxx             (0,2)(0,2)
+(.?.?){1}                      xxx             (0,2)(0,2)
+(.?.?)(.?.?)                   xxx             (0,3)(0,2)(2,3)
+(.?.?){2}                      xxx             (0,3)(2,3)
+(.?.?)(.?.?)(.?.?)             xxx             (0,3)(0,2)(2,3)(3,3)
+(.?.?){3}                      xxx             (0,3)(3,3)
+(.?.?)*                                xxx             (0,3)(2,3)
+
+a?((ab)?)(b?)                  ab              (0,2)(1,1)(?,?)(1,2)
+(a?)((ab)?)b?                  ab              (0,2)(0,1)(1,1)(?,?)
+a?((ab)?)b?                    ab              (0,2)(1,1)(?,?)
+
+(a*){2}                                xxxxx           (0,0)(0,0)
+
+(ab?)(b?a)                     aba             (0,3)(0,2)(2,3)
+(a|ab)(ba|a)                   aba             (0,3)(0,2)(2,3)
+(a|ab|ba)                      aba             (0,2)(0,2)
+(a|ab|ba)(a|ab|ba)             aba             (0,3)(0,2)(2,3)
+(a|ab|ba)*                     aba             (0,3)(2,3)
+
+(aba|a*b)                      ababa           (0,3)(0,3)
+(aba|a*b)(aba|a*b)             ababa           (0,5)(0,2)(2,5)
+(aba|a*b)(aba|a*b)(aba|a*b)    ababa           NOMATCH
+(aba|a*b)*                     ababa           (0,5)(2,5)
+(aba|ab|a)                     ababa           (0,3)(0,3)
+(aba|ab|a)(aba|ab|a)           ababa           (0,5)(0,2)(2,5)
+(aba|ab|a)(aba|ab|a)(aba|ab|a) ababa           (0,5)(0,2)(2,4)(4,5)
+(aba|ab|a)*                    ababa           (0,5)(2,5)
+
+(a(b)?)                                aba             (0,2)(0,2)(1,2)
+(a(b)?)(a(b)?)                 aba             (0,3)(0,2)(1,2)(2,3)(?,?)
+(a(b)?)+                       aba             (0,3)(2,3)(?,?)
+
+(.*)(.*)                       xx              (0,2)(0,2)(2,2)
+.*(.*)                         xx              (0,2)(2,2)
+
+(a.*z|b.*y)                    azbazby         (0,5)(0,5)
+(a.*z|b.*y)(a.*z|b.*y)         azbazby         (0,7)(0,5)(5,7)
+(a.*z|b.*y)*                   azbazby         (0,7)(5,7)
+
+(.|..)(.*)                     ab              (0,2)(0,2)(2,2)
+
+((..)*(...)*)                  xxx             (0,3)(0,3)(?,?)(0,3)
+((..)*(...)*)((..)*(...)*)     xxx             (0,3)(0,3)(?,?)(0,3)(3,3)(?,?)(?,?)
+((..)*(...)*)*                 xxx             (0,3)(0,3)(?,?)(0,3)
+
+
+
diff --git a/re2c/test/posix_captures/.dat/nullsubexpr.dat b/re2c/test/posix_captures/.dat/nullsubexpr.dat
new file mode 100644 (file)
index 0000000..c9f92d0
--- /dev/null
@@ -0,0 +1,51 @@
+(a*)*          a               (0,1)(0,1)
+SAME           x               (0,0)(0,0)
+SAME           aaaaaa          (0,6)(0,6)
+SAME           aaaaaax         (0,6)(0,6)
+(a*)+          a               (0,1)(0,1)
+SAME           x               (0,0)(0,0)
+SAME           aaaaaa          (0,6)(0,6)
+SAME           aaaaaax         (0,6)(0,6)
+(a+)*          a               (0,1)(0,1)
+SAME           x               (0,0)(?,?)
+SAME           aaaaaa          (0,6)(0,6)
+SAME           aaaaaax         (0,6)(0,6)
+(a+)+          a               (0,1)(0,1)
+SAME           x               NOMATCH
+SAME           aaaaaa          (0,6)(0,6)
+SAME           aaaaaax         (0,6)(0,6)
+([a]*)*                a               (0,1)(0,1)
+SAME           x               (0,0)(0,0)
+SAME           aaaaaa          (0,6)(0,6)
+SAME           aaaaaax         (0,6)(0,6)
+([a]*)+                a               (0,1)(0,1)
+SAME           x               (0,0)(0,0)
+SAME           aaaaaa          (0,6)(0,6)
+SAME           aaaaaax         (0,6)(0,6)
+([^b]*)*       a               (0,1)(0,1)
+SAME           b               (0,0)(0,0)
+SAME           aaaaaa          (0,6)(0,6)
+SAME           aaaaaab         (0,6)(0,6)
+([ab]*)*       a               (0,1)(0,1)
+SAME           aaaaaa          (0,6)(0,6)
+SAME           ababab          (0,6)(0,6)
+SAME           bababa          (0,6)(0,6)
+SAME           b               (0,1)(0,1)
+SAME           bbbbbb          (0,6)(0,6)
+SAME           aaaabcde        (0,5)(0,5)
+([^a]*)*       b               (0,1)(0,1)
+SAME           bbbbbb          (0,6)(0,6)
+SAME           aaaaaa          (0,0)(0,0)
+([^ab]*)*      ccccxx          (0,6)(0,6)
+SAME           ababab          (0,0)(0,0)
+((z)+|a)*      zabcde          (0,2)(1,2)(?,?)
+(a)            aaa             (0,1)(0,1)
+(a*)*(x)       x               (0,1)(0,0)(0,1)
+(a*)*(x)       ax              (0,2)(0,1)(1,2)
+(a*)*(x)       axa             (0,2)(0,1)(1,2)
+(a*)+(x)       x               (0,1)(0,0)(0,1)
+(a*)+(x)       ax              (0,2)(0,1)(1,2)
+(a*)+(x)       axa             (0,2)(0,1)(1,2)
+(a*){2}(x)     x               (0,1)(0,0)(0,1)
+(a*){2}(x)     ax              (0,2)(1,1)(1,2)
+(a*){2}(x)     axa             (0,2)(1,1)(1,2)
diff --git a/re2c/test/posix_captures/.dat/osxbsdcritical.dat b/re2c/test/posix_captures/.dat/osxbsdcritical.dat
new file mode 100644 (file)
index 0000000..fc6b5fd
--- /dev/null
@@ -0,0 +1,7 @@
+(()|.)(b)      ab      (0,2)(0,1)(?,?)(1,2)
+(()|[ab])(b)   ab      (0,2)(0,1)(?,?)(1,2)
+(()|[ab])+b    aaab    (0,4)(2,3)(?,?)
+(.|())(b)      ab      (0,2)(0,1)(?,?)(1,2)
+([ab]|())(b)   ab      (0,2)(0,1)(?,?)(1,2)
+([ab]|())+b    aaab    (0,4)(2,3)(?,?)
+(.?)(b)                ab      (0,2)(0,1)(1,2)
diff --git a/re2c/test/posix_captures/.dat/other.dat b/re2c/test/posix_captures/.dat/other.dat
new file mode 100644 (file)
index 0000000..261682b
--- /dev/null
@@ -0,0 +1,69 @@
+
+(a|aa)*                aaa     (0,3)(2,3)
+SAME           aaaa    (0,4)(2,4)
+(aa|a)*                aaa     (0,3)(2,3)
+SAME           aaaa    (0,4)(2,4)
+
+a|(a)          a       (0,1)(?,?)
+(a)|a          a       (0,1)(0,1)
+(b)a|b(a)      ba      (0,2)(0,1)(?,?)
+b(a)|(b)a      ba      (0,2)(1,2)(?,?)
+a*|(a|aa)*     aa      (0,2)(?,?)
+(a|aa)*|a*     aa      (0,2)(0,2)
+
+(aa*|aaa*)*            aaaaaa          (0,6)(0,6)
+(aa*|aaa*)(aa*|aaa*)   aaaaaa          (0,6)(0,6)(6,6)
+(aa)*|(aaa)*           aaaaaa          (0,6)(4,6)(?,?)
+
+(X|Xa|Xab|Xaba|abab|baba|bY|Y)*                XY              (0,2)(1,2)
+SAME                                   XabY            (0,4)(3,4)
+SAME                                   XababY          (0,6)(4,6)
+SAME                                   XabababY        (0,8)(7,8)
+SAME                                   XababababY      (0,10)(8,10)
+
+(y){2}         NULL    NOMATCH
+SAME           y       NOMATCH
+SAME           yy      (0,2)(1,2)
+(y){0,2}       NULL    (0,0)(?,?)
+SAME           y       (0,1)(0,1)
+SAME           yy      (0,2)(1,2)
+(y){1,2}       NULL    NOMATCH
+SAME           y       (0,1)(0,1)
+SAME           yy      (0,2)(1,2)
+(y){1,2}y      NULL    NOMATCH
+SAME           y       NOMATCH
+SAME           yy      (0,2)(0,1)
+SAME           yyy     (0,3)(1,2)
+(y){1,2}y?     NULL    NOMATCH
+SAME           y       (0,1)(0,1)
+SAME           yy      (0,2)(1,2)
+SAME           yyy     (0,3)(1,2)
+(y){2,}                NULL    NOMATCH
+SAME           y       NOMATCH
+SAME           yy      (0,2)(1,2)
+SAME           yyy     (0,3)(2,3)
+
+(y?){2}                NULL    (0,0)(0,0)
+SAME           y       (0,1)(1,1)
+SAME           yy      (0,2)(1,2)
+(y?){0,2}      NULL    (0,0)(0,0)
+SAME           y       (0,1)(0,1)
+SAME           yy      (0,2)(1,2)
+(y?){1,2}      NULL    (0,0)(0,0)
+SAME           y       (0,1)(0,1)
+SAME           yy      (0,2)(1,2)
+(y?){1,2}y     NULL    NOMATCH
+SAME           y       (0,1)(0,0)
+SAME           yy      (0,2)(0,1)
+SAME           yyy     (0,3)(1,2)
+(y?){1,2}y?    NULL    (0,0)(0,0)
+SAME           y       (0,1)(0,1)
+SAME           yy      (0,2)(1,2)
+SAME           yyy     (0,3)(1,2)
+(y?){2,}       NULL    (0,0)(0,0)
+SAME           y       (0,1)(1,1)
+SAME           yy      (0,2)(1,2)
+SAME           yyy     (0,3)(2,3)
+
+(y|(x?)){1,3}  y       (0,1)(0,1)(?,?)
+(y[y]?){3}     yyyy    (0,4)(3,4)
diff --git a/re2c/test/posix_captures/.dat/repetition.dat b/re2c/test/posix_captures/.dat/repetition.dat
new file mode 100644 (file)
index 0000000..e5b2bba
--- /dev/null
@@ -0,0 +1,94 @@
+((..)|(.))                     NULL            NOMATCH
+((..)|(.))((..)|(.))           NULL            NOMATCH
+((..)|(.))((..)|(.))((..)|(.)) NULL            NOMATCH
+((..)|(.)){1}                  NULL            NOMATCH
+((..)|(.)){2}                  NULL            NOMATCH
+((..)|(.)){3}                  NULL            NOMATCH
+((..)|(.))*                    NULL            (0,0)(?,?)(?,?)(?,?)
+((..)|(.))                     a               (0,1)(0,1)(?,?)(0,1)
+((..)|(.))((..)|(.))           a               NOMATCH
+((..)|(.))((..)|(.))((..)|(.)) a               NOMATCH
+((..)|(.)){1}                  a               (0,1)(0,1)(?,?)(0,1)
+((..)|(.)){2}                  a               NOMATCH
+((..)|(.)){3}                  a               NOMATCH
+((..)|(.))*                    a               (0,1)(0,1)(?,?)(0,1)
+((..)|(.))                     aa              (0,2)(0,2)(0,2)(?,?)
+((..)|(.))((..)|(.))           aa              (0,2)(0,1)(?,?)(0,1)(1,2)(?,?)(1,2)
+((..)|(.))((..)|(.))((..)|(.)) aa              NOMATCH
+((..)|(.)){1}                  aa              (0,2)(0,2)(0,2)(?,?)
+((..)|(.)){2}                  aa              (0,2)(1,2)(?,?)(1,2)
+((..)|(.)){3}                  aa              NOMATCH
+((..)|(.))*                    aa              (0,2)(0,2)(0,2)(?,?)
+((..)|(.))                     aaa             (0,2)(0,2)(0,2)(?,?)
+((..)|(.))((..)|(.))           aaa             (0,3)(0,2)(0,2)(?,?)(2,3)(?,?)(2,3)
+((..)|(.))((..)|(.))((..)|(.)) aaa             (0,3)(0,1)(?,?)(0,1)(1,2)(?,?)(1,2)(2,3)(?,?)(2,3)
+((..)|(.)){1}                  aaa             (0,2)(0,2)(0,2)(?,?)
+((..)|(.)){2}                  aaa             (0,3)(2,3)(?,?)(2,3)
+((..)|(.)){3}                  aaa             (0,3)(2,3)(?,?)(2,3)
+((..)|(.))*                    aaa             (0,3)(2,3)(?,?)(2,3)
+((..)|(.))                     aaaa            (0,2)(0,2)(0,2)(?,?)
+((..)|(.))((..)|(.))           aaaa            (0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)
+((..)|(.))((..)|(.))((..)|(.)) aaaa            (0,4)(0,2)(0,2)(?,?)(2,3)(?,?)(2,3)(3,4)(?,?)(3,4)
+((..)|(.)){1}                  aaaa            (0,2)(0,2)(0,2)(?,?)
+((..)|(.)){2}                  aaaa            (0,4)(2,4)(2,4)(?,?)
+((..)|(.)){3}                  aaaa            (0,4)(3,4)(?,?)(3,4)
+((..)|(.))*                    aaaa            (0,4)(2,4)(2,4)(?,?)
+((..)|(.))                     aaaaa           (0,2)(0,2)(0,2)(?,?)
+((..)|(.))((..)|(.))           aaaaa           (0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)
+((..)|(.))((..)|(.))((..)|(.)) aaaaa           (0,5)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)(4,5)(?,?)(4,5)
+((..)|(.)){1}                  aaaaa           (0,2)(0,2)(0,2)(?,?)
+((..)|(.)){2}                  aaaaa           (0,4)(2,4)(2,4)(?,?)
+((..)|(.)){3}                  aaaaa           (0,5)(4,5)(?,?)(4,5)
+((..)|(.))*                    aaaaa           (0,5)(4,5)(?,?)(4,5)
+((..)|(.))                     aaaaaa          (0,2)(0,2)(0,2)(?,?)
+((..)|(.))((..)|(.))           aaaaaa          (0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)
+((..)|(.))((..)|(.))((..)|(.)) aaaaaa          (0,6)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)(4,6)(4,6)(?,?)
+((..)|(.)){1}                  aaaaaa          (0,2)(0,2)(0,2)(?,?)
+((..)|(.)){2}                  aaaaaa          (0,4)(2,4)(2,4)(?,?)
+((..)|(.)){3}                  aaaaaa          (0,6)(4,6)(4,6)(?,?)
+((..)|(.))*                    aaaaaa          (0,6)(4,6)(4,6)(?,?)
+
+X(.?){0,}Y                     X1234567Y       (0,9)(7,8)
+X(.?){1,}Y                     X1234567Y       (0,9)(7,8)
+X(.?){2,}Y                     X1234567Y       (0,9)(7,8)
+X(.?){3,}Y                     X1234567Y       (0,9)(7,8)
+X(.?){4,}Y                     X1234567Y       (0,9)(7,8)
+X(.?){5,}Y                     X1234567Y       (0,9)(7,8)
+X(.?){6,}Y                     X1234567Y       (0,9)(7,8)
+X(.?){7,}Y                     X1234567Y       (0,9)(7,8)
+X(.?){8,}Y                     X1234567Y       (0,9)(8,8)
+X(.?){0,8}Y                    X1234567Y       (0,9)(7,8)
+X(.?){1,8}Y                    X1234567Y       (0,9)(7,8)
+X(.?){2,8}Y                    X1234567Y       (0,9)(7,8)
+X(.?){3,8}Y                    X1234567Y       (0,9)(7,8)
+X(.?){4,8}Y                    X1234567Y       (0,9)(7,8)
+X(.?){5,8}Y                    X1234567Y       (0,9)(7,8)
+X(.?){6,8}Y                    X1234567Y       (0,9)(7,8)
+X(.?){7,8}Y                    X1234567Y       (0,9)(7,8)
+X(.?){8,8}Y                    X1234567Y       (0,9)(8,8)
+
+(a|ab|c|bcd){0,}(d*)           ababcd          (0,6)(3,6)(6,6)
+(a|ab|c|bcd){1,}(d*)           ababcd          (0,6)(3,6)(6,6)
+(a|ab|c|bcd){2,}(d*)           ababcd          (0,6)(3,6)(6,6)
+(a|ab|c|bcd){3,}(d*)           ababcd          (0,6)(3,6)(6,6)
+(a|ab|c|bcd){4,}(d*)           ababcd          NOMATCH
+(a|ab|c|bcd){0,10}(d*)         ababcd          (0,6)(3,6)(6,6)
+(a|ab|c|bcd){1,10}(d*)         ababcd          (0,6)(3,6)(6,6)
+(a|ab|c|bcd){2,10}(d*)         ababcd          (0,6)(3,6)(6,6)
+(a|ab|c|bcd){3,10}(d*)         ababcd          (0,6)(3,6)(6,6)
+(a|ab|c|bcd){4,10}(d*)         ababcd          NOMATCH
+(a|ab|c|bcd)*(d*)              ababcd          (0,6)(3,6)(6,6)
+(a|ab|c|bcd)+(d*)              ababcd          (0,6)(3,6)(6,6)
+
+(ab|a|c|bcd){0,}(d*)           ababcd          (0,6)(3,6)(6,6)
+(ab|a|c|bcd){1,}(d*)           ababcd          (0,6)(3,6)(6,6)
+(ab|a|c|bcd){2,}(d*)           ababcd          (0,6)(3,6)(6,6)
+(ab|a|c|bcd){3,}(d*)           ababcd          (0,6)(3,6)(6,6)
+(ab|a|c|bcd){4,}(d*)           ababcd          NOMATCH
+(ab|a|c|bcd){0,10}(d*)         ababcd          (0,6)(3,6)(6,6)
+(ab|a|c|bcd){1,10}(d*)         ababcd          (0,6)(3,6)(6,6)
+(ab|a|c|bcd){2,10}(d*)         ababcd          (0,6)(3,6)(6,6)
+(ab|a|c|bcd){3,10}(d*)         ababcd          (0,6)(3,6)(6,6)
+(ab|a|c|bcd){4,10}(d*)         ababcd          NOMATCH
+(ab|a|c|bcd)*(d*)              ababcd          (0,6)(3,6)(6,6)
+(ab|a|c|bcd)+(d*)              ababcd          (0,6)(3,6)(6,6)
diff --git a/re2c/test/posix_captures/.dat/rightassoc.dat b/re2c/test/posix_captures/.dat/rightassoc.dat
new file mode 100644 (file)
index 0000000..e0e146c
--- /dev/null
@@ -0,0 +1,12 @@
+(a|ab)(c|bcd)(d*)      abcd    (0,4)(0,2)(2,3)(3,4)
+(a|ab)(bcd|c)(d*)      abcd    (0,4)(0,2)(2,3)(3,4)
+(ab|a)(c|bcd)(d*)      abcd    (0,4)(0,2)(2,3)(3,4)
+(ab|a)(bcd|c)(d*)      abcd    (0,4)(0,2)(2,3)(3,4)
+(a*)(b|abc)(c*)                abc     (0,3)(0,1)(1,2)(2,3)
+(a*)(abc|b)(c*)                abc     (0,3)(0,1)(1,2)(2,3)
+(a*)(b|abc)(c*)                abc     (0,3)(0,1)(1,2)(2,3)
+(a*)(abc|b)(c*)                abc     (0,3)(0,1)(1,2)(2,3)
+(a|ab)(c|bcd)(d|.*)    abcd    (0,4)(0,2)(2,3)(3,4)
+(a|ab)(bcd|c)(d|.*)    abcd    (0,4)(0,2)(2,3)(3,4)
+(ab|a)(c|bcd)(d|.*)    abcd    (0,4)(0,2)(2,3)(3,4)
+(ab|a)(bcd|c)(d|.*)    abcd    (0,4)(0,2)(2,3)(3,4)
diff --git a/re2c/test/posix_captures/.gen/__gen.sh b/re2c/test/posix_captures/.gen/__gen.sh
new file mode 100755 (executable)
index 0000000..cedd6a8
--- /dev/null
@@ -0,0 +1,25 @@
+
+for f in ../.dat/*.dat; do
+
+    d=../`basename ${f%.dat}`
+    mkdir -p $d
+
+    i=0
+    while read l; do
+
+        [ -z "$l" ] && continue
+        set $l
+        [ "$1" == SAME ] && continue
+
+        i=$((i + 1))
+        x=`printf '%02d' $i`.i.re
+        regexp=`printf "%s" "$1" | sed \
+            -e 's/\[^/[^\\\\x00/g' \
+            -e 's/\./[^\\\\x00]/g' \
+            -e 's/()/("")/g'`
+
+        cat template | sed "s/<<<<REGEXP>>>>/$regexp/" > $d/$x
+
+    done < $f
+done
+
diff --git a/re2c/test/posix_captures/.gen/template b/re2c/test/posix_captures/.gen/template
new file mode 100644 (file)
index 0000000..d66eb2e
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    <<<<REGEXP>>>>
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/.run/__run.sh b/re2c/test/posix_captures/.run/__run.sh
new file mode 100755 (executable)
index 0000000..c4eb3f0
--- /dev/null
@@ -0,0 +1,44 @@
+
+# run <regex> <string> <match> [re2c-flags]
+run() {
+    re2c=../../../.build/re2c
+    f="test_"`date +%y%m%d%H%M%S`
+    fail=0
+
+    cat template | sed "s/<<<<REGEXP>>>>/$1/" > $f.re \
+        && echo "$3" > $f.expected \
+        && $re2c -iF --posix-captures $4 $f.re -o$f.cpp \
+        && g++ -W $f.cpp -o$f \
+        && ./$f "$2" > $f.actual \
+        && diff $f.expected $f.actual \
+        || fail=1
+
+    rm $f*
+    [ $fail == 1 ] && { echo "$1 failed"; exit 1; }
+}
+
+for f in ../.dat/*.dat; do
+    i=0
+    n=`grep -cv "^$" $f` # nonempty lines
+
+    printf "%s\n" `basename $f`
+    while read l; do
+
+        [ -z "$l" ] && continue
+        set $l
+        [ "$1" == SAME ] || regexp=`printf "%s" "$1" | sed \
+            -e 's/\[^/[^\\\\x00/g' \
+            -e 's/\./[^\\\\x00]/g' \
+            -e 's/()/("")/g'`
+        string="${2#NULL}"
+        match="$3"
+        i=$((i + 1))
+
+        printf "\r%3d / %-3d" $i $n
+        run "$regexp" "$string" "$match"
+        run "$regexp" "$string" "$match" "--no-lookahead"
+
+    done < $f
+    printf "\n"
+done
+
diff --git a/re2c/test/posix_captures/.run/template b/re2c/test/posix_captures/.run/template
new file mode 100644 (file)
index 0000000..d36fe44
--- /dev/null
@@ -0,0 +1,45 @@
+#include <stdio.h>
+
+static int lex(const char *YYCURSOR)
+{
+    const char *YYMARKER;
+    /*!tags:re2c format = "const char *@@;"; */
+    /*!re2c
+        re2c:yyfill:enable = 0;
+        re2c:define:YYCTYPE = char;
+
+        <<<<REGEXP>>>>
+        {
+            const char *p0 = yypmatch[0], *p;
+            for (size_t i = 0; i < yynmatch; ++i) {
+                p = yypmatch[2 * i];
+                if (p) {
+                    printf("(%ld,", p - p0);
+                } else {
+                    printf("(?,");
+                }
+                p = yypmatch[2 * i + 1];
+                if (p) {
+                    printf("%ld)", p - p0);
+                } else {
+                    printf("?)");
+                }
+            }
+            printf("\n");
+            return 0;
+        }
+
+        "" {
+            printf("NOMATCH\n");
+            return 1;
+        }
+    */
+}
+
+int main(int argc, char **argv)
+{
+    for (int i = 1; i < argc; ++i) {
+        lex(argv[i]);
+    }
+    return 0;
+}
diff --git a/re2c/test/posix_captures/basic/01.i.c b/re2c/test/posix_captures/basic/01.i.c
new file mode 100644 (file)
index 0000000..95f82f1
--- /dev/null
@@ -0,0 +1,94 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt2 = NULL;
+               yyt1 = yyt3 = yyt5 = YYCURSOR;
+               goto yy3;
+       }
+       yyt2 = yyt3 = yyt4 = yyt5 = NULL;
+       yyt1 = YYCURSOR;
+yy2:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[5] = yyt4;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               yypmatch[4] = yyt5;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) goto yy5;
+       YYCURSOR = YYMARKER;
+       yyt2 = yyt3 = yyt4 = yyt5 = NULL;
+       yyt1 = YYCURSOR;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt4 = yyt5 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+       yyt4 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt2;
+               yyt4 = YYCURSOR;
+               goto yy2;
+       }
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt4;
+               yyt4 = yyt5 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+       yyt2 = yyt5 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt2 = yyt4;
+               yyt5 = yyt4;
+               yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy9:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt2;
+               yyt4 = yyt5 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+       yyt3 = YYCURSOR;
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt4;
+               yyt4 = YYCURSOR;
+               goto yy2;
+       }
+       yyt4 = yyt2;
+       yyt5 = yyt3;
+       yyt2 = yyt3;
+       goto yy9;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 4 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 4 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 4 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 4 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/basic/01.i.re b/re2c/test/posix_captures/basic/01.i.re
new file mode 100644 (file)
index 0000000..8cd2f82
Binary files /dev/null and b/re2c/test/posix_captures/basic/01.i.re differ
diff --git a/re2c/test/posix_captures/basic/02.i.c b/re2c/test/posix_captures/basic/02.i.c
new file mode 100644 (file)
index 0000000..95f82f1
--- /dev/null
@@ -0,0 +1,94 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt2 = NULL;
+               yyt1 = yyt3 = yyt5 = YYCURSOR;
+               goto yy3;
+       }
+       yyt2 = yyt3 = yyt4 = yyt5 = NULL;
+       yyt1 = YYCURSOR;
+yy2:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[5] = yyt4;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               yypmatch[4] = yyt5;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) goto yy5;
+       YYCURSOR = YYMARKER;
+       yyt2 = yyt3 = yyt4 = yyt5 = NULL;
+       yyt1 = YYCURSOR;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt4 = yyt5 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+       yyt4 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt2;
+               yyt4 = YYCURSOR;
+               goto yy2;
+       }
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt4;
+               yyt4 = yyt5 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+       yyt2 = yyt5 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt2 = yyt4;
+               yyt5 = yyt4;
+               yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy9:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt2;
+               yyt4 = yyt5 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+       yyt3 = YYCURSOR;
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt4;
+               yyt4 = YYCURSOR;
+               goto yy2;
+       }
+       yyt4 = yyt2;
+       yyt5 = yyt3;
+       yyt2 = yyt3;
+       goto yy9;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 4 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 4 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 4 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 4 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/basic/02.i.re b/re2c/test/posix_captures/basic/02.i.re
new file mode 100644 (file)
index 0000000..8cd2f82
Binary files /dev/null and b/re2c/test/posix_captures/basic/02.i.re differ
diff --git a/re2c/test/posix_captures/basic/03.i.c b/re2c/test/posix_captures/basic/03.i.c
new file mode 100644 (file)
index 0000000..5cad290
--- /dev/null
@@ -0,0 +1,67 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy8;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy6:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt2;
+               yypmatch[4] = yyt1;
+               yypmatch[0] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt1;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy6;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/basic/03.i.re b/re2c/test/posix_captures/basic/03.i.re
new file mode 100644 (file)
index 0000000..5a7a5ab
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (ab|a)(bc|c)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/04.i.c b/re2c/test/posix_captures/basic/04.i.c
new file mode 100644 (file)
index 0000000..619851c
--- /dev/null
@@ -0,0 +1,52 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy6:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[0] = YYCURSOR - 3;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/basic/04.i.re b/re2c/test/posix_captures/basic/04.i.re
new file mode 100644 (file)
index 0000000..b373d7e
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (ab)c|abc
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/05.i.c b/re2c/test/posix_captures/basic/05.i.c
new file mode 100644 (file)
index 0000000..3e8f4f9
--- /dev/null
@@ -0,0 +1,104 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt4 = yyt5 = yyt6 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       case 'b':
+               yyt5 = yyt6 = YYCURSOR;
+               goto yy6;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy6:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy7;
+       default:        goto yy5;
+       }
+yy7:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy8;
+       default:        goto yy5;
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy9;
+       default:        goto yy5;
+       }
+yy9:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt6 = YYCURSOR;
+               goto yy11;
+       default:        goto yy10;
+       }
+yy10:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt4;
+               yypmatch[4] = yyt5;
+               yypmatch[6] = yyt6;
+               yypmatch[7] = yyt1;
+               yypmatch[0] = yyt4;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt5;
+               yypmatch[5] = yyt6;
+               {}
+       }
+yy11:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt2 = yyt3;
+               yyt3 = yyt6;
+               yyt6 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt6 = yyt1;
+               yyt1 = yyt2;
+               goto yy10;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 4 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/basic/05.i.re b/re2c/test/posix_captures/basic/05.i.re
new file mode 100644 (file)
index 0000000..8c227cf
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a*)(b?)(b+)b{3}
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/06.i.c b/re2c/test/posix_captures/basic/06.i.c
new file mode 100644 (file)
index 0000000..3e8f4f9
--- /dev/null
@@ -0,0 +1,104 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt4 = yyt5 = yyt6 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       case 'b':
+               yyt5 = yyt6 = YYCURSOR;
+               goto yy6;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy6:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy7;
+       default:        goto yy5;
+       }
+yy7:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy8;
+       default:        goto yy5;
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy9;
+       default:        goto yy5;
+       }
+yy9:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt6 = YYCURSOR;
+               goto yy11;
+       default:        goto yy10;
+       }
+yy10:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt4;
+               yypmatch[4] = yyt5;
+               yypmatch[6] = yyt6;
+               yypmatch[7] = yyt1;
+               yypmatch[0] = yyt4;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt5;
+               yypmatch[5] = yyt6;
+               {}
+       }
+yy11:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt2 = yyt3;
+               yyt3 = yyt6;
+               yyt6 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt6 = yyt1;
+               yyt1 = yyt2;
+               goto yy10;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 4 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/basic/06.i.re b/re2c/test/posix_captures/basic/06.i.re
new file mode 100644 (file)
index 0000000..8f63de9
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a*)(b{0,1})(b{1,})b{3}
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/07.i.c b/re2c/test/posix_captures/basic/07.i.c
new file mode 100644 (file)
index 0000000..00c2ab7
--- /dev/null
@@ -0,0 +1,37 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       yyt2 = YYCURSOR;
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[4] = yyt1;
+               yypmatch[5] = yyt2;
+               yypmatch[0] = YYCURSOR - 1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = YYCURSOR - 1;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/basic/07.i.re b/re2c/test/posix_captures/basic/07.i.re
new file mode 100644 (file)
index 0000000..d3a764b
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    ((a|a)|a)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/08.i.c b/re2c/test/posix_captures/basic/08.i.c
new file mode 100644 (file)
index 0000000..c04780d
--- /dev/null
@@ -0,0 +1,47 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       default:        goto yy5;
+       }
+yy5:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt2;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/basic/08.i.re b/re2c/test/posix_captures/basic/08.i.re
new file mode 100644 (file)
index 0000000..4ad00a1
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a*)(a|aa)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/09.i.c b/re2c/test/posix_captures/basic/09.i.c
new file mode 100644 (file)
index 0000000..d904742
--- /dev/null
@@ -0,0 +1,51 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) goto yy8;
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       ++YYCURSOR;
+yy6:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = YYCURSOR - 2;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy7:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy8:
+       switch (yych) {
+       case 0x00:      goto yy6;
+       case 'a':       goto yy7;
+       default:        goto yy5;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/basic/09.i.re b/re2c/test/posix_captures/basic/09.i.re
new file mode 100644 (file)
index 0000000..3c4c941
Binary files /dev/null and b/re2c/test/posix_captures/basic/09.i.re differ
diff --git a/re2c/test/posix_captures/basic/10.i.c b/re2c/test/posix_captures/basic/10.i.c
new file mode 100644 (file)
index 0000000..99cf3dd
--- /dev/null
@@ -0,0 +1,83 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy5;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       case 'e':
+               yyt6 = YYCURSOR;
+               goto yy8;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':
+               yyt4 = YYCURSOR;
+               goto yy9;
+       default:        goto yy4;
+       }
+yy6:
+       ++YYCURSOR;
+       yyt4 = yyt5 = yyt6 = yyt7 = NULL;
+       yyt3 = YYCURSOR;
+yy7:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = yyt3;
+               yypmatch[4] = yyt4;
+               yypmatch[5] = yyt5;
+               yypmatch[6] = yyt6;
+               yypmatch[7] = yyt7;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'f':
+               yyt7 = YYCURSOR;
+               goto yy10;
+       default:        goto yy4;
+       }
+yy9:
+       ++YYCURSOR;
+       yyt2 = yyt3 = yyt6 = yyt7 = NULL;
+       yyt5 = YYCURSOR;
+       goto yy7;
+yy10:
+       ++YYCURSOR;
+       yyt2 = yyt3 = yyt4 = yyt5 = NULL;
+       goto yy7;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/basic/10.i.re b/re2c/test/posix_captures/basic/10.i.re
new file mode 100644 (file)
index 0000000..7b35305
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    a(b)|c(d)|a(e)f
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/11.i.c b/re2c/test/posix_captures/basic/11.i.c
new file mode 100644 (file)
index 0000000..d92f686
--- /dev/null
@@ -0,0 +1,46 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt3 = NULL;
+               yyt1 = YYCURSOR;
+               goto yy2;
+       case 'a':
+       case 'b':
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt2 = yyt3 = NULL;
+               yyt1 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[2] = yyt3;
+               yypmatch[3] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy4:
+       if (yych <= 0x00) goto yy2;
+       goto yy3;
+yy5:
+       yych = *++YYCURSOR;
+       yyt2 = YYCURSOR;
+       goto yy4;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/basic/11.i.re b/re2c/test/posix_captures/basic/11.i.re
new file mode 100644 (file)
index 0000000..9493389
Binary files /dev/null and b/re2c/test/posix_captures/basic/11.i.re differ
diff --git a/re2c/test/posix_captures/basic/12.i.c b/re2c/test/posix_captures/basic/12.i.c
new file mode 100644 (file)
index 0000000..83126bf
--- /dev/null
@@ -0,0 +1,69 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy5;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy6;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy8;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy8;
+       default:        goto yy4;
+       }
+yy6:
+       ++YYCURSOR;
+       yyt1 = yyt2 = NULL;
+       yyt4 = YYCURSOR;
+yy7:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[4] = yyt3;
+               yypmatch[5] = yyt4;
+               yypmatch[0] = YYCURSOR - 2;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy8:
+       ++YYCURSOR;
+       yyt3 = yyt4 = NULL;
+       goto yy7;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/basic/12.i.re b/re2c/test/posix_captures/basic/12.i.re
new file mode 100644 (file)
index 0000000..93eddb8
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a|b)c|a(b|c)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/13.i.c b/re2c/test/posix_captures/basic/13.i.c
new file mode 100644 (file)
index 0000000..83126bf
--- /dev/null
@@ -0,0 +1,69 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy5;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy6;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy8;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy8;
+       default:        goto yy4;
+       }
+yy6:
+       ++YYCURSOR;
+       yyt1 = yyt2 = NULL;
+       yyt4 = YYCURSOR;
+yy7:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[4] = yyt3;
+               yypmatch[5] = yyt4;
+               yypmatch[0] = YYCURSOR - 2;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy8:
+       ++YYCURSOR;
+       yyt3 = yyt4 = NULL;
+       goto yy7;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/basic/13.i.re b/re2c/test/posix_captures/basic/13.i.re
new file mode 100644 (file)
index 0000000..93eddb8
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a|b)c|a(b|c)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/14.i.c b/re2c/test/posix_captures/basic/14.i.c
new file mode 100644 (file)
index 0000000..f0ad48b
--- /dev/null
@@ -0,0 +1,63 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+       case 'b':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy3;
+       case 'c':
+               yyt1 = yyt3 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy6;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy6:
+       ++YYCURSOR;
+       yyt4 = NULL;
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt2;
+               yypmatch[3] = yyt3;
+               yypmatch[5] = yyt4;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt4;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/basic/14.i.re b/re2c/test/posix_captures/basic/14.i.re
new file mode 100644 (file)
index 0000000..c4f6746
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a|b)*c|(a|ab)*c
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/15.i.c b/re2c/test/posix_captures/basic/15.i.c
new file mode 100644 (file)
index 0000000..fd5a58e
--- /dev/null
@@ -0,0 +1,106 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+       case 'b':       goto yy7;
+       default:        goto yy6;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       if (yyaccept == 0) {
+               goto yy2;
+       } else {
+               yyt2 = yyt3 = NULL;
+               yyt5 = YYCURSOR;
+               goto yy8;
+       }
+yy5:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy6:
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'a':
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy5;
+       }
+yy7:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt3 = YYCURSOR;
+               goto yy11;
+       }
+       yyt4 = yyt5 = NULL;
+       yyt3 = YYCURSOR;
+yy8:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = yyt3;
+               yypmatch[4] = yyt4;
+               yypmatch[5] = yyt5;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy9:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt4 = yyt2;
+               yyt2 = yyt3 = NULL;
+               yyt5 = YYCURSOR;
+               goto yy8;
+       case 'a':
+       case 'b':
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt4 = yyt2;
+               yyt2 = YYCURSOR;
+               goto yy5;
+       }
+yy11:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) {
+               yyt4 = yyt5 = NULL;
+               goto yy8;
+       }
+       goto yy11;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/basic/15.i.re b/re2c/test/posix_captures/basic/15.i.re
new file mode 100644 (file)
index 0000000..01aa584
Binary files /dev/null and b/re2c/test/posix_captures/basic/15.i.re differ
diff --git a/re2c/test/posix_captures/basic/16.i.c b/re2c/test/posix_captures/basic/16.i.c
new file mode 100644 (file)
index 0000000..ecec131
--- /dev/null
@@ -0,0 +1,86 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy5;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy6;
+       case 'b':       goto yy7;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy8;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy8;
+       default:        goto yy4;
+       }
+yy7:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy9;
+       default:        goto yy4;
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy10;
+       default:        goto yy4;
+       }
+yy9:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy10;
+       case 'b':       goto yy11;
+       default:        goto yy4;
+       }
+yy10:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy11;
+       default:        goto yy4;
+       }
+yy11:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = YYCURSOR - 4;
+               yypmatch[3] = YYCURSOR - 2;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/basic/16.i.re b/re2c/test/posix_captures/basic/16.i.re
new file mode 100644 (file)
index 0000000..5ce187d
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    a?(ab|ba)ab
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/17.i.c b/re2c/test/posix_captures/basic/17.i.c
new file mode 100644 (file)
index 0000000..ecec131
--- /dev/null
@@ -0,0 +1,86 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy5;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy6;
+       case 'b':       goto yy7;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy8;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy8;
+       default:        goto yy4;
+       }
+yy7:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy9;
+       default:        goto yy4;
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy10;
+       default:        goto yy4;
+       }
+yy9:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy10;
+       case 'b':       goto yy11;
+       default:        goto yy4;
+       }
+yy10:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy11;
+       default:        goto yy4;
+       }
+yy11:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = YYCURSOR - 4;
+               yypmatch[3] = YYCURSOR - 2;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/basic/17.i.re b/re2c/test/posix_captures/basic/17.i.re
new file mode 100644 (file)
index 0000000..fada1d7
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    a?(a[c]{0}b|ba)ab
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/18.i.c b/re2c/test/posix_captures/basic/18.i.c
new file mode 100644 (file)
index 0000000..3cacffb
--- /dev/null
@@ -0,0 +1,61 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       if (yyaccept == 0) {
+               goto yy2;
+       } else {
+               goto yy6;
+       }
+yy5:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':       goto yy7;
+       default:        goto yy6;
+       }
+yy6:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy7:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy8;
+       default:        goto yy4;
+       }
+yy8:
+       ++YYCURSOR;
+       goto yy6;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/basic/18.i.re b/re2c/test/posix_captures/basic/18.i.re
new file mode 100644 (file)
index 0000000..1df2699
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    ab|abab
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/19.i.c b/re2c/test/posix_captures/basic/19.i.c
new file mode 100644 (file)
index 0000000..f871451
--- /dev/null
@@ -0,0 +1,154 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt3 = yyt4 = YYCURSOR;
+               goto yy3;
+       default:
+               yyt2 = yyt3 = yyt4 = yyt5 = NULL;
+               yyt1 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[4] = yyt4;
+               yypmatch[5] = yyt5;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy4;
+       default:
+               yyt2 = yyt3 = NULL;
+               yyt5 = YYCURSOR;
+               goto yy2;
+       }
+yy4:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt4 = yyt5 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy6;
+       default:
+               yyt4 = yyt5 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       default:
+               yyt3 = yyt2;
+               yyt4 = yyt5 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy7:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy8;
+       default:
+               yyt3 = yyt4;
+               yyt4 = yyt5 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy8:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt3 = yyt4;
+               yyt4 = yyt5 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy9:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy10;
+       default:
+               yyt4 = yyt5 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy10:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt3 = yyt2;
+               yyt4 = yyt5 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy11:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy12;
+       default:
+               yyt3 = yyt2;
+               yyt4 = yyt5 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy12:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       default:
+               yyt4 = yyt5 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/basic/19.i.re b/re2c/test/posix_captures/basic/19.i.re
new file mode 100644 (file)
index 0000000..658aef3
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (aa|aaa)*|(a|aaaaa)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/20.i.c b/re2c/test/posix_captures/basic/20.i.c
new file mode 100644 (file)
index 0000000..6e6595f
--- /dev/null
@@ -0,0 +1,470 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt3 = yyt4 = yyt5 = NULL;
+               yyt1 = YYCURSOR;
+               goto yy2;
+       case 'a':
+               yyt1 = yyt2 = yyt3 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt1 = yyt2 = yyt3 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt5;
+               yypmatch[4] = yyt3;
+               yypmatch[5] = yyt4;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy6;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       switch (yyaccept) {
+       case 0: 
+               yyt2 = yyt3 = yyt4 = yyt5 = NULL;
+               yyt1 = YYCURSOR;
+               goto yy2;
+       case 1: 
+               yyt3 = yyt4 = NULL;
+               yyt5 = YYCURSOR;
+               goto yy2;
+       case 2: 
+               yyt2 = yyt5 = NULL;
+               yyt4 = YYCURSOR;
+               goto yy2;
+       default:
+               yyt2 = yyt3;
+               yyt3 = yyt4 = NULL;
+               yyt5 = YYCURSOR;
+               goto yy2;
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt5 = NULL;
+               yyt4 = YYCURSOR;
+               goto yy2;
+       case 'a':       goto yy8;
+       default:        goto yy7;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) goto yy4;
+       goto yy9;
+yy7:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt3 = yyt4 = NULL;
+               yyt5 = YYCURSOR;
+               goto yy2;
+       case 'a':
+               yyt5 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt5 = YYCURSOR;
+               goto yy10;
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt3 = yyt4 = NULL;
+               yyt5 = YYCURSOR;
+               goto yy2;
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy12;
+       default:        goto yy9;
+       }
+yy9:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:
+               yyt3 = yyt4 = NULL;
+               yyt5 = YYCURSOR;
+               goto yy2;
+       case 'a':
+               yyt5 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt5 = YYCURSOR;
+               goto yy13;
+       }
+yy10:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy14;
+       default:        goto yy4;
+       }
+yy11:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'a':       goto yy15;
+       default:
+               yyt2 = yyt5;
+               goto yy7;
+       }
+yy12:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt3 = yyt4 = NULL;
+               yyt5 = YYCURSOR;
+               goto yy2;
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy17;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy16;
+       }
+yy13:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'a':       goto yy19;
+       default:        goto yy18;
+       }
+yy14:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) goto yy4;
+       yyt2 = yyt5;
+       goto yy7;
+yy15:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt5;
+               yyt3 = yyt4 = NULL;
+               yyt5 = YYCURSOR;
+               goto yy2;
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy21;
+       default:        goto yy20;
+       }
+yy16:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt4;
+               yyt3 = yyt4 = NULL;
+               yyt5 = YYCURSOR;
+               goto yy2;
+       case 'a':
+               yyt5 = YYCURSOR;
+               goto yy23;
+       default:
+               yyt5 = YYCURSOR;
+               goto yy22;
+       }
+yy17:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt4;
+               yyt3 = yyt4 = NULL;
+               yyt5 = YYCURSOR;
+               goto yy2;
+       case 'a':       goto yy24;
+       default:
+               yyt5 = yyt2;
+               goto yy20;
+       }
+yy18:
+       ++YYCURSOR;
+       yyt2 = yyt5 = NULL;
+       yyt4 = YYCURSOR;
+       goto yy2;
+yy19:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt2 = yyt5 = NULL;
+               yyt4 = YYCURSOR;
+               goto yy2;
+       }
+       yyt2 = yyt5;
+       goto yy7;
+yy20:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt5;
+               yyt3 = yyt4 = NULL;
+               yyt5 = YYCURSOR;
+               goto yy2;
+       case 'a':
+               yyt2 = yyt5;
+               yyt5 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt2 = yyt5;
+               yyt5 = YYCURSOR;
+               goto yy10;
+       }
+yy21:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt5;
+               yyt3 = yyt4 = NULL;
+               yyt5 = YYCURSOR;
+               goto yy2;
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy26;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy25;
+       }
+yy22:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':       goto yy14;
+       default:
+               yyt2 = yyt5 = NULL;
+               yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy23:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt5 = NULL;
+               yyt4 = YYCURSOR;
+               goto yy2;
+       case 'a':       goto yy27;
+       default:        goto yy7;
+       }
+yy24:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt3 = yyt4 = NULL;
+               yyt5 = YYCURSOR;
+               goto yy2;
+       case 'a':
+               yyt5 = YYCURSOR;
+               goto yy28;
+       default:        goto yy7;
+       }
+yy25:
+       yyaccept = 3;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt3;
+               yyt3 = yyt4 = NULL;
+               yyt5 = YYCURSOR;
+               goto yy2;
+       case 'a':
+               yyt5 = YYCURSOR;
+               goto yy29;
+       default:
+               yyt5 = YYCURSOR;
+               goto yy10;
+       }
+yy26:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt3;
+               yyt3 = yyt4 = NULL;
+               yyt5 = YYCURSOR;
+               goto yy2;
+       case 'a':       goto yy24;
+       default:
+               yyt5 = yyt2;
+               goto yy20;
+       }
+yy27:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt3 = yyt4 = NULL;
+               yyt5 = YYCURSOR;
+               goto yy2;
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy31;
+       default:
+               yyt4 = YYCURSOR;
+               goto yy30;
+       }
+yy28:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt3 = yyt4 = NULL;
+               yyt5 = YYCURSOR;
+               goto yy2;
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy32;
+       default:
+               yyt4 = YYCURSOR;
+               goto yy30;
+       }
+yy29:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'a':       goto yy27;
+       default:        goto yy7;
+       }
+yy30:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt5;
+               yyt3 = yyt4 = NULL;
+               yyt5 = YYCURSOR;
+               goto yy2;
+       case 'a':
+               yyt2 = yyt5;
+               yyt5 = YYCURSOR;
+               goto yy33;
+       default:
+               yyt2 = yyt5;
+               yyt5 = YYCURSOR;
+               goto yy10;
+       }
+yy31:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt5;
+               yyt3 = yyt4 = NULL;
+               yyt5 = YYCURSOR;
+               goto yy2;
+       case 'a':       goto yy34;
+       default:
+               yyt2 = yyt4;
+               goto yy7;
+       }
+yy32:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt5;
+               yyt3 = yyt4 = NULL;
+               yyt5 = YYCURSOR;
+               goto yy2;
+       case 'a':
+               yyt4 = yyt2;
+               goto yy34;
+       default:        goto yy7;
+       }
+yy33:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'a':
+               yyt2 = yyt4;
+               goto yy27;
+       default:
+               yyt2 = yyt4;
+               goto yy7;
+       }
+yy34:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt4;
+               yyt3 = yyt4 = NULL;
+               yyt5 = YYCURSOR;
+               goto yy2;
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy35;
+       default:
+               yyt5 = yyt4;
+               goto yy20;
+       }
+yy35:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt4;
+               yyt3 = yyt4 = NULL;
+               yyt5 = YYCURSOR;
+               goto yy2;
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy26;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy25;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/basic/20.i.re b/re2c/test/posix_captures/basic/20.i.re
new file mode 100644 (file)
index 0000000..390e663
Binary files /dev/null and b/re2c/test/posix_captures/basic/20.i.re differ
diff --git a/re2c/test/posix_captures/basic/21.i.c b/re2c/test/posix_captures/basic/21.i.c
new file mode 100644 (file)
index 0000000..078eb9b
--- /dev/null
@@ -0,0 +1,51 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':       goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy6;
+       default:        goto yy4;
+       }
+yy6:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR - 3;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = YYCURSOR - 3;
+               yypmatch[3] = YYCURSOR - 2;
+               yypmatch[4] = YYCURSOR - 2;
+               yypmatch[5] = YYCURSOR - 1;
+               yypmatch[6] = YYCURSOR - 1;
+               yypmatch[7] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/basic/21.i.re b/re2c/test/posix_captures/basic/21.i.re
new file mode 100644 (file)
index 0000000..78a0874
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a)(b)(c)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/22.i.c b/re2c/test/posix_captures/basic/22.i.c
new file mode 100644 (file)
index 0000000..66f5e7f
--- /dev/null
@@ -0,0 +1,90 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'x':       goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 31;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR - 1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = YYCURSOR - 1;
+               yypmatch[3] = YYCURSOR;
+               yypmatch[4] = YYCURSOR - 1;
+               yypmatch[5] = YYCURSOR;
+               yypmatch[6] = YYCURSOR - 1;
+               yypmatch[7] = YYCURSOR;
+               yypmatch[8] = YYCURSOR - 1;
+               yypmatch[9] = YYCURSOR;
+               yypmatch[10] = YYCURSOR - 1;
+               yypmatch[11] = YYCURSOR;
+               yypmatch[12] = YYCURSOR - 1;
+               yypmatch[13] = YYCURSOR;
+               yypmatch[14] = YYCURSOR - 1;
+               yypmatch[15] = YYCURSOR;
+               yypmatch[16] = YYCURSOR - 1;
+               yypmatch[17] = YYCURSOR;
+               yypmatch[18] = YYCURSOR - 1;
+               yypmatch[19] = YYCURSOR;
+               yypmatch[20] = YYCURSOR - 1;
+               yypmatch[21] = YYCURSOR;
+               yypmatch[22] = YYCURSOR - 1;
+               yypmatch[23] = YYCURSOR;
+               yypmatch[24] = YYCURSOR - 1;
+               yypmatch[25] = YYCURSOR;
+               yypmatch[26] = YYCURSOR - 1;
+               yypmatch[27] = YYCURSOR;
+               yypmatch[28] = YYCURSOR - 1;
+               yypmatch[29] = YYCURSOR;
+               yypmatch[30] = YYCURSOR - 1;
+               yypmatch[31] = YYCURSOR;
+               yypmatch[32] = YYCURSOR - 1;
+               yypmatch[33] = YYCURSOR;
+               yypmatch[34] = YYCURSOR - 1;
+               yypmatch[35] = YYCURSOR;
+               yypmatch[36] = YYCURSOR - 1;
+               yypmatch[37] = YYCURSOR;
+               yypmatch[38] = YYCURSOR - 1;
+               yypmatch[39] = YYCURSOR;
+               yypmatch[40] = YYCURSOR - 1;
+               yypmatch[41] = YYCURSOR;
+               yypmatch[42] = YYCURSOR - 1;
+               yypmatch[43] = YYCURSOR;
+               yypmatch[44] = YYCURSOR - 1;
+               yypmatch[45] = YYCURSOR;
+               yypmatch[46] = YYCURSOR - 1;
+               yypmatch[47] = YYCURSOR;
+               yypmatch[48] = YYCURSOR - 1;
+               yypmatch[49] = YYCURSOR;
+               yypmatch[50] = YYCURSOR - 1;
+               yypmatch[51] = YYCURSOR;
+               yypmatch[52] = YYCURSOR - 1;
+               yypmatch[53] = YYCURSOR;
+               yypmatch[54] = YYCURSOR - 1;
+               yypmatch[55] = YYCURSOR;
+               yypmatch[56] = YYCURSOR - 1;
+               yypmatch[57] = YYCURSOR;
+               yypmatch[58] = YYCURSOR - 1;
+               yypmatch[59] = YYCURSOR;
+               yypmatch[60] = YYCURSOR - 1;
+               yypmatch[61] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/basic/22.i.re b/re2c/test/posix_captures/basic/22.i.re
new file mode 100644 (file)
index 0000000..efd6c49
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    ((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/23.i.c b/re2c/test/posix_captures/basic/23.i.c
new file mode 100644 (file)
index 0000000..4feb8ae
--- /dev/null
@@ -0,0 +1,100 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'x':
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy3;
+       default:
+               yyt2 = yyt3 = NULL;
+               yyt1 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 31;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[4] = yyt3;
+               yypmatch[5] = yyt2;
+               yypmatch[6] = yyt3;
+               yypmatch[7] = yyt2;
+               yypmatch[8] = yyt3;
+               yypmatch[9] = yyt2;
+               yypmatch[10] = yyt3;
+               yypmatch[11] = yyt2;
+               yypmatch[12] = yyt3;
+               yypmatch[13] = yyt2;
+               yypmatch[14] = yyt3;
+               yypmatch[15] = yyt2;
+               yypmatch[16] = yyt3;
+               yypmatch[17] = yyt2;
+               yypmatch[18] = yyt3;
+               yypmatch[19] = yyt2;
+               yypmatch[20] = yyt3;
+               yypmatch[21] = yyt2;
+               yypmatch[22] = yyt3;
+               yypmatch[23] = yyt2;
+               yypmatch[24] = yyt3;
+               yypmatch[25] = yyt2;
+               yypmatch[26] = yyt3;
+               yypmatch[27] = yyt2;
+               yypmatch[28] = yyt3;
+               yypmatch[29] = yyt2;
+               yypmatch[30] = yyt3;
+               yypmatch[31] = yyt2;
+               yypmatch[32] = yyt3;
+               yypmatch[33] = yyt2;
+               yypmatch[34] = yyt3;
+               yypmatch[35] = yyt2;
+               yypmatch[36] = yyt3;
+               yypmatch[37] = yyt2;
+               yypmatch[38] = yyt3;
+               yypmatch[39] = yyt2;
+               yypmatch[40] = yyt3;
+               yypmatch[41] = yyt2;
+               yypmatch[42] = yyt3;
+               yypmatch[43] = yyt2;
+               yypmatch[44] = yyt3;
+               yypmatch[45] = yyt2;
+               yypmatch[46] = yyt3;
+               yypmatch[47] = yyt2;
+               yypmatch[48] = yyt3;
+               yypmatch[49] = yyt2;
+               yypmatch[50] = yyt3;
+               yypmatch[51] = yyt2;
+               yypmatch[52] = yyt3;
+               yypmatch[53] = yyt2;
+               yypmatch[54] = yyt3;
+               yypmatch[55] = yyt2;
+               yypmatch[56] = yyt3;
+               yypmatch[57] = yyt2;
+               yypmatch[58] = yyt3;
+               yypmatch[59] = yyt2;
+               yypmatch[60] = yyt3;
+               yypmatch[61] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'x':
+               yyt3 = YYCURSOR;
+               goto yy3;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/basic/23.i.re b/re2c/test/posix_captures/basic/23.i.re
new file mode 100644 (file)
index 0000000..b54b08a
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    ((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))*
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/24.i.c b/re2c/test/posix_captures/basic/24.i.c
new file mode 100644 (file)
index 0000000..bc0a9e8
--- /dev/null
@@ -0,0 +1,137 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy4;
+       default:
+               yyt2 = yyt3 = NULL;
+               yyt1 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt3;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               {}
+       }
+yy3:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy6;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt2 = yyt3 = NULL;
+               goto yy2;
+       }
+yy4:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy8;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       switch (yyaccept) {
+       case 0: 
+               yyt2 = yyt3 = NULL;
+               yyt1 = YYCURSOR;
+               goto yy2;
+       case 1: 
+               yyt2 = yyt3 = NULL;
+               goto yy2;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy6:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt3 = yyt4;
+               goto yy8;
+       default:        goto yy5;
+       }
+yy7:
+       yyaccept = 2;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy9;
+       case 'b':
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       default:
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy8:
+       yyaccept = 2;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = yyt3;
+               yyt4 = YYCURSOR;
+               goto yy6;
+       case 'b':
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       default:
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy9:
+       yyaccept = 2;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = yyt4;
+               yyt4 = YYCURSOR;
+               goto yy6;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt2 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/basic/24.i.re b/re2c/test/posix_captures/basic/24.i.re
new file mode 100644 (file)
index 0000000..a34a65c
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    a?(ab|ba)*
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/25.i.c b/re2c/test/posix_captures/basic/25.i.c
new file mode 100644 (file)
index 0000000..7186175
--- /dev/null
@@ -0,0 +1,47 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       case 'b':       goto yy6;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy6:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/basic/25.i.re b/re2c/test/posix_captures/basic/25.i.re
new file mode 100644 (file)
index 0000000..94ad079
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    a*a*a*a*a*b
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/26.i.c b/re2c/test/posix_captures/basic/26.i.c
new file mode 100644 (file)
index 0000000..ea40044
--- /dev/null
@@ -0,0 +1,56 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy6;
+       default:        goto yy4;
+       }
+yy6:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy6;
+       case 'c':       goto yy8;
+       default:        goto yy4;
+       }
+yy8:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/basic/26.i.re b/re2c/test/posix_captures/basic/26.i.re
new file mode 100644 (file)
index 0000000..a4f77f5
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    a[b]+bc
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/27.i.c b/re2c/test/posix_captures/basic/27.i.c
new file mode 100644 (file)
index 0000000..ea40044
--- /dev/null
@@ -0,0 +1,56 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy6;
+       default:        goto yy4;
+       }
+yy6:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy6;
+       case 'c':       goto yy8;
+       default:        goto yy4;
+       }
+yy8:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/basic/27.i.re b/re2c/test/posix_captures/basic/27.i.re
new file mode 100644 (file)
index 0000000..a4f77f5
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    a[b]+bc
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/28.i.c b/re2c/test/posix_captures/basic/28.i.c
new file mode 100644 (file)
index 0000000..8302835
--- /dev/null
@@ -0,0 +1,54 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy6;
+       case 'c':       goto yy7;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy7;
+       default:        goto yy4;
+       }
+yy7:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/basic/28.i.re b/re2c/test/posix_captures/basic/28.i.re
new file mode 100644 (file)
index 0000000..0e5eaea
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    a[b]?bc
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/29.i.c b/re2c/test/posix_captures/basic/29.i.c
new file mode 100644 (file)
index 0000000..8302835
--- /dev/null
@@ -0,0 +1,54 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy6;
+       case 'c':       goto yy7;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy7;
+       default:        goto yy4;
+       }
+yy7:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/basic/29.i.re b/re2c/test/posix_captures/basic/29.i.re
new file mode 100644 (file)
index 0000000..0e5eaea
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    a[b]?bc
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/30.i.c b/re2c/test/posix_captures/basic/30.i.c
new file mode 100644 (file)
index 0000000..612068f
--- /dev/null
@@ -0,0 +1,48 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       case 'c':       goto yy6;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy6;
+       default:        goto yy4;
+       }
+yy6:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/basic/30.i.re b/re2c/test/posix_captures/basic/30.i.re
new file mode 100644 (file)
index 0000000..4d73672
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    a[b]?c
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/31.i.c b/re2c/test/posix_captures/basic/31.i.c
new file mode 100644 (file)
index 0000000..2c713ec
--- /dev/null
@@ -0,0 +1,46 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':       goto yy3;
+       case 'c':       goto yy5;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy6;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:        goto yy4;
+       }
+yy6:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR - 2;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/basic/31.i.re b/re2c/test/posix_captures/basic/31.i.re
new file mode 100644 (file)
index 0000000..6eca49f
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    ab|cd
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/32.i.c b/re2c/test/posix_captures/basic/32.i.c
new file mode 100644 (file)
index 0000000..2c713ec
--- /dev/null
@@ -0,0 +1,46 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':       goto yy3;
+       case 'c':       goto yy5;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy6;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:        goto yy4;
+       }
+yy6:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR - 2;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/basic/32.i.re b/re2c/test/posix_captures/basic/32.i.re
new file mode 100644 (file)
index 0000000..6eca49f
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    ab|cd
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/33.i.c b/re2c/test/posix_captures/basic/33.i.c
new file mode 100644 (file)
index 0000000..db7b4bc
--- /dev/null
@@ -0,0 +1,34 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR - 1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = YYCURSOR - 1;
+               yypmatch[3] = YYCURSOR;
+               yypmatch[4] = YYCURSOR - 1;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/basic/33.i.re b/re2c/test/posix_captures/basic/33.i.re
new file mode 100644 (file)
index 0000000..0188706
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    ((a))
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/34.i.c b/re2c/test/posix_captures/basic/34.i.c
new file mode 100644 (file)
index 0000000..6ac6e30
--- /dev/null
@@ -0,0 +1,49 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':       goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy6;
+       default:        goto yy4;
+       }
+yy6:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR - 3;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = YYCURSOR - 3;
+               yypmatch[3] = YYCURSOR - 2;
+               yypmatch[4] = YYCURSOR - 1;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/basic/34.i.re b/re2c/test/posix_captures/basic/34.i.re
new file mode 100644 (file)
index 0000000..eae3b5b
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a)b(c)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/35.i.c b/re2c/test/posix_captures/basic/35.i.c
new file mode 100644 (file)
index 0000000..9ecc668
--- /dev/null
@@ -0,0 +1,32 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       yyt1 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       default:        goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/basic/35.i.re b/re2c/test/posix_captures/basic/35.i.re
new file mode 100644 (file)
index 0000000..179c148
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    a*
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/36.i.c b/re2c/test/posix_captures/basic/36.i.c
new file mode 100644 (file)
index 0000000..a0e369b
--- /dev/null
@@ -0,0 +1,39 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/basic/36.i.re b/re2c/test/posix_captures/basic/36.i.re
new file mode 100644 (file)
index 0000000..6c64764
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a*)*
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/37.i.c b/re2c/test/posix_captures/basic/37.i.c
new file mode 100644 (file)
index 0000000..dee1de1
--- /dev/null
@@ -0,0 +1,34 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       yyt1 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       default:        goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/basic/37.i.re b/re2c/test/posix_captures/basic/37.i.re
new file mode 100644 (file)
index 0000000..8131d00
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a*)+
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/38.i.c b/re2c/test/posix_captures/basic/38.i.c
new file mode 100644 (file)
index 0000000..c66d2ab
--- /dev/null
@@ -0,0 +1,60 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt1 = yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy5:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/basic/38.i.re b/re2c/test/posix_captures/basic/38.i.re
new file mode 100644 (file)
index 0000000..c891a0d
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a*|b)*
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/39.i.c b/re2c/test/posix_captures/basic/39.i.c
new file mode 100644 (file)
index 0000000..e09de1f
--- /dev/null
@@ -0,0 +1,61 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt2 = yyt3 = NULL;
+               yyt1 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy5:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/basic/39.i.re b/re2c/test/posix_captures/basic/39.i.re
new file mode 100644 (file)
index 0000000..635389b
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a+|b)*
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/40.i.c b/re2c/test/posix_captures/basic/40.i.c
new file mode 100644 (file)
index 0000000..7cf2e62
--- /dev/null
@@ -0,0 +1,60 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy5;
+       }
+yy5:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy6:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy5;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/basic/40.i.re b/re2c/test/posix_captures/basic/40.i.re
new file mode 100644 (file)
index 0000000..e672a88
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a+|b)+
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/41.i.c b/re2c/test/posix_captures/basic/41.i.c
new file mode 100644 (file)
index 0000000..52c95db
--- /dev/null
@@ -0,0 +1,47 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt2 = yyt3 = NULL;
+               yyt1 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = yyt3;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy5:
+       ++YYCURSOR;
+       yyt3 = YYCURSOR;
+       goto yy2;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/basic/41.i.re b/re2c/test/posix_captures/basic/41.i.re
new file mode 100644 (file)
index 0000000..4593eb0
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a+|b)?
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/42.i.c b/re2c/test/posix_captures/basic/42.i.c
new file mode 100644 (file)
index 0000000..be44ca3
--- /dev/null
@@ -0,0 +1,58 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+       case 'b':
+       case 'c':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy3;
+       case 'd':
+               yyt1 = yyt3 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+       case 'b':
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy6;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy6:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt2;
+               yypmatch[3] = yyt3;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/basic/42.i.re b/re2c/test/posix_captures/basic/42.i.re
new file mode 100644 (file)
index 0000000..1926bec
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    ([abc])*d
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/43.i.c b/re2c/test/posix_captures/basic/43.i.c
new file mode 100644 (file)
index 0000000..06690e4
--- /dev/null
@@ -0,0 +1,109 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+       case 'c':
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt2 = yyt4 = NULL;
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy4:
+       switch (yych) {
+       case 'a':
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy7;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy6:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy9;
+       default:        goto yy4;
+       }
+yy7:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt2;
+               yyt2 = YYCURSOR;
+               goto yy7;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy10;
+       default:        goto yy5;
+       }
+yy9:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy11;
+       default:        goto yy4;
+       }
+yy10:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt4;
+               yyt2 = YYCURSOR;
+               goto yy7;
+       case 'd':
+               yyt4 = yyt1;
+               goto yy11;
+       default:        goto yy5;
+       }
+yy11:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt3;
+               yypmatch[3] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt4;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/basic/43.i.re b/re2c/test/posix_captures/basic/43.i.re
new file mode 100644 (file)
index 0000000..9c3c05b
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    ([abc])*bcd
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/44.i.c b/re2c/test/posix_captures/basic/44.i.c
new file mode 100644 (file)
index 0000000..1e45b31
--- /dev/null
@@ -0,0 +1,34 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+       case 'b':
+       case 'c':
+       case 'd':
+       case 'e':       goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR - 1;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/basic/44.i.re b/re2c/test/posix_captures/basic/44.i.re
new file mode 100644 (file)
index 0000000..c574d43
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    a|b|c|d|e
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/45.i.c b/re2c/test/posix_captures/basic/45.i.c
new file mode 100644 (file)
index 0000000..d2724cd
--- /dev/null
@@ -0,0 +1,45 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+       case 'b':
+       case 'c':
+       case 'd':
+       case 'e':       goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'f':       goto yy5;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR - 2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = YYCURSOR - 2;
+               yypmatch[3] = YYCURSOR - 1;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/basic/45.i.re b/re2c/test/posix_captures/basic/45.i.re
new file mode 100644 (file)
index 0000000..713730c
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a|b|c|d|e)f
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/46.i.c b/re2c/test/posix_captures/basic/46.i.c
new file mode 100644 (file)
index 0000000..add0f6f
--- /dev/null
@@ -0,0 +1,62 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt1 = yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[4] = yyt3;
+               yypmatch[5] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy5:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/basic/46.i.re b/re2c/test/posix_captures/basic/46.i.re
new file mode 100644 (file)
index 0000000..9988bbc
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    ((a*|b))*
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/47.i.c b/re2c/test/posix_captures/basic/47.i.c
new file mode 100644 (file)
index 0000000..5fa27ef
--- /dev/null
@@ -0,0 +1,53 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       case 'c':       goto yy7;
+       default:        goto yy4;
+       }
+yy7:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = YYCURSOR - 2;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/basic/47.i.re b/re2c/test/posix_captures/basic/47.i.re
new file mode 100644 (file)
index 0000000..e30d847
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (ab|a[b]*)bc
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/48.i.c b/re2c/test/posix_captures/basic/48.i.c
new file mode 100644 (file)
index 0000000..e64ceab
--- /dev/null
@@ -0,0 +1,53 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy4;
+       }
+yy4:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[0] = yyt1 - 1;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy5:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'b':
+       case 'c':       goto yy5;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/basic/48.i.re b/re2c/test/posix_captures/basic/48.i.re
new file mode 100644 (file)
index 0000000..0354a95
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    a([bc]*)c*
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/49.i.c b/re2c/test/posix_captures/basic/49.i.c
new file mode 100644 (file)
index 0000000..ab09f5d
--- /dev/null
@@ -0,0 +1,61 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':       goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy5;
+       case 'd':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy7;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'b':
+       case 'c':       goto yy5;
+       case 'd':
+               yyt2 = YYCURSOR;
+               goto yy7;
+       default:        goto yy4;
+       }
+yy7:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[0] = yyt1 - 1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt2;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/basic/49.i.re b/re2c/test/posix_captures/basic/49.i.re
new file mode 100644 (file)
index 0000000..518c84a
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    a([bc]*)(c*d)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/50.i.c b/re2c/test/posix_captures/basic/50.i.c
new file mode 100644 (file)
index 0000000..2733ed4
--- /dev/null
@@ -0,0 +1,58 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':       goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy5;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'b':
+       case 'c':       goto yy5;
+       case 'd':
+               yyt2 = YYCURSOR;
+               goto yy7;
+       default:        goto yy4;
+       }
+yy7:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[0] = yyt1 - 1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt2;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/basic/50.i.re b/re2c/test/posix_captures/basic/50.i.re
new file mode 100644 (file)
index 0000000..11f1961
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    a([bc]+)(c*d)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/51.i.c b/re2c/test/posix_captures/basic/51.i.c
new file mode 100644 (file)
index 0000000..78c6cfb
--- /dev/null
@@ -0,0 +1,73 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':       goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy7;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy7;
+       default:        goto yy4;
+       }
+yy7:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy7;
+       case 'd':       goto yy9;
+       default:        goto yy4;
+       }
+yy9:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[0] = yyt1 - 1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt2;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/basic/51.i.re b/re2c/test/posix_captures/basic/51.i.re
new file mode 100644 (file)
index 0000000..63a580a
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    a([bc]*)(c+d)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/52.i.c b/re2c/test/posix_captures/basic/52.i.c
new file mode 100644 (file)
index 0000000..2ffa8f3
--- /dev/null
@@ -0,0 +1,96 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'b':
+       case 'c':       goto yy3;
+       case 'd':       goto yy6;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy6:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy3;
+       case 'c':       goto yy8;
+       case 'd':       goto yy6;
+       default:        goto yy5;
+       }
+yy8:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'b':
+       case 'c':       goto yy3;
+       case 'd':       goto yy9;
+       default:        goto yy5;
+       }
+yy9:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy3;
+       case 'c':       goto yy10;
+       case 'd':       goto yy6;
+       default:        goto yy5;
+       }
+yy10:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'b':
+       case 'c':       goto yy3;
+       case 'd':       goto yy11;
+       default:        goto yy5;
+       }
+yy11:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy3;
+       case 'c':       goto yy10;
+       case 'd':       goto yy6;
+       case 'e':       goto yy12;
+       default:        goto yy5;
+       }
+yy12:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/basic/52.i.re b/re2c/test/posix_captures/basic/52.i.re
new file mode 100644 (file)
index 0000000..c4943a0
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    a[bcd]*dcdcde
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/53.i.c b/re2c/test/posix_captures/basic/53.i.c
new file mode 100644 (file)
index 0000000..3711262
--- /dev/null
@@ -0,0 +1,66 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy8;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy6:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt2;
+               yypmatch[3] = yyt1;
+               yypmatch[0] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy8:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy8;
+       case 'c':       goto yy6;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/basic/53.i.re b/re2c/test/posix_captures/basic/53.i.re
new file mode 100644 (file)
index 0000000..ef8f0d9
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (ab|a)b*c
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/54.i.c b/re2c/test/posix_captures/basic/54.i.c
new file mode 100644 (file)
index 0000000..7c37fa9
--- /dev/null
@@ -0,0 +1,59 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':       goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy6;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy7;
+       default:        goto yy4;
+       }
+yy7:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 5;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR - 4;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = YYCURSOR - 4;
+               yypmatch[3] = YYCURSOR - 1;
+               yypmatch[4] = YYCURSOR - 4;
+               yypmatch[5] = YYCURSOR - 3;
+               yypmatch[6] = YYCURSOR - 3;
+               yypmatch[7] = YYCURSOR - 2;
+               yypmatch[8] = YYCURSOR - 1;
+               yypmatch[9] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/basic/54.i.re b/re2c/test/posix_captures/basic/54.i.re
new file mode 100644 (file)
index 0000000..a34a7a2
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    ((a)(b)c)(d)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/55.i.c b/re2c/test/posix_captures/basic/55.i.c
new file mode 100644 (file)
index 0000000..49d5c2d
--- /dev/null
@@ -0,0 +1,48 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 10;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR - 1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = YYCURSOR - 1;
+               yypmatch[3] = YYCURSOR;
+               yypmatch[4] = YYCURSOR - 1;
+               yypmatch[5] = YYCURSOR;
+               yypmatch[6] = YYCURSOR - 1;
+               yypmatch[7] = YYCURSOR;
+               yypmatch[8] = YYCURSOR - 1;
+               yypmatch[9] = YYCURSOR;
+               yypmatch[10] = YYCURSOR - 1;
+               yypmatch[11] = YYCURSOR;
+               yypmatch[12] = YYCURSOR - 1;
+               yypmatch[13] = YYCURSOR;
+               yypmatch[14] = YYCURSOR - 1;
+               yypmatch[15] = YYCURSOR;
+               yypmatch[16] = YYCURSOR - 1;
+               yypmatch[17] = YYCURSOR;
+               yypmatch[18] = YYCURSOR - 1;
+               yypmatch[19] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/basic/55.i.re b/re2c/test/posix_captures/basic/55.i.re
new file mode 100644 (file)
index 0000000..c75c2c6
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (((((((((a)))))))))
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/56.i.c b/re2c/test/posix_captures/basic/56.i.c
new file mode 100644 (file)
index 0000000..c7edbc2
--- /dev/null
@@ -0,0 +1,74 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy2;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:
+               yyt1 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy5;
+       case 'c':       goto yy6;
+       default:        goto yy3;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy6:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt2 = YYCURSOR;
+               goto yy8;
+       case 'c':       goto yy6;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy9;
+       }
+yy8:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt2 - 1;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy9:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy8;
+       case 'c':       goto yy6;
+       default:        goto yy9;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/basic/56.i.re b/re2c/test/posix_captures/basic/56.i.re
new file mode 100644 (file)
index 0000000..b0e627f
Binary files /dev/null and b/re2c/test/posix_captures/basic/56.i.re differ
diff --git a/re2c/test/posix_captures/basic/57.i.c b/re2c/test/posix_captures/basic/57.i.c
new file mode 100644 (file)
index 0000000..c7b34a5
--- /dev/null
@@ -0,0 +1,53 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':       goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy6;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy7;
+       default:        goto yy4;
+       }
+yy7:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR - 4;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = YYCURSOR - 3;
+               yypmatch[3] = YYCURSOR - 1;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/basic/57.i.re b/re2c/test/posix_captures/basic/57.i.re
new file mode 100644 (file)
index 0000000..09c333c
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    a(bc)d
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/58.i.c b/re2c/test/posix_captures/basic/58.i.c
new file mode 100644 (file)
index 0000000..42747ff
--- /dev/null
@@ -0,0 +1,50 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x01:
+       case 0x02:
+       case 0x03:      goto yy5;
+       case 'c':       goto yy6;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy6;
+       default:        goto yy4;
+       }
+yy6:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/basic/58.i.re b/re2c/test/posix_captures/basic/58.i.re
new file mode 100644 (file)
index 0000000..548dd7e
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    a[\ 1-\ 3]?c
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/basic/59.i.c b/re2c/test/posix_captures/basic/59.i.c
new file mode 100644 (file)
index 0000000..5339041
--- /dev/null
@@ -0,0 +1,73 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       case 'b':
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       case 'd':
+               yyt1 = yyt3 = NULL;
+               goto yy8;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy6:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'b':
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy8;
+       default:        goto yy5;
+       }
+yy8:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy8;
+       default:        goto yy10;
+       }
+yy10:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt2;
+               yypmatch[3] = yyt3;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/basic/59.i.re b/re2c/test/posix_captures/basic/59.i.re
new file mode 100644 (file)
index 0000000..28e6bef
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    a+(b|c)*d+
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/categorize/01.i.c b/re2c/test/posix_captures/categorize/01.i.c
new file mode 100644 (file)
index 0000000..833d38b
--- /dev/null
@@ -0,0 +1,119 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = yyt4 = NULL;
+               yyt1 = yyt2 = yyt5 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt3 = yyt4 = NULL;
+               yyt1 = yyt2 = yyt5 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[5] = yyt3;
+               yypmatch[6] = yyt5;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[4] = yyt4;
+               yypmatch[7] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = yyt4 = NULL;
+               yyt5 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt3 = yyt4 = NULL;
+               yyt2 = yyt5 = YYCURSOR;
+               goto yy2;
+       }
+yy5:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       default:        goto yy2;
+       }
+yy7:
+       yyaccept = 0;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt6 = YYCURSOR;
+               goto yy8;
+       case 'b':
+               yyt2 = yyt5;
+               goto yy5;
+       default:
+               yyt2 = yyt5;
+               goto yy2;
+       }
+yy8:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy10;
+       default:        goto yy9;
+       }
+yy9:
+       YYCURSOR = YYMARKER;
+       if (yyaccept == 0) {
+               yyt2 = yyt5;
+               goto yy2;
+       } else {
+               yyt3 = yyt5 = YYCURSOR;
+               goto yy2;
+       }
+yy10:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt4 = yyt6;
+               yyt6 = YYCURSOR;
+               goto yy8;
+       case 'b':
+               yyt4 = yyt6;
+               yyt3 = yyt5 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt4 = yyt6;
+               yyt3 = yyt5 = YYCURSOR;
+               goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/categorize/01.i.re b/re2c/test/posix_captures/categorize/01.i.re
new file mode 100644 (file)
index 0000000..0ef51ec
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a*)(ab)*(b*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/categorize/02.i.c b/re2c/test/posix_captures/categorize/02.i.c
new file mode 100644 (file)
index 0000000..04dac1a
--- /dev/null
@@ -0,0 +1,140 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt2 = yyt4 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = yyt4 = NULL;
+               yyt1 = yyt2 = yyt5 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt3 = yyt4 = NULL;
+               yyt1 = yyt2 = yyt5 = yyt6 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 7;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[4] = yyt1;
+               yypmatch[5] = yyt2;
+               yypmatch[7] = yyt3;
+               yypmatch[10] = yyt5;
+               yypmatch[12] = yyt6;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               yypmatch[3] = yyt5;
+               yypmatch[6] = yyt4;
+               yypmatch[8] = yyt5;
+               yypmatch[9] = YYCURSOR;
+               yypmatch[11] = yyt6;
+               yypmatch[13] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy3;
+       case 'b':       goto yy7;
+       default:
+               yyt3 = yyt4 = NULL;
+               yyt2 = yyt5 = yyt6 = YYCURSOR;
+               goto yy2;
+       }
+yy5:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt6 = YYCURSOR;
+               goto yy8;
+       case 'b':       goto yy5;
+       default:
+               yyt6 = YYCURSOR;
+               goto yy2;
+       }
+yy7:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt3 = yyt5 = yyt6 = yyt7 = YYCURSOR;
+               goto yy10;
+       case 'b':
+               yyt3 = yyt5 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt3 = yyt5 = yyt6 = YYCURSOR;
+               goto yy2;
+       }
+yy8:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy9:
+       switch (yych) {
+       case 'a':       goto yy8;
+       default:        goto yy2;
+       }
+yy10:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy11;
+       default:        goto yy9;
+       }
+yy11:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt3 = yyt5 = yyt6 = YYCURSOR;
+               goto yy12;
+       case 'b':
+               yyt4 = yyt7;
+               yyt3 = yyt5 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt4 = yyt7;
+               yyt3 = yyt5 = yyt6 = YYCURSOR;
+               goto yy2;
+       }
+yy12:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt4 = yyt7;
+               goto yy8;
+       case 'b':
+               yyt7 = yyt3;
+               goto yy11;
+       default:
+               yyt4 = yyt7;
+               goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/categorize/02.i.re b/re2c/test/posix_captures/categorize/02.i.re
new file mode 100644 (file)
index 0000000..2f49506
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    ((a*)(ab)*)((b*)(a*))
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/categorize/03.i.c b/re2c/test/posix_captures/categorize/03.i.c
new file mode 100644 (file)
index 0000000..7bed7f6
--- /dev/null
@@ -0,0 +1,65 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy3;
+       }
+       yyt2 = yyt3 = NULL;
+       yyt1 = YYCURSOR;
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) goto yy5;
+       YYCURSOR = YYMARKER;
+       yyt2 = yyt3 = NULL;
+       yyt1 = YYCURSOR;
+       goto yy2;
+yy5:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) {
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       yyt2 = YYCURSOR;
+       if (yych <= 0x00) goto yy2;
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) {
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+       yyt3 = YYCURSOR;
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt2;
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+       goto yy5;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/categorize/03.i.re b/re2c/test/posix_captures/categorize/03.i.re
new file mode 100644 (file)
index 0000000..5357fe4
Binary files /dev/null and b/re2c/test/posix_captures/categorize/03.i.re differ
diff --git a/re2c/test/posix_captures/categorize/04.i.c b/re2c/test/posix_captures/categorize/04.i.c
new file mode 100644 (file)
index 0000000..5cad290
--- /dev/null
@@ -0,0 +1,67 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy8;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy6:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt2;
+               yypmatch[4] = yyt1;
+               yypmatch[0] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt1;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy6;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/categorize/04.i.re b/re2c/test/posix_captures/categorize/04.i.re
new file mode 100644 (file)
index 0000000..771d410
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a|ab)(bc|c)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/categorize/05.i.c b/re2c/test/posix_captures/categorize/05.i.c
new file mode 100644 (file)
index 0000000..35d4c96
--- /dev/null
@@ -0,0 +1,124 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy5;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy8;
+       default:        goto yy7;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy9;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy10;
+       default:        goto yy4;
+       }
+yy6:
+       ++YYCURSOR;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *YYCURSOR;
+yy7:
+       switch (yych) {
+       case 'a':       goto yy6;
+       case 'b':       goto yy5;
+       default:        goto yy4;
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy12;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy10;
+       default:        goto yy4;
+       }
+yy9:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy15;
+       default:        goto yy14;
+       }
+yy10:
+       ++YYCURSOR;
+yy11:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt2;
+               yypmatch[4] = yyt1;
+               yypmatch[0] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt1;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy12:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy9;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:        goto yy4;
+       }
+yy13:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy14:
+       switch (yych) {
+       case 'a':       goto yy13;
+       case 'b':       goto yy10;
+       default:        goto yy4;
+       }
+yy15:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy10;
+       default:        goto yy11;
+       }
+yy16:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy10;
+       default:
+               yyt1 = yyt3;
+               goto yy11;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/categorize/05.i.re b/re2c/test/posix_captures/categorize/05.i.re
new file mode 100644 (file)
index 0000000..2c4417f
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (aba|a*b)(aba|a*b)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/categorize/06.i.c b/re2c/test/posix_captures/categorize/06.i.c
new file mode 100644 (file)
index 0000000..0a46854
--- /dev/null
@@ -0,0 +1,39 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/categorize/06.i.re b/re2c/test/posix_captures/categorize/06.i.re
new file mode 100644 (file)
index 0000000..1cc0b31
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a*){2}
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/categorize/07.i.c b/re2c/test/posix_captures/categorize/07.i.c
new file mode 100644 (file)
index 0000000..a0e369b
--- /dev/null
@@ -0,0 +1,39 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/categorize/07.i.re b/re2c/test/posix_captures/categorize/07.i.re
new file mode 100644 (file)
index 0000000..6c64764
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a*)*
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/categorize/08.i.c b/re2c/test/posix_captures/categorize/08.i.c
new file mode 100644 (file)
index 0000000..d6cfefe
--- /dev/null
@@ -0,0 +1,156 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt2 = yyt3 = NULL;
+               yyt1 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt3;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       case 'b':       goto yy9;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       if (yyaccept == 0) {
+               yyt2 = yyt3 = NULL;
+               yyt1 = YYCURSOR;
+               goto yy2;
+       } else {
+               yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy5:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy7:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       case 'b':       goto yy5;
+       default:        goto yy4;
+       }
+yy9:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy10;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy10:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy11:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy12;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy12:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy13;
+       case 'b':       goto yy9;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy13:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       case 'b':
+               yyt2 = yyt4;
+               goto yy11;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/categorize/08.i.re b/re2c/test/posix_captures/categorize/08.i.re
new file mode 100644 (file)
index 0000000..a12b35d
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (aba|a*b)*
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/categorize/09.i.c b/re2c/test/posix_captures/categorize/09.i.c
new file mode 100644 (file)
index 0000000..310504f
--- /dev/null
@@ -0,0 +1,62 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy6;
+       default:
+               yyt3 = yyt4 = NULL;
+               goto yy5;
+       }
+yy5:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[4] = yyt3;
+               yypmatch[5] = yyt4;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy6:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       default:
+               yyt4 = YYCURSOR;
+               goto yy5;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/categorize/09.i.re b/re2c/test/posix_captures/categorize/09.i.re
new file mode 100644 (file)
index 0000000..3a4e3a2
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a(b)?)+
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/categorize/10.i.c b/re2c/test/posix_captures/categorize/10.i.c
new file mode 100644 (file)
index 0000000..aaf30b8
--- /dev/null
@@ -0,0 +1,35 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych >= 0x01) {
+               yyt1 = YYCURSOR;
+               goto yy3;
+       }
+       yyt1 = yyt2 = YYCURSOR;
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[2] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) {
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+       goto yy3;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/categorize/10.i.re b/re2c/test/posix_captures/categorize/10.i.re
new file mode 100644 (file)
index 0000000..17991be
Binary files /dev/null and b/re2c/test/posix_captures/categorize/10.i.re differ
diff --git a/re2c/test/posix_captures/categorize/11.i.c b/re2c/test/posix_captures/categorize/11.i.c
new file mode 100644 (file)
index 0000000..c3b4568
--- /dev/null
@@ -0,0 +1,205 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 8) YYFILL(8);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt4 = yyt5 = NULL;
+               yyt1 = yyt2 = yyt6 = YYCURSOR;
+               goto yy4;
+       default:
+               yyt3 = yyt4 = yyt5 = yyt9 = NULL;
+               yyt1 = yyt2 = yyt6 = yyt8 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 6;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[6] = yyt4;
+               yypmatch[7] = yyt5;
+               yypmatch[8] = yyt6;
+               yypmatch[9] = yyt8;
+               yypmatch[10] = yyt9;
+               yypmatch[11] = yyt3;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt2;
+               yypmatch[5] = yyt6;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt4 = yyt5 = NULL;
+               yyt3 = yyt6 = yyt7 = yyt8 = YYCURSOR;
+               goto yy5;
+       case 'b':
+               yyt4 = yyt5 = NULL;
+               yyt6 = yyt7 = YYCURSOR;
+               goto yy6;
+       default:
+               yyt3 = yyt4 = yyt5 = yyt9 = NULL;
+               yyt2 = yyt6 = yyt8 = YYCURSOR;
+               goto yy2;
+       }
+yy4:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt8 = yyt9 = YYCURSOR;
+               goto yy7;
+       case 'b':
+               yyt3 = yyt9 = NULL;
+               yyt8 = YYCURSOR;
+               goto yy8;
+       default:
+               yyt3 = yyt9 = NULL;
+               yyt8 = YYCURSOR;
+               goto yy2;
+       }
+yy5:
+       yyaccept = 0;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt9 = YYCURSOR;
+               goto yy9;
+       case 'b':       goto yy11;
+       default:
+               yyt2 = yyt7;
+               yyt3 = yyt9 = NULL;
+               goto yy2;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = yyt7;
+               yyt8 = yyt9 = YYCURSOR;
+               goto yy7;
+       case 'b':
+               yyt3 = yyt9 = NULL;
+               yyt8 = YYCURSOR;
+               goto yy12;
+       default:
+               yyt2 = yyt7;
+               yyt3 = yyt9 = NULL;
+               yyt8 = YYCURSOR;
+               goto yy2;
+       }
+yy7:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt7 = yyt2;
+               yyt9 = YYCURSOR;
+               goto yy9;
+       case 'b':
+               yyt3 = yyt7 = NULL;
+               goto yy13;
+       default:
+               yyt3 = yyt9 = NULL;
+               goto yy2;
+       }
+yy8:
+       ++YYCURSOR;
+       goto yy2;
+yy9:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy14;
+       default:        goto yy10;
+       }
+yy10:
+       YYCURSOR = YYMARKER;
+       if (yyaccept == 0) {
+               yyt2 = yyt7;
+               yyt3 = yyt9 = NULL;
+               goto yy2;
+       } else {
+               yyt3 = yyt9 = NULL;
+               goto yy2;
+       }
+yy11:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = yyt7;
+               yyt4 = yyt3;
+               yyt5 = yyt6 = yyt8 = yyt9 = YYCURSOR;
+               goto yy7;
+       case 'b':
+               yyt2 = yyt7;
+               yyt4 = yyt3;
+               yyt5 = yyt6 = YYCURSOR;
+               goto yy4;
+       default:
+               yyt2 = yyt7;
+               yyt4 = yyt3;
+               yyt3 = yyt9 = NULL;
+               yyt5 = yyt6 = yyt8 = YYCURSOR;
+               goto yy2;
+       }
+yy12:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt4 = yyt1;
+               yyt5 = yyt8;
+               yyt6 = yyt8;
+               yyt8 = yyt9 = YYCURSOR;
+               goto yy7;
+       case 'b':
+               yyt4 = yyt1;
+               yyt5 = yyt8;
+               yyt6 = yyt8;
+               yyt3 = yyt9 = NULL;
+               yyt8 = YYCURSOR;
+               goto yy8;
+       default:
+               yyt2 = yyt7;
+               goto yy2;
+       }
+yy13:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy8;
+       default:
+               yyt9 = yyt7;
+               goto yy2;
+       }
+yy14:
+       yych = *++YYCURSOR;
+       yyt2 = yyt7;
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy8;
+       default:        goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/categorize/11.i.re b/re2c/test/posix_captures/categorize/11.i.re
new file mode 100644 (file)
index 0000000..12e93fd
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a?)((ab)?)(b?)a?(ab)?b?
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/forcedassoc/01.i.c b/re2c/test/posix_captures/forcedassoc/01.i.c
new file mode 100644 (file)
index 0000000..dd96b7f
--- /dev/null
@@ -0,0 +1,86 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy8;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy9;
+       default:        goto yy4;
+       }
+yy6:
+       ++YYCURSOR;
+yy7:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt2;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy10;
+       default:        goto yy4;
+       }
+yy9:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:
+               yyt2 = yyt3;
+               goto yy7;
+       }
+yy10:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':
+               yyt2 = yyt3;
+               goto yy6;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/forcedassoc/01.i.re b/re2c/test/posix_captures/forcedassoc/01.i.re
new file mode 100644 (file)
index 0000000..4cd5776
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a|ab)(c|bcd)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/forcedassoc/02.i.c b/re2c/test/posix_captures/forcedassoc/02.i.c
new file mode 100644 (file)
index 0000000..dd96b7f
--- /dev/null
@@ -0,0 +1,86 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy8;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy9;
+       default:        goto yy4;
+       }
+yy6:
+       ++YYCURSOR;
+yy7:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt2;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy10;
+       default:        goto yy4;
+       }
+yy9:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:
+               yyt2 = yyt3;
+               goto yy7;
+       }
+yy10:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':
+               yyt2 = yyt3;
+               goto yy6;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/forcedassoc/02.i.re b/re2c/test/posix_captures/forcedassoc/02.i.re
new file mode 100644 (file)
index 0000000..1045d7f
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a|ab)(bcd|c)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/forcedassoc/03.i.c b/re2c/test/posix_captures/forcedassoc/03.i.c
new file mode 100644 (file)
index 0000000..dd96b7f
--- /dev/null
@@ -0,0 +1,86 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy8;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy9;
+       default:        goto yy4;
+       }
+yy6:
+       ++YYCURSOR;
+yy7:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt2;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy10;
+       default:        goto yy4;
+       }
+yy9:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:
+               yyt2 = yyt3;
+               goto yy7;
+       }
+yy10:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':
+               yyt2 = yyt3;
+               goto yy6;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/forcedassoc/03.i.re b/re2c/test/posix_captures/forcedassoc/03.i.re
new file mode 100644 (file)
index 0000000..712586e
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (ab|a)(c|bcd)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/forcedassoc/04.i.c b/re2c/test/posix_captures/forcedassoc/04.i.c
new file mode 100644 (file)
index 0000000..dd96b7f
--- /dev/null
@@ -0,0 +1,86 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy8;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy9;
+       default:        goto yy4;
+       }
+yy6:
+       ++YYCURSOR;
+yy7:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt2;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy10;
+       default:        goto yy4;
+       }
+yy9:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:
+               yyt2 = yyt3;
+               goto yy7;
+       }
+yy10:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':
+               yyt2 = yyt3;
+               goto yy6;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/forcedassoc/04.i.re b/re2c/test/posix_captures/forcedassoc/04.i.re
new file mode 100644 (file)
index 0000000..68fbbde
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (ab|a)(bcd|c)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/forcedassoc/05.i.c b/re2c/test/posix_captures/forcedassoc/05.i.c
new file mode 100644 (file)
index 0000000..77d6ea1
--- /dev/null
@@ -0,0 +1,102 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy8;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy9;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       goto yy11;
+yy7:
+       {
+               const size_t yynmatch = 5;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[4] = yyt1;
+               yypmatch[6] = yyt2;
+               yypmatch[8] = yyt3;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               yypmatch[3] = yyt3;
+               yypmatch[5] = yyt2;
+               yypmatch[7] = yyt3;
+               yypmatch[9] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy12;
+       default:        goto yy4;
+       }
+yy9:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy7;
+       }
+yy10:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy11:
+       switch (yych) {
+       case 'd':       goto yy10;
+       default:        goto yy7;
+       }
+yy12:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':
+               yyt2 = yyt3;
+               goto yy6;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/forcedassoc/05.i.re b/re2c/test/posix_captures/forcedassoc/05.i.re
new file mode 100644 (file)
index 0000000..2bffe43
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    ((a|ab)(c|bcd))(d*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/forcedassoc/06.i.c b/re2c/test/posix_captures/forcedassoc/06.i.c
new file mode 100644 (file)
index 0000000..77d6ea1
--- /dev/null
@@ -0,0 +1,102 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy8;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy9;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       goto yy11;
+yy7:
+       {
+               const size_t yynmatch = 5;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[4] = yyt1;
+               yypmatch[6] = yyt2;
+               yypmatch[8] = yyt3;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               yypmatch[3] = yyt3;
+               yypmatch[5] = yyt2;
+               yypmatch[7] = yyt3;
+               yypmatch[9] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy12;
+       default:        goto yy4;
+       }
+yy9:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy7;
+       }
+yy10:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy11:
+       switch (yych) {
+       case 'd':       goto yy10;
+       default:        goto yy7;
+       }
+yy12:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':
+               yyt2 = yyt3;
+               goto yy6;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/forcedassoc/06.i.re b/re2c/test/posix_captures/forcedassoc/06.i.re
new file mode 100644 (file)
index 0000000..4899b65
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    ((a|ab)(bcd|c))(d*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/forcedassoc/07.i.c b/re2c/test/posix_captures/forcedassoc/07.i.c
new file mode 100644 (file)
index 0000000..77d6ea1
--- /dev/null
@@ -0,0 +1,102 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy8;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy9;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       goto yy11;
+yy7:
+       {
+               const size_t yynmatch = 5;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[4] = yyt1;
+               yypmatch[6] = yyt2;
+               yypmatch[8] = yyt3;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               yypmatch[3] = yyt3;
+               yypmatch[5] = yyt2;
+               yypmatch[7] = yyt3;
+               yypmatch[9] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy12;
+       default:        goto yy4;
+       }
+yy9:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy7;
+       }
+yy10:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy11:
+       switch (yych) {
+       case 'd':       goto yy10;
+       default:        goto yy7;
+       }
+yy12:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':
+               yyt2 = yyt3;
+               goto yy6;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/forcedassoc/07.i.re b/re2c/test/posix_captures/forcedassoc/07.i.re
new file mode 100644 (file)
index 0000000..a7c6033
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    ((ab|a)(c|bcd))(d*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/forcedassoc/08.i.c b/re2c/test/posix_captures/forcedassoc/08.i.c
new file mode 100644 (file)
index 0000000..77d6ea1
--- /dev/null
@@ -0,0 +1,102 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy8;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy9;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       goto yy11;
+yy7:
+       {
+               const size_t yynmatch = 5;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[4] = yyt1;
+               yypmatch[6] = yyt2;
+               yypmatch[8] = yyt3;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               yypmatch[3] = yyt3;
+               yypmatch[5] = yyt2;
+               yypmatch[7] = yyt3;
+               yypmatch[9] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy12;
+       default:        goto yy4;
+       }
+yy9:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy7;
+       }
+yy10:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy11:
+       switch (yych) {
+       case 'd':       goto yy10;
+       default:        goto yy7;
+       }
+yy12:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':
+               yyt2 = yyt3;
+               goto yy6;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/forcedassoc/08.i.re b/re2c/test/posix_captures/forcedassoc/08.i.re
new file mode 100644 (file)
index 0000000..bbaf021
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    ((ab|a)(bcd|c))(d*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/forcedassoc/09.i.c b/re2c/test/posix_captures/forcedassoc/09.i.c
new file mode 100644 (file)
index 0000000..9533c66
--- /dev/null
@@ -0,0 +1,90 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy8;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       goto yy10;
+yy7:
+       {
+               const size_t yynmatch = 5;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt2;
+               yypmatch[6] = yyt1;
+               yypmatch[8] = yyt3;
+               yypmatch[0] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt1;
+               yypmatch[4] = yyt1;
+               yypmatch[5] = YYCURSOR;
+               yypmatch[7] = yyt3;
+               yypmatch[9] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy11;
+       default:        goto yy4;
+       }
+yy9:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy10:
+       switch (yych) {
+       case 'd':       goto yy9;
+       default:        goto yy7;
+       }
+yy11:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/forcedassoc/09.i.re b/re2c/test/posix_captures/forcedassoc/09.i.re
new file mode 100644 (file)
index 0000000..679364e
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a|ab)((c|bcd)(d*))
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/forcedassoc/10.i.c b/re2c/test/posix_captures/forcedassoc/10.i.c
new file mode 100644 (file)
index 0000000..9533c66
--- /dev/null
@@ -0,0 +1,90 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy8;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       goto yy10;
+yy7:
+       {
+               const size_t yynmatch = 5;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt2;
+               yypmatch[6] = yyt1;
+               yypmatch[8] = yyt3;
+               yypmatch[0] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt1;
+               yypmatch[4] = yyt1;
+               yypmatch[5] = YYCURSOR;
+               yypmatch[7] = yyt3;
+               yypmatch[9] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy11;
+       default:        goto yy4;
+       }
+yy9:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy10:
+       switch (yych) {
+       case 'd':       goto yy9;
+       default:        goto yy7;
+       }
+yy11:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/forcedassoc/10.i.re b/re2c/test/posix_captures/forcedassoc/10.i.re
new file mode 100644 (file)
index 0000000..31d4fb7
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a|ab)((bcd|c)(d*))
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/forcedassoc/11.i.c b/re2c/test/posix_captures/forcedassoc/11.i.c
new file mode 100644 (file)
index 0000000..9533c66
--- /dev/null
@@ -0,0 +1,90 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy8;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       goto yy10;
+yy7:
+       {
+               const size_t yynmatch = 5;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt2;
+               yypmatch[6] = yyt1;
+               yypmatch[8] = yyt3;
+               yypmatch[0] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt1;
+               yypmatch[4] = yyt1;
+               yypmatch[5] = YYCURSOR;
+               yypmatch[7] = yyt3;
+               yypmatch[9] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy11;
+       default:        goto yy4;
+       }
+yy9:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy10:
+       switch (yych) {
+       case 'd':       goto yy9;
+       default:        goto yy7;
+       }
+yy11:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/forcedassoc/11.i.re b/re2c/test/posix_captures/forcedassoc/11.i.re
new file mode 100644 (file)
index 0000000..3453ed0
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (ab|a)((c|bcd)(d*))
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/forcedassoc/12.i.c b/re2c/test/posix_captures/forcedassoc/12.i.c
new file mode 100644 (file)
index 0000000..9533c66
--- /dev/null
@@ -0,0 +1,90 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy8;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       goto yy10;
+yy7:
+       {
+               const size_t yynmatch = 5;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt2;
+               yypmatch[6] = yyt1;
+               yypmatch[8] = yyt3;
+               yypmatch[0] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt1;
+               yypmatch[4] = yyt1;
+               yypmatch[5] = YYCURSOR;
+               yypmatch[7] = yyt3;
+               yypmatch[9] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy11;
+       default:        goto yy4;
+       }
+yy9:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy10:
+       switch (yych) {
+       case 'd':       goto yy9;
+       default:        goto yy7;
+       }
+yy11:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/forcedassoc/12.i.re b/re2c/test/posix_captures/forcedassoc/12.i.re
new file mode 100644 (file)
index 0000000..f98e95e
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (ab|a)((bcd|c)(d*))
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/forcedassoc/13.i.c b/re2c/test/posix_captures/forcedassoc/13.i.c
new file mode 100644 (file)
index 0000000..bbe2e4a
--- /dev/null
@@ -0,0 +1,66 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy8;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy6:
+       ++YYCURSOR;
+yy7:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt2;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy6;
+       default:
+               yyt2 = yyt3;
+               goto yy7;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/forcedassoc/13.i.re b/re2c/test/posix_captures/forcedassoc/13.i.re
new file mode 100644 (file)
index 0000000..33f680d
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a*)(b|abc)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/forcedassoc/14.i.c b/re2c/test/posix_captures/forcedassoc/14.i.c
new file mode 100644 (file)
index 0000000..bbe2e4a
--- /dev/null
@@ -0,0 +1,66 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy8;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy6:
+       ++YYCURSOR;
+yy7:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt2;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy6;
+       default:
+               yyt2 = yyt3;
+               goto yy7;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/forcedassoc/14.i.re b/re2c/test/posix_captures/forcedassoc/14.i.re
new file mode 100644 (file)
index 0000000..bda28c7
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a*)(abc|b)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/forcedassoc/15.i.c b/re2c/test/posix_captures/forcedassoc/15.i.c
new file mode 100644 (file)
index 0000000..99a7f0f
--- /dev/null
@@ -0,0 +1,82 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy8;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy6:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       goto yy10;
+yy7:
+       {
+               const size_t yynmatch = 5;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[4] = yyt1;
+               yypmatch[6] = yyt2;
+               yypmatch[8] = yyt3;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               yypmatch[3] = yyt3;
+               yypmatch[5] = yyt2;
+               yypmatch[7] = yyt3;
+               yypmatch[9] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy6;
+       default:
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy7;
+       }
+yy9:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy10:
+       switch (yych) {
+       case 'c':       goto yy9;
+       default:        goto yy7;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/forcedassoc/15.i.re b/re2c/test/posix_captures/forcedassoc/15.i.re
new file mode 100644 (file)
index 0000000..23e1454
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    ((a*)(b|abc))(c*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/forcedassoc/16.i.c b/re2c/test/posix_captures/forcedassoc/16.i.c
new file mode 100644 (file)
index 0000000..99a7f0f
--- /dev/null
@@ -0,0 +1,82 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy8;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy6:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       goto yy10;
+yy7:
+       {
+               const size_t yynmatch = 5;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[4] = yyt1;
+               yypmatch[6] = yyt2;
+               yypmatch[8] = yyt3;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               yypmatch[3] = yyt3;
+               yypmatch[5] = yyt2;
+               yypmatch[7] = yyt3;
+               yypmatch[9] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy6;
+       default:
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy7;
+       }
+yy9:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy10:
+       switch (yych) {
+       case 'c':       goto yy9;
+       default:        goto yy7;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/forcedassoc/16.i.re b/re2c/test/posix_captures/forcedassoc/16.i.re
new file mode 100644 (file)
index 0000000..75836fe
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    ((a*)(abc|b))(c*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/forcedassoc/17.i.c b/re2c/test/posix_captures/forcedassoc/17.i.c
new file mode 100644 (file)
index 0000000..6793e59
--- /dev/null
@@ -0,0 +1,72 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy6:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       goto yy9;
+yy7:
+       {
+               const size_t yynmatch = 5;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt2;
+               yypmatch[6] = yyt1;
+               yypmatch[8] = yyt3;
+               yypmatch[0] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt1;
+               yypmatch[4] = yyt1;
+               yypmatch[5] = YYCURSOR;
+               yypmatch[7] = yyt3;
+               yypmatch[9] = YYCURSOR;
+               {}
+       }
+yy8:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy9:
+       switch (yych) {
+       case 'c':       goto yy8;
+       default:        goto yy7;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/forcedassoc/17.i.re b/re2c/test/posix_captures/forcedassoc/17.i.re
new file mode 100644 (file)
index 0000000..efb0e6c
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a*)((b|abc)(c*))
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/forcedassoc/18.i.c b/re2c/test/posix_captures/forcedassoc/18.i.c
new file mode 100644 (file)
index 0000000..6793e59
--- /dev/null
@@ -0,0 +1,72 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy6:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       goto yy9;
+yy7:
+       {
+               const size_t yynmatch = 5;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt2;
+               yypmatch[6] = yyt1;
+               yypmatch[8] = yyt3;
+               yypmatch[0] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt1;
+               yypmatch[4] = yyt1;
+               yypmatch[5] = YYCURSOR;
+               yypmatch[7] = yyt3;
+               yypmatch[9] = YYCURSOR;
+               {}
+       }
+yy8:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy9:
+       switch (yych) {
+       case 'c':       goto yy8;
+       default:        goto yy7;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/forcedassoc/18.i.re b/re2c/test/posix_captures/forcedassoc/18.i.re
new file mode 100644 (file)
index 0000000..d2ee1fd
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a*)((abc|b)(c*))
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/forcedassoc/19.i.c b/re2c/test/posix_captures/forcedassoc/19.i.c
new file mode 100644 (file)
index 0000000..bbe2e4a
--- /dev/null
@@ -0,0 +1,66 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy8;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy6:
+       ++YYCURSOR;
+yy7:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt2;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy6;
+       default:
+               yyt2 = yyt3;
+               goto yy7;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/forcedassoc/19.i.re b/re2c/test/posix_captures/forcedassoc/19.i.re
new file mode 100644 (file)
index 0000000..33f680d
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a*)(b|abc)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/forcedassoc/20.i.c b/re2c/test/posix_captures/forcedassoc/20.i.c
new file mode 100644 (file)
index 0000000..bbe2e4a
--- /dev/null
@@ -0,0 +1,66 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy8;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy6:
+       ++YYCURSOR;
+yy7:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt2;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy6;
+       default:
+               yyt2 = yyt3;
+               goto yy7;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/forcedassoc/20.i.re b/re2c/test/posix_captures/forcedassoc/20.i.re
new file mode 100644 (file)
index 0000000..bda28c7
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a*)(abc|b)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/forcedassoc/21.i.c b/re2c/test/posix_captures/forcedassoc/21.i.c
new file mode 100644 (file)
index 0000000..99a7f0f
--- /dev/null
@@ -0,0 +1,82 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy8;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy6:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       goto yy10;
+yy7:
+       {
+               const size_t yynmatch = 5;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[4] = yyt1;
+               yypmatch[6] = yyt2;
+               yypmatch[8] = yyt3;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               yypmatch[3] = yyt3;
+               yypmatch[5] = yyt2;
+               yypmatch[7] = yyt3;
+               yypmatch[9] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy6;
+       default:
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy7;
+       }
+yy9:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy10:
+       switch (yych) {
+       case 'c':       goto yy9;
+       default:        goto yy7;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/forcedassoc/21.i.re b/re2c/test/posix_captures/forcedassoc/21.i.re
new file mode 100644 (file)
index 0000000..23e1454
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    ((a*)(b|abc))(c*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/forcedassoc/22.i.c b/re2c/test/posix_captures/forcedassoc/22.i.c
new file mode 100644 (file)
index 0000000..99a7f0f
--- /dev/null
@@ -0,0 +1,82 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy8;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy6:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       goto yy10;
+yy7:
+       {
+               const size_t yynmatch = 5;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[4] = yyt1;
+               yypmatch[6] = yyt2;
+               yypmatch[8] = yyt3;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               yypmatch[3] = yyt3;
+               yypmatch[5] = yyt2;
+               yypmatch[7] = yyt3;
+               yypmatch[9] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy6;
+       default:
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy7;
+       }
+yy9:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy10:
+       switch (yych) {
+       case 'c':       goto yy9;
+       default:        goto yy7;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/forcedassoc/22.i.re b/re2c/test/posix_captures/forcedassoc/22.i.re
new file mode 100644 (file)
index 0000000..75836fe
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    ((a*)(abc|b))(c*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/forcedassoc/23.i.c b/re2c/test/posix_captures/forcedassoc/23.i.c
new file mode 100644 (file)
index 0000000..6793e59
--- /dev/null
@@ -0,0 +1,72 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy6:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       goto yy9;
+yy7:
+       {
+               const size_t yynmatch = 5;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt2;
+               yypmatch[6] = yyt1;
+               yypmatch[8] = yyt3;
+               yypmatch[0] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt1;
+               yypmatch[4] = yyt1;
+               yypmatch[5] = YYCURSOR;
+               yypmatch[7] = yyt3;
+               yypmatch[9] = YYCURSOR;
+               {}
+       }
+yy8:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy9:
+       switch (yych) {
+       case 'c':       goto yy8;
+       default:        goto yy7;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/forcedassoc/23.i.re b/re2c/test/posix_captures/forcedassoc/23.i.re
new file mode 100644 (file)
index 0000000..efb0e6c
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a*)((b|abc)(c*))
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/forcedassoc/24.i.c b/re2c/test/posix_captures/forcedassoc/24.i.c
new file mode 100644 (file)
index 0000000..6793e59
--- /dev/null
@@ -0,0 +1,72 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy6:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       goto yy9;
+yy7:
+       {
+               const size_t yynmatch = 5;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt2;
+               yypmatch[6] = yyt1;
+               yypmatch[8] = yyt3;
+               yypmatch[0] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt1;
+               yypmatch[4] = yyt1;
+               yypmatch[5] = YYCURSOR;
+               yypmatch[7] = yyt3;
+               yypmatch[9] = YYCURSOR;
+               {}
+       }
+yy8:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy9:
+       switch (yych) {
+       case 'c':       goto yy8;
+       default:        goto yy7;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/forcedassoc/24.i.re b/re2c/test/posix_captures/forcedassoc/24.i.re
new file mode 100644 (file)
index 0000000..d2ee1fd
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a*)((abc|b)(c*))
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/forcedassoc/25.i.c b/re2c/test/posix_captures/forcedassoc/25.i.c
new file mode 100644 (file)
index 0000000..0298fe9
--- /dev/null
@@ -0,0 +1,42 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       default:        goto yy4;
+       }
+yy4:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy5:
+       ++YYCURSOR;
+       goto yy4;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/forcedassoc/25.i.re b/re2c/test/posix_captures/forcedassoc/25.i.re
new file mode 100644 (file)
index 0000000..dbe9754
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a|ab)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/forcedassoc/26.i.c b/re2c/test/posix_captures/forcedassoc/26.i.c
new file mode 100644 (file)
index 0000000..0298fe9
--- /dev/null
@@ -0,0 +1,42 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       default:        goto yy4;
+       }
+yy4:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy5:
+       ++YYCURSOR;
+       goto yy4;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/forcedassoc/26.i.re b/re2c/test/posix_captures/forcedassoc/26.i.re
new file mode 100644 (file)
index 0000000..98fe6b6
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (ab|a)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/forcedassoc/27.i.c b/re2c/test/posix_captures/forcedassoc/27.i.c
new file mode 100644 (file)
index 0000000..b341cf9
--- /dev/null
@@ -0,0 +1,56 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy4;
+       }
+yy4:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt2;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy5:
+       yych = *++YYCURSOR;
+       yyt2 = YYCURSOR;
+       goto yy7;
+yy6:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy7:
+       switch (yych) {
+       case 'b':       goto yy6;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/forcedassoc/27.i.re b/re2c/test/posix_captures/forcedassoc/27.i.re
new file mode 100644 (file)
index 0000000..dd4048b
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a|ab)(b*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/forcedassoc/28.i.c b/re2c/test/posix_captures/forcedassoc/28.i.c
new file mode 100644 (file)
index 0000000..b341cf9
--- /dev/null
@@ -0,0 +1,56 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy4;
+       }
+yy4:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt2;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy5:
+       yych = *++YYCURSOR;
+       yyt2 = YYCURSOR;
+       goto yy7;
+yy6:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy7:
+       switch (yych) {
+       case 'b':       goto yy6;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/forcedassoc/28.i.re b/re2c/test/posix_captures/forcedassoc/28.i.re
new file mode 100644 (file)
index 0000000..d7d6b55
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (ab|a)(b*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/glennfowler/01.i.c b/re2c/test/posix_captures/glennfowler/01.i.c
new file mode 100644 (file)
index 0000000..ad3818f
--- /dev/null
@@ -0,0 +1,64 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt3 = yyt4 = YYCURSOR;
+               goto yy3;
+       default:
+               yyt2 = yyt4 = NULL;
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt3;
+               yypmatch[6] = yyt4;
+               yypmatch[7] = yyt2;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt3;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = yyt4 = YYCURSOR;
+               goto yy4;
+       case 'b':       goto yy6;
+       default:
+               yyt2 = yyt4 = NULL;
+               yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy4:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy6;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       yyt2 = yyt4 = NULL;
+       yyt3 = YYCURSOR;
+       goto yy2;
+yy6:
+       ++YYCURSOR;
+       yyt2 = YYCURSOR;
+       goto yy2;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/glennfowler/01.i.re b/re2c/test/posix_captures/glennfowler/01.i.re
new file mode 100644 (file)
index 0000000..9ba890a
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a?)((ab)?)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/glennfowler/02.i.c b/re2c/test/posix_captures/glennfowler/02.i.c
new file mode 100644 (file)
index 0000000..07129cc
--- /dev/null
@@ -0,0 +1,94 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt2 = yyt5 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = yyt5 = NULL;
+               yyt1 = yyt2 = yyt4 = YYCURSOR;
+               goto yy4;
+       default:
+               yyt3 = yyt5 = NULL;
+               yyt1 = yyt2 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 5;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[6] = yyt5;
+               yypmatch[7] = yyt3;
+               yypmatch[8] = yyt4;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt2;
+               yypmatch[5] = yyt4;
+               yypmatch[9] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt4 = yyt5 = YYCURSOR;
+               goto yy5;
+       case 'b':
+               yyt3 = NULL;
+               yyt4 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt3 = yyt5 = NULL;
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy4:
+       ++YYCURSOR;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy8;
+       default:        goto yy6;
+       }
+yy6:
+       YYCURSOR = YYMARKER;
+       yyt3 = yyt5 = NULL;
+       yyt2 = yyt4 = YYCURSOR;
+       goto yy2;
+yy7:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt3 = yyt4 = YYCURSOR;
+               goto yy4;
+       default:
+               yyt2 = yyt4;
+               yyt5 = yyt3;
+               goto yy2;
+       }
+yy8:
+       yych = *++YYCURSOR;
+       yyt2 = yyt4;
+       yyt3 = yyt4 = YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy4;
+       default:        goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/glennfowler/02.i.re b/re2c/test/posix_captures/glennfowler/02.i.re
new file mode 100644 (file)
index 0000000..3e2edd1
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a?)((ab)?)(b?)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/glennfowler/03.i.c b/re2c/test/posix_captures/glennfowler/03.i.c
new file mode 100644 (file)
index 0000000..6ddc52f
--- /dev/null
@@ -0,0 +1,78 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt4 = yyt5 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt2 = yyt5 = NULL;
+               yyt1 = yyt3 = yyt4 = YYCURSOR;
+               goto yy4;
+       default:
+               yyt2 = yyt5 = NULL;
+               yyt1 = yyt3 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 6;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[4] = yyt1;
+               yypmatch[6] = yyt4;
+               yypmatch[8] = yyt5;
+               yypmatch[9] = yyt2;
+               yypmatch[10] = yyt3;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               yypmatch[3] = yyt3;
+               yypmatch[5] = yyt4;
+               yypmatch[7] = yyt3;
+               yypmatch[11] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt4 = yyt5 = YYCURSOR;
+               goto yy5;
+       case 'b':       goto yy7;
+       default:
+               yyt2 = yyt5 = NULL;
+               yyt3 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy4:
+       ++YYCURSOR;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy7;
+       default:        goto yy6;
+       }
+yy6:
+       YYCURSOR = YYMARKER;
+       yyt2 = yyt5 = NULL;
+       yyt3 = yyt4 = YYCURSOR;
+       goto yy2;
+yy7:
+       yych = *++YYCURSOR;
+       yyt2 = yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy4;
+       default:        goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/glennfowler/03.i.re b/re2c/test/posix_captures/glennfowler/03.i.re
new file mode 100644 (file)
index 0000000..675f01f
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    ((a?)((ab)?))(b?)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/glennfowler/04.i.c b/re2c/test/posix_captures/glennfowler/04.i.c
new file mode 100644 (file)
index 0000000..7db38ae
--- /dev/null
@@ -0,0 +1,97 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt2 = yyt5 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = yyt5 = NULL;
+               yyt1 = yyt2 = yyt4 = YYCURSOR;
+               goto yy4;
+       default:
+               yyt3 = yyt5 = NULL;
+               yyt1 = yyt2 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 6;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[6] = yyt2;
+               yypmatch[8] = yyt5;
+               yypmatch[9] = yyt3;
+               yypmatch[10] = yyt4;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt2;
+               yypmatch[4] = yyt2;
+               yypmatch[5] = YYCURSOR;
+               yypmatch[7] = yyt4;
+               yypmatch[11] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt4 = yyt5 = YYCURSOR;
+               goto yy5;
+       case 'b':
+               yyt3 = NULL;
+               yyt4 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt3 = yyt5 = NULL;
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy4:
+       ++YYCURSOR;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy8;
+       default:        goto yy6;
+       }
+yy6:
+       YYCURSOR = YYMARKER;
+       yyt3 = yyt5 = NULL;
+       yyt2 = yyt4 = YYCURSOR;
+       goto yy2;
+yy7:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt3 = yyt4 = YYCURSOR;
+               goto yy4;
+       default:
+               yyt2 = yyt4;
+               yyt5 = yyt3;
+               goto yy2;
+       }
+yy8:
+       yych = *++YYCURSOR;
+       yyt2 = yyt4;
+       yyt3 = yyt4 = YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy4;
+       default:        goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/glennfowler/04.i.re b/re2c/test/posix_captures/glennfowler/04.i.re
new file mode 100644 (file)
index 0000000..230d9df
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a?)(((ab)?)(b?))
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/glennfowler/05.i.c b/re2c/test/posix_captures/glennfowler/05.i.c
new file mode 100644 (file)
index 0000000..78ad0e2
--- /dev/null
@@ -0,0 +1,26 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       yyt1 = YYCURSOR;
+       if (yych >= 0x01) goto yy3;
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       goto yy2;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/glennfowler/05.i.re b/re2c/test/posix_captures/glennfowler/05.i.re
new file mode 100644 (file)
index 0000000..4611985
Binary files /dev/null and b/re2c/test/posix_captures/glennfowler/05.i.re differ
diff --git a/re2c/test/posix_captures/glennfowler/06.i.c b/re2c/test/posix_captures/glennfowler/06.i.c
new file mode 100644 (file)
index 0000000..78ad0e2
--- /dev/null
@@ -0,0 +1,26 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       yyt1 = YYCURSOR;
+       if (yych >= 0x01) goto yy3;
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       goto yy2;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/glennfowler/06.i.re b/re2c/test/posix_captures/glennfowler/06.i.re
new file mode 100644 (file)
index 0000000..102f0cf
Binary files /dev/null and b/re2c/test/posix_captures/glennfowler/06.i.re differ
diff --git a/re2c/test/posix_captures/glennfowler/07.i.c b/re2c/test/posix_captures/glennfowler/07.i.c
new file mode 100644 (file)
index 0000000..544fc4d
--- /dev/null
@@ -0,0 +1,34 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       if (yych >= 0x01) {
+               yyt1 = YYCURSOR;
+               goto yy3;
+       }
+       yyt1 = yyt2 = YYCURSOR;
+yy2:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt2;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       yyt2 = YYCURSOR;
+       if (yych <= 0x00) goto yy2;
+       ++YYCURSOR;
+       goto yy2;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/glennfowler/07.i.re b/re2c/test/posix_captures/glennfowler/07.i.re
new file mode 100644 (file)
index 0000000..a96d64d
Binary files /dev/null and b/re2c/test/posix_captures/glennfowler/07.i.re differ
diff --git a/re2c/test/posix_captures/glennfowler/08.i.c b/re2c/test/posix_captures/glennfowler/08.i.c
new file mode 100644 (file)
index 0000000..b37bf28
--- /dev/null
@@ -0,0 +1,32 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       if (yych >= 0x01) {
+               yyt1 = YYCURSOR;
+               goto yy3;
+       }
+       yyt1 = yyt2 = YYCURSOR;
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       yyt2 = YYCURSOR;
+       if (yych <= 0x00) goto yy2;
+       ++YYCURSOR;
+       goto yy2;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/glennfowler/08.i.re b/re2c/test/posix_captures/glennfowler/08.i.re
new file mode 100644 (file)
index 0000000..0e0134f
Binary files /dev/null and b/re2c/test/posix_captures/glennfowler/08.i.re differ
diff --git a/re2c/test/posix_captures/glennfowler/09.i.c b/re2c/test/posix_captures/glennfowler/09.i.c
new file mode 100644 (file)
index 0000000..7f88bc6
--- /dev/null
@@ -0,0 +1,36 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych >= 0x01) {
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy3;
+       }
+       yyt1 = yyt2 = yyt3 = YYCURSOR;
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) {
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+       yyt3 = YYCURSOR;
+       goto yy3;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/glennfowler/09.i.re b/re2c/test/posix_captures/glennfowler/09.i.re
new file mode 100644 (file)
index 0000000..ea30b30
Binary files /dev/null and b/re2c/test/posix_captures/glennfowler/09.i.re differ
diff --git a/re2c/test/posix_captures/glennfowler/10.i.c b/re2c/test/posix_captures/glennfowler/10.i.c
new file mode 100644 (file)
index 0000000..5a5ca6f
--- /dev/null
@@ -0,0 +1,28 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       yyt1 = YYCURSOR;
+       if (yych >= 0x01) goto yy3;
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) goto yy2;
+       ++YYCURSOR;
+       goto yy2;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/glennfowler/10.i.re b/re2c/test/posix_captures/glennfowler/10.i.re
new file mode 100644 (file)
index 0000000..4840445
Binary files /dev/null and b/re2c/test/posix_captures/glennfowler/10.i.re differ
diff --git a/re2c/test/posix_captures/glennfowler/11.i.c b/re2c/test/posix_captures/glennfowler/11.i.c
new file mode 100644 (file)
index 0000000..5a5ca6f
--- /dev/null
@@ -0,0 +1,28 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       yyt1 = YYCURSOR;
+       if (yych >= 0x01) goto yy3;
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) goto yy2;
+       ++YYCURSOR;
+       goto yy2;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/glennfowler/11.i.re b/re2c/test/posix_captures/glennfowler/11.i.re
new file mode 100644 (file)
index 0000000..80f113b
Binary files /dev/null and b/re2c/test/posix_captures/glennfowler/11.i.re differ
diff --git a/re2c/test/posix_captures/glennfowler/12.i.c b/re2c/test/posix_captures/glennfowler/12.i.c
new file mode 100644 (file)
index 0000000..a10ba40
--- /dev/null
@@ -0,0 +1,41 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *YYCURSOR;
+       if (yych >= 0x01) {
+               yyt1 = YYCURSOR;
+               goto yy3;
+       }
+       yyt1 = yyt2 = YYCURSOR;
+yy2:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt2;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+       yych = *++YYCURSOR;
+       yyt2 = YYCURSOR;
+       if (yych <= 0x00) goto yy2;
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) goto yy2;
+       ++YYCURSOR;
+       goto yy2;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/glennfowler/12.i.re b/re2c/test/posix_captures/glennfowler/12.i.re
new file mode 100644 (file)
index 0000000..67711d5
Binary files /dev/null and b/re2c/test/posix_captures/glennfowler/12.i.re differ
diff --git a/re2c/test/posix_captures/glennfowler/13.i.c b/re2c/test/posix_captures/glennfowler/13.i.c
new file mode 100644 (file)
index 0000000..f56d32a
--- /dev/null
@@ -0,0 +1,39 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *YYCURSOR;
+       if (yych >= 0x01) {
+               yyt1 = YYCURSOR;
+               goto yy3;
+       }
+       yyt1 = yyt2 = YYCURSOR;
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+       yych = *++YYCURSOR;
+       yyt2 = YYCURSOR;
+       if (yych <= 0x00) goto yy2;
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) goto yy2;
+       ++YYCURSOR;
+       goto yy2;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/glennfowler/13.i.re b/re2c/test/posix_captures/glennfowler/13.i.re
new file mode 100644 (file)
index 0000000..7971eae
Binary files /dev/null and b/re2c/test/posix_captures/glennfowler/13.i.re differ
diff --git a/re2c/test/posix_captures/glennfowler/14.i.c b/re2c/test/posix_captures/glennfowler/14.i.c
new file mode 100644 (file)
index 0000000..ae67d1b
--- /dev/null
@@ -0,0 +1,54 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *YYCURSOR;
+       if (yych >= 0x01) {
+               yyt1 = YYCURSOR;
+               goto yy3;
+       }
+       yyt1 = yyt2 = yyt3 = YYCURSOR;
+yy2:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[6] = yyt3;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt2;
+               yypmatch[5] = yyt3;
+               yypmatch[7] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+       yyt2 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = YYCURSOR;
+               goto yy2;
+       }
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       if (yych <= 0x00) goto yy2;
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) goto yy2;
+       ++YYCURSOR;
+       goto yy2;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/glennfowler/14.i.re b/re2c/test/posix_captures/glennfowler/14.i.re
new file mode 100644 (file)
index 0000000..698b366
Binary files /dev/null and b/re2c/test/posix_captures/glennfowler/14.i.re differ
diff --git a/re2c/test/posix_captures/glennfowler/15.i.c b/re2c/test/posix_captures/glennfowler/15.i.c
new file mode 100644 (file)
index 0000000..64107e4
--- /dev/null
@@ -0,0 +1,49 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *YYCURSOR;
+       if (yych >= 0x01) {
+               yyt1 = YYCURSOR;
+               goto yy3;
+       }
+       yyt1 = yyt2 = YYCURSOR;
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+       yych = *++YYCURSOR;
+       yyt2 = YYCURSOR;
+       if (yych <= 0x00) goto yy2;
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) goto yy2;
+       ++YYCURSOR;
+       goto yy2;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/glennfowler/15.i.re b/re2c/test/posix_captures/glennfowler/15.i.re
new file mode 100644 (file)
index 0000000..1f196a8
Binary files /dev/null and b/re2c/test/posix_captures/glennfowler/15.i.re differ
diff --git a/re2c/test/posix_captures/glennfowler/16.i.c b/re2c/test/posix_captures/glennfowler/16.i.c
new file mode 100644 (file)
index 0000000..bfb8b50
--- /dev/null
@@ -0,0 +1,43 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych >= 0x01) {
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy3;
+       }
+       yyt1 = yyt2 = yyt3 = YYCURSOR;
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) {
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) {
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+       yyt3 = YYCURSOR;
+       goto yy3;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/glennfowler/16.i.re b/re2c/test/posix_captures/glennfowler/16.i.re
new file mode 100644 (file)
index 0000000..ed51ad8
Binary files /dev/null and b/re2c/test/posix_captures/glennfowler/16.i.re differ
diff --git a/re2c/test/posix_captures/glennfowler/17.i.c b/re2c/test/posix_captures/glennfowler/17.i.c
new file mode 100644 (file)
index 0000000..d19b0ab
--- /dev/null
@@ -0,0 +1,91 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt2 = yyt5 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = yyt5 = NULL;
+               yyt1 = yyt2 = yyt4 = YYCURSOR;
+               goto yy4;
+       default:
+               yyt3 = yyt5 = NULL;
+               yyt1 = yyt2 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[2] = yyt2;
+               yypmatch[4] = yyt5;
+               yypmatch[5] = yyt3;
+               yypmatch[6] = yyt4;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt4;
+               yypmatch[7] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt4 = yyt5 = YYCURSOR;
+               goto yy5;
+       case 'b':
+               yyt3 = NULL;
+               yyt4 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt3 = yyt5 = NULL;
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy4:
+       ++YYCURSOR;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy8;
+       default:        goto yy6;
+       }
+yy6:
+       YYCURSOR = YYMARKER;
+       yyt3 = yyt5 = NULL;
+       yyt2 = yyt4 = YYCURSOR;
+       goto yy2;
+yy7:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt3 = yyt4 = YYCURSOR;
+               goto yy4;
+       default:
+               yyt2 = yyt4;
+               yyt5 = yyt3;
+               goto yy2;
+       }
+yy8:
+       yych = *++YYCURSOR;
+       yyt2 = yyt4;
+       yyt3 = yyt4 = YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy4;
+       default:        goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/glennfowler/17.i.re b/re2c/test/posix_captures/glennfowler/17.i.re
new file mode 100644 (file)
index 0000000..458fa6e
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    a?((ab)?)(b?)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/glennfowler/18.i.c b/re2c/test/posix_captures/glennfowler/18.i.c
new file mode 100644 (file)
index 0000000..8dc3a9d
--- /dev/null
@@ -0,0 +1,91 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt2 = yyt5 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt4 = yyt5 = NULL;
+               yyt1 = yyt2 = yyt3 = YYCURSOR;
+               goto yy4;
+       default:
+               yyt4 = yyt5 = NULL;
+               yyt1 = yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[5] = yyt3;
+               yypmatch[6] = yyt5;
+               yypmatch[7] = yyt4;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt2;
+               {}
+       }
+yy3:
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = yyt5 = YYCURSOR;
+               goto yy5;
+       case 'b':
+               yyt4 = NULL;
+               yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt4 = yyt5 = NULL;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy4:
+       ++YYCURSOR;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy8;
+       default:        goto yy6;
+       }
+yy6:
+       YYCURSOR = YYMARKER;
+       yyt4 = yyt5 = NULL;
+       yyt2 = yyt3 = YYCURSOR;
+       goto yy2;
+yy7:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt3 = yyt4 = YYCURSOR;
+               goto yy4;
+       default:
+               yyt2 = yyt3;
+               yyt5 = yyt4;
+               goto yy2;
+       }
+yy8:
+       yych = *++YYCURSOR;
+       yyt2 = yyt3;
+       yyt3 = yyt4 = YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy4;
+       default:        goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/glennfowler/18.i.re b/re2c/test/posix_captures/glennfowler/18.i.re
new file mode 100644 (file)
index 0000000..54514fb
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a?)((ab)?)b?
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/glennfowler/19.i.c b/re2c/test/posix_captures/glennfowler/19.i.c
new file mode 100644 (file)
index 0000000..0424afc
--- /dev/null
@@ -0,0 +1,88 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt2 = yyt5 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt4 = yyt5 = NULL;
+               yyt1 = yyt2 = yyt3 = YYCURSOR;
+               goto yy4;
+       default:
+               yyt4 = yyt5 = NULL;
+               yyt1 = yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = yyt3;
+               yypmatch[4] = yyt5;
+               yypmatch[5] = yyt4;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = yyt5 = YYCURSOR;
+               goto yy5;
+       case 'b':
+               yyt4 = NULL;
+               yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt4 = yyt5 = NULL;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy4:
+       ++YYCURSOR;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy8;
+       default:        goto yy6;
+       }
+yy6:
+       YYCURSOR = YYMARKER;
+       yyt4 = yyt5 = NULL;
+       yyt2 = yyt3 = YYCURSOR;
+       goto yy2;
+yy7:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt3 = yyt4 = YYCURSOR;
+               goto yy4;
+       default:
+               yyt2 = yyt3;
+               yyt5 = yyt4;
+               goto yy2;
+       }
+yy8:
+       yych = *++YYCURSOR;
+       yyt2 = yyt3;
+       yyt3 = yyt4 = YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy4;
+       default:        goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/glennfowler/19.i.re b/re2c/test/posix_captures/glennfowler/19.i.re
new file mode 100644 (file)
index 0000000..0915ba2
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    a?((ab)?)b?
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/glennfowler/20.i.c b/re2c/test/posix_captures/glennfowler/20.i.c
new file mode 100644 (file)
index 0000000..0a46854
--- /dev/null
@@ -0,0 +1,39 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/glennfowler/20.i.re b/re2c/test/posix_captures/glennfowler/20.i.re
new file mode 100644 (file)
index 0000000..1cc0b31
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a*){2}
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/glennfowler/21.i.c b/re2c/test/posix_captures/glennfowler/21.i.c
new file mode 100644 (file)
index 0000000..d2a9e42
--- /dev/null
@@ -0,0 +1,77 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy5;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       yyt3 = yyt1;
+       switch (yych) {
+       case 'b':       goto yy7;
+       default:        goto yy4;
+       }
+yy4:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt2;
+               yypmatch[4] = yyt3;
+               yypmatch[0] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt3;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy8;
+       default:        goto yy6;
+       }
+yy6:
+       YYCURSOR = YYMARKER;
+       if (yyaccept == 0) {
+               goto yy2;
+       } else {
+               goto yy4;
+       }
+yy7:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy8;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy5;
+       default:        goto yy6;
+       }
+yy8:
+       ++YYCURSOR;
+       yyt3 = yyt1;
+       goto yy4;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/glennfowler/21.i.re b/re2c/test/posix_captures/glennfowler/21.i.re
new file mode 100644 (file)
index 0000000..55e8cbd
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (ab?)(b?a)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/glennfowler/22.i.c b/re2c/test/posix_captures/glennfowler/22.i.c
new file mode 100644 (file)
index 0000000..3b6a820
--- /dev/null
@@ -0,0 +1,67 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy5;
+       case 'b':       goto yy7;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt2;
+               yypmatch[4] = yyt1;
+               yypmatch[0] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt1;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy7:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy5;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy8;
+       default:        goto yy4;
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy5;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/glennfowler/22.i.re b/re2c/test/posix_captures/glennfowler/22.i.re
new file mode 100644 (file)
index 0000000..c1dcea2
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a|ab)(ba|a)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/glennfowler/23.i.c b/re2c/test/posix_captures/glennfowler/23.i.c
new file mode 100644 (file)
index 0000000..70cd89f
--- /dev/null
@@ -0,0 +1,54 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy5;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy7;
+       default:        goto yy4;
+       }
+yy4:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       default:        goto yy6;
+       }
+yy6:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy7:
+       ++YYCURSOR;
+       goto yy4;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/glennfowler/23.i.re b/re2c/test/posix_captures/glennfowler/23.i.re
new file mode 100644 (file)
index 0000000..e4e800c
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a|ab|ba)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/glennfowler/24.i.c b/re2c/test/posix_captures/glennfowler/24.i.c
new file mode 100644 (file)
index 0000000..63f3818
--- /dev/null
@@ -0,0 +1,84 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy5;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       case 'b':       goto yy8;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy8;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy9;
+       default:        goto yy7;
+       }
+yy7:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt2;
+               yypmatch[4] = yyt1;
+               yypmatch[0] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt1;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy10;
+       default:        goto yy4;
+       }
+yy9:
+       ++YYCURSOR;
+       goto yy7;
+yy10:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy9;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/glennfowler/24.i.re b/re2c/test/posix_captures/glennfowler/24.i.re
new file mode 100644 (file)
index 0000000..2619464
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a|ab|ba)(a|ab|ba)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/glennfowler/25.i.c b/re2c/test/posix_captures/glennfowler/25.i.c
new file mode 100644 (file)
index 0000000..aa92b61
--- /dev/null
@@ -0,0 +1,85 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt2 = yyt3 = NULL;
+               yyt1 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':       goto yy7;
+       default:
+               yyt3 = yyt2;
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy5:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       default:        goto yy6;
+       }
+yy6:
+       YYCURSOR = YYMARKER;
+       if (yyaccept == 0) {
+               yyt2 = yyt3 = NULL;
+               yyt1 = YYCURSOR;
+               goto yy2;
+       } else {
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy7:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = yyt2;
+               yyt2 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt3 = yyt2;
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/glennfowler/25.i.re b/re2c/test/posix_captures/glennfowler/25.i.re
new file mode 100644 (file)
index 0000000..3c8515e
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a|ab|ba)*
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/glennfowler/26.i.c b/re2c/test/posix_captures/glennfowler/26.i.c
new file mode 100644 (file)
index 0000000..c265c15
--- /dev/null
@@ -0,0 +1,63 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy5;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy9;
+       default:        goto yy8;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       ++YYCURSOR;
+yy6:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy7:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy8:
+       switch (yych) {
+       case 'a':       goto yy7;
+       case 'b':       goto yy5;
+       default:        goto yy4;
+       }
+yy9:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy5;
+       default:        goto yy6;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/glennfowler/26.i.re b/re2c/test/posix_captures/glennfowler/26.i.re
new file mode 100644 (file)
index 0000000..97050cd
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (aba|a*b)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/glennfowler/27.i.c b/re2c/test/posix_captures/glennfowler/27.i.c
new file mode 100644 (file)
index 0000000..35d4c96
--- /dev/null
@@ -0,0 +1,124 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy5;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy8;
+       default:        goto yy7;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy9;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy10;
+       default:        goto yy4;
+       }
+yy6:
+       ++YYCURSOR;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *YYCURSOR;
+yy7:
+       switch (yych) {
+       case 'a':       goto yy6;
+       case 'b':       goto yy5;
+       default:        goto yy4;
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy12;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy10;
+       default:        goto yy4;
+       }
+yy9:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy15;
+       default:        goto yy14;
+       }
+yy10:
+       ++YYCURSOR;
+yy11:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt2;
+               yypmatch[4] = yyt1;
+               yypmatch[0] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt1;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy12:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy9;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:        goto yy4;
+       }
+yy13:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy14:
+       switch (yych) {
+       case 'a':       goto yy13;
+       case 'b':       goto yy10;
+       default:        goto yy4;
+       }
+yy15:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy10;
+       default:        goto yy11;
+       }
+yy16:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy10;
+       default:
+               yyt1 = yyt3;
+               goto yy11;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/glennfowler/27.i.re b/re2c/test/posix_captures/glennfowler/27.i.re
new file mode 100644 (file)
index 0000000..2c4417f
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (aba|a*b)(aba|a*b)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/glennfowler/28.i.c b/re2c/test/posix_captures/glennfowler/28.i.c
new file mode 100644 (file)
index 0000000..a353abe
--- /dev/null
@@ -0,0 +1,212 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 9) YYFILL(9);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy5;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy8;
+       default:        goto yy7;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy9;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy10;
+       default:        goto yy4;
+       }
+yy6:
+       ++YYCURSOR;
+       if ((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
+       yych = *YYCURSOR;
+yy7:
+       switch (yych) {
+       case 'a':       goto yy6;
+       case 'b':       goto yy5;
+       default:        goto yy4;
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy10;
+       default:        goto yy4;
+       }
+yy9:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy14;
+       default:        goto yy13;
+       }
+yy10:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy15;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:        goto yy4;
+       }
+yy11:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy9;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy18;
+       default:        goto yy4;
+       }
+yy12:
+       ++YYCURSOR;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *YYCURSOR;
+yy13:
+       switch (yych) {
+       case 'a':       goto yy12;
+       case 'b':       goto yy10;
+       default:        goto yy4;
+       }
+yy14:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy19;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:        goto yy4;
+       }
+yy15:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy22;
+       default:        goto yy21;
+       }
+yy16:
+       ++YYCURSOR;
+yy17:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt4;
+               yypmatch[4] = yyt1;
+               yypmatch[6] = yyt3;
+               yypmatch[0] = yyt4;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt1;
+               yypmatch[5] = yyt3;
+               yypmatch[7] = YYCURSOR;
+               {}
+       }
+yy18:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy23;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:        goto yy4;
+       }
+yy19:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy15;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy24;
+       default:        goto yy4;
+       }
+yy20:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy21:
+       switch (yych) {
+       case 'a':       goto yy20;
+       case 'b':       goto yy16;
+       default:        goto yy4;
+       }
+yy22:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy16;
+       default:        goto yy17;
+       }
+yy23:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt5 = YYCURSOR;
+               goto yy25;
+       case 'b':       goto yy22;
+       default:        goto yy4;
+       }
+yy24:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy16;
+       default:
+               yyt3 = yyt2;
+               goto yy17;
+       }
+yy25:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy26;
+       default:        goto yy21;
+       }
+yy26:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt2;
+               yyt3 = yyt5;
+               goto yy16;
+       default:        goto yy17;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/glennfowler/28.i.re b/re2c/test/posix_captures/glennfowler/28.i.re
new file mode 100644 (file)
index 0000000..7de698a
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (aba|a*b)(aba|a*b)(aba|a*b)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/glennfowler/29.i.c b/re2c/test/posix_captures/glennfowler/29.i.c
new file mode 100644 (file)
index 0000000..d6cfefe
--- /dev/null
@@ -0,0 +1,156 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt2 = yyt3 = NULL;
+               yyt1 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt3;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       case 'b':       goto yy9;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       if (yyaccept == 0) {
+               yyt2 = yyt3 = NULL;
+               yyt1 = YYCURSOR;
+               goto yy2;
+       } else {
+               yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy5:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy7:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       case 'b':       goto yy5;
+       default:        goto yy4;
+       }
+yy9:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy10;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy10:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy11:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy12;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy12:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy13;
+       case 'b':       goto yy9;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy13:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       case 'b':
+               yyt2 = yyt4;
+               goto yy11;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/glennfowler/29.i.re b/re2c/test/posix_captures/glennfowler/29.i.re
new file mode 100644 (file)
index 0000000..a12b35d
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (aba|a*b)*
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/glennfowler/30.i.c b/re2c/test/posix_captures/glennfowler/30.i.c
new file mode 100644 (file)
index 0000000..74d2660
--- /dev/null
@@ -0,0 +1,48 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       default:        goto yy4;
+       }
+yy4:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy6;
+       default:        goto yy4;
+       }
+yy6:
+       ++YYCURSOR;
+       goto yy4;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/glennfowler/30.i.re b/re2c/test/posix_captures/glennfowler/30.i.re
new file mode 100644 (file)
index 0000000..539c3ef
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (aba|ab|a)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/glennfowler/31.i.c b/re2c/test/posix_captures/glennfowler/31.i.c
new file mode 100644 (file)
index 0000000..b39c3e5
--- /dev/null
@@ -0,0 +1,81 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy5;
+       case 'b':       goto yy7;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy8;
+       default:        goto yy6;
+       }
+yy6:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt2;
+               yypmatch[4] = yyt1;
+               yypmatch[0] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt1;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy7:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy9;
+       default:        goto yy4;
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy10;
+       default:        goto yy6;
+       }
+yy9:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy5;
+       case 'b':       goto yy8;
+       default:        goto yy6;
+       }
+yy10:
+       ++YYCURSOR;
+       goto yy6;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/glennfowler/31.i.re b/re2c/test/posix_captures/glennfowler/31.i.re
new file mode 100644 (file)
index 0000000..07d7432
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (aba|ab|a)(aba|ab|a)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/glennfowler/32.i.c b/re2c/test/posix_captures/glennfowler/32.i.c
new file mode 100644 (file)
index 0000000..953fff0
--- /dev/null
@@ -0,0 +1,130 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 9) YYFILL(9);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy5;
+       case 'b':       goto yy6;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy7;
+       case 'b':       goto yy9;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy10;
+       default:        goto yy4;
+       }
+yy7:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy11;
+       default:        goto yy8;
+       }
+yy8:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt3;
+               yypmatch[4] = yyt1;
+               yypmatch[6] = yyt2;
+               yypmatch[0] = yyt3;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt1;
+               yypmatch[5] = yyt2;
+               yypmatch[7] = YYCURSOR;
+               {}
+       }
+yy9:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy12;
+       default:        goto yy4;
+       }
+yy10:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy13;
+       case 'b':       goto yy9;
+       default:        goto yy4;
+       }
+yy11:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy14;
+       default:        goto yy8;
+       }
+yy12:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy7;
+       case 'b':       goto yy11;
+       default:        goto yy8;
+       }
+yy13:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt2;
+               yyt2 = YYCURSOR;
+               goto yy7;
+       case 'b':       goto yy15;
+       default:        goto yy8;
+       }
+yy14:
+       ++YYCURSOR;
+       goto yy8;
+yy15:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt2;
+               yyt2 = YYCURSOR;
+               goto yy12;
+       default:        goto yy8;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/glennfowler/32.i.re b/re2c/test/posix_captures/glennfowler/32.i.re
new file mode 100644 (file)
index 0000000..97d8be1
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (aba|ab|a)(aba|ab|a)(aba|ab|a)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/glennfowler/33.i.c b/re2c/test/posix_captures/glennfowler/33.i.c
new file mode 100644 (file)
index 0000000..f3edb1a
--- /dev/null
@@ -0,0 +1,68 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy3;
+       default:
+               yyt2 = yyt3 = NULL;
+               yyt1 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy3;
+       case 'b':       goto yy5;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy5:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       yyt2 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy6;
+       default:        goto yy2;
+       }
+yy6:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = yyt2;
+               goto yy5;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/glennfowler/33.i.re b/re2c/test/posix_captures/glennfowler/33.i.re
new file mode 100644 (file)
index 0000000..fef9735
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (aba|ab|a)*
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/glennfowler/34.i.c b/re2c/test/posix_captures/glennfowler/34.i.c
new file mode 100644 (file)
index 0000000..677466b
--- /dev/null
@@ -0,0 +1,49 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt2 = yyt3 = NULL;
+               goto yy4;
+       }
+yy4:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[5] = yyt3;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy5:
+       ++YYCURSOR;
+       yyt3 = YYCURSOR;
+       goto yy4;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/glennfowler/34.i.re b/re2c/test/posix_captures/glennfowler/34.i.re
new file mode 100644 (file)
index 0000000..71a2247
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a(b)?)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/glennfowler/35.i.c b/re2c/test/posix_captures/glennfowler/35.i.c
new file mode 100644 (file)
index 0000000..79496b9
--- /dev/null
@@ -0,0 +1,76 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt3 = NULL;
+               yyt4 = YYCURSOR;
+               goto yy5;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy7;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt5 = YYCURSOR;
+               goto yy8;
+       default:
+               yyt5 = yyt6 = NULL;
+               goto yy6;
+       }
+yy6:
+       {
+               const size_t yynmatch = 5;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt2;
+               yypmatch[4] = yyt1;
+               yypmatch[5] = yyt3;
+               yypmatch[6] = yyt4;
+               yypmatch[8] = yyt5;
+               yypmatch[9] = yyt6;
+               yypmatch[0] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt4;
+               yypmatch[7] = YYCURSOR;
+               {}
+       }
+yy7:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt3 = yyt4 = YYCURSOR;
+               goto yy5;
+       default:        goto yy4;
+       }
+yy8:
+       ++YYCURSOR;
+       yyt6 = YYCURSOR;
+       goto yy6;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/glennfowler/35.i.re b/re2c/test/posix_captures/glennfowler/35.i.re
new file mode 100644 (file)
index 0000000..682135a
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a(b)?)(a(b)?)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/glennfowler/36.i.c b/re2c/test/posix_captures/glennfowler/36.i.c
new file mode 100644 (file)
index 0000000..310504f
--- /dev/null
@@ -0,0 +1,62 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy6;
+       default:
+               yyt3 = yyt4 = NULL;
+               goto yy5;
+       }
+yy5:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[4] = yyt3;
+               yypmatch[5] = yyt4;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy6:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       default:
+               yyt4 = YYCURSOR;
+               goto yy5;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/glennfowler/36.i.re b/re2c/test/posix_captures/glennfowler/36.i.re
new file mode 100644 (file)
index 0000000..3a4e3a2
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a(b)?)+
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/glennfowler/37.i.c b/re2c/test/posix_captures/glennfowler/37.i.c
new file mode 100644 (file)
index 0000000..bf2721f
--- /dev/null
@@ -0,0 +1,37 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych >= 0x01) {
+               yyt1 = YYCURSOR;
+               goto yy3;
+       }
+       yyt1 = yyt2 = YYCURSOR;
+yy2:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt2;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) {
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+       goto yy3;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/glennfowler/37.i.re b/re2c/test/posix_captures/glennfowler/37.i.re
new file mode 100644 (file)
index 0000000..21ba516
Binary files /dev/null and b/re2c/test/posix_captures/glennfowler/37.i.re differ
diff --git a/re2c/test/posix_captures/glennfowler/38.i.c b/re2c/test/posix_captures/glennfowler/38.i.c
new file mode 100644 (file)
index 0000000..aaf30b8
--- /dev/null
@@ -0,0 +1,35 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych >= 0x01) {
+               yyt1 = YYCURSOR;
+               goto yy3;
+       }
+       yyt1 = yyt2 = YYCURSOR;
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[2] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) {
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+       goto yy3;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/glennfowler/38.i.re b/re2c/test/posix_captures/glennfowler/38.i.re
new file mode 100644 (file)
index 0000000..17991be
Binary files /dev/null and b/re2c/test/posix_captures/glennfowler/38.i.re differ
diff --git a/re2c/test/posix_captures/glennfowler/39.i.c b/re2c/test/posix_captures/glennfowler/39.i.c
new file mode 100644 (file)
index 0000000..268f781
--- /dev/null
@@ -0,0 +1,82 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy5;
+       case 'z':       goto yy8;
+       default:        goto yy3;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       if (yyaccept == 0) {
+               goto yy2;
+       } else {
+               goto yy10;
+       }
+yy6:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy5;
+       case 'y':       goto yy11;
+       default:        goto yy6;
+       }
+yy8:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy10;
+       case 'z':       goto yy8;
+       default:        goto yy3;
+       }
+yy10:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy11:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy10;
+       case 'y':       goto yy11;
+       default:        goto yy6;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/glennfowler/39.i.re b/re2c/test/posix_captures/glennfowler/39.i.re
new file mode 100644 (file)
index 0000000..b971d23
Binary files /dev/null and b/re2c/test/posix_captures/glennfowler/39.i.re differ
diff --git a/re2c/test/posix_captures/glennfowler/40.i.c b/re2c/test/posix_captures/glennfowler/40.i.c
new file mode 100644 (file)
index 0000000..136b525
--- /dev/null
@@ -0,0 +1,437 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy5;
+       case 'z':       goto yy8;
+       default:        goto yy3;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       switch (yyaccept) {
+       case 0:         goto yy2;
+       case 1:         goto yy22;
+       case 2: 
+               yyt3 = yyt4;
+               goto yy22;
+       default:
+               yyt3 = yyt1;
+               goto yy22;
+       }
+yy6:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy5;
+       case 'y':       goto yy10;
+       default:        goto yy6;
+       }
+yy8:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy5;
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy12;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy14;
+       case 'z':       goto yy8;
+       default:        goto yy3;
+       }
+yy10:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy5;
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy16;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy18;
+       case 'y':       goto yy10;
+       default:        goto yy6;
+       }
+yy12:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy5;
+       case 'z':       goto yy20;
+       default:        goto yy12;
+       }
+yy14:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy5;
+       case 'y':       goto yy23;
+       case 'z':       goto yy25;
+       default:        goto yy14;
+       }
+yy16:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy5;
+       case 'y':       goto yy27;
+       case 'z':       goto yy29;
+       default:        goto yy16;
+       }
+yy18:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy5;
+       case 'y':       goto yy31;
+       default:        goto yy18;
+       }
+yy20:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt3 = yyt1;
+               goto yy22;
+       case 'a':
+               yyt3 = yyt1;
+               yyt1 = YYCURSOR;
+               goto yy12;
+       case 'b':
+               yyt3 = yyt1;
+               yyt4 = YYCURSOR;
+               goto yy33;
+       case 'z':       goto yy20;
+       default:
+               yyt3 = yyt1;
+               goto yy12;
+       }
+yy22:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt2;
+               yypmatch[4] = yyt3;
+               yypmatch[0] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt3;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy23:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt3 = yyt1;
+               goto yy22;
+       case 'y':       goto yy23;
+       case 'z':
+               yyt3 = yyt1;
+               goto yy25;
+       default:
+               yyt3 = yyt1;
+               goto yy14;
+       }
+yy25:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy5;
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy35;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy14;
+       case 'y':       goto yy23;
+       case 'z':       goto yy25;
+       default:        goto yy14;
+       }
+yy27:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy5;
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy16;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy37;
+       case 'y':       goto yy27;
+       case 'z':       goto yy29;
+       default:        goto yy16;
+       }
+yy29:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt3 = yyt1;
+               goto yy22;
+       case 'y':
+               yyt3 = yyt1;
+               goto yy27;
+       case 'z':       goto yy29;
+       default:
+               yyt3 = yyt1;
+               goto yy16;
+       }
+yy31:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt3 = yyt1;
+               goto yy22;
+       case 'a':
+               yyt3 = yyt1;
+               yyt4 = YYCURSOR;
+               goto yy39;
+       case 'b':
+               yyt3 = yyt1;
+               yyt1 = YYCURSOR;
+               goto yy18;
+       case 'y':       goto yy31;
+       default:
+               yyt3 = yyt1;
+               goto yy18;
+       }
+yy33:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy5;
+       case 'y':       goto yy41;
+       case 'z':       goto yy43;
+       default:        goto yy33;
+       }
+yy35:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy5;
+       case 'y':       goto yy45;
+       case 'z':       goto yy47;
+       default:        goto yy35;
+       }
+yy37:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy5;
+       case 'y':       goto yy49;
+       case 'z':       goto yy51;
+       default:        goto yy37;
+       }
+yy39:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy5;
+       case 'y':       goto yy53;
+       case 'z':       goto yy55;
+       default:        goto yy39;
+       }
+yy41:
+       yyaccept = 2;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt3 = yyt4;
+               goto yy22;
+       case 'y':       goto yy41;
+       case 'z':       goto yy43;
+       default:        goto yy33;
+       }
+yy43:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt3 = yyt1;
+               goto yy22;
+       case 'a':
+               yyt3 = yyt1;
+               yyt1 = yyt4;
+               yyt4 = YYCURSOR;
+               goto yy35;
+       case 'b':
+               yyt3 = yyt1;
+               yyt4 = YYCURSOR;
+               goto yy33;
+       case 'y':       goto yy41;
+       case 'z':       goto yy43;
+       default:
+               yyt3 = yyt1;
+               goto yy33;
+       }
+yy45:
+       yyaccept = 3;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt3 = yyt1;
+               goto yy22;
+       case 'y':       goto yy45;
+       case 'z':       goto yy47;
+       default:        goto yy35;
+       }
+yy47:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt3 = yyt4;
+               goto yy22;
+       case 'a':
+               yyt3 = yyt4;
+               yyt4 = YYCURSOR;
+               goto yy35;
+       case 'b':
+               yyt1 = yyt4;
+               yyt3 = yyt4;
+               yyt4 = YYCURSOR;
+               goto yy33;
+       case 'y':       goto yy45;
+       case 'z':       goto yy47;
+       default:
+               yyt3 = yyt4;
+               goto yy35;
+       }
+yy49:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt3 = yyt4;
+               goto yy22;
+       case 'a':
+               yyt1 = yyt4;
+               yyt3 = yyt4;
+               yyt4 = YYCURSOR;
+               goto yy39;
+       case 'b':
+               yyt3 = yyt4;
+               yyt4 = YYCURSOR;
+               goto yy37;
+       case 'y':       goto yy49;
+       case 'z':       goto yy51;
+       default:
+               yyt3 = yyt4;
+               goto yy37;
+       }
+yy51:
+       yyaccept = 3;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt3 = yyt1;
+               goto yy22;
+       case 'y':       goto yy49;
+       case 'z':       goto yy51;
+       default:        goto yy37;
+       }
+yy53:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt3 = yyt1;
+               goto yy22;
+       case 'a':
+               yyt3 = yyt1;
+               yyt4 = YYCURSOR;
+               goto yy39;
+       case 'b':
+               yyt3 = yyt1;
+               yyt1 = yyt4;
+               yyt4 = YYCURSOR;
+               goto yy37;
+       case 'y':       goto yy53;
+       case 'z':       goto yy55;
+       default:
+               yyt3 = yyt1;
+               goto yy39;
+       }
+yy55:
+       yyaccept = 2;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt3 = yyt4;
+               goto yy22;
+       case 'y':       goto yy53;
+       case 'z':       goto yy55;
+       default:        goto yy39;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/glennfowler/40.i.re b/re2c/test/posix_captures/glennfowler/40.i.re
new file mode 100644 (file)
index 0000000..f0befe0
Binary files /dev/null and b/re2c/test/posix_captures/glennfowler/40.i.re differ
diff --git a/re2c/test/posix_captures/glennfowler/41.i.c b/re2c/test/posix_captures/glennfowler/41.i.c
new file mode 100644 (file)
index 0000000..7608e9d
--- /dev/null
@@ -0,0 +1,178 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy6;
+       default:
+               yyt2 = yyt3 = NULL;
+               yyt1 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy5;
+       case 'z':       goto yy8;
+       default:        goto yy3;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       switch (yyaccept) {
+       case 0: 
+               yyt2 = yyt3 = NULL;
+               yyt1 = YYCURSOR;
+               goto yy2;
+       case 1: 
+               yyt2 = YYCURSOR;
+               goto yy2;
+       default:
+               yyt3 = yyt2;
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy6:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy5;
+       case 'y':       goto yy10;
+       default:        goto yy6;
+       }
+yy8:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy12;
+       case 'z':       goto yy8;
+       default:        goto yy3;
+       }
+yy10:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy14;
+       case 'y':       goto yy10;
+       default:        goto yy6;
+       }
+yy12:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy5;
+       case 'y':       goto yy16;
+       case 'z':       goto yy18;
+       default:        goto yy12;
+       }
+yy14:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy5;
+       case 'y':       goto yy20;
+       case 'z':       goto yy22;
+       default:        goto yy14;
+       }
+yy16:
+       yyaccept = 2;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt3 = yyt2;
+               yyt2 = YYCURSOR;
+               goto yy2;
+       case 'y':       goto yy16;
+       case 'z':       goto yy18;
+       default:        goto yy12;
+       }
+yy18:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy12;
+       case 'y':       goto yy16;
+       case 'z':       goto yy18;
+       default:        goto yy12;
+       }
+yy20:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy14;
+       case 'y':       goto yy20;
+       case 'z':       goto yy22;
+       default:        goto yy14;
+       }
+yy22:
+       yyaccept = 2;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+               yyt3 = yyt2;
+               yyt2 = YYCURSOR;
+               goto yy2;
+       case 'y':       goto yy20;
+       case 'z':       goto yy22;
+       default:        goto yy14;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/glennfowler/41.i.re b/re2c/test/posix_captures/glennfowler/41.i.re
new file mode 100644 (file)
index 0000000..a738619
Binary files /dev/null and b/re2c/test/posix_captures/glennfowler/41.i.re differ
diff --git a/re2c/test/posix_captures/glennfowler/42.i.c b/re2c/test/posix_captures/glennfowler/42.i.c
new file mode 100644 (file)
index 0000000..6d65aca
--- /dev/null
@@ -0,0 +1,47 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+       yych = *YYCURSOR;
+       if (yych >= 0x01) {
+               yyt1 = YYCURSOR;
+               goto yy3;
+       }
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) goto yy5;
+       yyt2 = YYCURSOR;
+yy4:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt2;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy5:
+       yych = *++YYCURSOR;
+       yyt2 = YYCURSOR;
+       goto yy7;
+yy6:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy7:
+       if (yych <= 0x00) goto yy4;
+       goto yy6;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/glennfowler/42.i.re b/re2c/test/posix_captures/glennfowler/42.i.re
new file mode 100644 (file)
index 0000000..01bed5d
Binary files /dev/null and b/re2c/test/posix_captures/glennfowler/42.i.re differ
diff --git a/re2c/test/posix_captures/glennfowler/43.i.c b/re2c/test/posix_captures/glennfowler/43.i.c
new file mode 100644 (file)
index 0000000..462354c
--- /dev/null
@@ -0,0 +1,96 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt2 = NULL;
+               yyt1 = yyt3 = yyt5 = YYCURSOR;
+               goto yy3;
+       }
+       yyt2 = yyt3 = yyt4 = yyt5 = NULL;
+       yyt1 = YYCURSOR;
+yy2:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[5] = yyt2;
+               yypmatch[7] = yyt4;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = YYCURSOR;
+               yypmatch[4] = yyt3;
+               yypmatch[6] = yyt5;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) goto yy5;
+       YYCURSOR = YYMARKER;
+       yyt2 = yyt3 = yyt4 = yyt5 = NULL;
+       yyt1 = YYCURSOR;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt4 = yyt5 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+       yyt4 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt2;
+               yyt4 = YYCURSOR;
+               goto yy2;
+       }
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt4;
+               yyt4 = yyt5 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+       yyt2 = yyt5 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt2 = yyt4;
+               yyt5 = yyt4;
+               yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy9:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt2;
+               yyt4 = yyt5 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+       yyt3 = YYCURSOR;
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt4;
+               yyt4 = YYCURSOR;
+               goto yy2;
+       }
+       yyt4 = yyt2;
+       yyt5 = yyt3;
+       yyt2 = yyt3;
+       goto yy9;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 4 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 4 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 4 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 4 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/glennfowler/43.i.re b/re2c/test/posix_captures/glennfowler/43.i.re
new file mode 100644 (file)
index 0000000..895f60e
Binary files /dev/null and b/re2c/test/posix_captures/glennfowler/43.i.re differ
diff --git a/re2c/test/posix_captures/glennfowler/44.i.c b/re2c/test/posix_captures/glennfowler/44.i.c
new file mode 100644 (file)
index 0000000..fbb25c3
--- /dev/null
@@ -0,0 +1,114 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt2 = NULL;
+               yyt1 = yyt3 = yyt5 = YYCURSOR;
+               goto yy3;
+       }
+       yyt2 = yyt3 = yyt4 = yyt5 = yyt7 = NULL;
+       yyt1 = yyt6 = YYCURSOR;
+yy2:
+       {
+               const size_t yynmatch = 7;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[5] = yyt2;
+               yypmatch[7] = yyt4;
+               yypmatch[8] = yyt6;
+               yypmatch[11] = yyt7;
+               yypmatch[13] = yyt7;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt6;
+               yypmatch[4] = yyt3;
+               yypmatch[6] = yyt5;
+               yypmatch[9] = YYCURSOR;
+               yypmatch[10] = yyt7;
+               yypmatch[12] = yyt7;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) goto yy5;
+       YYCURSOR = YYMARKER;
+       yyt2 = yyt3 = yyt4 = yyt5 = yyt7 = NULL;
+       yyt1 = yyt6 = YYCURSOR;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt4 = yyt5 = yyt7 = NULL;
+               yyt2 = yyt6 = YYCURSOR;
+               goto yy2;
+       }
+       yyt4 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt2;
+               yyt7 = NULL;
+               yyt4 = yyt6 = YYCURSOR;
+               goto yy2;
+       }
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt4;
+               yyt4 = yyt5 = yyt7 = NULL;
+               yyt2 = yyt6 = YYCURSOR;
+               goto yy2;
+       }
+       yyt2 = yyt5 = yyt6 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt2 = yyt4;
+               yyt5 = yyt4;
+               yyt7 = NULL;
+               yyt4 = yyt6 = YYCURSOR;
+               goto yy2;
+       }
+yy9:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt6;
+               yyt4 = yyt5 = yyt7 = NULL;
+               yyt2 = yyt6 = YYCURSOR;
+               goto yy2;
+       }
+       yyt3 = YYCURSOR;
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt4;
+               yyt7 = NULL;
+               yyt4 = yyt6 = YYCURSOR;
+               goto yy2;
+       }
+       yyt2 = yyt3;
+       yyt4 = yyt6;
+       yyt5 = yyt3;
+       yyt6 = yyt3;
+       goto yy9;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 4 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 4 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 5 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 6 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 4 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 4 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/glennfowler/44.i.re b/re2c/test/posix_captures/glennfowler/44.i.re
new file mode 100644 (file)
index 0000000..36f76ef
Binary files /dev/null and b/re2c/test/posix_captures/glennfowler/44.i.re differ
diff --git a/re2c/test/posix_captures/glennfowler/45.i.c b/re2c/test/posix_captures/glennfowler/45.i.c
new file mode 100644 (file)
index 0000000..af408fe
--- /dev/null
@@ -0,0 +1,99 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt2 = yyt3 = NULL;
+               yyt1 = yyt4 = yyt6 = YYCURSOR;
+               goto yy3;
+       }
+       yyt3 = yyt4 = yyt5 = yyt6 = NULL;
+       yyt1 = yyt2 = YYCURSOR;
+yy2:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[5] = yyt3;
+               yypmatch[7] = yyt5;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt4;
+               yypmatch[6] = yyt6;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) goto yy5;
+       YYCURSOR = YYMARKER;
+       yyt3 = yyt4 = yyt5 = yyt6 = NULL;
+       yyt1 = yyt2 = YYCURSOR;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt5 = yyt6 = NULL;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+       yyt5 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt4 = yyt2;
+               yyt2 = yyt5 = YYCURSOR;
+               goto yy2;
+       }
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt4 = yyt5;
+               yyt5 = yyt6 = NULL;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+       yyt2 = yyt3 = yyt6 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt5;
+               yyt6 = yyt5;
+               yyt2 = yyt5 = YYCURSOR;
+               goto yy2;
+       }
+yy9:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) {
+               yyt4 = yyt2;
+               yyt5 = yyt6 = NULL;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+       yyt4 = YYCURSOR;
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) {
+               yyt4 = yyt5;
+               yyt2 = yyt5 = YYCURSOR;
+               goto yy2;
+       }
+       yyt3 = yyt4;
+       yyt5 = yyt2;
+       yyt6 = yyt4;
+       yyt2 = yyt4;
+       goto yy9;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 4 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 4 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 4 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 4 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/glennfowler/45.i.re b/re2c/test/posix_captures/glennfowler/45.i.re
new file mode 100644 (file)
index 0000000..662fa27
Binary files /dev/null and b/re2c/test/posix_captures/glennfowler/45.i.re differ
diff --git a/re2c/test/posix_captures/nullsubexpr/01.i.c b/re2c/test/posix_captures/nullsubexpr/01.i.c
new file mode 100644 (file)
index 0000000..a0e369b
--- /dev/null
@@ -0,0 +1,39 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/nullsubexpr/01.i.re b/re2c/test/posix_captures/nullsubexpr/01.i.re
new file mode 100644 (file)
index 0000000..6c64764
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a*)*
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/nullsubexpr/02.i.c b/re2c/test/posix_captures/nullsubexpr/02.i.c
new file mode 100644 (file)
index 0000000..dee1de1
--- /dev/null
@@ -0,0 +1,34 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       yyt1 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       default:        goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/nullsubexpr/02.i.re b/re2c/test/posix_captures/nullsubexpr/02.i.re
new file mode 100644 (file)
index 0000000..8131d00
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a*)+
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/nullsubexpr/03.i.c b/re2c/test/posix_captures/nullsubexpr/03.i.c
new file mode 100644 (file)
index 0000000..7a6bbb8
--- /dev/null
@@ -0,0 +1,40 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy3;
+       default:
+               yyt2 = yyt3 = NULL;
+               yyt1 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/nullsubexpr/03.i.re b/re2c/test/posix_captures/nullsubexpr/03.i.re
new file mode 100644 (file)
index 0000000..72e5eee
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a+)*
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/nullsubexpr/04.i.c b/re2c/test/posix_captures/nullsubexpr/04.i.c
new file mode 100644 (file)
index 0000000..8e50e10
--- /dev/null
@@ -0,0 +1,41 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       default:        goto yy5;
+       }
+yy5:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/nullsubexpr/04.i.re b/re2c/test/posix_captures/nullsubexpr/04.i.re
new file mode 100644 (file)
index 0000000..a9df071
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a+)+
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/nullsubexpr/05.i.c b/re2c/test/posix_captures/nullsubexpr/05.i.c
new file mode 100644 (file)
index 0000000..a0e369b
--- /dev/null
@@ -0,0 +1,39 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/nullsubexpr/05.i.re b/re2c/test/posix_captures/nullsubexpr/05.i.re
new file mode 100644 (file)
index 0000000..3156642
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    ([a]*)*
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/nullsubexpr/06.i.c b/re2c/test/posix_captures/nullsubexpr/06.i.c
new file mode 100644 (file)
index 0000000..dee1de1
--- /dev/null
@@ -0,0 +1,34 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       yyt1 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       default:        goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/nullsubexpr/06.i.re b/re2c/test/posix_captures/nullsubexpr/06.i.re
new file mode 100644 (file)
index 0000000..bfdf486
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    ([a]*)+
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/nullsubexpr/07.i.c b/re2c/test/posix_captures/nullsubexpr/07.i.c
new file mode 100644 (file)
index 0000000..b80f90e
--- /dev/null
@@ -0,0 +1,41 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+       case 'b':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy2;
+       default:
+               yyt1 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy2;
+       default:        goto yy3;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/nullsubexpr/07.i.re b/re2c/test/posix_captures/nullsubexpr/07.i.re
new file mode 100644 (file)
index 0000000..6077561
Binary files /dev/null and b/re2c/test/posix_captures/nullsubexpr/07.i.re differ
diff --git a/re2c/test/posix_captures/nullsubexpr/08.i.c b/re2c/test/posix_captures/nullsubexpr/08.i.c
new file mode 100644 (file)
index 0000000..ea8f74e
--- /dev/null
@@ -0,0 +1,41 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+       case 'b':       goto yy3;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/nullsubexpr/08.i.re b/re2c/test/posix_captures/nullsubexpr/08.i.re
new file mode 100644 (file)
index 0000000..f6eb815
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    ([ab]*)*
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/nullsubexpr/09.i.c b/re2c/test/posix_captures/nullsubexpr/09.i.c
new file mode 100644 (file)
index 0000000..5d69b0e
--- /dev/null
@@ -0,0 +1,41 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+       case 'a':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy2;
+       default:
+               yyt1 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy2;
+       default:        goto yy3;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/nullsubexpr/09.i.re b/re2c/test/posix_captures/nullsubexpr/09.i.re
new file mode 100644 (file)
index 0000000..89b4903
Binary files /dev/null and b/re2c/test/posix_captures/nullsubexpr/09.i.re differ
diff --git a/re2c/test/posix_captures/nullsubexpr/10.i.c b/re2c/test/posix_captures/nullsubexpr/10.i.c
new file mode 100644 (file)
index 0000000..5f97d6c
--- /dev/null
@@ -0,0 +1,43 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+       case 'a':
+       case 'b':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy2;
+       default:
+               yyt1 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 0x00:
+       case 'a':
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy2;
+       default:        goto yy3;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/nullsubexpr/10.i.re b/re2c/test/posix_captures/nullsubexpr/10.i.re
new file mode 100644 (file)
index 0000000..f137be9
Binary files /dev/null and b/re2c/test/posix_captures/nullsubexpr/10.i.re differ
diff --git a/re2c/test/posix_captures/nullsubexpr/11.i.c b/re2c/test/posix_captures/nullsubexpr/11.i.c
new file mode 100644 (file)
index 0000000..77ad3e7
--- /dev/null
@@ -0,0 +1,66 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy3;
+       case 'z':
+               yyt1 = yyt3 = yyt5 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt2 = yyt3 = yyt4 = yyt5 = NULL;
+               yyt1 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[5] = yyt4;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               yypmatch[4] = yyt5;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy3;
+       case 'z':
+               yyt3 = yyt5 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt4 = yyt5 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy5:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy3;
+       case 'z':
+               yyt5 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/nullsubexpr/11.i.re b/re2c/test/posix_captures/nullsubexpr/11.i.re
new file mode 100644 (file)
index 0000000..f6c0b6d
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    ((z)+|a)*
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/nullsubexpr/12.i.c b/re2c/test/posix_captures/nullsubexpr/12.i.c
new file mode 100644 (file)
index 0000000..820993a
--- /dev/null
@@ -0,0 +1,32 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR - 1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = YYCURSOR - 1;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/nullsubexpr/12.i.re b/re2c/test/posix_captures/nullsubexpr/12.i.re
new file mode 100644 (file)
index 0000000..57cae25
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/nullsubexpr/13.i.c b/re2c/test/posix_captures/nullsubexpr/13.i.c
new file mode 100644 (file)
index 0000000..9619fe9
--- /dev/null
@@ -0,0 +1,53 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'x':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       case 'x':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy6:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               yypmatch[4] = YYCURSOR - 1;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/nullsubexpr/13.i.re b/re2c/test/posix_captures/nullsubexpr/13.i.re
new file mode 100644 (file)
index 0000000..5e20a85
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a*)*(x)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/nullsubexpr/14.i.c b/re2c/test/posix_captures/nullsubexpr/14.i.c
new file mode 100644 (file)
index 0000000..9619fe9
--- /dev/null
@@ -0,0 +1,53 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'x':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       case 'x':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy6:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               yypmatch[4] = YYCURSOR - 1;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/nullsubexpr/14.i.re b/re2c/test/posix_captures/nullsubexpr/14.i.re
new file mode 100644 (file)
index 0000000..5e20a85
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a*)*(x)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/nullsubexpr/15.i.c b/re2c/test/posix_captures/nullsubexpr/15.i.c
new file mode 100644 (file)
index 0000000..9619fe9
--- /dev/null
@@ -0,0 +1,53 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'x':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       case 'x':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy6:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               yypmatch[4] = YYCURSOR - 1;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/nullsubexpr/15.i.re b/re2c/test/posix_captures/nullsubexpr/15.i.re
new file mode 100644 (file)
index 0000000..5e20a85
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a*)*(x)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/nullsubexpr/16.i.c b/re2c/test/posix_captures/nullsubexpr/16.i.c
new file mode 100644 (file)
index 0000000..5b22f95
--- /dev/null
@@ -0,0 +1,51 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'x':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       case 'x':       goto yy6;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy6:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               yypmatch[3] = YYCURSOR - 1;
+               yypmatch[4] = YYCURSOR - 1;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/nullsubexpr/16.i.re b/re2c/test/posix_captures/nullsubexpr/16.i.re
new file mode 100644 (file)
index 0000000..5eef26b
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a*)+(x)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/nullsubexpr/17.i.c b/re2c/test/posix_captures/nullsubexpr/17.i.c
new file mode 100644 (file)
index 0000000..5b22f95
--- /dev/null
@@ -0,0 +1,51 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'x':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       case 'x':       goto yy6;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy6:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               yypmatch[3] = YYCURSOR - 1;
+               yypmatch[4] = YYCURSOR - 1;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/nullsubexpr/17.i.re b/re2c/test/posix_captures/nullsubexpr/17.i.re
new file mode 100644 (file)
index 0000000..5eef26b
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a*)+(x)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/nullsubexpr/18.i.c b/re2c/test/posix_captures/nullsubexpr/18.i.c
new file mode 100644 (file)
index 0000000..5b22f95
--- /dev/null
@@ -0,0 +1,51 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'x':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       case 'x':       goto yy6;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy6:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               yypmatch[3] = YYCURSOR - 1;
+               yypmatch[4] = YYCURSOR - 1;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/nullsubexpr/18.i.re b/re2c/test/posix_captures/nullsubexpr/18.i.re
new file mode 100644 (file)
index 0000000..5eef26b
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a*)+(x)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/nullsubexpr/19.i.c b/re2c/test/posix_captures/nullsubexpr/19.i.c
new file mode 100644 (file)
index 0000000..603e34a
--- /dev/null
@@ -0,0 +1,53 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'x':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       case 'x':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy6:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR - 1;
+               yypmatch[4] = YYCURSOR - 1;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/nullsubexpr/19.i.re b/re2c/test/posix_captures/nullsubexpr/19.i.re
new file mode 100644 (file)
index 0000000..6a5de21
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a*){2}(x)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/nullsubexpr/20.i.c b/re2c/test/posix_captures/nullsubexpr/20.i.c
new file mode 100644 (file)
index 0000000..603e34a
--- /dev/null
@@ -0,0 +1,53 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'x':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       case 'x':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy6:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR - 1;
+               yypmatch[4] = YYCURSOR - 1;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/nullsubexpr/20.i.re b/re2c/test/posix_captures/nullsubexpr/20.i.re
new file mode 100644 (file)
index 0000000..6a5de21
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a*){2}(x)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/nullsubexpr/21.i.c b/re2c/test/posix_captures/nullsubexpr/21.i.c
new file mode 100644 (file)
index 0000000..603e34a
--- /dev/null
@@ -0,0 +1,53 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'x':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       case 'x':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy6:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR - 1;
+               yypmatch[4] = YYCURSOR - 1;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/nullsubexpr/21.i.re b/re2c/test/posix_captures/nullsubexpr/21.i.re
new file mode 100644 (file)
index 0000000..6a5de21
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a*){2}(x)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/osxbsdcritical/01.i.c b/re2c/test/posix_captures/osxbsdcritical/01.i.c
new file mode 100644 (file)
index 0000000..a1255d8
--- /dev/null
@@ -0,0 +1,66 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy2;
+       case 'b':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt1 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt2 = NULL;
+               goto yy7;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt2 = NULL;
+               goto yy7;
+       default:        goto yy6;
+       }
+yy6:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[5] = yyt2;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = YYCURSOR - 1;
+               yypmatch[6] = YYCURSOR - 1;
+               yypmatch[7] = YYCURSOR;
+               {}
+       }
+yy7:
+       ++YYCURSOR;
+       goto yy6;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/osxbsdcritical/01.i.re b/re2c/test/posix_captures/osxbsdcritical/01.i.re
new file mode 100644 (file)
index 0000000..9e5477f
Binary files /dev/null and b/re2c/test/posix_captures/osxbsdcritical/01.i.re differ
diff --git a/re2c/test/posix_captures/osxbsdcritical/02.i.c b/re2c/test/posix_captures/osxbsdcritical/02.i.c
new file mode 100644 (file)
index 0000000..541db4e
--- /dev/null
@@ -0,0 +1,66 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy5;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt2 = NULL;
+               goto yy7;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt2 = NULL;
+               goto yy7;
+       default:        goto yy6;
+       }
+yy6:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[5] = yyt2;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = YYCURSOR - 1;
+               yypmatch[6] = YYCURSOR - 1;
+               yypmatch[7] = YYCURSOR;
+               {}
+       }
+yy7:
+       ++YYCURSOR;
+       goto yy6;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/osxbsdcritical/02.i.re b/re2c/test/posix_captures/osxbsdcritical/02.i.re
new file mode 100644 (file)
index 0000000..2ce1bdd
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (("")|[ab])(b)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/osxbsdcritical/03.i.c b/re2c/test/posix_captures/osxbsdcritical/03.i.c
new file mode 100644 (file)
index 0000000..808dc38
--- /dev/null
@@ -0,0 +1,94 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt2 = yyt4 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt4 = NULL;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       if (yyaccept == 0) {
+               goto yy2;
+       } else {
+               goto yy7;
+       }
+yy6:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'b':
+               yyt4 = NULL;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       default:        goto yy9;
+       }
+yy7:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt2;
+               yypmatch[4] = yyt4;
+               yypmatch[5] = yyt4;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               yypmatch[3] = YYCURSOR - 1;
+               {}
+       }
+yy8:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy9:
+       switch (yych) {
+       case 'a':
+               yyt3 = yyt1;
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt3;
+               yyt4 = NULL;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       default:
+               yyt3 = yyt1;
+               goto yy7;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/osxbsdcritical/03.i.re b/re2c/test/posix_captures/osxbsdcritical/03.i.re
new file mode 100644 (file)
index 0000000..fcebb5a
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (("")|[ab])+b
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/osxbsdcritical/04.i.c b/re2c/test/posix_captures/osxbsdcritical/04.i.c
new file mode 100644 (file)
index 0000000..a1255d8
--- /dev/null
@@ -0,0 +1,66 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy2;
+       case 'b':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt1 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt2 = NULL;
+               goto yy7;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt2 = NULL;
+               goto yy7;
+       default:        goto yy6;
+       }
+yy6:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[5] = yyt2;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = YYCURSOR - 1;
+               yypmatch[6] = YYCURSOR - 1;
+               yypmatch[7] = YYCURSOR;
+               {}
+       }
+yy7:
+       ++YYCURSOR;
+       goto yy6;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/osxbsdcritical/04.i.re b/re2c/test/posix_captures/osxbsdcritical/04.i.re
new file mode 100644 (file)
index 0000000..74eabd7
Binary files /dev/null and b/re2c/test/posix_captures/osxbsdcritical/04.i.re differ
diff --git a/re2c/test/posix_captures/osxbsdcritical/05.i.c b/re2c/test/posix_captures/osxbsdcritical/05.i.c
new file mode 100644 (file)
index 0000000..541db4e
--- /dev/null
@@ -0,0 +1,66 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy5;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt2 = NULL;
+               goto yy7;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt2 = NULL;
+               goto yy7;
+       default:        goto yy6;
+       }
+yy6:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[5] = yyt2;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = YYCURSOR - 1;
+               yypmatch[6] = YYCURSOR - 1;
+               yypmatch[7] = YYCURSOR;
+               {}
+       }
+yy7:
+       ++YYCURSOR;
+       goto yy6;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/osxbsdcritical/05.i.re b/re2c/test/posix_captures/osxbsdcritical/05.i.re
new file mode 100644 (file)
index 0000000..75448df
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    ([ab]|(""))(b)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/osxbsdcritical/06.i.c b/re2c/test/posix_captures/osxbsdcritical/06.i.c
new file mode 100644 (file)
index 0000000..808dc38
--- /dev/null
@@ -0,0 +1,94 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt2 = yyt4 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt4 = NULL;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       if (yyaccept == 0) {
+               goto yy2;
+       } else {
+               goto yy7;
+       }
+yy6:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'b':
+               yyt4 = NULL;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       default:        goto yy9;
+       }
+yy7:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt2;
+               yypmatch[4] = yyt4;
+               yypmatch[5] = yyt4;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               yypmatch[3] = YYCURSOR - 1;
+               {}
+       }
+yy8:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy9:
+       switch (yych) {
+       case 'a':
+               yyt3 = yyt1;
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt3;
+               yyt4 = NULL;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       default:
+               yyt3 = yyt1;
+               goto yy7;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/osxbsdcritical/06.i.re b/re2c/test/posix_captures/osxbsdcritical/06.i.re
new file mode 100644 (file)
index 0000000..dca00d1
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    ([ab]|(""))+b
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/osxbsdcritical/07.i.c b/re2c/test/posix_captures/osxbsdcritical/07.i.c
new file mode 100644 (file)
index 0000000..6652485
--- /dev/null
@@ -0,0 +1,58 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy2;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt1 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy7;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy7;
+       default:        goto yy6;
+       }
+yy6:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = YYCURSOR - 1;
+               yypmatch[4] = YYCURSOR - 1;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy7:
+       ++YYCURSOR;
+       goto yy6;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/osxbsdcritical/07.i.re b/re2c/test/posix_captures/osxbsdcritical/07.i.re
new file mode 100644 (file)
index 0000000..9e3528b
Binary files /dev/null and b/re2c/test/posix_captures/osxbsdcritical/07.i.re differ
diff --git a/re2c/test/posix_captures/other/01.i.c b/re2c/test/posix_captures/other/01.i.c
new file mode 100644 (file)
index 0000000..da7cef6
--- /dev/null
@@ -0,0 +1,53 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy3;
+       default:
+               yyt2 = yyt3 = NULL;
+               yyt1 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy4;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy4:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy3;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/other/01.i.re b/re2c/test/posix_captures/other/01.i.re
new file mode 100644 (file)
index 0000000..c890744
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a|aa)*
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/other/02.i.c b/re2c/test/posix_captures/other/02.i.c
new file mode 100644 (file)
index 0000000..da7cef6
--- /dev/null
@@ -0,0 +1,53 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy3;
+       default:
+               yyt2 = yyt3 = NULL;
+               yyt1 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy4;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy4:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy3;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/other/02.i.re b/re2c/test/posix_captures/other/02.i.re
new file mode 100644 (file)
index 0000000..50049d7
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (aa|a)*
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/other/03.i.c b/re2c/test/posix_captures/other/03.i.c
new file mode 100644 (file)
index 0000000..b6873b8
--- /dev/null
@@ -0,0 +1,33 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       yyt1 = NULL;
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[3] = yyt1;
+               yypmatch[0] = YYCURSOR - 1;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/other/03.i.re b/re2c/test/posix_captures/other/03.i.re
new file mode 100644 (file)
index 0000000..4b1b283
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    a|(a)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/other/04.i.c b/re2c/test/posix_captures/other/04.i.c
new file mode 100644 (file)
index 0000000..66ce719
--- /dev/null
@@ -0,0 +1,35 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       yyt2 = YYCURSOR;
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[0] = YYCURSOR - 1;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/other/04.i.re b/re2c/test/posix_captures/other/04.i.re
new file mode 100644 (file)
index 0000000..1d7d4bb
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a)|a
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/other/05.i.c b/re2c/test/posix_captures/other/05.i.c
new file mode 100644 (file)
index 0000000..a269155
--- /dev/null
@@ -0,0 +1,49 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy5;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       ++YYCURSOR;
+       yyt3 = NULL;
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[4] = yyt3;
+               yypmatch[5] = yyt3;
+               yypmatch[0] = YYCURSOR - 2;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/other/05.i.re b/re2c/test/posix_captures/other/05.i.re
new file mode 100644 (file)
index 0000000..b06c9de
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (b)a|b(a)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/other/06.i.c b/re2c/test/posix_captures/other/06.i.c
new file mode 100644 (file)
index 0000000..043bf06
--- /dev/null
@@ -0,0 +1,48 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'b':       goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy5;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       ++YYCURSOR;
+       yyt3 = NULL;
+       yyt2 = YYCURSOR;
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[4] = yyt3;
+               yypmatch[5] = yyt3;
+               yypmatch[0] = YYCURSOR - 2;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/other/06.i.re b/re2c/test/posix_captures/other/06.i.re
new file mode 100644 (file)
index 0000000..45fd973
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    b(a)|(b)a
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/other/07.i.c b/re2c/test/posix_captures/other/07.i.c
new file mode 100644 (file)
index 0000000..416db36
--- /dev/null
@@ -0,0 +1,42 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:
+               yyt2 = NULL;
+               yyt1 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       default:
+               yyt2 = NULL;
+               goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/other/07.i.re b/re2c/test/posix_captures/other/07.i.re
new file mode 100644 (file)
index 0000000..074db3a
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    a*|(a|aa)*
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/other/08.i.c b/re2c/test/posix_captures/other/08.i.c
new file mode 100644 (file)
index 0000000..fbbd9db
--- /dev/null
@@ -0,0 +1,54 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy3;
+       default:
+               yyt2 = yyt3 = NULL;
+               yyt1 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy4;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy4:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy3;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/other/08.i.re b/re2c/test/posix_captures/other/08.i.re
new file mode 100644 (file)
index 0000000..999b785
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a|aa)*|a*
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/other/09.i.c b/re2c/test/posix_captures/other/09.i.c
new file mode 100644 (file)
index 0000000..600ffd6
--- /dev/null
@@ -0,0 +1,103 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy3;
+       default:
+               yyt1 = yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy5;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       yyt1 = yyt2 = yyt3 = YYCURSOR;
+       goto yy2;
+yy5:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy6;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy6:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       yyt2 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       default:        goto yy2;
+       }
+yy7:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy8;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy8:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy9;
+       default:
+               yyt3 = yyt2;
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy9:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy10;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy10:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy5;
+       default:
+               yyt3 = yyt4;
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 4 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/other/09.i.re b/re2c/test/posix_captures/other/09.i.re
new file mode 100644 (file)
index 0000000..5f6a5d6
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (aa*|aaa*)*
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/other/10.i.c b/re2c/test/posix_captures/other/10.i.c
new file mode 100644 (file)
index 0000000..1116c20
--- /dev/null
@@ -0,0 +1,102 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt2;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy5;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       yyt1 = yyt2 = YYCURSOR;
+       goto yy2;
+yy5:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy6;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy6:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       yyt2 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       default:        goto yy2;
+       }
+yy7:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy8;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy8:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy9;
+       default:        goto yy2;
+       }
+yy9:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy10;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy10:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy5;
+       default:
+               yyt2 = yyt3;
+               goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 5 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 5 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/other/10.i.re b/re2c/test/posix_captures/other/10.i.re
new file mode 100644 (file)
index 0000000..5c1d817
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (aa*|aaa*)(aa*|aaa*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/other/11.i.c b/re2c/test/posix_captures/other/11.i.c
new file mode 100644 (file)
index 0000000..25a0633
--- /dev/null
@@ -0,0 +1,123 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt3 = yyt5 = YYCURSOR;
+               goto yy3;
+       default:
+               yyt2 = yyt3 = yyt4 = yyt5 = NULL;
+               yyt1 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[5] = yyt4;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               yypmatch[4] = yyt5;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy5;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       switch (yyaccept) {
+       case 0: 
+               yyt2 = yyt3 = yyt4 = yyt5 = NULL;
+               yyt1 = YYCURSOR;
+               goto yy2;
+       case 1: 
+               yyt4 = yyt5 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy2;
+       default:
+               yyt3 = yyt2;
+               yyt4 = yyt5 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy5:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy6;
+       default:
+               yyt4 = yyt5 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy6:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       default:
+               yyt2 = yyt3 = NULL;
+               yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy7:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy8;
+       default:
+               yyt4 = yyt5 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy8:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy9;
+       default:        goto yy4;
+       }
+yy9:
+       yyaccept = 2;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt3 = yyt5 = YYCURSOR;
+               goto yy3;
+       default:
+               yyt3 = yyt2;
+               yyt4 = yyt5 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/other/11.i.re b/re2c/test/posix_captures/other/11.i.re
new file mode 100644 (file)
index 0000000..d3c9da1
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (aa)*|(aaa)*
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/other/12.i.c b/re2c/test/posix_captures/other/12.i.c
new file mode 100644 (file)
index 0000000..eb2ec89
--- /dev/null
@@ -0,0 +1,296 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'X':
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy3;
+       case 'Y':
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy5;
+       case 'a':
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy7;
+       case 'b':
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt2 = yyt3 = NULL;
+               yyt1 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt3;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               {}
+       }
+yy3:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'X':
+               yyt3 = YYCURSOR;
+               goto yy3;
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy5;
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy10;
+       case 'b':
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy5:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'X':
+               yyt3 = YYCURSOR;
+               goto yy3;
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy5;
+       case 'a':
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy7;
+       case 'b':
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy7:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy11;
+       default:        goto yy8;
+       }
+yy8:
+       YYCURSOR = YYMARKER;
+       switch (yyaccept) {
+       case 0: 
+               yyt2 = yyt3 = NULL;
+               yyt1 = YYCURSOR;
+               goto yy2;
+       case 1: 
+               yyt3 = YYCURSOR;
+               goto yy2;
+       case 2: 
+               yyt2 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy2;
+       default:
+               yyt2 = yyt5;
+               yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy9:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'Y':       goto yy5;
+       case 'a':       goto yy12;
+       default:        goto yy8;
+       }
+yy10:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'X':
+               yyt3 = YYCURSOR;
+               goto yy3;
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy5;
+       case 'a':
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy7;
+       case 'b':
+               yyt5 = YYCURSOR;
+               goto yy13;
+       default:
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy11:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy14;
+       default:        goto yy8;
+       }
+yy12:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy15;
+       default:        goto yy8;
+       }
+yy13:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'X':
+               yyt3 = YYCURSOR;
+               goto yy3;
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy5;
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy16;
+       case 'b':
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy14:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       default:        goto yy8;
+       }
+yy15:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy5;
+       default:        goto yy8;
+       }
+yy16:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'X':
+               yyt3 = YYCURSOR;
+               goto yy3;
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy5;
+       case 'a':
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy7;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy17;
+       default:
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy17:
+       yyaccept = 2;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'X':
+               yyt3 = YYCURSOR;
+               goto yy3;
+       case 'Y':       goto yy5;
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy18;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt2 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy18:
+       yyaccept = 3;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'X':
+               yyt3 = YYCURSOR;
+               goto yy3;
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy5;
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy7;
+       case 'b':
+               yyt5 = YYCURSOR;
+               goto yy19;
+       default:
+               yyt2 = yyt5;
+               yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy19:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'X':
+               yyt3 = YYCURSOR;
+               goto yy3;
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy5;
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy16;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 4 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/other/12.i.re b/re2c/test/posix_captures/other/12.i.re
new file mode 100644 (file)
index 0000000..07917a0
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (X|Xa|Xab|Xaba|abab|baba|bY|Y)*
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/other/13.i.c b/re2c/test/posix_captures/other/13.i.c
new file mode 100644 (file)
index 0000000..99af72a
--- /dev/null
@@ -0,0 +1,45 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'y':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'y':
+               yyt2 = YYCURSOR;
+               goto yy5;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       ++YYCURSOR;
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/other/13.i.re b/re2c/test/posix_captures/other/13.i.re
new file mode 100644 (file)
index 0000000..dcc4ad4
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (y){2}
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/other/14.i.c b/re2c/test/posix_captures/other/14.i.c
new file mode 100644 (file)
index 0000000..bac8d62
--- /dev/null
@@ -0,0 +1,44 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'y':
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy3;
+       default:
+               yyt2 = yyt3 = NULL;
+               yyt1 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'y':
+               yyt3 = YYCURSOR;
+               goto yy4;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy4:
+       ++YYCURSOR;
+       yyt2 = YYCURSOR;
+       goto yy2;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/other/14.i.re b/re2c/test/posix_captures/other/14.i.re
new file mode 100644 (file)
index 0000000..bed5653
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (y){0,2}
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/other/15.i.c b/re2c/test/posix_captures/other/15.i.c
new file mode 100644 (file)
index 0000000..9602d8c
--- /dev/null
@@ -0,0 +1,44 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'y':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'y':
+               yyt2 = YYCURSOR;
+               goto yy5;
+       default:        goto yy4;
+       }
+yy4:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy5:
+       ++YYCURSOR;
+       goto yy4;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/other/15.i.re b/re2c/test/posix_captures/other/15.i.re
new file mode 100644 (file)
index 0000000..5ef6872
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (y){1,2}
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/other/16.i.c b/re2c/test/posix_captures/other/16.i.c
new file mode 100644 (file)
index 0000000..975cd9a
--- /dev/null
@@ -0,0 +1,56 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'y':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'y':
+               yyt1 = YYCURSOR;
+               goto yy5;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'y':       goto yy7;
+       default:        goto yy6;
+       }
+yy6:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               yypmatch[3] = YYCURSOR - 1;
+               {}
+       }
+yy7:
+       ++YYCURSOR;
+       yyt3 = yyt1;
+       goto yy6;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/other/16.i.re b/re2c/test/posix_captures/other/16.i.re
new file mode 100644 (file)
index 0000000..6a30463
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (y){1,2}y
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/other/17.i.c b/re2c/test/posix_captures/other/17.i.c
new file mode 100644 (file)
index 0000000..39b65be
--- /dev/null
@@ -0,0 +1,53 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'y':
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'y':
+               yyt3 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy4;
+       }
+yy4:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               {}
+       }
+yy5:
+       yych = *++YYCURSOR;
+       yyt2 = YYCURSOR;
+       switch (yych) {
+       case 'y':       goto yy6;
+       default:        goto yy4;
+       }
+yy6:
+       ++YYCURSOR;
+       goto yy4;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/other/17.i.re b/re2c/test/posix_captures/other/17.i.re
new file mode 100644 (file)
index 0000000..24285e3
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (y){1,2}y?
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/other/18.i.c b/re2c/test/posix_captures/other/18.i.c
new file mode 100644 (file)
index 0000000..989611f
--- /dev/null
@@ -0,0 +1,54 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'y':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'y':
+               yyt2 = YYCURSOR;
+               goto yy5;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'y':
+               yyt2 = YYCURSOR;
+               goto yy5;
+       default:        goto yy7;
+       }
+yy7:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
diff --git a/re2c/test/posix_captures/other/18.i.re b/re2c/test/posix_captures/other/18.i.re
new file mode 100644 (file)
index 0000000..4b37f5c
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (y){2,}
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/other/19.i.c b/re2c/test/posix_captures/other/19.i.c
new file mode 100644 (file)
index 0000000..1e8acbf
--- /dev/null
@@ -0,0 +1,39 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'y':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       yyt2 = YYCURSOR;
+       switch (yych) {
+       case 'y':       goto yy4;
+       default:        goto yy2;
+       }
+yy4:
+       ++YYCURSOR;
+       goto yy2;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/other/19.i.re b/re2c/test/posix_captures/other/19.i.re
new file mode 100644 (file)
index 0000000..cec5690
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (y?){2}
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/other/20.i.c b/re2c/test/posix_captures/other/20.i.c
new file mode 100644 (file)
index 0000000..4d30a68
--- /dev/null
@@ -0,0 +1,43 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'y':
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy3;
+       default:
+               yyt1 = yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'y':
+               yyt3 = YYCURSOR;
+               goto yy4;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy4:
+       ++YYCURSOR;
+       yyt2 = YYCURSOR;
+       goto yy2;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/other/20.i.re b/re2c/test/posix_captures/other/20.i.re
new file mode 100644 (file)
index 0000000..402cb99
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (y?){0,2}
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/other/21.i.c b/re2c/test/posix_captures/other/21.i.c
new file mode 100644 (file)
index 0000000..57fb270
--- /dev/null
@@ -0,0 +1,37 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       yyt1 = yyt2 = YYCURSOR;
+       switch (yych) {
+       case 'y':       goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'y':
+               yyt2 = YYCURSOR;
+               goto yy4;
+       default:        goto yy2;
+       }
+yy4:
+       ++YYCURSOR;
+       goto yy2;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/other/21.i.re b/re2c/test/posix_captures/other/21.i.re
new file mode 100644 (file)
index 0000000..45aa282
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (y?){1,2}
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/other/22.i.c b/re2c/test/posix_captures/other/22.i.c
new file mode 100644 (file)
index 0000000..401ea46
--- /dev/null
@@ -0,0 +1,53 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'y':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'y':
+               yyt3 = YYCURSOR;
+               goto yy5;
+       default:        goto yy4;
+       }
+yy4:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR - 1;
+               {}
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'y':       goto yy6;
+       default:        goto yy4;
+       }
+yy6:
+       ++YYCURSOR;
+       yyt2 = yyt3;
+       goto yy4;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/other/22.i.re b/re2c/test/posix_captures/other/22.i.re
new file mode 100644 (file)
index 0000000..58b5811
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (y?){1,2}y
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/other/23.i.c b/re2c/test/posix_captures/other/23.i.c
new file mode 100644 (file)
index 0000000..38f8b85
--- /dev/null
@@ -0,0 +1,49 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'y':
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy3;
+       default:
+               yyt1 = yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'y':
+               yyt3 = YYCURSOR;
+               goto yy4;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy4:
+       yych = *++YYCURSOR;
+       yyt2 = YYCURSOR;
+       switch (yych) {
+       case 'y':       goto yy5;
+       default:        goto yy2;
+       }
+yy5:
+       ++YYCURSOR;
+       goto yy2;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/other/23.i.re b/re2c/test/posix_captures/other/23.i.re
new file mode 100644 (file)
index 0000000..62e01a0
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (y?){1,2}y?
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/other/24.i.c b/re2c/test/posix_captures/other/24.i.c
new file mode 100644 (file)
index 0000000..306f7f2
--- /dev/null
@@ -0,0 +1,46 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'y':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       yyt2 = YYCURSOR;
+       switch (yych) {
+       case 'y':       goto yy4;
+       default:        goto yy2;
+       }
+yy4:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'y':
+               yyt2 = YYCURSOR;
+               goto yy4;
+       default:        goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/other/24.i.re b/re2c/test/posix_captures/other/24.i.re
new file mode 100644 (file)
index 0000000..9bdaa51
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (y?){2,}
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/other/25.i.c b/re2c/test/posix_captures/other/25.i.c
new file mode 100644 (file)
index 0000000..6f5ff5a
--- /dev/null
@@ -0,0 +1,94 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'x':
+               yyt1 = yyt2 = yyt3 = YYCURSOR;
+               goto yy3;
+       case 'y':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy4;
+       default:
+               yyt1 = yyt2 = yyt3 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[4] = yyt3;
+               yypmatch[5] = yyt4;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'x':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy5;
+       case 'y':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:
+               yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy4:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'x':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy5;
+       case 'y':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:
+               yyt3 = yyt4 = NULL;
+               goto yy2;
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'x':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       case 'y':
+               yyt2 = YYCURSOR;
+               goto yy8;
+       default:
+               yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'x':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       case 'y':
+               yyt2 = YYCURSOR;
+               goto yy8;
+       default:
+               yyt3 = yyt4 = NULL;
+               goto yy2;
+       }
+yy7:
+       ++YYCURSOR;
+       yyt4 = YYCURSOR;
+       goto yy2;
+yy8:
+       ++YYCURSOR;
+       yyt3 = yyt4 = NULL;
+       goto yy2;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/other/25.i.re b/re2c/test/posix_captures/other/25.i.re
new file mode 100644 (file)
index 0000000..c1630e8
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (y|(x?)){1,3}
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/other/26.i.c b/re2c/test/posix_captures/other/26.i.c
new file mode 100644 (file)
index 0000000..ebc2950
--- /dev/null
@@ -0,0 +1,76 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'y':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'y':       goto yy5;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'y':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'y':
+               yyt2 = YYCURSOR;
+               goto yy8;
+       default:        goto yy7;
+       }
+yy7:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'y':
+               yyt2 = YYCURSOR;
+               goto yy9;
+       default:        goto yy7;
+       }
+yy9:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'y':       goto yy10;
+       default:        goto yy7;
+       }
+yy10:
+       ++YYCURSOR;
+       goto yy7;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/other/26.i.re b/re2c/test/posix_captures/other/26.i.re
new file mode 100644 (file)
index 0000000..58a3a78
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (y[y]?){3}
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/repetition/01.i.c b/re2c/test/posix_captures/repetition/01.i.c
new file mode 100644 (file)
index 0000000..bf27499
--- /dev/null
@@ -0,0 +1,46 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       if (yych >= 0x01) {
+               yyt1 = yyt2 = yyt4 = YYCURSOR;
+               goto yy3;
+       }
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) goto yy5;
+       yyt2 = yyt3 = NULL;
+       yyt5 = YYCURSOR;
+yy4:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[5] = yyt3;
+               yypmatch[6] = yyt4;
+               yypmatch[7] = yyt5;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy5:
+       ++YYCURSOR;
+       yyt4 = yyt5 = NULL;
+       yyt3 = YYCURSOR;
+       goto yy4;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/01.i.re b/re2c/test/posix_captures/repetition/01.i.re
new file mode 100644 (file)
index 0000000..5d82396
Binary files /dev/null and b/re2c/test/posix_captures/repetition/01.i.re differ
diff --git a/re2c/test/posix_captures/repetition/02.i.c b/re2c/test/posix_captures/repetition/02.i.c
new file mode 100644 (file)
index 0000000..246c6c3
--- /dev/null
@@ -0,0 +1,80 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt1 = yyt4 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt2 = yyt3 = NULL;
+               yyt5 = yyt6 = yyt9 = YYCURSOR;
+               goto yy5;
+       }
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt4 = yyt5 = NULL;
+               yyt3 = yyt6 = yyt7 = yyt9 = YYCURSOR;
+               goto yy7;
+       }
+       yyt7 = yyt8 = NULL;
+       yyt10 = YYCURSOR;
+yy6:
+       {
+               const size_t yynmatch = 7;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[5] = yyt3;
+               yypmatch[6] = yyt4;
+               yypmatch[7] = yyt5;
+               yypmatch[8] = yyt6;
+               yypmatch[10] = yyt7;
+               yypmatch[11] = yyt8;
+               yypmatch[12] = yyt9;
+               yypmatch[13] = yyt10;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt6;
+               yypmatch[9] = YYCURSOR;
+               {}
+       }
+yy7:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt2 = yyt1;
+               yyt7 = yyt8 = NULL;
+               yyt10 = YYCURSOR;
+               goto yy6;
+       }
+       ++YYCURSOR;
+       yyt2 = yyt1;
+       yyt9 = yyt10 = NULL;
+       yyt8 = YYCURSOR;
+       goto yy6;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/02.i.re b/re2c/test/posix_captures/repetition/02.i.re
new file mode 100644 (file)
index 0000000..059cec2
Binary files /dev/null and b/re2c/test/posix_captures/repetition/02.i.re differ
diff --git a/re2c/test/posix_captures/repetition/03.i.c b/re2c/test/posix_captures/repetition/03.i.c
new file mode 100644 (file)
index 0000000..a9a4df2
--- /dev/null
@@ -0,0 +1,121 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt3 = yyt6 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt4 = yyt5 = NULL;
+               yyt7 = yyt8 = yyt11 = YYCURSOR;
+               goto yy5;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) goto yy4;
+       yyt2 = yyt9 = yyt10 = NULL;
+       yyt1 = yyt12 = yyt13 = yyt15 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt9 = yyt10 = NULL;
+               yyt12 = yyt13 = yyt15 = YYCURSOR;
+               goto yy8;
+       }
+       yyt1 = yyt14 = NULL;
+       yyt2 = YYCURSOR;
+yy7:
+       {
+               const size_t yynmatch = 10;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt3;
+               yypmatch[4] = yyt4;
+               yypmatch[5] = yyt5;
+               yypmatch[6] = yyt6;
+               yypmatch[7] = yyt7;
+               yypmatch[8] = yyt8;
+               yypmatch[10] = yyt9;
+               yypmatch[11] = yyt10;
+               yypmatch[12] = yyt11;
+               yypmatch[13] = yyt12;
+               yypmatch[14] = yyt13;
+               yypmatch[16] = yyt14;
+               yypmatch[17] = yyt1;
+               yypmatch[18] = yyt15;
+               yypmatch[19] = yyt2;
+               yypmatch[0] = yyt3;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt8;
+               yypmatch[9] = yyt13;
+               yypmatch[15] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt4 = yyt3;
+               yyt5 = yyt1;
+               yyt6 = yyt2;
+               yyt7 = yyt2;
+               yyt8 = yyt1;
+               yyt11 = yyt1;
+               yyt1 = yyt14 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy7;
+       }
+       yyt11 = yyt12 = NULL;
+       yyt10 = yyt13 = yyt14 = yyt15 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt4 = yyt3;
+               yyt5 = yyt1;
+               yyt6 = yyt2;
+               yyt7 = yyt2;
+               yyt8 = yyt1;
+               yyt9 = yyt1;
+               yyt1 = yyt14 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy7;
+       }
+       ++YYCURSOR;
+       yyt4 = yyt3;
+       yyt5 = yyt1;
+       yyt6 = yyt2;
+       yyt7 = yyt2;
+       yyt8 = yyt1;
+       yyt9 = yyt1;
+       yyt2 = yyt15 = NULL;
+       yyt1 = YYCURSOR;
+       goto yy7;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/03.i.re b/re2c/test/posix_captures/repetition/03.i.re
new file mode 100644 (file)
index 0000000..861c373
Binary files /dev/null and b/re2c/test/posix_captures/repetition/03.i.re differ
diff --git a/re2c/test/posix_captures/repetition/04.i.c b/re2c/test/posix_captures/repetition/04.i.c
new file mode 100644 (file)
index 0000000..bf27499
--- /dev/null
@@ -0,0 +1,46 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       if (yych >= 0x01) {
+               yyt1 = yyt2 = yyt4 = YYCURSOR;
+               goto yy3;
+       }
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) goto yy5;
+       yyt2 = yyt3 = NULL;
+       yyt5 = YYCURSOR;
+yy4:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[5] = yyt3;
+               yypmatch[6] = yyt4;
+               yypmatch[7] = yyt5;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy5:
+       ++YYCURSOR;
+       yyt4 = yyt5 = NULL;
+       yyt3 = YYCURSOR;
+       goto yy4;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/04.i.re b/re2c/test/posix_captures/repetition/04.i.re
new file mode 100644 (file)
index 0000000..631119c
Binary files /dev/null and b/re2c/test/posix_captures/repetition/04.i.re differ
diff --git a/re2c/test/posix_captures/repetition/05.i.c b/re2c/test/posix_captures/repetition/05.i.c
new file mode 100644 (file)
index 0000000..0072733
--- /dev/null
@@ -0,0 +1,67 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt1 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt2 = yyt5 = YYCURSOR;
+               goto yy5;
+       }
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt2 = yyt3 = yyt5 = YYCURSOR;
+               goto yy7;
+       }
+       yyt3 = yyt4 = NULL;
+       yyt6 = YYCURSOR;
+yy6:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[4] = yyt3;
+               yypmatch[5] = yyt4;
+               yypmatch[6] = yyt5;
+               yypmatch[7] = yyt6;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy7:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt4 = NULL;
+               yyt6 = YYCURSOR;
+               goto yy6;
+       }
+       ++YYCURSOR;
+       yyt5 = yyt6 = NULL;
+       yyt4 = YYCURSOR;
+       goto yy6;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/05.i.re b/re2c/test/posix_captures/repetition/05.i.re
new file mode 100644 (file)
index 0000000..ae11829
Binary files /dev/null and b/re2c/test/posix_captures/repetition/05.i.re differ
diff --git a/re2c/test/posix_captures/repetition/06.i.c b/re2c/test/posix_captures/repetition/06.i.c
new file mode 100644 (file)
index 0000000..bffac17
--- /dev/null
@@ -0,0 +1,75 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt1 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) goto yy5;
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) goto yy4;
+       yyt2 = yyt5 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt2 = yyt5 = YYCURSOR;
+               goto yy8;
+       }
+       yyt3 = yyt4 = NULL;
+       yyt6 = YYCURSOR;
+yy7:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[4] = yyt3;
+               yypmatch[5] = yyt4;
+               yypmatch[6] = yyt5;
+               yypmatch[7] = yyt6;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt4 = NULL;
+               yyt6 = YYCURSOR;
+               goto yy7;
+       }
+       yyt2 = yyt3 = yyt5 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt4 = NULL;
+               yyt6 = YYCURSOR;
+               goto yy7;
+       }
+       ++YYCURSOR;
+       yyt5 = yyt6 = NULL;
+       yyt4 = YYCURSOR;
+       goto yy7;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/06.i.re b/re2c/test/posix_captures/repetition/06.i.re
new file mode 100644 (file)
index 0000000..cce92f9
Binary files /dev/null and b/re2c/test/posix_captures/repetition/06.i.re differ
diff --git a/re2c/test/posix_captures/repetition/07.i.c b/re2c/test/posix_captures/repetition/07.i.c
new file mode 100644 (file)
index 0000000..d0efdec
--- /dev/null
@@ -0,0 +1,55 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych >= 0x01) {
+               yyt1 = yyt3 = yyt4 = yyt6 = YYCURSOR;
+               goto yy3;
+       }
+       yyt2 = yyt3 = yyt4 = yyt5 = yyt6 = yyt7 = NULL;
+       yyt1 = YYCURSOR;
+yy2:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[4] = yyt4;
+               yypmatch[5] = yyt5;
+               yypmatch[6] = yyt6;
+               yypmatch[7] = yyt7;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) {
+               yyt4 = yyt5 = NULL;
+               yyt2 = yyt7 = YYCURSOR;
+               goto yy2;
+       }
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) {
+               yyt6 = yyt7 = NULL;
+               yyt2 = yyt5 = YYCURSOR;
+               goto yy2;
+       }
+       yyt3 = yyt4 = yyt6 = YYCURSOR;
+       goto yy3;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/repetition/07.i.re b/re2c/test/posix_captures/repetition/07.i.re
new file mode 100644 (file)
index 0000000..7e64e15
Binary files /dev/null and b/re2c/test/posix_captures/repetition/07.i.re differ
diff --git a/re2c/test/posix_captures/repetition/08.i.c b/re2c/test/posix_captures/repetition/08.i.c
new file mode 100644 (file)
index 0000000..bf27499
--- /dev/null
@@ -0,0 +1,46 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       if (yych >= 0x01) {
+               yyt1 = yyt2 = yyt4 = YYCURSOR;
+               goto yy3;
+       }
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) goto yy5;
+       yyt2 = yyt3 = NULL;
+       yyt5 = YYCURSOR;
+yy4:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[5] = yyt3;
+               yypmatch[6] = yyt4;
+               yypmatch[7] = yyt5;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy5:
+       ++YYCURSOR;
+       yyt4 = yyt5 = NULL;
+       yyt3 = YYCURSOR;
+       goto yy4;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/08.i.re b/re2c/test/posix_captures/repetition/08.i.re
new file mode 100644 (file)
index 0000000..5d82396
Binary files /dev/null and b/re2c/test/posix_captures/repetition/08.i.re differ
diff --git a/re2c/test/posix_captures/repetition/09.i.c b/re2c/test/posix_captures/repetition/09.i.c
new file mode 100644 (file)
index 0000000..246c6c3
--- /dev/null
@@ -0,0 +1,80 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt1 = yyt4 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt2 = yyt3 = NULL;
+               yyt5 = yyt6 = yyt9 = YYCURSOR;
+               goto yy5;
+       }
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt4 = yyt5 = NULL;
+               yyt3 = yyt6 = yyt7 = yyt9 = YYCURSOR;
+               goto yy7;
+       }
+       yyt7 = yyt8 = NULL;
+       yyt10 = YYCURSOR;
+yy6:
+       {
+               const size_t yynmatch = 7;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[5] = yyt3;
+               yypmatch[6] = yyt4;
+               yypmatch[7] = yyt5;
+               yypmatch[8] = yyt6;
+               yypmatch[10] = yyt7;
+               yypmatch[11] = yyt8;
+               yypmatch[12] = yyt9;
+               yypmatch[13] = yyt10;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt6;
+               yypmatch[9] = YYCURSOR;
+               {}
+       }
+yy7:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt2 = yyt1;
+               yyt7 = yyt8 = NULL;
+               yyt10 = YYCURSOR;
+               goto yy6;
+       }
+       ++YYCURSOR;
+       yyt2 = yyt1;
+       yyt9 = yyt10 = NULL;
+       yyt8 = YYCURSOR;
+       goto yy6;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/09.i.re b/re2c/test/posix_captures/repetition/09.i.re
new file mode 100644 (file)
index 0000000..059cec2
Binary files /dev/null and b/re2c/test/posix_captures/repetition/09.i.re differ
diff --git a/re2c/test/posix_captures/repetition/10.i.c b/re2c/test/posix_captures/repetition/10.i.c
new file mode 100644 (file)
index 0000000..a9a4df2
--- /dev/null
@@ -0,0 +1,121 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt3 = yyt6 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt4 = yyt5 = NULL;
+               yyt7 = yyt8 = yyt11 = YYCURSOR;
+               goto yy5;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) goto yy4;
+       yyt2 = yyt9 = yyt10 = NULL;
+       yyt1 = yyt12 = yyt13 = yyt15 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt9 = yyt10 = NULL;
+               yyt12 = yyt13 = yyt15 = YYCURSOR;
+               goto yy8;
+       }
+       yyt1 = yyt14 = NULL;
+       yyt2 = YYCURSOR;
+yy7:
+       {
+               const size_t yynmatch = 10;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt3;
+               yypmatch[4] = yyt4;
+               yypmatch[5] = yyt5;
+               yypmatch[6] = yyt6;
+               yypmatch[7] = yyt7;
+               yypmatch[8] = yyt8;
+               yypmatch[10] = yyt9;
+               yypmatch[11] = yyt10;
+               yypmatch[12] = yyt11;
+               yypmatch[13] = yyt12;
+               yypmatch[14] = yyt13;
+               yypmatch[16] = yyt14;
+               yypmatch[17] = yyt1;
+               yypmatch[18] = yyt15;
+               yypmatch[19] = yyt2;
+               yypmatch[0] = yyt3;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt8;
+               yypmatch[9] = yyt13;
+               yypmatch[15] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt4 = yyt3;
+               yyt5 = yyt1;
+               yyt6 = yyt2;
+               yyt7 = yyt2;
+               yyt8 = yyt1;
+               yyt11 = yyt1;
+               yyt1 = yyt14 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy7;
+       }
+       yyt11 = yyt12 = NULL;
+       yyt10 = yyt13 = yyt14 = yyt15 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt4 = yyt3;
+               yyt5 = yyt1;
+               yyt6 = yyt2;
+               yyt7 = yyt2;
+               yyt8 = yyt1;
+               yyt9 = yyt1;
+               yyt1 = yyt14 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy7;
+       }
+       ++YYCURSOR;
+       yyt4 = yyt3;
+       yyt5 = yyt1;
+       yyt6 = yyt2;
+       yyt7 = yyt2;
+       yyt8 = yyt1;
+       yyt9 = yyt1;
+       yyt2 = yyt15 = NULL;
+       yyt1 = YYCURSOR;
+       goto yy7;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/10.i.re b/re2c/test/posix_captures/repetition/10.i.re
new file mode 100644 (file)
index 0000000..861c373
Binary files /dev/null and b/re2c/test/posix_captures/repetition/10.i.re differ
diff --git a/re2c/test/posix_captures/repetition/11.i.c b/re2c/test/posix_captures/repetition/11.i.c
new file mode 100644 (file)
index 0000000..bf27499
--- /dev/null
@@ -0,0 +1,46 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       if (yych >= 0x01) {
+               yyt1 = yyt2 = yyt4 = YYCURSOR;
+               goto yy3;
+       }
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) goto yy5;
+       yyt2 = yyt3 = NULL;
+       yyt5 = YYCURSOR;
+yy4:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[5] = yyt3;
+               yypmatch[6] = yyt4;
+               yypmatch[7] = yyt5;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy5:
+       ++YYCURSOR;
+       yyt4 = yyt5 = NULL;
+       yyt3 = YYCURSOR;
+       goto yy4;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/11.i.re b/re2c/test/posix_captures/repetition/11.i.re
new file mode 100644 (file)
index 0000000..631119c
Binary files /dev/null and b/re2c/test/posix_captures/repetition/11.i.re differ
diff --git a/re2c/test/posix_captures/repetition/12.i.c b/re2c/test/posix_captures/repetition/12.i.c
new file mode 100644 (file)
index 0000000..0072733
--- /dev/null
@@ -0,0 +1,67 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt1 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt2 = yyt5 = YYCURSOR;
+               goto yy5;
+       }
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt2 = yyt3 = yyt5 = YYCURSOR;
+               goto yy7;
+       }
+       yyt3 = yyt4 = NULL;
+       yyt6 = YYCURSOR;
+yy6:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[4] = yyt3;
+               yypmatch[5] = yyt4;
+               yypmatch[6] = yyt5;
+               yypmatch[7] = yyt6;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy7:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt4 = NULL;
+               yyt6 = YYCURSOR;
+               goto yy6;
+       }
+       ++YYCURSOR;
+       yyt5 = yyt6 = NULL;
+       yyt4 = YYCURSOR;
+       goto yy6;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/12.i.re b/re2c/test/posix_captures/repetition/12.i.re
new file mode 100644 (file)
index 0000000..ae11829
Binary files /dev/null and b/re2c/test/posix_captures/repetition/12.i.re differ
diff --git a/re2c/test/posix_captures/repetition/13.i.c b/re2c/test/posix_captures/repetition/13.i.c
new file mode 100644 (file)
index 0000000..bffac17
--- /dev/null
@@ -0,0 +1,75 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt1 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) goto yy5;
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) goto yy4;
+       yyt2 = yyt5 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt2 = yyt5 = YYCURSOR;
+               goto yy8;
+       }
+       yyt3 = yyt4 = NULL;
+       yyt6 = YYCURSOR;
+yy7:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[4] = yyt3;
+               yypmatch[5] = yyt4;
+               yypmatch[6] = yyt5;
+               yypmatch[7] = yyt6;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt4 = NULL;
+               yyt6 = YYCURSOR;
+               goto yy7;
+       }
+       yyt2 = yyt3 = yyt5 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt4 = NULL;
+               yyt6 = YYCURSOR;
+               goto yy7;
+       }
+       ++YYCURSOR;
+       yyt5 = yyt6 = NULL;
+       yyt4 = YYCURSOR;
+       goto yy7;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/13.i.re b/re2c/test/posix_captures/repetition/13.i.re
new file mode 100644 (file)
index 0000000..cce92f9
Binary files /dev/null and b/re2c/test/posix_captures/repetition/13.i.re differ
diff --git a/re2c/test/posix_captures/repetition/14.i.c b/re2c/test/posix_captures/repetition/14.i.c
new file mode 100644 (file)
index 0000000..d0efdec
--- /dev/null
@@ -0,0 +1,55 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych >= 0x01) {
+               yyt1 = yyt3 = yyt4 = yyt6 = YYCURSOR;
+               goto yy3;
+       }
+       yyt2 = yyt3 = yyt4 = yyt5 = yyt6 = yyt7 = NULL;
+       yyt1 = YYCURSOR;
+yy2:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[4] = yyt4;
+               yypmatch[5] = yyt5;
+               yypmatch[6] = yyt6;
+               yypmatch[7] = yyt7;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) {
+               yyt4 = yyt5 = NULL;
+               yyt2 = yyt7 = YYCURSOR;
+               goto yy2;
+       }
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) {
+               yyt6 = yyt7 = NULL;
+               yyt2 = yyt5 = YYCURSOR;
+               goto yy2;
+       }
+       yyt3 = yyt4 = yyt6 = YYCURSOR;
+       goto yy3;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/repetition/14.i.re b/re2c/test/posix_captures/repetition/14.i.re
new file mode 100644 (file)
index 0000000..7e64e15
Binary files /dev/null and b/re2c/test/posix_captures/repetition/14.i.re differ
diff --git a/re2c/test/posix_captures/repetition/15.i.c b/re2c/test/posix_captures/repetition/15.i.c
new file mode 100644 (file)
index 0000000..bf27499
--- /dev/null
@@ -0,0 +1,46 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       if (yych >= 0x01) {
+               yyt1 = yyt2 = yyt4 = YYCURSOR;
+               goto yy3;
+       }
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) goto yy5;
+       yyt2 = yyt3 = NULL;
+       yyt5 = YYCURSOR;
+yy4:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[5] = yyt3;
+               yypmatch[6] = yyt4;
+               yypmatch[7] = yyt5;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy5:
+       ++YYCURSOR;
+       yyt4 = yyt5 = NULL;
+       yyt3 = YYCURSOR;
+       goto yy4;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/15.i.re b/re2c/test/posix_captures/repetition/15.i.re
new file mode 100644 (file)
index 0000000..5d82396
Binary files /dev/null and b/re2c/test/posix_captures/repetition/15.i.re differ
diff --git a/re2c/test/posix_captures/repetition/16.i.c b/re2c/test/posix_captures/repetition/16.i.c
new file mode 100644 (file)
index 0000000..246c6c3
--- /dev/null
@@ -0,0 +1,80 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt1 = yyt4 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt2 = yyt3 = NULL;
+               yyt5 = yyt6 = yyt9 = YYCURSOR;
+               goto yy5;
+       }
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt4 = yyt5 = NULL;
+               yyt3 = yyt6 = yyt7 = yyt9 = YYCURSOR;
+               goto yy7;
+       }
+       yyt7 = yyt8 = NULL;
+       yyt10 = YYCURSOR;
+yy6:
+       {
+               const size_t yynmatch = 7;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[5] = yyt3;
+               yypmatch[6] = yyt4;
+               yypmatch[7] = yyt5;
+               yypmatch[8] = yyt6;
+               yypmatch[10] = yyt7;
+               yypmatch[11] = yyt8;
+               yypmatch[12] = yyt9;
+               yypmatch[13] = yyt10;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt6;
+               yypmatch[9] = YYCURSOR;
+               {}
+       }
+yy7:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt2 = yyt1;
+               yyt7 = yyt8 = NULL;
+               yyt10 = YYCURSOR;
+               goto yy6;
+       }
+       ++YYCURSOR;
+       yyt2 = yyt1;
+       yyt9 = yyt10 = NULL;
+       yyt8 = YYCURSOR;
+       goto yy6;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/16.i.re b/re2c/test/posix_captures/repetition/16.i.re
new file mode 100644 (file)
index 0000000..059cec2
Binary files /dev/null and b/re2c/test/posix_captures/repetition/16.i.re differ
diff --git a/re2c/test/posix_captures/repetition/17.i.c b/re2c/test/posix_captures/repetition/17.i.c
new file mode 100644 (file)
index 0000000..a9a4df2
--- /dev/null
@@ -0,0 +1,121 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt3 = yyt6 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt4 = yyt5 = NULL;
+               yyt7 = yyt8 = yyt11 = YYCURSOR;
+               goto yy5;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) goto yy4;
+       yyt2 = yyt9 = yyt10 = NULL;
+       yyt1 = yyt12 = yyt13 = yyt15 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt9 = yyt10 = NULL;
+               yyt12 = yyt13 = yyt15 = YYCURSOR;
+               goto yy8;
+       }
+       yyt1 = yyt14 = NULL;
+       yyt2 = YYCURSOR;
+yy7:
+       {
+               const size_t yynmatch = 10;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt3;
+               yypmatch[4] = yyt4;
+               yypmatch[5] = yyt5;
+               yypmatch[6] = yyt6;
+               yypmatch[7] = yyt7;
+               yypmatch[8] = yyt8;
+               yypmatch[10] = yyt9;
+               yypmatch[11] = yyt10;
+               yypmatch[12] = yyt11;
+               yypmatch[13] = yyt12;
+               yypmatch[14] = yyt13;
+               yypmatch[16] = yyt14;
+               yypmatch[17] = yyt1;
+               yypmatch[18] = yyt15;
+               yypmatch[19] = yyt2;
+               yypmatch[0] = yyt3;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt8;
+               yypmatch[9] = yyt13;
+               yypmatch[15] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt4 = yyt3;
+               yyt5 = yyt1;
+               yyt6 = yyt2;
+               yyt7 = yyt2;
+               yyt8 = yyt1;
+               yyt11 = yyt1;
+               yyt1 = yyt14 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy7;
+       }
+       yyt11 = yyt12 = NULL;
+       yyt10 = yyt13 = yyt14 = yyt15 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt4 = yyt3;
+               yyt5 = yyt1;
+               yyt6 = yyt2;
+               yyt7 = yyt2;
+               yyt8 = yyt1;
+               yyt9 = yyt1;
+               yyt1 = yyt14 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy7;
+       }
+       ++YYCURSOR;
+       yyt4 = yyt3;
+       yyt5 = yyt1;
+       yyt6 = yyt2;
+       yyt7 = yyt2;
+       yyt8 = yyt1;
+       yyt9 = yyt1;
+       yyt2 = yyt15 = NULL;
+       yyt1 = YYCURSOR;
+       goto yy7;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/17.i.re b/re2c/test/posix_captures/repetition/17.i.re
new file mode 100644 (file)
index 0000000..861c373
Binary files /dev/null and b/re2c/test/posix_captures/repetition/17.i.re differ
diff --git a/re2c/test/posix_captures/repetition/18.i.c b/re2c/test/posix_captures/repetition/18.i.c
new file mode 100644 (file)
index 0000000..bf27499
--- /dev/null
@@ -0,0 +1,46 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       if (yych >= 0x01) {
+               yyt1 = yyt2 = yyt4 = YYCURSOR;
+               goto yy3;
+       }
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) goto yy5;
+       yyt2 = yyt3 = NULL;
+       yyt5 = YYCURSOR;
+yy4:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[5] = yyt3;
+               yypmatch[6] = yyt4;
+               yypmatch[7] = yyt5;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy5:
+       ++YYCURSOR;
+       yyt4 = yyt5 = NULL;
+       yyt3 = YYCURSOR;
+       goto yy4;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/18.i.re b/re2c/test/posix_captures/repetition/18.i.re
new file mode 100644 (file)
index 0000000..631119c
Binary files /dev/null and b/re2c/test/posix_captures/repetition/18.i.re differ
diff --git a/re2c/test/posix_captures/repetition/19.i.c b/re2c/test/posix_captures/repetition/19.i.c
new file mode 100644 (file)
index 0000000..0072733
--- /dev/null
@@ -0,0 +1,67 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt1 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt2 = yyt5 = YYCURSOR;
+               goto yy5;
+       }
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt2 = yyt3 = yyt5 = YYCURSOR;
+               goto yy7;
+       }
+       yyt3 = yyt4 = NULL;
+       yyt6 = YYCURSOR;
+yy6:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[4] = yyt3;
+               yypmatch[5] = yyt4;
+               yypmatch[6] = yyt5;
+               yypmatch[7] = yyt6;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy7:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt4 = NULL;
+               yyt6 = YYCURSOR;
+               goto yy6;
+       }
+       ++YYCURSOR;
+       yyt5 = yyt6 = NULL;
+       yyt4 = YYCURSOR;
+       goto yy6;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/19.i.re b/re2c/test/posix_captures/repetition/19.i.re
new file mode 100644 (file)
index 0000000..ae11829
Binary files /dev/null and b/re2c/test/posix_captures/repetition/19.i.re differ
diff --git a/re2c/test/posix_captures/repetition/20.i.c b/re2c/test/posix_captures/repetition/20.i.c
new file mode 100644 (file)
index 0000000..bffac17
--- /dev/null
@@ -0,0 +1,75 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt1 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) goto yy5;
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) goto yy4;
+       yyt2 = yyt5 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt2 = yyt5 = YYCURSOR;
+               goto yy8;
+       }
+       yyt3 = yyt4 = NULL;
+       yyt6 = YYCURSOR;
+yy7:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[4] = yyt3;
+               yypmatch[5] = yyt4;
+               yypmatch[6] = yyt5;
+               yypmatch[7] = yyt6;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt4 = NULL;
+               yyt6 = YYCURSOR;
+               goto yy7;
+       }
+       yyt2 = yyt3 = yyt5 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt4 = NULL;
+               yyt6 = YYCURSOR;
+               goto yy7;
+       }
+       ++YYCURSOR;
+       yyt5 = yyt6 = NULL;
+       yyt4 = YYCURSOR;
+       goto yy7;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/20.i.re b/re2c/test/posix_captures/repetition/20.i.re
new file mode 100644 (file)
index 0000000..cce92f9
Binary files /dev/null and b/re2c/test/posix_captures/repetition/20.i.re differ
diff --git a/re2c/test/posix_captures/repetition/21.i.c b/re2c/test/posix_captures/repetition/21.i.c
new file mode 100644 (file)
index 0000000..d0efdec
--- /dev/null
@@ -0,0 +1,55 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych >= 0x01) {
+               yyt1 = yyt3 = yyt4 = yyt6 = YYCURSOR;
+               goto yy3;
+       }
+       yyt2 = yyt3 = yyt4 = yyt5 = yyt6 = yyt7 = NULL;
+       yyt1 = YYCURSOR;
+yy2:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[4] = yyt4;
+               yypmatch[5] = yyt5;
+               yypmatch[6] = yyt6;
+               yypmatch[7] = yyt7;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) {
+               yyt4 = yyt5 = NULL;
+               yyt2 = yyt7 = YYCURSOR;
+               goto yy2;
+       }
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) {
+               yyt6 = yyt7 = NULL;
+               yyt2 = yyt5 = YYCURSOR;
+               goto yy2;
+       }
+       yyt3 = yyt4 = yyt6 = YYCURSOR;
+       goto yy3;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/repetition/21.i.re b/re2c/test/posix_captures/repetition/21.i.re
new file mode 100644 (file)
index 0000000..7e64e15
Binary files /dev/null and b/re2c/test/posix_captures/repetition/21.i.re differ
diff --git a/re2c/test/posix_captures/repetition/22.i.c b/re2c/test/posix_captures/repetition/22.i.c
new file mode 100644 (file)
index 0000000..bf27499
--- /dev/null
@@ -0,0 +1,46 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       if (yych >= 0x01) {
+               yyt1 = yyt2 = yyt4 = YYCURSOR;
+               goto yy3;
+       }
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) goto yy5;
+       yyt2 = yyt3 = NULL;
+       yyt5 = YYCURSOR;
+yy4:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[5] = yyt3;
+               yypmatch[6] = yyt4;
+               yypmatch[7] = yyt5;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy5:
+       ++YYCURSOR;
+       yyt4 = yyt5 = NULL;
+       yyt3 = YYCURSOR;
+       goto yy4;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/22.i.re b/re2c/test/posix_captures/repetition/22.i.re
new file mode 100644 (file)
index 0000000..5d82396
Binary files /dev/null and b/re2c/test/posix_captures/repetition/22.i.re differ
diff --git a/re2c/test/posix_captures/repetition/23.i.c b/re2c/test/posix_captures/repetition/23.i.c
new file mode 100644 (file)
index 0000000..246c6c3
--- /dev/null
@@ -0,0 +1,80 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt1 = yyt4 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt2 = yyt3 = NULL;
+               yyt5 = yyt6 = yyt9 = YYCURSOR;
+               goto yy5;
+       }
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt4 = yyt5 = NULL;
+               yyt3 = yyt6 = yyt7 = yyt9 = YYCURSOR;
+               goto yy7;
+       }
+       yyt7 = yyt8 = NULL;
+       yyt10 = YYCURSOR;
+yy6:
+       {
+               const size_t yynmatch = 7;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[5] = yyt3;
+               yypmatch[6] = yyt4;
+               yypmatch[7] = yyt5;
+               yypmatch[8] = yyt6;
+               yypmatch[10] = yyt7;
+               yypmatch[11] = yyt8;
+               yypmatch[12] = yyt9;
+               yypmatch[13] = yyt10;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt6;
+               yypmatch[9] = YYCURSOR;
+               {}
+       }
+yy7:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt2 = yyt1;
+               yyt7 = yyt8 = NULL;
+               yyt10 = YYCURSOR;
+               goto yy6;
+       }
+       ++YYCURSOR;
+       yyt2 = yyt1;
+       yyt9 = yyt10 = NULL;
+       yyt8 = YYCURSOR;
+       goto yy6;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/23.i.re b/re2c/test/posix_captures/repetition/23.i.re
new file mode 100644 (file)
index 0000000..059cec2
Binary files /dev/null and b/re2c/test/posix_captures/repetition/23.i.re differ
diff --git a/re2c/test/posix_captures/repetition/24.i.c b/re2c/test/posix_captures/repetition/24.i.c
new file mode 100644 (file)
index 0000000..a9a4df2
--- /dev/null
@@ -0,0 +1,121 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt3 = yyt6 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt4 = yyt5 = NULL;
+               yyt7 = yyt8 = yyt11 = YYCURSOR;
+               goto yy5;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) goto yy4;
+       yyt2 = yyt9 = yyt10 = NULL;
+       yyt1 = yyt12 = yyt13 = yyt15 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt9 = yyt10 = NULL;
+               yyt12 = yyt13 = yyt15 = YYCURSOR;
+               goto yy8;
+       }
+       yyt1 = yyt14 = NULL;
+       yyt2 = YYCURSOR;
+yy7:
+       {
+               const size_t yynmatch = 10;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt3;
+               yypmatch[4] = yyt4;
+               yypmatch[5] = yyt5;
+               yypmatch[6] = yyt6;
+               yypmatch[7] = yyt7;
+               yypmatch[8] = yyt8;
+               yypmatch[10] = yyt9;
+               yypmatch[11] = yyt10;
+               yypmatch[12] = yyt11;
+               yypmatch[13] = yyt12;
+               yypmatch[14] = yyt13;
+               yypmatch[16] = yyt14;
+               yypmatch[17] = yyt1;
+               yypmatch[18] = yyt15;
+               yypmatch[19] = yyt2;
+               yypmatch[0] = yyt3;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt8;
+               yypmatch[9] = yyt13;
+               yypmatch[15] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt4 = yyt3;
+               yyt5 = yyt1;
+               yyt6 = yyt2;
+               yyt7 = yyt2;
+               yyt8 = yyt1;
+               yyt11 = yyt1;
+               yyt1 = yyt14 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy7;
+       }
+       yyt11 = yyt12 = NULL;
+       yyt10 = yyt13 = yyt14 = yyt15 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt4 = yyt3;
+               yyt5 = yyt1;
+               yyt6 = yyt2;
+               yyt7 = yyt2;
+               yyt8 = yyt1;
+               yyt9 = yyt1;
+               yyt1 = yyt14 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy7;
+       }
+       ++YYCURSOR;
+       yyt4 = yyt3;
+       yyt5 = yyt1;
+       yyt6 = yyt2;
+       yyt7 = yyt2;
+       yyt8 = yyt1;
+       yyt9 = yyt1;
+       yyt2 = yyt15 = NULL;
+       yyt1 = YYCURSOR;
+       goto yy7;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/24.i.re b/re2c/test/posix_captures/repetition/24.i.re
new file mode 100644 (file)
index 0000000..861c373
Binary files /dev/null and b/re2c/test/posix_captures/repetition/24.i.re differ
diff --git a/re2c/test/posix_captures/repetition/25.i.c b/re2c/test/posix_captures/repetition/25.i.c
new file mode 100644 (file)
index 0000000..bf27499
--- /dev/null
@@ -0,0 +1,46 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       if (yych >= 0x01) {
+               yyt1 = yyt2 = yyt4 = YYCURSOR;
+               goto yy3;
+       }
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) goto yy5;
+       yyt2 = yyt3 = NULL;
+       yyt5 = YYCURSOR;
+yy4:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[5] = yyt3;
+               yypmatch[6] = yyt4;
+               yypmatch[7] = yyt5;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy5:
+       ++YYCURSOR;
+       yyt4 = yyt5 = NULL;
+       yyt3 = YYCURSOR;
+       goto yy4;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/25.i.re b/re2c/test/posix_captures/repetition/25.i.re
new file mode 100644 (file)
index 0000000..631119c
Binary files /dev/null and b/re2c/test/posix_captures/repetition/25.i.re differ
diff --git a/re2c/test/posix_captures/repetition/26.i.c b/re2c/test/posix_captures/repetition/26.i.c
new file mode 100644 (file)
index 0000000..0072733
--- /dev/null
@@ -0,0 +1,67 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt1 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt2 = yyt5 = YYCURSOR;
+               goto yy5;
+       }
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt2 = yyt3 = yyt5 = YYCURSOR;
+               goto yy7;
+       }
+       yyt3 = yyt4 = NULL;
+       yyt6 = YYCURSOR;
+yy6:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[4] = yyt3;
+               yypmatch[5] = yyt4;
+               yypmatch[6] = yyt5;
+               yypmatch[7] = yyt6;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy7:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt4 = NULL;
+               yyt6 = YYCURSOR;
+               goto yy6;
+       }
+       ++YYCURSOR;
+       yyt5 = yyt6 = NULL;
+       yyt4 = YYCURSOR;
+       goto yy6;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/26.i.re b/re2c/test/posix_captures/repetition/26.i.re
new file mode 100644 (file)
index 0000000..ae11829
Binary files /dev/null and b/re2c/test/posix_captures/repetition/26.i.re differ
diff --git a/re2c/test/posix_captures/repetition/27.i.c b/re2c/test/posix_captures/repetition/27.i.c
new file mode 100644 (file)
index 0000000..bffac17
--- /dev/null
@@ -0,0 +1,75 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt1 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) goto yy5;
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) goto yy4;
+       yyt2 = yyt5 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt2 = yyt5 = YYCURSOR;
+               goto yy8;
+       }
+       yyt3 = yyt4 = NULL;
+       yyt6 = YYCURSOR;
+yy7:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[4] = yyt3;
+               yypmatch[5] = yyt4;
+               yypmatch[6] = yyt5;
+               yypmatch[7] = yyt6;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt4 = NULL;
+               yyt6 = YYCURSOR;
+               goto yy7;
+       }
+       yyt2 = yyt3 = yyt5 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt4 = NULL;
+               yyt6 = YYCURSOR;
+               goto yy7;
+       }
+       ++YYCURSOR;
+       yyt5 = yyt6 = NULL;
+       yyt4 = YYCURSOR;
+       goto yy7;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/27.i.re b/re2c/test/posix_captures/repetition/27.i.re
new file mode 100644 (file)
index 0000000..cce92f9
Binary files /dev/null and b/re2c/test/posix_captures/repetition/27.i.re differ
diff --git a/re2c/test/posix_captures/repetition/28.i.c b/re2c/test/posix_captures/repetition/28.i.c
new file mode 100644 (file)
index 0000000..d0efdec
--- /dev/null
@@ -0,0 +1,55 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych >= 0x01) {
+               yyt1 = yyt3 = yyt4 = yyt6 = YYCURSOR;
+               goto yy3;
+       }
+       yyt2 = yyt3 = yyt4 = yyt5 = yyt6 = yyt7 = NULL;
+       yyt1 = YYCURSOR;
+yy2:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[4] = yyt4;
+               yypmatch[5] = yyt5;
+               yypmatch[6] = yyt6;
+               yypmatch[7] = yyt7;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) {
+               yyt4 = yyt5 = NULL;
+               yyt2 = yyt7 = YYCURSOR;
+               goto yy2;
+       }
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) {
+               yyt6 = yyt7 = NULL;
+               yyt2 = yyt5 = YYCURSOR;
+               goto yy2;
+       }
+       yyt3 = yyt4 = yyt6 = YYCURSOR;
+       goto yy3;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/repetition/28.i.re b/re2c/test/posix_captures/repetition/28.i.re
new file mode 100644 (file)
index 0000000..7e64e15
Binary files /dev/null and b/re2c/test/posix_captures/repetition/28.i.re differ
diff --git a/re2c/test/posix_captures/repetition/29.i.c b/re2c/test/posix_captures/repetition/29.i.c
new file mode 100644 (file)
index 0000000..bf27499
--- /dev/null
@@ -0,0 +1,46 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       if (yych >= 0x01) {
+               yyt1 = yyt2 = yyt4 = YYCURSOR;
+               goto yy3;
+       }
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) goto yy5;
+       yyt2 = yyt3 = NULL;
+       yyt5 = YYCURSOR;
+yy4:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[5] = yyt3;
+               yypmatch[6] = yyt4;
+               yypmatch[7] = yyt5;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy5:
+       ++YYCURSOR;
+       yyt4 = yyt5 = NULL;
+       yyt3 = YYCURSOR;
+       goto yy4;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/29.i.re b/re2c/test/posix_captures/repetition/29.i.re
new file mode 100644 (file)
index 0000000..5d82396
Binary files /dev/null and b/re2c/test/posix_captures/repetition/29.i.re differ
diff --git a/re2c/test/posix_captures/repetition/30.i.c b/re2c/test/posix_captures/repetition/30.i.c
new file mode 100644 (file)
index 0000000..246c6c3
--- /dev/null
@@ -0,0 +1,80 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt1 = yyt4 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt2 = yyt3 = NULL;
+               yyt5 = yyt6 = yyt9 = YYCURSOR;
+               goto yy5;
+       }
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt4 = yyt5 = NULL;
+               yyt3 = yyt6 = yyt7 = yyt9 = YYCURSOR;
+               goto yy7;
+       }
+       yyt7 = yyt8 = NULL;
+       yyt10 = YYCURSOR;
+yy6:
+       {
+               const size_t yynmatch = 7;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[5] = yyt3;
+               yypmatch[6] = yyt4;
+               yypmatch[7] = yyt5;
+               yypmatch[8] = yyt6;
+               yypmatch[10] = yyt7;
+               yypmatch[11] = yyt8;
+               yypmatch[12] = yyt9;
+               yypmatch[13] = yyt10;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt6;
+               yypmatch[9] = YYCURSOR;
+               {}
+       }
+yy7:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt2 = yyt1;
+               yyt7 = yyt8 = NULL;
+               yyt10 = YYCURSOR;
+               goto yy6;
+       }
+       ++YYCURSOR;
+       yyt2 = yyt1;
+       yyt9 = yyt10 = NULL;
+       yyt8 = YYCURSOR;
+       goto yy6;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/30.i.re b/re2c/test/posix_captures/repetition/30.i.re
new file mode 100644 (file)
index 0000000..059cec2
Binary files /dev/null and b/re2c/test/posix_captures/repetition/30.i.re differ
diff --git a/re2c/test/posix_captures/repetition/31.i.c b/re2c/test/posix_captures/repetition/31.i.c
new file mode 100644 (file)
index 0000000..a9a4df2
--- /dev/null
@@ -0,0 +1,121 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt3 = yyt6 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt4 = yyt5 = NULL;
+               yyt7 = yyt8 = yyt11 = YYCURSOR;
+               goto yy5;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) goto yy4;
+       yyt2 = yyt9 = yyt10 = NULL;
+       yyt1 = yyt12 = yyt13 = yyt15 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt9 = yyt10 = NULL;
+               yyt12 = yyt13 = yyt15 = YYCURSOR;
+               goto yy8;
+       }
+       yyt1 = yyt14 = NULL;
+       yyt2 = YYCURSOR;
+yy7:
+       {
+               const size_t yynmatch = 10;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt3;
+               yypmatch[4] = yyt4;
+               yypmatch[5] = yyt5;
+               yypmatch[6] = yyt6;
+               yypmatch[7] = yyt7;
+               yypmatch[8] = yyt8;
+               yypmatch[10] = yyt9;
+               yypmatch[11] = yyt10;
+               yypmatch[12] = yyt11;
+               yypmatch[13] = yyt12;
+               yypmatch[14] = yyt13;
+               yypmatch[16] = yyt14;
+               yypmatch[17] = yyt1;
+               yypmatch[18] = yyt15;
+               yypmatch[19] = yyt2;
+               yypmatch[0] = yyt3;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt8;
+               yypmatch[9] = yyt13;
+               yypmatch[15] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt4 = yyt3;
+               yyt5 = yyt1;
+               yyt6 = yyt2;
+               yyt7 = yyt2;
+               yyt8 = yyt1;
+               yyt11 = yyt1;
+               yyt1 = yyt14 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy7;
+       }
+       yyt11 = yyt12 = NULL;
+       yyt10 = yyt13 = yyt14 = yyt15 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt4 = yyt3;
+               yyt5 = yyt1;
+               yyt6 = yyt2;
+               yyt7 = yyt2;
+               yyt8 = yyt1;
+               yyt9 = yyt1;
+               yyt1 = yyt14 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy7;
+       }
+       ++YYCURSOR;
+       yyt4 = yyt3;
+       yyt5 = yyt1;
+       yyt6 = yyt2;
+       yyt7 = yyt2;
+       yyt8 = yyt1;
+       yyt9 = yyt1;
+       yyt2 = yyt15 = NULL;
+       yyt1 = YYCURSOR;
+       goto yy7;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/31.i.re b/re2c/test/posix_captures/repetition/31.i.re
new file mode 100644 (file)
index 0000000..861c373
Binary files /dev/null and b/re2c/test/posix_captures/repetition/31.i.re differ
diff --git a/re2c/test/posix_captures/repetition/32.i.c b/re2c/test/posix_captures/repetition/32.i.c
new file mode 100644 (file)
index 0000000..bf27499
--- /dev/null
@@ -0,0 +1,46 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       if (yych >= 0x01) {
+               yyt1 = yyt2 = yyt4 = YYCURSOR;
+               goto yy3;
+       }
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) goto yy5;
+       yyt2 = yyt3 = NULL;
+       yyt5 = YYCURSOR;
+yy4:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[5] = yyt3;
+               yypmatch[6] = yyt4;
+               yypmatch[7] = yyt5;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy5:
+       ++YYCURSOR;
+       yyt4 = yyt5 = NULL;
+       yyt3 = YYCURSOR;
+       goto yy4;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/32.i.re b/re2c/test/posix_captures/repetition/32.i.re
new file mode 100644 (file)
index 0000000..631119c
Binary files /dev/null and b/re2c/test/posix_captures/repetition/32.i.re differ
diff --git a/re2c/test/posix_captures/repetition/33.i.c b/re2c/test/posix_captures/repetition/33.i.c
new file mode 100644 (file)
index 0000000..0072733
--- /dev/null
@@ -0,0 +1,67 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt1 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt2 = yyt5 = YYCURSOR;
+               goto yy5;
+       }
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt2 = yyt3 = yyt5 = YYCURSOR;
+               goto yy7;
+       }
+       yyt3 = yyt4 = NULL;
+       yyt6 = YYCURSOR;
+yy6:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[4] = yyt3;
+               yypmatch[5] = yyt4;
+               yypmatch[6] = yyt5;
+               yypmatch[7] = yyt6;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy7:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt4 = NULL;
+               yyt6 = YYCURSOR;
+               goto yy6;
+       }
+       ++YYCURSOR;
+       yyt5 = yyt6 = NULL;
+       yyt4 = YYCURSOR;
+       goto yy6;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/33.i.re b/re2c/test/posix_captures/repetition/33.i.re
new file mode 100644 (file)
index 0000000..ae11829
Binary files /dev/null and b/re2c/test/posix_captures/repetition/33.i.re differ
diff --git a/re2c/test/posix_captures/repetition/34.i.c b/re2c/test/posix_captures/repetition/34.i.c
new file mode 100644 (file)
index 0000000..bffac17
--- /dev/null
@@ -0,0 +1,75 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt1 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) goto yy5;
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) goto yy4;
+       yyt2 = yyt5 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt2 = yyt5 = YYCURSOR;
+               goto yy8;
+       }
+       yyt3 = yyt4 = NULL;
+       yyt6 = YYCURSOR;
+yy7:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[4] = yyt3;
+               yypmatch[5] = yyt4;
+               yypmatch[6] = yyt5;
+               yypmatch[7] = yyt6;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt4 = NULL;
+               yyt6 = YYCURSOR;
+               goto yy7;
+       }
+       yyt2 = yyt3 = yyt5 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt4 = NULL;
+               yyt6 = YYCURSOR;
+               goto yy7;
+       }
+       ++YYCURSOR;
+       yyt5 = yyt6 = NULL;
+       yyt4 = YYCURSOR;
+       goto yy7;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/34.i.re b/re2c/test/posix_captures/repetition/34.i.re
new file mode 100644 (file)
index 0000000..cce92f9
Binary files /dev/null and b/re2c/test/posix_captures/repetition/34.i.re differ
diff --git a/re2c/test/posix_captures/repetition/35.i.c b/re2c/test/posix_captures/repetition/35.i.c
new file mode 100644 (file)
index 0000000..d0efdec
--- /dev/null
@@ -0,0 +1,55 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych >= 0x01) {
+               yyt1 = yyt3 = yyt4 = yyt6 = YYCURSOR;
+               goto yy3;
+       }
+       yyt2 = yyt3 = yyt4 = yyt5 = yyt6 = yyt7 = NULL;
+       yyt1 = YYCURSOR;
+yy2:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[4] = yyt4;
+               yypmatch[5] = yyt5;
+               yypmatch[6] = yyt6;
+               yypmatch[7] = yyt7;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) {
+               yyt4 = yyt5 = NULL;
+               yyt2 = yyt7 = YYCURSOR;
+               goto yy2;
+       }
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) {
+               yyt6 = yyt7 = NULL;
+               yyt2 = yyt5 = YYCURSOR;
+               goto yy2;
+       }
+       yyt3 = yyt4 = yyt6 = YYCURSOR;
+       goto yy3;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/repetition/35.i.re b/re2c/test/posix_captures/repetition/35.i.re
new file mode 100644 (file)
index 0000000..7e64e15
Binary files /dev/null and b/re2c/test/posix_captures/repetition/35.i.re differ
diff --git a/re2c/test/posix_captures/repetition/36.i.c b/re2c/test/posix_captures/repetition/36.i.c
new file mode 100644 (file)
index 0000000..bf27499
--- /dev/null
@@ -0,0 +1,46 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       if (yych >= 0x01) {
+               yyt1 = yyt2 = yyt4 = YYCURSOR;
+               goto yy3;
+       }
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) goto yy5;
+       yyt2 = yyt3 = NULL;
+       yyt5 = YYCURSOR;
+yy4:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[5] = yyt3;
+               yypmatch[6] = yyt4;
+               yypmatch[7] = yyt5;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy5:
+       ++YYCURSOR;
+       yyt4 = yyt5 = NULL;
+       yyt3 = YYCURSOR;
+       goto yy4;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/36.i.re b/re2c/test/posix_captures/repetition/36.i.re
new file mode 100644 (file)
index 0000000..5d82396
Binary files /dev/null and b/re2c/test/posix_captures/repetition/36.i.re differ
diff --git a/re2c/test/posix_captures/repetition/37.i.c b/re2c/test/posix_captures/repetition/37.i.c
new file mode 100644 (file)
index 0000000..246c6c3
--- /dev/null
@@ -0,0 +1,80 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt1 = yyt4 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt2 = yyt3 = NULL;
+               yyt5 = yyt6 = yyt9 = YYCURSOR;
+               goto yy5;
+       }
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt4 = yyt5 = NULL;
+               yyt3 = yyt6 = yyt7 = yyt9 = YYCURSOR;
+               goto yy7;
+       }
+       yyt7 = yyt8 = NULL;
+       yyt10 = YYCURSOR;
+yy6:
+       {
+               const size_t yynmatch = 7;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[5] = yyt3;
+               yypmatch[6] = yyt4;
+               yypmatch[7] = yyt5;
+               yypmatch[8] = yyt6;
+               yypmatch[10] = yyt7;
+               yypmatch[11] = yyt8;
+               yypmatch[12] = yyt9;
+               yypmatch[13] = yyt10;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt6;
+               yypmatch[9] = YYCURSOR;
+               {}
+       }
+yy7:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt2 = yyt1;
+               yyt7 = yyt8 = NULL;
+               yyt10 = YYCURSOR;
+               goto yy6;
+       }
+       ++YYCURSOR;
+       yyt2 = yyt1;
+       yyt9 = yyt10 = NULL;
+       yyt8 = YYCURSOR;
+       goto yy6;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/37.i.re b/re2c/test/posix_captures/repetition/37.i.re
new file mode 100644 (file)
index 0000000..059cec2
Binary files /dev/null and b/re2c/test/posix_captures/repetition/37.i.re differ
diff --git a/re2c/test/posix_captures/repetition/38.i.c b/re2c/test/posix_captures/repetition/38.i.c
new file mode 100644 (file)
index 0000000..a9a4df2
--- /dev/null
@@ -0,0 +1,121 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt3 = yyt6 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt4 = yyt5 = NULL;
+               yyt7 = yyt8 = yyt11 = YYCURSOR;
+               goto yy5;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) goto yy4;
+       yyt2 = yyt9 = yyt10 = NULL;
+       yyt1 = yyt12 = yyt13 = yyt15 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt9 = yyt10 = NULL;
+               yyt12 = yyt13 = yyt15 = YYCURSOR;
+               goto yy8;
+       }
+       yyt1 = yyt14 = NULL;
+       yyt2 = YYCURSOR;
+yy7:
+       {
+               const size_t yynmatch = 10;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt3;
+               yypmatch[4] = yyt4;
+               yypmatch[5] = yyt5;
+               yypmatch[6] = yyt6;
+               yypmatch[7] = yyt7;
+               yypmatch[8] = yyt8;
+               yypmatch[10] = yyt9;
+               yypmatch[11] = yyt10;
+               yypmatch[12] = yyt11;
+               yypmatch[13] = yyt12;
+               yypmatch[14] = yyt13;
+               yypmatch[16] = yyt14;
+               yypmatch[17] = yyt1;
+               yypmatch[18] = yyt15;
+               yypmatch[19] = yyt2;
+               yypmatch[0] = yyt3;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt8;
+               yypmatch[9] = yyt13;
+               yypmatch[15] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt4 = yyt3;
+               yyt5 = yyt1;
+               yyt6 = yyt2;
+               yyt7 = yyt2;
+               yyt8 = yyt1;
+               yyt11 = yyt1;
+               yyt1 = yyt14 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy7;
+       }
+       yyt11 = yyt12 = NULL;
+       yyt10 = yyt13 = yyt14 = yyt15 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt4 = yyt3;
+               yyt5 = yyt1;
+               yyt6 = yyt2;
+               yyt7 = yyt2;
+               yyt8 = yyt1;
+               yyt9 = yyt1;
+               yyt1 = yyt14 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy7;
+       }
+       ++YYCURSOR;
+       yyt4 = yyt3;
+       yyt5 = yyt1;
+       yyt6 = yyt2;
+       yyt7 = yyt2;
+       yyt8 = yyt1;
+       yyt9 = yyt1;
+       yyt2 = yyt15 = NULL;
+       yyt1 = YYCURSOR;
+       goto yy7;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/38.i.re b/re2c/test/posix_captures/repetition/38.i.re
new file mode 100644 (file)
index 0000000..861c373
Binary files /dev/null and b/re2c/test/posix_captures/repetition/38.i.re differ
diff --git a/re2c/test/posix_captures/repetition/39.i.c b/re2c/test/posix_captures/repetition/39.i.c
new file mode 100644 (file)
index 0000000..bf27499
--- /dev/null
@@ -0,0 +1,46 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       if (yych >= 0x01) {
+               yyt1 = yyt2 = yyt4 = YYCURSOR;
+               goto yy3;
+       }
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) goto yy5;
+       yyt2 = yyt3 = NULL;
+       yyt5 = YYCURSOR;
+yy4:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[5] = yyt3;
+               yypmatch[6] = yyt4;
+               yypmatch[7] = yyt5;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy5:
+       ++YYCURSOR;
+       yyt4 = yyt5 = NULL;
+       yyt3 = YYCURSOR;
+       goto yy4;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/39.i.re b/re2c/test/posix_captures/repetition/39.i.re
new file mode 100644 (file)
index 0000000..631119c
Binary files /dev/null and b/re2c/test/posix_captures/repetition/39.i.re differ
diff --git a/re2c/test/posix_captures/repetition/40.i.c b/re2c/test/posix_captures/repetition/40.i.c
new file mode 100644 (file)
index 0000000..0072733
--- /dev/null
@@ -0,0 +1,67 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt1 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt2 = yyt5 = YYCURSOR;
+               goto yy5;
+       }
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt2 = yyt3 = yyt5 = YYCURSOR;
+               goto yy7;
+       }
+       yyt3 = yyt4 = NULL;
+       yyt6 = YYCURSOR;
+yy6:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[4] = yyt3;
+               yypmatch[5] = yyt4;
+               yypmatch[6] = yyt5;
+               yypmatch[7] = yyt6;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy7:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt4 = NULL;
+               yyt6 = YYCURSOR;
+               goto yy6;
+       }
+       ++YYCURSOR;
+       yyt5 = yyt6 = NULL;
+       yyt4 = YYCURSOR;
+       goto yy6;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/40.i.re b/re2c/test/posix_captures/repetition/40.i.re
new file mode 100644 (file)
index 0000000..ae11829
Binary files /dev/null and b/re2c/test/posix_captures/repetition/40.i.re differ
diff --git a/re2c/test/posix_captures/repetition/41.i.c b/re2c/test/posix_captures/repetition/41.i.c
new file mode 100644 (file)
index 0000000..bffac17
--- /dev/null
@@ -0,0 +1,75 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt1 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) goto yy5;
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) goto yy4;
+       yyt2 = yyt5 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt2 = yyt5 = YYCURSOR;
+               goto yy8;
+       }
+       yyt3 = yyt4 = NULL;
+       yyt6 = YYCURSOR;
+yy7:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[4] = yyt3;
+               yypmatch[5] = yyt4;
+               yypmatch[6] = yyt5;
+               yypmatch[7] = yyt6;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt4 = NULL;
+               yyt6 = YYCURSOR;
+               goto yy7;
+       }
+       yyt2 = yyt3 = yyt5 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt4 = NULL;
+               yyt6 = YYCURSOR;
+               goto yy7;
+       }
+       ++YYCURSOR;
+       yyt5 = yyt6 = NULL;
+       yyt4 = YYCURSOR;
+       goto yy7;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/41.i.re b/re2c/test/posix_captures/repetition/41.i.re
new file mode 100644 (file)
index 0000000..cce92f9
Binary files /dev/null and b/re2c/test/posix_captures/repetition/41.i.re differ
diff --git a/re2c/test/posix_captures/repetition/42.i.c b/re2c/test/posix_captures/repetition/42.i.c
new file mode 100644 (file)
index 0000000..d0efdec
--- /dev/null
@@ -0,0 +1,55 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych >= 0x01) {
+               yyt1 = yyt3 = yyt4 = yyt6 = YYCURSOR;
+               goto yy3;
+       }
+       yyt2 = yyt3 = yyt4 = yyt5 = yyt6 = yyt7 = NULL;
+       yyt1 = YYCURSOR;
+yy2:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[4] = yyt4;
+               yypmatch[5] = yyt5;
+               yypmatch[6] = yyt6;
+               yypmatch[7] = yyt7;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) {
+               yyt4 = yyt5 = NULL;
+               yyt2 = yyt7 = YYCURSOR;
+               goto yy2;
+       }
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) {
+               yyt6 = yyt7 = NULL;
+               yyt2 = yyt5 = YYCURSOR;
+               goto yy2;
+       }
+       yyt3 = yyt4 = yyt6 = YYCURSOR;
+       goto yy3;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/repetition/42.i.re b/re2c/test/posix_captures/repetition/42.i.re
new file mode 100644 (file)
index 0000000..7e64e15
Binary files /dev/null and b/re2c/test/posix_captures/repetition/42.i.re differ
diff --git a/re2c/test/posix_captures/repetition/43.i.c b/re2c/test/posix_captures/repetition/43.i.c
new file mode 100644 (file)
index 0000000..bf27499
--- /dev/null
@@ -0,0 +1,46 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       if (yych >= 0x01) {
+               yyt1 = yyt2 = yyt4 = YYCURSOR;
+               goto yy3;
+       }
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) goto yy5;
+       yyt2 = yyt3 = NULL;
+       yyt5 = YYCURSOR;
+yy4:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[5] = yyt3;
+               yypmatch[6] = yyt4;
+               yypmatch[7] = yyt5;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy5:
+       ++YYCURSOR;
+       yyt4 = yyt5 = NULL;
+       yyt3 = YYCURSOR;
+       goto yy4;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/43.i.re b/re2c/test/posix_captures/repetition/43.i.re
new file mode 100644 (file)
index 0000000..5d82396
Binary files /dev/null and b/re2c/test/posix_captures/repetition/43.i.re differ
diff --git a/re2c/test/posix_captures/repetition/44.i.c b/re2c/test/posix_captures/repetition/44.i.c
new file mode 100644 (file)
index 0000000..246c6c3
--- /dev/null
@@ -0,0 +1,80 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt1 = yyt4 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt2 = yyt3 = NULL;
+               yyt5 = yyt6 = yyt9 = YYCURSOR;
+               goto yy5;
+       }
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt4 = yyt5 = NULL;
+               yyt3 = yyt6 = yyt7 = yyt9 = YYCURSOR;
+               goto yy7;
+       }
+       yyt7 = yyt8 = NULL;
+       yyt10 = YYCURSOR;
+yy6:
+       {
+               const size_t yynmatch = 7;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[5] = yyt3;
+               yypmatch[6] = yyt4;
+               yypmatch[7] = yyt5;
+               yypmatch[8] = yyt6;
+               yypmatch[10] = yyt7;
+               yypmatch[11] = yyt8;
+               yypmatch[12] = yyt9;
+               yypmatch[13] = yyt10;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt6;
+               yypmatch[9] = YYCURSOR;
+               {}
+       }
+yy7:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt2 = yyt1;
+               yyt7 = yyt8 = NULL;
+               yyt10 = YYCURSOR;
+               goto yy6;
+       }
+       ++YYCURSOR;
+       yyt2 = yyt1;
+       yyt9 = yyt10 = NULL;
+       yyt8 = YYCURSOR;
+       goto yy6;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/44.i.re b/re2c/test/posix_captures/repetition/44.i.re
new file mode 100644 (file)
index 0000000..059cec2
Binary files /dev/null and b/re2c/test/posix_captures/repetition/44.i.re differ
diff --git a/re2c/test/posix_captures/repetition/45.i.c b/re2c/test/posix_captures/repetition/45.i.c
new file mode 100644 (file)
index 0000000..a9a4df2
--- /dev/null
@@ -0,0 +1,121 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt3 = yyt6 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt4 = yyt5 = NULL;
+               yyt7 = yyt8 = yyt11 = YYCURSOR;
+               goto yy5;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) goto yy4;
+       yyt2 = yyt9 = yyt10 = NULL;
+       yyt1 = yyt12 = yyt13 = yyt15 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt9 = yyt10 = NULL;
+               yyt12 = yyt13 = yyt15 = YYCURSOR;
+               goto yy8;
+       }
+       yyt1 = yyt14 = NULL;
+       yyt2 = YYCURSOR;
+yy7:
+       {
+               const size_t yynmatch = 10;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt3;
+               yypmatch[4] = yyt4;
+               yypmatch[5] = yyt5;
+               yypmatch[6] = yyt6;
+               yypmatch[7] = yyt7;
+               yypmatch[8] = yyt8;
+               yypmatch[10] = yyt9;
+               yypmatch[11] = yyt10;
+               yypmatch[12] = yyt11;
+               yypmatch[13] = yyt12;
+               yypmatch[14] = yyt13;
+               yypmatch[16] = yyt14;
+               yypmatch[17] = yyt1;
+               yypmatch[18] = yyt15;
+               yypmatch[19] = yyt2;
+               yypmatch[0] = yyt3;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt8;
+               yypmatch[9] = yyt13;
+               yypmatch[15] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt4 = yyt3;
+               yyt5 = yyt1;
+               yyt6 = yyt2;
+               yyt7 = yyt2;
+               yyt8 = yyt1;
+               yyt11 = yyt1;
+               yyt1 = yyt14 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy7;
+       }
+       yyt11 = yyt12 = NULL;
+       yyt10 = yyt13 = yyt14 = yyt15 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt4 = yyt3;
+               yyt5 = yyt1;
+               yyt6 = yyt2;
+               yyt7 = yyt2;
+               yyt8 = yyt1;
+               yyt9 = yyt1;
+               yyt1 = yyt14 = NULL;
+               yyt2 = YYCURSOR;
+               goto yy7;
+       }
+       ++YYCURSOR;
+       yyt4 = yyt3;
+       yyt5 = yyt1;
+       yyt6 = yyt2;
+       yyt7 = yyt2;
+       yyt8 = yyt1;
+       yyt9 = yyt1;
+       yyt2 = yyt15 = NULL;
+       yyt1 = YYCURSOR;
+       goto yy7;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/45.i.re b/re2c/test/posix_captures/repetition/45.i.re
new file mode 100644 (file)
index 0000000..861c373
Binary files /dev/null and b/re2c/test/posix_captures/repetition/45.i.re differ
diff --git a/re2c/test/posix_captures/repetition/46.i.c b/re2c/test/posix_captures/repetition/46.i.c
new file mode 100644 (file)
index 0000000..bf27499
--- /dev/null
@@ -0,0 +1,46 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       if (yych >= 0x01) {
+               yyt1 = yyt2 = yyt4 = YYCURSOR;
+               goto yy3;
+       }
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) goto yy5;
+       yyt2 = yyt3 = NULL;
+       yyt5 = YYCURSOR;
+yy4:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt1;
+               yypmatch[4] = yyt2;
+               yypmatch[5] = yyt3;
+               yypmatch[6] = yyt4;
+               yypmatch[7] = yyt5;
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy5:
+       ++YYCURSOR;
+       yyt4 = yyt5 = NULL;
+       yyt3 = YYCURSOR;
+       goto yy4;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/46.i.re b/re2c/test/posix_captures/repetition/46.i.re
new file mode 100644 (file)
index 0000000..631119c
Binary files /dev/null and b/re2c/test/posix_captures/repetition/46.i.re differ
diff --git a/re2c/test/posix_captures/repetition/47.i.c b/re2c/test/posix_captures/repetition/47.i.c
new file mode 100644 (file)
index 0000000..0072733
--- /dev/null
@@ -0,0 +1,67 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt1 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt2 = yyt5 = YYCURSOR;
+               goto yy5;
+       }
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt2 = yyt3 = yyt5 = YYCURSOR;
+               goto yy7;
+       }
+       yyt3 = yyt4 = NULL;
+       yyt6 = YYCURSOR;
+yy6:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[4] = yyt3;
+               yypmatch[5] = yyt4;
+               yypmatch[6] = yyt5;
+               yypmatch[7] = yyt6;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy7:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt4 = NULL;
+               yyt6 = YYCURSOR;
+               goto yy6;
+       }
+       ++YYCURSOR;
+       yyt5 = yyt6 = NULL;
+       yyt4 = YYCURSOR;
+       goto yy6;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/47.i.re b/re2c/test/posix_captures/repetition/47.i.re
new file mode 100644 (file)
index 0000000..ae11829
Binary files /dev/null and b/re2c/test/posix_captures/repetition/47.i.re differ
diff --git a/re2c/test/posix_captures/repetition/48.i.c b/re2c/test/posix_captures/repetition/48.i.c
new file mode 100644 (file)
index 0000000..bffac17
--- /dev/null
@@ -0,0 +1,75 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       if (yych >= 0x01) {
+               yyt1 = YYCURSOR;
+               goto yy3;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) goto yy5;
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) goto yy4;
+       yyt2 = yyt5 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych >= 0x01) {
+               yyt2 = yyt5 = YYCURSOR;
+               goto yy8;
+       }
+       yyt3 = yyt4 = NULL;
+       yyt6 = YYCURSOR;
+yy7:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[4] = yyt3;
+               yypmatch[5] = yyt4;
+               yypmatch[6] = yyt5;
+               yypmatch[7] = yyt6;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt4 = NULL;
+               yyt6 = YYCURSOR;
+               goto yy7;
+       }
+       yyt2 = yyt3 = yyt5 = YYCURSOR;
+       yych = *++YYCURSOR;
+       if (yych <= 0x00) {
+               yyt3 = yyt4 = NULL;
+               yyt6 = YYCURSOR;
+               goto yy7;
+       }
+       ++YYCURSOR;
+       yyt5 = yyt6 = NULL;
+       yyt4 = YYCURSOR;
+       goto yy7;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 3 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/48.i.re b/re2c/test/posix_captures/repetition/48.i.re
new file mode 100644 (file)
index 0000000..cce92f9
Binary files /dev/null and b/re2c/test/posix_captures/repetition/48.i.re differ
diff --git a/re2c/test/posix_captures/repetition/49.i.c b/re2c/test/posix_captures/repetition/49.i.c
new file mode 100644 (file)
index 0000000..d0efdec
--- /dev/null
@@ -0,0 +1,55 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych >= 0x01) {
+               yyt1 = yyt3 = yyt4 = yyt6 = YYCURSOR;
+               goto yy3;
+       }
+       yyt2 = yyt3 = yyt4 = yyt5 = yyt6 = yyt7 = NULL;
+       yyt1 = YYCURSOR;
+yy2:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[4] = yyt4;
+               yypmatch[5] = yyt5;
+               yypmatch[6] = yyt6;
+               yypmatch[7] = yyt7;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) {
+               yyt4 = yyt5 = NULL;
+               yyt2 = yyt7 = YYCURSOR;
+               goto yy2;
+       }
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       if (yych <= 0x00) {
+               yyt6 = yyt7 = NULL;
+               yyt2 = yyt5 = YYCURSOR;
+               goto yy2;
+       }
+       yyt3 = yyt4 = yyt6 = YYCURSOR;
+       goto yy3;
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/repetition/49.i.re b/re2c/test/posix_captures/repetition/49.i.re
new file mode 100644 (file)
index 0000000..7e64e15
Binary files /dev/null and b/re2c/test/posix_captures/repetition/49.i.re differ
diff --git a/re2c/test/posix_captures/repetition/50.i.c b/re2c/test/posix_captures/repetition/50.i.c
new file mode 100644 (file)
index 0000000..8022221
--- /dev/null
@@ -0,0 +1,93 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'X':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'Y':
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:        goto yy6;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       if (yyaccept == 0) {
+               goto yy2;
+       } else {
+               goto yy8;
+       }
+yy5:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy6:
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt1 = YYCURSOR;
+               goto yy5;
+       }
+yy7:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy9;
+       default:        goto yy10;
+       }
+yy8:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt2;
+               yypmatch[3] = yyt3;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt4;
+               {}
+       }
+yy9:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy10:
+       switch (yych) {
+       case 0x00:
+               yyt4 = yyt1;
+               goto yy8;
+       case 'Y':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt4 = yyt1;
+               yyt1 = YYCURSOR;
+               goto yy5;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/50.i.re b/re2c/test/posix_captures/repetition/50.i.re
new file mode 100644 (file)
index 0000000..ad1cd58
Binary files /dev/null and b/re2c/test/posix_captures/repetition/50.i.re differ
diff --git a/re2c/test/posix_captures/repetition/51.i.c b/re2c/test/posix_captures/repetition/51.i.c
new file mode 100644 (file)
index 0000000..57cfb4f
--- /dev/null
@@ -0,0 +1,93 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'X':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'Y':
+               yyt1 = YYCURSOR;
+               goto yy7;
+       default:        goto yy6;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       if (yyaccept == 0) {
+               goto yy2;
+       } else {
+               goto yy8;
+       }
+yy5:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy6:
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt1 = YYCURSOR;
+               goto yy5;
+       }
+yy7:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy9;
+       default:        goto yy10;
+       }
+yy8:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               yypmatch[3] = YYCURSOR - 1;
+               {}
+       }
+yy9:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy10:
+       switch (yych) {
+       case 0x00:
+               yyt3 = yyt1;
+               goto yy8;
+       case 'Y':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt3 = yyt1;
+               yyt1 = YYCURSOR;
+               goto yy5;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/51.i.re b/re2c/test/posix_captures/repetition/51.i.re
new file mode 100644 (file)
index 0000000..667bcf5
Binary files /dev/null and b/re2c/test/posix_captures/repetition/51.i.re differ
diff --git a/re2c/test/posix_captures/repetition/52.i.c b/re2c/test/posix_captures/repetition/52.i.c
new file mode 100644 (file)
index 0000000..31da261
--- /dev/null
@@ -0,0 +1,114 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'X':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy5;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       if (yyaccept == 0) {
+               goto yy2;
+       } else {
+               goto yy7;
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy10;
+       default:        goto yy9;
+       }
+yy6:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy10;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy7:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR - 1;
+               {}
+       }
+yy8:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy9:
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy10:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       default:        goto yy12;
+       }
+yy11:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy12:
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt3;
+               goto yy7;
+       case 'Y':
+               yyt3 = yyt2;
+               yyt2 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/52.i.re b/re2c/test/posix_captures/repetition/52.i.re
new file mode 100644 (file)
index 0000000..1a37b77
Binary files /dev/null and b/re2c/test/posix_captures/repetition/52.i.re differ
diff --git a/re2c/test/posix_captures/repetition/53.i.c b/re2c/test/posix_captures/repetition/53.i.c
new file mode 100644 (file)
index 0000000..cacde3e
--- /dev/null
@@ -0,0 +1,133 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'X':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy5;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       if (yyaccept == 0) {
+               goto yy2;
+       } else {
+               goto yy7;
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy9;
+       default:        goto yy8;
+       }
+yy6:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy9;
+       default:        goto yy8;
+       }
+yy7:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR - 1;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy12;
+       default:        goto yy11;
+       }
+yy9:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy12;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy10;
+       }
+yy10:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy11:
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy13;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy10;
+       }
+yy12:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy13;
+       default:        goto yy14;
+       }
+yy13:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy14:
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt3;
+               goto yy7;
+       case 'Y':
+               yyt3 = yyt2;
+               yyt2 = YYCURSOR;
+               goto yy13;
+       default:
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy10;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/53.i.re b/re2c/test/posix_captures/repetition/53.i.re
new file mode 100644 (file)
index 0000000..9c2d995
Binary files /dev/null and b/re2c/test/posix_captures/repetition/53.i.re differ
diff --git a/re2c/test/posix_captures/repetition/54.i.c b/re2c/test/posix_captures/repetition/54.i.c
new file mode 100644 (file)
index 0000000..8ff75c2
--- /dev/null
@@ -0,0 +1,152 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'X':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy5;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       if (yyaccept == 0) {
+               goto yy2;
+       } else {
+               goto yy7;
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy9;
+       default:        goto yy8;
+       }
+yy6:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy9;
+       default:        goto yy8;
+       }
+yy7:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR - 1;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       default:        goto yy10;
+       }
+yy9:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       default:        goto yy10;
+       }
+yy10:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy14;
+       default:        goto yy13;
+       }
+yy11:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy14;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy12;
+       }
+yy12:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy13:
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy15;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy12;
+       }
+yy14:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy15;
+       default:        goto yy16;
+       }
+yy15:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy16:
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt3;
+               goto yy7;
+       case 'Y':
+               yyt3 = yyt2;
+               yyt2 = YYCURSOR;
+               goto yy15;
+       default:
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy12;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/54.i.re b/re2c/test/posix_captures/repetition/54.i.re
new file mode 100644 (file)
index 0000000..397f53b
Binary files /dev/null and b/re2c/test/posix_captures/repetition/54.i.re differ
diff --git a/re2c/test/posix_captures/repetition/55.i.c b/re2c/test/posix_captures/repetition/55.i.c
new file mode 100644 (file)
index 0000000..e0a15d8
--- /dev/null
@@ -0,0 +1,171 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'X':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy5;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       if (yyaccept == 0) {
+               goto yy2;
+       } else {
+               goto yy7;
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy9;
+       default:        goto yy8;
+       }
+yy6:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy9;
+       default:        goto yy8;
+       }
+yy7:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR - 1;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       default:        goto yy10;
+       }
+yy9:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       default:        goto yy10;
+       }
+yy10:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy13;
+       default:        goto yy12;
+       }
+yy11:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy13;
+       default:        goto yy12;
+       }
+yy12:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:        goto yy15;
+       }
+yy13:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy14;
+       }
+yy14:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy15:
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy17;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy14;
+       }
+yy16:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy17;
+       default:        goto yy18;
+       }
+yy17:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy18:
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt3;
+               goto yy7;
+       case 'Y':
+               yyt3 = yyt2;
+               yyt2 = YYCURSOR;
+               goto yy17;
+       default:
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy14;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/55.i.re b/re2c/test/posix_captures/repetition/55.i.re
new file mode 100644 (file)
index 0000000..89f3171
Binary files /dev/null and b/re2c/test/posix_captures/repetition/55.i.re differ
diff --git a/re2c/test/posix_captures/repetition/56.i.c b/re2c/test/posix_captures/repetition/56.i.c
new file mode 100644 (file)
index 0000000..e050880
--- /dev/null
@@ -0,0 +1,190 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 8) YYFILL(8);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'X':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy5;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       if (yyaccept == 0) {
+               goto yy2;
+       } else {
+               goto yy7;
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy9;
+       default:        goto yy8;
+       }
+yy6:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy9;
+       default:        goto yy8;
+       }
+yy7:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR - 1;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       default:        goto yy10;
+       }
+yy9:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       default:        goto yy10;
+       }
+yy10:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy13;
+       default:        goto yy12;
+       }
+yy11:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy13;
+       default:        goto yy12;
+       }
+yy12:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy15;
+       default:        goto yy14;
+       }
+yy13:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy15;
+       default:        goto yy14;
+       }
+yy14:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy18;
+       default:        goto yy17;
+       }
+yy15:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy18;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy16;
+       }
+yy16:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy17:
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy19;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy16;
+       }
+yy18:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy19;
+       default:        goto yy20;
+       }
+yy19:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy20:
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt3;
+               goto yy7;
+       case 'Y':
+               yyt3 = yyt2;
+               yyt2 = YYCURSOR;
+               goto yy19;
+       default:
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy16;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/56.i.re b/re2c/test/posix_captures/repetition/56.i.re
new file mode 100644 (file)
index 0000000..a922075
Binary files /dev/null and b/re2c/test/posix_captures/repetition/56.i.re differ
diff --git a/re2c/test/posix_captures/repetition/57.i.c b/re2c/test/posix_captures/repetition/57.i.c
new file mode 100644 (file)
index 0000000..11112dc
--- /dev/null
@@ -0,0 +1,209 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 9) YYFILL(9);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'X':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy5;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       if (yyaccept == 0) {
+               goto yy2;
+       } else {
+               goto yy7;
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy9;
+       default:        goto yy8;
+       }
+yy6:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy9;
+       default:        goto yy8;
+       }
+yy7:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR - 1;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       default:        goto yy10;
+       }
+yy9:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       default:        goto yy10;
+       }
+yy10:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy13;
+       default:        goto yy12;
+       }
+yy11:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy13;
+       default:        goto yy12;
+       }
+yy12:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy15;
+       default:        goto yy14;
+       }
+yy13:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy15;
+       default:        goto yy14;
+       }
+yy14:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy17;
+       default:        goto yy16;
+       }
+yy15:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy17;
+       default:        goto yy16;
+       }
+yy16:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy20;
+       default:        goto yy19;
+       }
+yy17:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy20;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy18;
+       }
+yy18:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy19:
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy21;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy18;
+       }
+yy20:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy21;
+       default:        goto yy22;
+       }
+yy21:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy22:
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt3;
+               goto yy7;
+       case 'Y':
+               yyt3 = yyt2;
+               yyt2 = YYCURSOR;
+               goto yy21;
+       default:
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy18;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/57.i.re b/re2c/test/posix_captures/repetition/57.i.re
new file mode 100644 (file)
index 0000000..50bbeba
Binary files /dev/null and b/re2c/test/posix_captures/repetition/57.i.re differ
diff --git a/re2c/test/posix_captures/repetition/58.i.c b/re2c/test/posix_captures/repetition/58.i.c
new file mode 100644 (file)
index 0000000..8ca5d07
--- /dev/null
@@ -0,0 +1,228 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 10) YYFILL(10);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'X':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy5;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       if (yyaccept == 0) {
+               goto yy2;
+       } else {
+               goto yy7;
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy9;
+       default:        goto yy8;
+       }
+yy6:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy9;
+       default:        goto yy8;
+       }
+yy7:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR - 1;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       default:        goto yy10;
+       }
+yy9:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       default:        goto yy10;
+       }
+yy10:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy13;
+       default:        goto yy12;
+       }
+yy11:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy13;
+       default:        goto yy12;
+       }
+yy12:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy15;
+       default:        goto yy14;
+       }
+yy13:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy15;
+       default:        goto yy14;
+       }
+yy14:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy17;
+       default:        goto yy16;
+       }
+yy15:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy17;
+       default:        goto yy16;
+       }
+yy16:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy19;
+       default:        goto yy18;
+       }
+yy17:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy19;
+       default:        goto yy18;
+       }
+yy18:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:        goto yy21;
+       }
+yy19:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy20;
+       }
+yy20:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy21:
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy23;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy20;
+       }
+yy22:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy23;
+       default:        goto yy24;
+       }
+yy23:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy24:
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt3;
+               goto yy7;
+       case 'Y':
+               yyt3 = yyt2;
+               yyt2 = YYCURSOR;
+               goto yy23;
+       default:
+               yyt2 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy20;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/58.i.re b/re2c/test/posix_captures/repetition/58.i.re
new file mode 100644 (file)
index 0000000..6199ad7
Binary files /dev/null and b/re2c/test/posix_captures/repetition/58.i.re differ
diff --git a/re2c/test/posix_captures/repetition/59.i.c b/re2c/test/posix_captures/repetition/59.i.c
new file mode 100644 (file)
index 0000000..71e40ad
--- /dev/null
@@ -0,0 +1,261 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 10) YYFILL(10);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'X':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy6;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy5;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       switch (yyaccept) {
+       case 0:         goto yy2;
+       case 1:         goto yy7;
+       case 2: 
+               yyt3 = yyt4;
+               goto yy7;
+       case 3: 
+               yyt3 = yyt5;
+               goto yy7;
+       case 4: 
+               yyt3 = yyt6;
+               goto yy7;
+       case 5: 
+               yyt3 = yyt7;
+               goto yy7;
+       default:
+               yyt3 = yyt8;
+               goto yy7;
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt4 = YYCURSOR;
+               goto yy8;
+       }
+yy6:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt4 = YYCURSOR;
+               goto yy8;
+       }
+yy7:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = yyt5 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt5 = YYCURSOR;
+               goto yy10;
+       }
+yy9:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = yyt5 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt5 = YYCURSOR;
+               goto yy10;
+       }
+yy10:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = yyt6 = YYCURSOR;
+               goto yy13;
+       default:
+               yyt6 = YYCURSOR;
+               goto yy12;
+       }
+yy11:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:
+               yyt3 = yyt4;
+               goto yy7;
+       case 'Y':
+               yyt2 = yyt6 = YYCURSOR;
+               goto yy13;
+       default:
+               yyt6 = YYCURSOR;
+               goto yy12;
+       }
+yy12:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = yyt7 = YYCURSOR;
+               goto yy15;
+       default:
+               yyt7 = YYCURSOR;
+               goto yy14;
+       }
+yy13:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:
+               yyt3 = yyt5;
+               goto yy7;
+       case 'Y':
+               yyt2 = yyt7 = YYCURSOR;
+               goto yy15;
+       default:
+               yyt7 = YYCURSOR;
+               goto yy14;
+       }
+yy14:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = yyt8 = YYCURSOR;
+               goto yy17;
+       default:
+               yyt8 = YYCURSOR;
+               goto yy16;
+       }
+yy15:
+       yyaccept = 4;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:
+               yyt3 = yyt6;
+               goto yy7;
+       case 'Y':
+               yyt2 = yyt8 = YYCURSOR;
+               goto yy17;
+       default:
+               yyt8 = YYCURSOR;
+               goto yy16;
+       }
+yy16:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = yyt9 = YYCURSOR;
+               goto yy19;
+       default:
+               yyt9 = YYCURSOR;
+               goto yy18;
+       }
+yy17:
+       yyaccept = 5;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:
+               yyt3 = yyt7;
+               goto yy7;
+       case 'Y':
+               yyt2 = yyt9 = YYCURSOR;
+               goto yy19;
+       default:
+               yyt9 = YYCURSOR;
+               goto yy18;
+       }
+yy18:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = yyt10 = YYCURSOR;
+               goto yy21;
+       default:
+               yyt10 = YYCURSOR;
+               goto yy20;
+       }
+yy19:
+       yyaccept = 6;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:
+               yyt3 = yyt8;
+               goto yy7;
+       case 'Y':
+               yyt2 = yyt10 = YYCURSOR;
+               goto yy21;
+       default:
+               yyt10 = YYCURSOR;
+               goto yy20;
+       }
+yy20:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy22;
+       default:        goto yy4;
+       }
+yy21:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt3 = yyt9;
+               goto yy7;
+       }
+yy22:
+       ++YYCURSOR;
+       yyt3 = yyt10;
+       goto yy7;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/59.i.re b/re2c/test/posix_captures/repetition/59.i.re
new file mode 100644 (file)
index 0000000..ce6b685
Binary files /dev/null and b/re2c/test/posix_captures/repetition/59.i.re differ
diff --git a/re2c/test/posix_captures/repetition/60.i.c b/re2c/test/posix_captures/repetition/60.i.c
new file mode 100644 (file)
index 0000000..03a4907
--- /dev/null
@@ -0,0 +1,257 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 10) YYFILL(10);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'X':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:
+               yyt2 = YYCURSOR;
+               goto yy5;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       switch (yyaccept) {
+       case 0:         goto yy2;
+       case 1:         goto yy7;
+       case 2: 
+               yyt2 = yyt3;
+               goto yy7;
+       case 3: 
+               yyt2 = yyt4;
+               goto yy7;
+       case 4: 
+               yyt2 = yyt5;
+               goto yy7;
+       case 5: 
+               yyt2 = yyt6;
+               goto yy7;
+       default:
+               yyt2 = yyt7;
+               goto yy7;
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy6:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy7:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR - 1;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt4 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt4 = YYCURSOR;
+               goto yy10;
+       }
+yy9:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt4 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt4 = YYCURSOR;
+               goto yy10;
+       }
+yy10:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt5 = YYCURSOR;
+               goto yy13;
+       default:
+               yyt5 = YYCURSOR;
+               goto yy12;
+       }
+yy11:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt3;
+               goto yy7;
+       case 'Y':
+               yyt5 = YYCURSOR;
+               goto yy13;
+       default:
+               yyt5 = YYCURSOR;
+               goto yy12;
+       }
+yy12:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt6 = YYCURSOR;
+               goto yy15;
+       default:
+               yyt6 = YYCURSOR;
+               goto yy14;
+       }
+yy13:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt4;
+               goto yy7;
+       case 'Y':
+               yyt6 = YYCURSOR;
+               goto yy15;
+       default:
+               yyt6 = YYCURSOR;
+               goto yy14;
+       }
+yy14:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt7 = YYCURSOR;
+               goto yy17;
+       default:
+               yyt7 = YYCURSOR;
+               goto yy16;
+       }
+yy15:
+       yyaccept = 4;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt5;
+               goto yy7;
+       case 'Y':
+               yyt7 = YYCURSOR;
+               goto yy17;
+       default:
+               yyt7 = YYCURSOR;
+               goto yy16;
+       }
+yy16:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt8 = YYCURSOR;
+               goto yy19;
+       default:
+               yyt8 = YYCURSOR;
+               goto yy18;
+       }
+yy17:
+       yyaccept = 5;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt6;
+               goto yy7;
+       case 'Y':
+               yyt8 = YYCURSOR;
+               goto yy19;
+       default:
+               yyt8 = YYCURSOR;
+               goto yy18;
+       }
+yy18:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt9 = YYCURSOR;
+               goto yy21;
+       default:
+               yyt9 = YYCURSOR;
+               goto yy20;
+       }
+yy19:
+       yyaccept = 6;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt7;
+               goto yy7;
+       case 'Y':
+               yyt9 = YYCURSOR;
+               goto yy21;
+       default:
+               yyt9 = YYCURSOR;
+               goto yy20;
+       }
+yy20:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'Y':       goto yy22;
+       default:        goto yy4;
+       }
+yy21:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'Y':       goto yy22;
+       default:
+               yyt2 = yyt8;
+               goto yy7;
+       }
+yy22:
+       ++YYCURSOR;
+       yyt2 = yyt9;
+       goto yy7;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/60.i.re b/re2c/test/posix_captures/repetition/60.i.re
new file mode 100644 (file)
index 0000000..9edf58b
Binary files /dev/null and b/re2c/test/posix_captures/repetition/60.i.re differ
diff --git a/re2c/test/posix_captures/repetition/61.i.c b/re2c/test/posix_captures/repetition/61.i.c
new file mode 100644 (file)
index 0000000..5263c66
--- /dev/null
@@ -0,0 +1,257 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 10) YYFILL(10);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'X':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy5;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       switch (yyaccept) {
+       case 0:         goto yy2;
+       case 1:         goto yy7;
+       case 2: 
+               yyt2 = yyt3;
+               goto yy7;
+       case 3: 
+               yyt2 = yyt4;
+               goto yy7;
+       case 4: 
+               yyt2 = yyt5;
+               goto yy7;
+       case 5: 
+               yyt2 = yyt6;
+               goto yy7;
+       default:
+               yyt2 = yyt7;
+               goto yy7;
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy6:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy7:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR - 1;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt4 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt4 = YYCURSOR;
+               goto yy10;
+       }
+yy9:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt3;
+               goto yy7;
+       case 'Y':
+               yyt4 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt4 = YYCURSOR;
+               goto yy10;
+       }
+yy10:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt5 = YYCURSOR;
+               goto yy13;
+       default:
+               yyt5 = YYCURSOR;
+               goto yy12;
+       }
+yy11:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt3;
+               goto yy7;
+       case 'Y':
+               yyt5 = YYCURSOR;
+               goto yy13;
+       default:
+               yyt5 = YYCURSOR;
+               goto yy12;
+       }
+yy12:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt6 = YYCURSOR;
+               goto yy15;
+       default:
+               yyt6 = YYCURSOR;
+               goto yy14;
+       }
+yy13:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt4;
+               goto yy7;
+       case 'Y':
+               yyt6 = YYCURSOR;
+               goto yy15;
+       default:
+               yyt6 = YYCURSOR;
+               goto yy14;
+       }
+yy14:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt7 = YYCURSOR;
+               goto yy17;
+       default:
+               yyt7 = YYCURSOR;
+               goto yy16;
+       }
+yy15:
+       yyaccept = 4;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt5;
+               goto yy7;
+       case 'Y':
+               yyt7 = YYCURSOR;
+               goto yy17;
+       default:
+               yyt7 = YYCURSOR;
+               goto yy16;
+       }
+yy16:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt8 = YYCURSOR;
+               goto yy19;
+       default:
+               yyt8 = YYCURSOR;
+               goto yy18;
+       }
+yy17:
+       yyaccept = 5;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt6;
+               goto yy7;
+       case 'Y':
+               yyt8 = YYCURSOR;
+               goto yy19;
+       default:
+               yyt8 = YYCURSOR;
+               goto yy18;
+       }
+yy18:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt9 = YYCURSOR;
+               goto yy21;
+       default:
+               yyt9 = YYCURSOR;
+               goto yy20;
+       }
+yy19:
+       yyaccept = 6;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt7;
+               goto yy7;
+       case 'Y':
+               yyt9 = YYCURSOR;
+               goto yy21;
+       default:
+               yyt9 = YYCURSOR;
+               goto yy20;
+       }
+yy20:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'Y':       goto yy22;
+       default:        goto yy4;
+       }
+yy21:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'Y':       goto yy22;
+       default:
+               yyt2 = yyt8;
+               goto yy7;
+       }
+yy22:
+       ++YYCURSOR;
+       yyt2 = yyt9;
+       goto yy7;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/61.i.re b/re2c/test/posix_captures/repetition/61.i.re
new file mode 100644 (file)
index 0000000..6540264
Binary files /dev/null and b/re2c/test/posix_captures/repetition/61.i.re differ
diff --git a/re2c/test/posix_captures/repetition/62.i.c b/re2c/test/posix_captures/repetition/62.i.c
new file mode 100644 (file)
index 0000000..939ee1f
--- /dev/null
@@ -0,0 +1,248 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 10) YYFILL(10);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'X':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy5;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       switch (yyaccept) {
+       case 0:         goto yy2;
+       case 1:         goto yy7;
+       case 2: 
+               yyt2 = yyt3;
+               goto yy7;
+       case 3: 
+               yyt2 = yyt4;
+               goto yy7;
+       case 4: 
+               yyt2 = yyt5;
+               goto yy7;
+       default:
+               yyt2 = yyt6;
+               goto yy7;
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy9;
+       default:        goto yy8;
+       }
+yy6:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy9;
+       default:        goto yy8;
+       }
+yy7:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR - 1;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy10;
+       }
+yy9:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy10;
+       }
+yy10:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt4 = YYCURSOR;
+               goto yy13;
+       default:
+               yyt4 = YYCURSOR;
+               goto yy12;
+       }
+yy11:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt3;
+               goto yy7;
+       case 'Y':
+               yyt4 = YYCURSOR;
+               goto yy13;
+       default:
+               yyt4 = YYCURSOR;
+               goto yy12;
+       }
+yy12:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt5 = YYCURSOR;
+               goto yy15;
+       default:
+               yyt5 = YYCURSOR;
+               goto yy14;
+       }
+yy13:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt3;
+               goto yy7;
+       case 'Y':
+               yyt5 = YYCURSOR;
+               goto yy15;
+       default:
+               yyt5 = YYCURSOR;
+               goto yy14;
+       }
+yy14:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt6 = YYCURSOR;
+               goto yy17;
+       default:
+               yyt6 = YYCURSOR;
+               goto yy16;
+       }
+yy15:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt4;
+               goto yy7;
+       case 'Y':
+               yyt6 = YYCURSOR;
+               goto yy17;
+       default:
+               yyt6 = YYCURSOR;
+               goto yy16;
+       }
+yy16:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt7 = YYCURSOR;
+               goto yy19;
+       default:
+               yyt7 = YYCURSOR;
+               goto yy18;
+       }
+yy17:
+       yyaccept = 4;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt5;
+               goto yy7;
+       case 'Y':
+               yyt7 = YYCURSOR;
+               goto yy19;
+       default:
+               yyt7 = YYCURSOR;
+               goto yy18;
+       }
+yy18:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt8 = YYCURSOR;
+               goto yy21;
+       default:
+               yyt8 = YYCURSOR;
+               goto yy20;
+       }
+yy19:
+       yyaccept = 5;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt6;
+               goto yy7;
+       case 'Y':
+               yyt8 = YYCURSOR;
+               goto yy21;
+       default:
+               yyt8 = YYCURSOR;
+               goto yy20;
+       }
+yy20:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'Y':       goto yy22;
+       default:        goto yy4;
+       }
+yy21:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'Y':       goto yy22;
+       default:
+               yyt2 = yyt7;
+               goto yy7;
+       }
+yy22:
+       ++YYCURSOR;
+       yyt2 = yyt8;
+       goto yy7;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/62.i.re b/re2c/test/posix_captures/repetition/62.i.re
new file mode 100644 (file)
index 0000000..96bf479
Binary files /dev/null and b/re2c/test/posix_captures/repetition/62.i.re differ
diff --git a/re2c/test/posix_captures/repetition/63.i.c b/re2c/test/posix_captures/repetition/63.i.c
new file mode 100644 (file)
index 0000000..79db53b
--- /dev/null
@@ -0,0 +1,239 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 10) YYFILL(10);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'X':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy5;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       switch (yyaccept) {
+       case 0:         goto yy2;
+       case 1:         goto yy7;
+       case 2: 
+               yyt2 = yyt3;
+               goto yy7;
+       case 3: 
+               yyt2 = yyt4;
+               goto yy7;
+       default:
+               yyt2 = yyt5;
+               goto yy7;
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy9;
+       default:        goto yy8;
+       }
+yy6:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy9;
+       default:        goto yy8;
+       }
+yy7:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR - 1;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       default:        goto yy10;
+       }
+yy9:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       default:        goto yy10;
+       }
+yy10:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy13;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy12;
+       }
+yy11:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy13;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy12;
+       }
+yy12:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt4 = YYCURSOR;
+               goto yy15;
+       default:
+               yyt4 = YYCURSOR;
+               goto yy14;
+       }
+yy13:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt3;
+               goto yy7;
+       case 'Y':
+               yyt4 = YYCURSOR;
+               goto yy15;
+       default:
+               yyt4 = YYCURSOR;
+               goto yy14;
+       }
+yy14:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt5 = YYCURSOR;
+               goto yy17;
+       default:
+               yyt5 = YYCURSOR;
+               goto yy16;
+       }
+yy15:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt3;
+               goto yy7;
+       case 'Y':
+               yyt5 = YYCURSOR;
+               goto yy17;
+       default:
+               yyt5 = YYCURSOR;
+               goto yy16;
+       }
+yy16:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt6 = YYCURSOR;
+               goto yy19;
+       default:
+               yyt6 = YYCURSOR;
+               goto yy18;
+       }
+yy17:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt4;
+               goto yy7;
+       case 'Y':
+               yyt6 = YYCURSOR;
+               goto yy19;
+       default:
+               yyt6 = YYCURSOR;
+               goto yy18;
+       }
+yy18:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt7 = YYCURSOR;
+               goto yy21;
+       default:
+               yyt7 = YYCURSOR;
+               goto yy20;
+       }
+yy19:
+       yyaccept = 4;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt5;
+               goto yy7;
+       case 'Y':
+               yyt7 = YYCURSOR;
+               goto yy21;
+       default:
+               yyt7 = YYCURSOR;
+               goto yy20;
+       }
+yy20:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'Y':       goto yy22;
+       default:        goto yy4;
+       }
+yy21:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'Y':       goto yy22;
+       default:
+               yyt2 = yyt6;
+               goto yy7;
+       }
+yy22:
+       ++YYCURSOR;
+       yyt2 = yyt7;
+       goto yy7;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/63.i.re b/re2c/test/posix_captures/repetition/63.i.re
new file mode 100644 (file)
index 0000000..ce6776b
Binary files /dev/null and b/re2c/test/posix_captures/repetition/63.i.re differ
diff --git a/re2c/test/posix_captures/repetition/64.i.c b/re2c/test/posix_captures/repetition/64.i.c
new file mode 100644 (file)
index 0000000..9a77ab9
--- /dev/null
@@ -0,0 +1,230 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 10) YYFILL(10);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'X':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy5;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       switch (yyaccept) {
+       case 0:         goto yy2;
+       case 1:         goto yy7;
+       case 2: 
+               yyt2 = yyt3;
+               goto yy7;
+       default:
+               yyt2 = yyt4;
+               goto yy7;
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy9;
+       default:        goto yy8;
+       }
+yy6:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy9;
+       default:        goto yy8;
+       }
+yy7:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR - 1;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       default:        goto yy10;
+       }
+yy9:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       default:        goto yy10;
+       }
+yy10:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy13;
+       default:        goto yy12;
+       }
+yy11:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy13;
+       default:        goto yy12;
+       }
+yy12:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy15;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy14;
+       }
+yy13:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy15;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy14;
+       }
+yy14:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt4 = YYCURSOR;
+               goto yy17;
+       default:
+               yyt4 = YYCURSOR;
+               goto yy16;
+       }
+yy15:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt3;
+               goto yy7;
+       case 'Y':
+               yyt4 = YYCURSOR;
+               goto yy17;
+       default:
+               yyt4 = YYCURSOR;
+               goto yy16;
+       }
+yy16:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt5 = YYCURSOR;
+               goto yy19;
+       default:
+               yyt5 = YYCURSOR;
+               goto yy18;
+       }
+yy17:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt3;
+               goto yy7;
+       case 'Y':
+               yyt5 = YYCURSOR;
+               goto yy19;
+       default:
+               yyt5 = YYCURSOR;
+               goto yy18;
+       }
+yy18:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt6 = YYCURSOR;
+               goto yy21;
+       default:
+               yyt6 = YYCURSOR;
+               goto yy20;
+       }
+yy19:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt4;
+               goto yy7;
+       case 'Y':
+               yyt6 = YYCURSOR;
+               goto yy21;
+       default:
+               yyt6 = YYCURSOR;
+               goto yy20;
+       }
+yy20:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'Y':       goto yy22;
+       default:        goto yy4;
+       }
+yy21:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'Y':       goto yy22;
+       default:
+               yyt2 = yyt5;
+               goto yy7;
+       }
+yy22:
+       ++YYCURSOR;
+       yyt2 = yyt6;
+       goto yy7;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/64.i.re b/re2c/test/posix_captures/repetition/64.i.re
new file mode 100644 (file)
index 0000000..0017194
Binary files /dev/null and b/re2c/test/posix_captures/repetition/64.i.re differ
diff --git a/re2c/test/posix_captures/repetition/65.i.c b/re2c/test/posix_captures/repetition/65.i.c
new file mode 100644 (file)
index 0000000..e51c24e
--- /dev/null
@@ -0,0 +1,221 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 10) YYFILL(10);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'X':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy5;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       switch (yyaccept) {
+       case 0:         goto yy2;
+       case 1:         goto yy7;
+       default:
+               yyt2 = yyt3;
+               goto yy7;
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy9;
+       default:        goto yy8;
+       }
+yy6:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy9;
+       default:        goto yy8;
+       }
+yy7:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR - 1;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       default:        goto yy10;
+       }
+yy9:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       default:        goto yy10;
+       }
+yy10:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy13;
+       default:        goto yy12;
+       }
+yy11:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy13;
+       default:        goto yy12;
+       }
+yy12:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy15;
+       default:        goto yy14;
+       }
+yy13:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy15;
+       default:        goto yy14;
+       }
+yy14:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy17;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy16;
+       }
+yy15:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy17;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy16;
+       }
+yy16:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt4 = YYCURSOR;
+               goto yy19;
+       default:
+               yyt4 = YYCURSOR;
+               goto yy18;
+       }
+yy17:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt3;
+               goto yy7;
+       case 'Y':
+               yyt4 = YYCURSOR;
+               goto yy19;
+       default:
+               yyt4 = YYCURSOR;
+               goto yy18;
+       }
+yy18:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt5 = YYCURSOR;
+               goto yy21;
+       default:
+               yyt5 = YYCURSOR;
+               goto yy20;
+       }
+yy19:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt3;
+               goto yy7;
+       case 'Y':
+               yyt5 = YYCURSOR;
+               goto yy21;
+       default:
+               yyt5 = YYCURSOR;
+               goto yy20;
+       }
+yy20:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'Y':       goto yy22;
+       default:        goto yy4;
+       }
+yy21:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'Y':       goto yy22;
+       default:
+               yyt2 = yyt4;
+               goto yy7;
+       }
+yy22:
+       ++YYCURSOR;
+       yyt2 = yyt5;
+       goto yy7;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/65.i.re b/re2c/test/posix_captures/repetition/65.i.re
new file mode 100644 (file)
index 0000000..ee2f728
Binary files /dev/null and b/re2c/test/posix_captures/repetition/65.i.re differ
diff --git a/re2c/test/posix_captures/repetition/66.i.c b/re2c/test/posix_captures/repetition/66.i.c
new file mode 100644 (file)
index 0000000..3077b8c
--- /dev/null
@@ -0,0 +1,215 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 10) YYFILL(10);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'X':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy5;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       switch (yyaccept) {
+       case 0:         goto yy2;
+       case 1:         goto yy7;
+       default:
+               yyt2 = yyt3;
+               goto yy7;
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy9;
+       default:        goto yy8;
+       }
+yy6:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy9;
+       default:        goto yy8;
+       }
+yy7:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR - 1;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       default:        goto yy10;
+       }
+yy9:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       default:        goto yy10;
+       }
+yy10:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy13;
+       default:        goto yy12;
+       }
+yy11:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy13;
+       default:        goto yy12;
+       }
+yy12:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy15;
+       default:        goto yy14;
+       }
+yy13:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy15;
+       default:        goto yy14;
+       }
+yy14:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy17;
+       default:        goto yy16;
+       }
+yy15:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy17;
+       default:        goto yy16;
+       }
+yy16:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy19;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy18;
+       }
+yy17:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy19;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy18;
+       }
+yy18:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt4 = YYCURSOR;
+               goto yy21;
+       default:
+               yyt4 = YYCURSOR;
+               goto yy20;
+       }
+yy19:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:
+               yyt2 = yyt3;
+               goto yy7;
+       case 'Y':
+               yyt4 = YYCURSOR;
+               goto yy21;
+       default:
+               yyt4 = YYCURSOR;
+               goto yy20;
+       }
+yy20:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'Y':       goto yy22;
+       default:        goto yy4;
+       }
+yy21:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'Y':       goto yy22;
+       default:
+               yyt2 = yyt3;
+               goto yy7;
+       }
+yy22:
+       ++YYCURSOR;
+       yyt2 = yyt4;
+       goto yy7;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/66.i.re b/re2c/test/posix_captures/repetition/66.i.re
new file mode 100644 (file)
index 0000000..accc8c9
Binary files /dev/null and b/re2c/test/posix_captures/repetition/66.i.re differ
diff --git a/re2c/test/posix_captures/repetition/67.i.c b/re2c/test/posix_captures/repetition/67.i.c
new file mode 100644 (file)
index 0000000..f973207
--- /dev/null
@@ -0,0 +1,206 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 10) YYFILL(10);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'X':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy5;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       if (yyaccept == 0) {
+               goto yy2;
+       } else {
+               goto yy7;
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy9;
+       default:        goto yy8;
+       }
+yy6:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy9;
+       default:        goto yy8;
+       }
+yy7:
+       {
+               const size_t yynmatch = 2;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = YYCURSOR - 1;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       default:        goto yy10;
+       }
+yy9:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       default:        goto yy10;
+       }
+yy10:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy13;
+       default:        goto yy12;
+       }
+yy11:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy13;
+       default:        goto yy12;
+       }
+yy12:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy15;
+       default:        goto yy14;
+       }
+yy13:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy15;
+       default:        goto yy14;
+       }
+yy14:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy17;
+       default:        goto yy16;
+       }
+yy15:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy17;
+       default:        goto yy16;
+       }
+yy16:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy19;
+       default:        goto yy18;
+       }
+yy17:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt2 = YYCURSOR;
+               goto yy19;
+       default:        goto yy18;
+       }
+yy18:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 0x00:      goto yy4;
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy21;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy20;
+       }
+yy19:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 0x00:      goto yy7;
+       case 'Y':
+               yyt3 = YYCURSOR;
+               goto yy21;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy20;
+       }
+yy20:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'Y':       goto yy22;
+       default:        goto yy4;
+       }
+yy21:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'Y':       goto yy22;
+       default:
+               yyt2 = yyt3;
+               goto yy7;
+       }
+yy22:
+       ++YYCURSOR;
+       yyt2 = yyt3;
+       goto yy7;
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/67.i.re b/re2c/test/posix_captures/repetition/67.i.re
new file mode 100644 (file)
index 0000000..4d26ddd
Binary files /dev/null and b/re2c/test/posix_captures/repetition/67.i.re differ
diff --git a/re2c/test/posix_captures/repetition/68.i.c b/re2c/test/posix_captures/repetition/68.i.c
new file mode 100644 (file)
index 0000000..6ab7d03
--- /dev/null
@@ -0,0 +1,172 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt5 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt5 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt1 = yyt5 = YYCURSOR;
+               goto yy7;
+       case 'd':
+               yyt2 = yyt5 = NULL;
+               yyt1 = yyt4 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt2 = yyt3 = NULL;
+               yyt1 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[4] = yyt4;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt5 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       case 'c':
+               yyt5 = YYCURSOR;
+               goto yy7;
+       case 'd':
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt3 = yyt5;
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy5:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy12;
+       default:        goto yy6;
+       }
+yy6:
+       YYCURSOR = YYMARKER;
+       if (yyaccept == 0) {
+               yyt2 = yyt3 = NULL;
+               yyt1 = yyt4 = YYCURSOR;
+               goto yy2;
+       } else {
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy7:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt5 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = yyt5;
+               yyt5 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt5 = YYCURSOR;
+               goto yy7;
+       case 'd':
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt3 = yyt5;
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy9:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy9;
+       default:
+               yyt3 = yyt5;
+               goto yy2;
+       }
+yy11:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt5 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = yyt5;
+               yyt5 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy13;
+       case 'd':
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt3 = yyt5;
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy12:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy7;
+       default:        goto yy6;
+       }
+yy13:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt5 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt5 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt5 = YYCURSOR;
+               goto yy7;
+       case 'd':
+               yyt5 = yyt2;
+               goto yy7;
+       default:
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/repetition/68.i.re b/re2c/test/posix_captures/repetition/68.i.re
new file mode 100644 (file)
index 0000000..1170cce
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a|ab|c|bcd){0,}(d*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/repetition/69.i.c b/re2c/test/posix_captures/repetition/69.i.c
new file mode 100644 (file)
index 0000000..51b6f31
--- /dev/null
@@ -0,0 +1,169 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy6;
+       case 'c':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy8;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy10;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy8;
+       case 'd':
+               yyt4 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt3 = yyt1;
+               yyt4 = YYCURSOR;
+               goto yy5;
+       }
+yy5:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt2;
+               yypmatch[4] = yyt4;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               yypmatch[3] = yyt4;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy6:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy13;
+       default:        goto yy7;
+       }
+yy7:
+       YYCURSOR = YYMARKER;
+       if (yyaccept == 0) {
+               goto yy2;
+       } else {
+               yyt4 = YYCURSOR;
+               goto yy5;
+       }
+yy8:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = yyt1;
+               yyt1 = YYCURSOR;
+               goto yy6;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy8;
+       case 'd':
+               yyt4 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt3 = yyt1;
+               yyt4 = YYCURSOR;
+               goto yy5;
+       }
+yy10:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = yyt1;
+               yyt1 = YYCURSOR;
+               goto yy6;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy14;
+       case 'd':
+               yyt4 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt3 = yyt1;
+               yyt4 = YYCURSOR;
+               goto yy5;
+       }
+yy11:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy11;
+       default:
+               yyt3 = yyt1;
+               goto yy5;
+       }
+yy13:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy8;
+       default:        goto yy7;
+       }
+yy14:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy8;
+       case 'd':
+               yyt1 = yyt4;
+               goto yy8;
+       default:
+               yyt4 = YYCURSOR;
+               goto yy5;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/69.i.re b/re2c/test/posix_captures/repetition/69.i.re
new file mode 100644 (file)
index 0000000..70097a0
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a|ab|c|bcd){1,}(d*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/repetition/70.i.c b/re2c/test/posix_captures/repetition/70.i.c
new file mode 100644 (file)
index 0000000..e5cee6d
--- /dev/null
@@ -0,0 +1,217 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy7;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy10;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       switch (yyaccept) {
+       case 0:         goto yy2;
+       case 1: 
+               yyt3 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt2 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy9;
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy13;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+       case 'b':
+       case 'c':       goto yy12;
+       default:        goto yy4;
+       }
+yy7:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy7;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy15;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy9;
+       }
+yy9:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[4] = yyt3;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = yyt3;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy10:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy7;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy14;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy18;
+       default:        goto yy4;
+       }
+yy11:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy12:
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy7;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy14;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy9;
+       }
+yy13:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:        goto yy4;
+       }
+yy14:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy19;
+       default:        goto yy4;
+       }
+yy15:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy7;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy14;
+       case 'c':
+               yyt2 = yyt3;
+               yyt4 = YYCURSOR;
+               goto yy18;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy9;
+       }
+yy16:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy16;
+       default:        goto yy9;
+       }
+yy18:
+       yyaccept = 2;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy7;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy14;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       case 'd':       goto yy11;
+       default:
+               yyt2 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy9;
+       }
+yy19:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'd':
+               yyt2 = yyt3;
+               goto yy11;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/70.i.re b/re2c/test/posix_captures/repetition/70.i.re
new file mode 100644 (file)
index 0000000..9e6be9e
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a|ab|c|bcd){2,}(d*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/repetition/71.i.c b/re2c/test/posix_captures/repetition/71.i.c
new file mode 100644 (file)
index 0000000..ebc20ae
--- /dev/null
@@ -0,0 +1,262 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       case 'b':       goto yy8;
+       case 'c':       goto yy9;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       switch (yyaccept) {
+       case 0:         goto yy2;
+       case 1: 
+               yyt3 = YYCURSOR;
+               goto yy14;
+       default:
+               yyt2 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy14;
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy10;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       case 'b':       goto yy11;
+       case 'c':       goto yy9;
+       default:        goto yy4;
+       }
+yy7:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy12;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy15;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy16;
+       default:        goto yy4;
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       case 'b':       goto yy11;
+       case 'c':       goto yy18;
+       default:        goto yy4;
+       }
+yy9:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+       case 'b':
+       case 'c':       goto yy17;
+       default:        goto yy4;
+       }
+yy10:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:        goto yy4;
+       }
+yy11:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy20;
+       default:        goto yy4;
+       }
+yy12:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy12;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy21;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy16;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy14;
+       }
+yy14:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[4] = yyt3;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = yyt3;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy15:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy12;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy19;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy24;
+       default:        goto yy4;
+       }
+yy16:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy17:
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy12;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy19;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy16;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy14;
+       }
+yy18:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+       case 'b':
+       case 'c':       goto yy17;
+       case 'd':       goto yy9;
+       default:        goto yy4;
+       }
+yy19:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy25;
+       default:        goto yy4;
+       }
+yy20:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy9;
+       default:        goto yy4;
+       }
+yy21:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy12;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy19;
+       case 'c':
+               yyt2 = yyt3;
+               yyt4 = YYCURSOR;
+               goto yy24;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy14;
+       }
+yy22:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy22;
+       default:        goto yy14;
+       }
+yy24:
+       yyaccept = 2;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy12;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy19;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy16;
+       case 'd':       goto yy16;
+       default:
+               yyt2 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy14;
+       }
+yy25:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'd':
+               yyt2 = yyt3;
+               goto yy16;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/71.i.re b/re2c/test/posix_captures/repetition/71.i.re
new file mode 100644 (file)
index 0000000..2aff0a9
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a|ab|c|bcd){3,}(d*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/repetition/72.i.c b/re2c/test/posix_captures/repetition/72.i.c
new file mode 100644 (file)
index 0000000..ac9afb3
--- /dev/null
@@ -0,0 +1,307 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 10) YYFILL(10);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       case 'b':       goto yy8;
+       case 'c':       goto yy9;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       switch (yyaccept) {
+       case 0:         goto yy2;
+       case 1: 
+               yyt3 = YYCURSOR;
+               goto yy20;
+       default:
+               yyt2 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy20;
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy10;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       case 'b':       goto yy11;
+       case 'c':       goto yy9;
+       default:        goto yy4;
+       }
+yy7:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy12;
+       case 'b':       goto yy13;
+       case 'c':       goto yy14;
+       default:        goto yy4;
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       case 'b':       goto yy11;
+       case 'c':       goto yy15;
+       default:        goto yy4;
+       }
+yy9:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy12;
+       case 'b':       goto yy16;
+       case 'c':       goto yy14;
+       default:        goto yy4;
+       }
+yy10:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:        goto yy4;
+       }
+yy11:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy17;
+       default:        goto yy4;
+       }
+yy12:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy18;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy21;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy22;
+       default:        goto yy4;
+       }
+yy13:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy12;
+       case 'b':       goto yy16;
+       case 'c':       goto yy24;
+       default:        goto yy4;
+       }
+yy14:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+       case 'b':
+       case 'c':       goto yy23;
+       default:        goto yy4;
+       }
+yy15:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy12;
+       case 'b':       goto yy16;
+       case 'c':       goto yy14;
+       case 'd':       goto yy9;
+       default:        goto yy4;
+       }
+yy16:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy26;
+       default:        goto yy4;
+       }
+yy17:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy9;
+       default:        goto yy4;
+       }
+yy18:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy18;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy27;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy22;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy28;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy20;
+       }
+yy20:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[4] = yyt3;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = yyt3;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy21:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy18;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy25;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy30;
+       default:        goto yy4;
+       }
+yy22:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy23:
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy18;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy25;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy22;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy28;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy20;
+       }
+yy24:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+       case 'b':
+       case 'c':       goto yy23;
+       case 'd':       goto yy14;
+       default:        goto yy4;
+       }
+yy25:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy31;
+       default:        goto yy4;
+       }
+yy26:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy14;
+       default:        goto yy4;
+       }
+yy27:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy18;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy25;
+       case 'c':
+               yyt2 = yyt3;
+               yyt4 = YYCURSOR;
+               goto yy30;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy28;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy20;
+       }
+yy28:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy28;
+       default:        goto yy20;
+       }
+yy30:
+       yyaccept = 2;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy18;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy25;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy22;
+       case 'd':       goto yy22;
+       default:
+               yyt2 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy20;
+       }
+yy31:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'd':
+               yyt2 = yyt3;
+               goto yy22;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/72.i.re b/re2c/test/posix_captures/repetition/72.i.re
new file mode 100644 (file)
index 0000000..e272a8c
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a|ab|c|bcd){4,}(d*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/repetition/73.i.c b/re2c/test/posix_captures/repetition/73.i.c
new file mode 100644 (file)
index 0000000..4761ebe
--- /dev/null
@@ -0,0 +1,925 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 31) YYFILL(31);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt4 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt4 = YYCURSOR;
+               goto yy4;
+       case 'c':
+               yyt1 = yyt4 = YYCURSOR;
+               goto yy6;
+       case 'd':
+               yyt2 = yyt4 = NULL;
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt2 = yyt4 = NULL;
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[4] = yyt3;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt4;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy9;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy10;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       case 'd':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy4:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy12;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       switch (yyaccept) {
+       case 0: 
+               yyt2 = yyt4 = NULL;
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy2;
+       case 1: 
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       case 2: 
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       default:
+               yyt4 = yyt3;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy6:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy9;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy13;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       case 'd':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy7:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy8:
+       switch (yych) {
+       case 'd':       goto yy7;
+       default:        goto yy2;
+       }
+yy9:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy14;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy15;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy16;
+       case 'd':
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy10:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy9;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy13;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy17;
+       case 'd':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy11:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy14;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy18;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy16;
+       case 'd':
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy12:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:        goto yy5;
+       }
+yy13:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy19;
+       default:        goto yy5;
+       }
+yy14:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy20;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy21;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy22;
+       case 'd':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy15:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy14;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy18;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy23;
+       case 'd':
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy16:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy20;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy24;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy22;
+       case 'd':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy17:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy14;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy18;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy16;
+       case 'd':       goto yy11;
+       default:
+               yyt4 = yyt3;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy18:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy25;
+       default:        goto yy5;
+       }
+yy19:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy11;
+       default:        goto yy5;
+       }
+yy20:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy26;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy27;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy28;
+       case 'd':
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy21:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy20;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy24;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy29;
+       case 'd':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy22:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy26;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy30;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy28;
+       case 'd':
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy23:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy20;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy24;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy22;
+       case 'd':       goto yy16;
+       default:
+               yyt4 = yyt3;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy24:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy31;
+       default:        goto yy5;
+       }
+yy25:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy16;
+       default:        goto yy5;
+       }
+yy26:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy32;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy33;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy34;
+       case 'd':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy27:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy26;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy30;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy35;
+       case 'd':
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy28:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy32;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy36;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy34;
+       case 'd':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy29:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy26;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy30;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy28;
+       case 'd':       goto yy22;
+       default:
+               yyt4 = yyt3;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy30:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy37;
+       default:        goto yy5;
+       }
+yy31:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy22;
+       default:        goto yy5;
+       }
+yy32:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy38;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy39;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy40;
+       case 'd':
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy33:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy32;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy36;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy41;
+       case 'd':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy34:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy38;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy42;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy40;
+       case 'd':
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy35:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy32;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy36;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy34;
+       case 'd':       goto yy28;
+       default:
+               yyt4 = yyt3;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy36:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy43;
+       default:        goto yy5;
+       }
+yy37:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy28;
+       default:        goto yy5;
+       }
+yy38:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy44;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy45;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy46;
+       case 'd':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy39:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy38;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy42;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy47;
+       case 'd':
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy40:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy44;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy48;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy46;
+       case 'd':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy41:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy38;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy42;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy40;
+       case 'd':       goto yy34;
+       default:
+               yyt4 = yyt3;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy42:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy49;
+       default:        goto yy5;
+       }
+yy43:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy34;
+       default:        goto yy5;
+       }
+yy44:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy50;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy51;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy52;
+       case 'd':
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy45:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy44;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy48;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy53;
+       case 'd':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy46:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy50;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy54;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy52;
+       case 'd':
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy47:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy44;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy48;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy46;
+       case 'd':       goto yy40;
+       default:
+               yyt4 = yyt3;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy48:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy55;
+       default:        goto yy5;
+       }
+yy49:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy40;
+       default:        goto yy5;
+       }
+yy50:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy56;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy57;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy58;
+       case 'd':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy51:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy50;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy54;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy59;
+       case 'd':
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy52:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy56;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy60;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy58;
+       case 'd':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy53:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy50;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy54;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy52;
+       case 'd':       goto yy46;
+       default:
+               yyt4 = yyt3;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy54:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy61;
+       default:        goto yy5;
+       }
+yy55:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy46;
+       default:        goto yy5;
+       }
+yy56:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy58;
+       case 'd':
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy57:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy56;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy60;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy62;
+       case 'd':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy58:
+       yych = *++YYCURSOR;
+       yyt4 = yyt2;
+       yyt2 = yyt3 = YYCURSOR;
+       goto yy8;
+yy59:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy56;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy60;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy58;
+       case 'd':       goto yy52;
+       default:
+               yyt4 = yyt3;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy60:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy63;
+       default:        goto yy5;
+       }
+yy61:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy52;
+       default:        goto yy5;
+       }
+yy62:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy58;
+       default:
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy63:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy58;
+       default:        goto yy5;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/repetition/73.i.re b/re2c/test/posix_captures/repetition/73.i.re
new file mode 100644 (file)
index 0000000..d920cd1
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a|ab|c|bcd){0,10}(d*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/repetition/74.i.c b/re2c/test/posix_captures/repetition/74.i.c
new file mode 100644 (file)
index 0000000..9e5af63
--- /dev/null
@@ -0,0 +1,821 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 31) YYFILL(31);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy7;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy8;
+       case 'b':       goto yy9;
+       case 'c':       goto yy10;
+       default:        goto yy12;
+       }
+yy4:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt2;
+               yypmatch[4] = yyt3;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               yypmatch[3] = yyt3;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy13;
+       default:        goto yy6;
+       }
+yy6:
+       YYCURSOR = YYMARKER;
+       switch (yyaccept) {
+       case 0:         goto yy2;
+       case 1: 
+               yyt3 = YYCURSOR;
+               goto yy4;
+       case 2: 
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy7:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy8;
+       case 'b':       goto yy14;
+       case 'c':       goto yy10;
+       default:        goto yy12;
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy15;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy16;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy17;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy9:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy8;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy14;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy18;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy10:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy15;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy19;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy17;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy11:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy12:
+       switch (yych) {
+       case 'd':       goto yy11;
+       default:        goto yy4;
+       }
+yy13:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy7;
+       default:        goto yy6;
+       }
+yy14:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy20;
+       default:        goto yy6;
+       }
+yy15:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy21;
+       case 'b':       goto yy22;
+       case 'c':       goto yy23;
+       default:        goto yy12;
+       }
+yy16:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy15;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy19;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy24;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy17:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy21;
+       case 'b':       goto yy25;
+       case 'c':       goto yy23;
+       default:        goto yy12;
+       }
+yy18:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy15;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy19;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy17;
+       case 'd':       goto yy10;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy19:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy26;
+       default:        goto yy6;
+       }
+yy20:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy10;
+       default:        goto yy6;
+       }
+yy21:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy27;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy28;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy29;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy22:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy21;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy25;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy30;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy23:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy27;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy31;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy29;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy24:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy21;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy25;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy23;
+       case 'd':       goto yy17;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy25:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy32;
+       default:        goto yy6;
+       }
+yy26:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy17;
+       default:        goto yy6;
+       }
+yy27:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy33;
+       case 'b':       goto yy34;
+       case 'c':       goto yy35;
+       default:        goto yy12;
+       }
+yy28:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy27;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy31;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy36;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy29:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy33;
+       case 'b':       goto yy37;
+       case 'c':       goto yy35;
+       default:        goto yy12;
+       }
+yy30:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy27;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy31;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy29;
+       case 'd':       goto yy23;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy31:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy38;
+       default:        goto yy6;
+       }
+yy32:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy23;
+       default:        goto yy6;
+       }
+yy33:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy39;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy40;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy41;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy34:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy33;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy37;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy42;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy35:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy39;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy43;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy41;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy36:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy33;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy37;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy35;
+       case 'd':       goto yy29;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy37:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy44;
+       default:        goto yy6;
+       }
+yy38:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy29;
+       default:        goto yy6;
+       }
+yy39:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy45;
+       case 'b':       goto yy46;
+       case 'c':       goto yy47;
+       default:        goto yy12;
+       }
+yy40:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy39;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy43;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy48;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy41:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy45;
+       case 'b':       goto yy49;
+       case 'c':       goto yy47;
+       default:        goto yy12;
+       }
+yy42:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy39;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy43;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy41;
+       case 'd':       goto yy35;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy43:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy50;
+       default:        goto yy6;
+       }
+yy44:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy35;
+       default:        goto yy6;
+       }
+yy45:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy51;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy52;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy53;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy46:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy45;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy49;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy54;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy47:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy51;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy55;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy53;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy48:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy45;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy49;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy47;
+       case 'd':       goto yy41;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy49:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy56;
+       default:        goto yy6;
+       }
+yy50:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy41;
+       default:        goto yy6;
+       }
+yy51:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy57;
+       case 'b':       goto yy58;
+       case 'c':       goto yy59;
+       default:        goto yy12;
+       }
+yy52:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy51;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy55;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy60;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy53:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy57;
+       case 'b':       goto yy61;
+       case 'c':       goto yy59;
+       default:        goto yy12;
+       }
+yy54:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy51;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy55;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy53;
+       case 'd':       goto yy47;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy55:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy62;
+       default:        goto yy6;
+       }
+yy56:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy47;
+       default:        goto yy6;
+       }
+yy57:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy59;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy58:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy57;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy61;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy63;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy59:
+       yych = *++YYCURSOR;
+       yyt1 = yyt3;
+       yyt3 = YYCURSOR;
+       goto yy12;
+yy60:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy57;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy61;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy59;
+       case 'd':       goto yy53;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy61:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy64;
+       default:        goto yy6;
+       }
+yy62:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy53;
+       default:        goto yy6;
+       }
+yy63:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy59;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy64:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy59;
+       default:        goto yy6;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/74.i.re b/re2c/test/posix_captures/repetition/74.i.re
new file mode 100644 (file)
index 0000000..6775c09
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a|ab|c|bcd){1,10}(d*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/repetition/75.i.c b/re2c/test/posix_captures/repetition/75.i.c
new file mode 100644 (file)
index 0000000..097a8a2
--- /dev/null
@@ -0,0 +1,822 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 31) YYFILL(31);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy7;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy9;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy10;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       switch (yyaccept) {
+       case 0:         goto yy2;
+       case 1: 
+               yyt3 = YYCURSOR;
+               goto yy8;
+       case 2: 
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy11;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy7;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy12;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy10;
+       default:        goto yy4;
+       }
+yy7:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy13;
+       case 'b':       goto yy14;
+       case 'c':       goto yy15;
+       default:        goto yy17;
+       }
+yy8:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt2;
+               yypmatch[4] = yyt3;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               yypmatch[3] = yyt3;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy9:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy7;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy12;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy18;
+       default:        goto yy4;
+       }
+yy10:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy13;
+       case 'b':       goto yy19;
+       case 'c':       goto yy15;
+       default:        goto yy17;
+       }
+yy11:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:        goto yy4;
+       }
+yy12:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy20;
+       default:        goto yy4;
+       }
+yy13:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy21;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy22;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy23;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy14:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy13;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy19;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy24;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy15:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy21;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy25;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy23;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy16:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy17:
+       switch (yych) {
+       case 'd':       goto yy16;
+       default:        goto yy8;
+       }
+yy18:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy13;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy19;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy15;
+       case 'd':       goto yy10;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy19:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy26;
+       default:        goto yy4;
+       }
+yy20:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy10;
+       default:        goto yy4;
+       }
+yy21:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy27;
+       case 'b':       goto yy28;
+       case 'c':       goto yy29;
+       default:        goto yy17;
+       }
+yy22:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy21;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy25;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy30;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy23:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy27;
+       case 'b':       goto yy31;
+       case 'c':       goto yy29;
+       default:        goto yy17;
+       }
+yy24:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy21;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy25;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy23;
+       case 'd':       goto yy15;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy25:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy32;
+       default:        goto yy4;
+       }
+yy26:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy15;
+       default:        goto yy4;
+       }
+yy27:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy33;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy34;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy35;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy28:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy27;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy31;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy36;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy29:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy33;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy37;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy35;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy30:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy27;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy31;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy29;
+       case 'd':       goto yy23;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy31:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy38;
+       default:        goto yy4;
+       }
+yy32:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy23;
+       default:        goto yy4;
+       }
+yy33:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy39;
+       case 'b':       goto yy40;
+       case 'c':       goto yy41;
+       default:        goto yy17;
+       }
+yy34:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy33;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy37;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy42;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy35:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy39;
+       case 'b':       goto yy43;
+       case 'c':       goto yy41;
+       default:        goto yy17;
+       }
+yy36:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy33;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy37;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy35;
+       case 'd':       goto yy29;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy37:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy44;
+       default:        goto yy4;
+       }
+yy38:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy29;
+       default:        goto yy4;
+       }
+yy39:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy45;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy46;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy47;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy40:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy39;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy43;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy48;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy41:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy45;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy49;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy47;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy42:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy39;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy43;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy41;
+       case 'd':       goto yy35;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy43:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy50;
+       default:        goto yy4;
+       }
+yy44:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy35;
+       default:        goto yy4;
+       }
+yy45:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy51;
+       case 'b':       goto yy52;
+       case 'c':       goto yy53;
+       default:        goto yy17;
+       }
+yy46:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy45;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy49;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy54;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy47:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy51;
+       case 'b':       goto yy55;
+       case 'c':       goto yy53;
+       default:        goto yy17;
+       }
+yy48:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy45;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy49;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy47;
+       case 'd':       goto yy41;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy49:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy56;
+       default:        goto yy4;
+       }
+yy50:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy41;
+       default:        goto yy4;
+       }
+yy51:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy57;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy58;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy59;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy52:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy51;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy55;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy60;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy53:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy57;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy61;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy59;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy54:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy51;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy55;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy53;
+       case 'd':       goto yy47;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy55:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy62;
+       default:        goto yy4;
+       }
+yy56:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy47;
+       default:        goto yy4;
+       }
+yy57:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy59;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy58:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy57;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy61;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy63;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy59:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       goto yy17;
+yy60:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy57;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy61;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy59;
+       case 'd':       goto yy53;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy61:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy64;
+       default:        goto yy4;
+       }
+yy62:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy53;
+       default:        goto yy4;
+       }
+yy63:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy59;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy64:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy59;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/75.i.re b/re2c/test/posix_captures/repetition/75.i.re
new file mode 100644 (file)
index 0000000..e83968a
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a|ab|c|bcd){2,10}(d*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/repetition/76.i.c b/re2c/test/posix_captures/repetition/76.i.c
new file mode 100644 (file)
index 0000000..731222f
--- /dev/null
@@ -0,0 +1,779 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 31) YYFILL(31);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       case 'b':       goto yy8;
+       case 'c':       goto yy9;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       switch (yyaccept) {
+       case 0:         goto yy2;
+       case 1: 
+               yyt3 = YYCURSOR;
+               goto yy13;
+       case 2: 
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy10;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       case 'b':       goto yy11;
+       case 'c':       goto yy9;
+       default:        goto yy4;
+       }
+yy7:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy12;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy14;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy15;
+       default:        goto yy4;
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       case 'b':       goto yy11;
+       case 'c':       goto yy16;
+       default:        goto yy4;
+       }
+yy9:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy12;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy17;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy15;
+       default:        goto yy4;
+       }
+yy10:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:        goto yy4;
+       }
+yy11:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy18;
+       default:        goto yy4;
+       }
+yy12:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy19;
+       case 'b':       goto yy20;
+       case 'c':       goto yy21;
+       default:        goto yy23;
+       }
+yy13:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt2;
+               yypmatch[4] = yyt3;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               yypmatch[3] = yyt3;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy14:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy12;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy17;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy24;
+       default:        goto yy4;
+       }
+yy15:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy19;
+       case 'b':       goto yy25;
+       case 'c':       goto yy21;
+       default:        goto yy23;
+       }
+yy16:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy12;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy17;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy15;
+       case 'd':       goto yy9;
+       default:        goto yy4;
+       }
+yy17:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy26;
+       default:        goto yy4;
+       }
+yy18:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy9;
+       default:        goto yy4;
+       }
+yy19:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy27;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy28;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy29;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy20:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy19;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy25;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy30;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy21:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy27;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy31;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy29;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy22:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy23:
+       switch (yych) {
+       case 'd':       goto yy22;
+       default:        goto yy13;
+       }
+yy24:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy19;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy25;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy21;
+       case 'd':       goto yy15;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy25:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy32;
+       default:        goto yy4;
+       }
+yy26:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy15;
+       default:        goto yy4;
+       }
+yy27:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy33;
+       case 'b':       goto yy34;
+       case 'c':       goto yy35;
+       default:        goto yy23;
+       }
+yy28:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy27;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy31;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy36;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy29:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy33;
+       case 'b':       goto yy37;
+       case 'c':       goto yy35;
+       default:        goto yy23;
+       }
+yy30:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy27;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy31;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy29;
+       case 'd':       goto yy21;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy31:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy38;
+       default:        goto yy4;
+       }
+yy32:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy21;
+       default:        goto yy4;
+       }
+yy33:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy39;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy40;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy41;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy34:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy33;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy37;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy42;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy35:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy39;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy43;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy41;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy36:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy33;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy37;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy35;
+       case 'd':       goto yy29;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy37:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy44;
+       default:        goto yy4;
+       }
+yy38:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy29;
+       default:        goto yy4;
+       }
+yy39:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy45;
+       case 'b':       goto yy46;
+       case 'c':       goto yy47;
+       default:        goto yy23;
+       }
+yy40:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy39;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy43;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy48;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy41:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy45;
+       case 'b':       goto yy49;
+       case 'c':       goto yy47;
+       default:        goto yy23;
+       }
+yy42:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy39;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy43;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy41;
+       case 'd':       goto yy35;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy43:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy50;
+       default:        goto yy4;
+       }
+yy44:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy35;
+       default:        goto yy4;
+       }
+yy45:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy51;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy52;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy53;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy46:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy45;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy49;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy54;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy47:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy51;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy55;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy53;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy48:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy45;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy49;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy47;
+       case 'd':       goto yy41;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy49:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy56;
+       default:        goto yy4;
+       }
+yy50:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy41;
+       default:        goto yy4;
+       }
+yy51:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy57;
+       case 'b':       goto yy58;
+       case 'c':       goto yy59;
+       default:        goto yy23;
+       }
+yy52:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy51;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy55;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy60;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy53:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy57;
+       case 'b':       goto yy61;
+       case 'c':       goto yy59;
+       default:        goto yy23;
+       }
+yy54:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy51;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy55;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy53;
+       case 'd':       goto yy47;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy55:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy62;
+       default:        goto yy4;
+       }
+yy56:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy47;
+       default:        goto yy4;
+       }
+yy57:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy59;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy58:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy57;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy61;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy63;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy59:
+       yych = *++YYCURSOR;
+       yyt1 = yyt3;
+       yyt3 = YYCURSOR;
+       goto yy23;
+yy60:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy57;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy61;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy59;
+       case 'd':       goto yy53;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy61:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy64;
+       default:        goto yy4;
+       }
+yy62:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy53;
+       default:        goto yy4;
+       }
+yy63:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy59;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy64:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy59;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/76.i.re b/re2c/test/posix_captures/repetition/76.i.re
new file mode 100644 (file)
index 0000000..37586ef
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a|ab|c|bcd){3,10}(d*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/repetition/77.i.c b/re2c/test/posix_captures/repetition/77.i.c
new file mode 100644 (file)
index 0000000..bf9f02d
--- /dev/null
@@ -0,0 +1,752 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 31) YYFILL(31);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       case 'b':       goto yy8;
+       case 'c':       goto yy9;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       switch (yyaccept) {
+       case 0:         goto yy2;
+       case 1: 
+               yyt3 = YYCURSOR;
+               goto yy19;
+       case 2: 
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy10;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       case 'b':       goto yy11;
+       case 'c':       goto yy9;
+       default:        goto yy4;
+       }
+yy7:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy12;
+       case 'b':       goto yy13;
+       case 'c':       goto yy14;
+       default:        goto yy4;
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       case 'b':       goto yy11;
+       case 'c':       goto yy15;
+       default:        goto yy4;
+       }
+yy9:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy12;
+       case 'b':       goto yy16;
+       case 'c':       goto yy14;
+       default:        goto yy4;
+       }
+yy10:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:        goto yy4;
+       }
+yy11:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy17;
+       default:        goto yy4;
+       }
+yy12:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy18;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy20;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy21;
+       default:        goto yy4;
+       }
+yy13:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy12;
+       case 'b':       goto yy16;
+       case 'c':       goto yy22;
+       default:        goto yy4;
+       }
+yy14:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy18;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy23;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy21;
+       default:        goto yy4;
+       }
+yy15:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy12;
+       case 'b':       goto yy16;
+       case 'c':       goto yy14;
+       case 'd':       goto yy9;
+       default:        goto yy4;
+       }
+yy16:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy24;
+       default:        goto yy4;
+       }
+yy17:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy9;
+       default:        goto yy4;
+       }
+yy18:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy25;
+       case 'b':       goto yy26;
+       case 'c':       goto yy27;
+       default:        goto yy29;
+       }
+yy19:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt2;
+               yypmatch[4] = yyt3;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               yypmatch[3] = yyt3;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy20:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy18;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy23;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy30;
+       default:        goto yy4;
+       }
+yy21:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy25;
+       case 'b':       goto yy31;
+       case 'c':       goto yy27;
+       default:        goto yy29;
+       }
+yy22:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy18;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy23;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy21;
+       case 'd':       goto yy14;
+       default:        goto yy4;
+       }
+yy23:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy32;
+       default:        goto yy4;
+       }
+yy24:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy14;
+       default:        goto yy4;
+       }
+yy25:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy33;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy34;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy35;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy28;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy26:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy25;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy31;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy36;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy28;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy27:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy33;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy37;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy35;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy28;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy28:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy29:
+       switch (yych) {
+       case 'd':       goto yy28;
+       default:        goto yy19;
+       }
+yy30:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy25;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy31;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy27;
+       case 'd':       goto yy21;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy31:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy38;
+       default:        goto yy4;
+       }
+yy32:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy21;
+       default:        goto yy4;
+       }
+yy33:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy39;
+       case 'b':       goto yy40;
+       case 'c':       goto yy41;
+       default:        goto yy29;
+       }
+yy34:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy33;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy37;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy42;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy28;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy35:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy39;
+       case 'b':       goto yy43;
+       case 'c':       goto yy41;
+       default:        goto yy29;
+       }
+yy36:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy33;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy37;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy35;
+       case 'd':       goto yy27;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy37:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy44;
+       default:        goto yy4;
+       }
+yy38:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy27;
+       default:        goto yy4;
+       }
+yy39:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy45;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy46;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy47;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy28;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy40:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy39;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy43;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy48;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy28;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy41:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy45;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy49;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy47;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy28;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy42:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy39;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy43;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy41;
+       case 'd':       goto yy35;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy43:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy50;
+       default:        goto yy4;
+       }
+yy44:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy35;
+       default:        goto yy4;
+       }
+yy45:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy51;
+       case 'b':       goto yy52;
+       case 'c':       goto yy53;
+       default:        goto yy29;
+       }
+yy46:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy45;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy49;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy54;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy28;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy47:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy51;
+       case 'b':       goto yy55;
+       case 'c':       goto yy53;
+       default:        goto yy29;
+       }
+yy48:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy45;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy49;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy47;
+       case 'd':       goto yy41;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy49:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy56;
+       default:        goto yy4;
+       }
+yy50:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy41;
+       default:        goto yy4;
+       }
+yy51:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy57;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy58;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy59;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy28;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy52:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy51;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy55;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy60;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy28;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy53:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy57;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy61;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy59;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy28;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy54:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy51;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy55;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy53;
+       case 'd':       goto yy47;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy55:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy62;
+       default:        goto yy4;
+       }
+yy56:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy47;
+       default:        goto yy4;
+       }
+yy57:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy59;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy28;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy58:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy57;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy61;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy63;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy28;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy59:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       goto yy29;
+yy60:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy57;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy61;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy59;
+       case 'd':       goto yy53;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy61:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy64;
+       default:        goto yy4;
+       }
+yy62:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy53;
+       default:        goto yy4;
+       }
+yy63:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy59;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy64:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy59;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/77.i.re b/re2c/test/posix_captures/repetition/77.i.re
new file mode 100644 (file)
index 0000000..e51b21e
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a|ab|c|bcd){4,10}(d*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/repetition/78.i.c b/re2c/test/posix_captures/repetition/78.i.c
new file mode 100644 (file)
index 0000000..6ab7d03
--- /dev/null
@@ -0,0 +1,172 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt5 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt5 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt1 = yyt5 = YYCURSOR;
+               goto yy7;
+       case 'd':
+               yyt2 = yyt5 = NULL;
+               yyt1 = yyt4 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt2 = yyt3 = NULL;
+               yyt1 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[4] = yyt4;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt5 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       case 'c':
+               yyt5 = YYCURSOR;
+               goto yy7;
+       case 'd':
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt3 = yyt5;
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy5:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy12;
+       default:        goto yy6;
+       }
+yy6:
+       YYCURSOR = YYMARKER;
+       if (yyaccept == 0) {
+               yyt2 = yyt3 = NULL;
+               yyt1 = yyt4 = YYCURSOR;
+               goto yy2;
+       } else {
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy7:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt5 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = yyt5;
+               yyt5 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt5 = YYCURSOR;
+               goto yy7;
+       case 'd':
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt3 = yyt5;
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy9:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy9;
+       default:
+               yyt3 = yyt5;
+               goto yy2;
+       }
+yy11:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt5 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = yyt5;
+               yyt5 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy13;
+       case 'd':
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt3 = yyt5;
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy12:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy7;
+       default:        goto yy6;
+       }
+yy13:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt5 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt5 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt5 = YYCURSOR;
+               goto yy7;
+       case 'd':
+               yyt5 = yyt2;
+               goto yy7;
+       default:
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/repetition/78.i.re b/re2c/test/posix_captures/repetition/78.i.re
new file mode 100644 (file)
index 0000000..f25fd11
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a|ab|c|bcd)*(d*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/repetition/79.i.c b/re2c/test/posix_captures/repetition/79.i.c
new file mode 100644 (file)
index 0000000..51b6f31
--- /dev/null
@@ -0,0 +1,169 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy6;
+       case 'c':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy8;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy10;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy8;
+       case 'd':
+               yyt4 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt3 = yyt1;
+               yyt4 = YYCURSOR;
+               goto yy5;
+       }
+yy5:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt2;
+               yypmatch[4] = yyt4;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               yypmatch[3] = yyt4;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy6:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy13;
+       default:        goto yy7;
+       }
+yy7:
+       YYCURSOR = YYMARKER;
+       if (yyaccept == 0) {
+               goto yy2;
+       } else {
+               yyt4 = YYCURSOR;
+               goto yy5;
+       }
+yy8:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = yyt1;
+               yyt1 = YYCURSOR;
+               goto yy6;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy8;
+       case 'd':
+               yyt4 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt3 = yyt1;
+               yyt4 = YYCURSOR;
+               goto yy5;
+       }
+yy10:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = yyt1;
+               yyt1 = YYCURSOR;
+               goto yy6;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy14;
+       case 'd':
+               yyt4 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt3 = yyt1;
+               yyt4 = YYCURSOR;
+               goto yy5;
+       }
+yy11:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy11;
+       default:
+               yyt3 = yyt1;
+               goto yy5;
+       }
+yy13:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy8;
+       default:        goto yy7;
+       }
+yy14:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy8;
+       case 'd':
+               yyt1 = yyt4;
+               goto yy8;
+       default:
+               yyt4 = YYCURSOR;
+               goto yy5;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/79.i.re b/re2c/test/posix_captures/repetition/79.i.re
new file mode 100644 (file)
index 0000000..1d38e9d
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a|ab|c|bcd)+(d*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/repetition/80.i.c b/re2c/test/posix_captures/repetition/80.i.c
new file mode 100644 (file)
index 0000000..b0a34bc
--- /dev/null
@@ -0,0 +1,199 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt5 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt5 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt1 = yyt5 = YYCURSOR;
+               goto yy7;
+       case 'd':
+               yyt2 = yyt5 = NULL;
+               yyt1 = yyt4 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt2 = yyt3 = NULL;
+               yyt1 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[4] = yyt4;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt5 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       case 'c':
+               yyt5 = YYCURSOR;
+               goto yy7;
+       case 'd':
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt3 = yyt5;
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy5:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy12;
+       default:        goto yy6;
+       }
+yy6:
+       YYCURSOR = YYMARKER;
+       switch (yyaccept) {
+       case 0: 
+               yyt2 = yyt3 = NULL;
+               yyt1 = yyt4 = YYCURSOR;
+               goto yy2;
+       case 1: 
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy2;
+       default:
+               yyt3 = yyt2;
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy7:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt5 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = yyt5;
+               yyt5 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt5 = YYCURSOR;
+               goto yy7;
+       case 'd':
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt3 = yyt5;
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy9:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy9;
+       default:
+               yyt3 = yyt5;
+               goto yy2;
+       }
+yy11:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt5 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = yyt5;
+               yyt5 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy13;
+       case 'd':
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt3 = yyt5;
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy12:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy7;
+       default:        goto yy6;
+       }
+yy13:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt5 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt5 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt5 = YYCURSOR;
+               goto yy7;
+       case 'd':       goto yy14;
+       default:
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy14:
+       yyaccept = 2;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt5 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt5 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt5 = YYCURSOR;
+               goto yy7;
+       case 'd':
+               yyt5 = yyt2;
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt3 = yyt2;
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/repetition/80.i.re b/re2c/test/posix_captures/repetition/80.i.re
new file mode 100644 (file)
index 0000000..7cc2b7a
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (ab|a|c|bcd){0,}(d*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/repetition/81.i.c b/re2c/test/posix_captures/repetition/81.i.c
new file mode 100644 (file)
index 0000000..7c416a4
--- /dev/null
@@ -0,0 +1,195 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy6;
+       case 'c':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy8;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy10;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy8;
+       case 'd':
+               yyt4 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt3 = yyt1;
+               yyt4 = YYCURSOR;
+               goto yy5;
+       }
+yy5:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt2;
+               yypmatch[4] = yyt4;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               yypmatch[3] = yyt4;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy6:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy13;
+       default:        goto yy7;
+       }
+yy7:
+       YYCURSOR = YYMARKER;
+       switch (yyaccept) {
+       case 0:         goto yy2;
+       case 1: 
+               yyt4 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt3 = yyt4;
+               yyt4 = YYCURSOR;
+               goto yy5;
+       }
+yy8:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = yyt1;
+               yyt1 = YYCURSOR;
+               goto yy6;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy8;
+       case 'd':
+               yyt4 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt3 = yyt1;
+               yyt4 = YYCURSOR;
+               goto yy5;
+       }
+yy10:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = yyt1;
+               yyt1 = YYCURSOR;
+               goto yy6;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy14;
+       case 'd':
+               yyt4 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt3 = yyt1;
+               yyt4 = YYCURSOR;
+               goto yy5;
+       }
+yy11:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy11;
+       default:
+               yyt3 = yyt1;
+               goto yy5;
+       }
+yy13:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy8;
+       default:        goto yy7;
+       }
+yy14:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy8;
+       case 'd':       goto yy15;
+       default:
+               yyt4 = YYCURSOR;
+               goto yy5;
+       }
+yy15:
+       yyaccept = 2;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy8;
+       case 'd':
+               yyt1 = yyt4;
+               yyt4 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt3 = yyt4;
+               yyt4 = YYCURSOR;
+               goto yy5;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/81.i.re b/re2c/test/posix_captures/repetition/81.i.re
new file mode 100644 (file)
index 0000000..516493e
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (ab|a|c|bcd){1,}(d*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/repetition/82.i.c b/re2c/test/posix_captures/repetition/82.i.c
new file mode 100644 (file)
index 0000000..e5cee6d
--- /dev/null
@@ -0,0 +1,217 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy7;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy10;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       switch (yyaccept) {
+       case 0:         goto yy2;
+       case 1: 
+               yyt3 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt2 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy9;
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy13;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+       case 'b':
+       case 'c':       goto yy12;
+       default:        goto yy4;
+       }
+yy7:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy7;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy15;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy9;
+       }
+yy9:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[4] = yyt3;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = yyt3;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy10:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy7;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy14;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy18;
+       default:        goto yy4;
+       }
+yy11:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy12:
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy7;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy14;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy9;
+       }
+yy13:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:        goto yy4;
+       }
+yy14:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy19;
+       default:        goto yy4;
+       }
+yy15:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy7;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy14;
+       case 'c':
+               yyt2 = yyt3;
+               yyt4 = YYCURSOR;
+               goto yy18;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy9;
+       }
+yy16:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy16;
+       default:        goto yy9;
+       }
+yy18:
+       yyaccept = 2;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy7;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy14;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       case 'd':       goto yy11;
+       default:
+               yyt2 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy9;
+       }
+yy19:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'd':
+               yyt2 = yyt3;
+               goto yy11;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/82.i.re b/re2c/test/posix_captures/repetition/82.i.re
new file mode 100644 (file)
index 0000000..2325046
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (ab|a|c|bcd){2,}(d*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/repetition/83.i.c b/re2c/test/posix_captures/repetition/83.i.c
new file mode 100644 (file)
index 0000000..ebc20ae
--- /dev/null
@@ -0,0 +1,262 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       case 'b':       goto yy8;
+       case 'c':       goto yy9;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       switch (yyaccept) {
+       case 0:         goto yy2;
+       case 1: 
+               yyt3 = YYCURSOR;
+               goto yy14;
+       default:
+               yyt2 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy14;
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy10;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       case 'b':       goto yy11;
+       case 'c':       goto yy9;
+       default:        goto yy4;
+       }
+yy7:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy12;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy15;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy16;
+       default:        goto yy4;
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       case 'b':       goto yy11;
+       case 'c':       goto yy18;
+       default:        goto yy4;
+       }
+yy9:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+       case 'b':
+       case 'c':       goto yy17;
+       default:        goto yy4;
+       }
+yy10:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:        goto yy4;
+       }
+yy11:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy20;
+       default:        goto yy4;
+       }
+yy12:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy12;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy21;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy16;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy14;
+       }
+yy14:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[4] = yyt3;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = yyt3;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy15:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy12;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy19;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy24;
+       default:        goto yy4;
+       }
+yy16:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy17:
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy12;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy19;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy16;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy14;
+       }
+yy18:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+       case 'b':
+       case 'c':       goto yy17;
+       case 'd':       goto yy9;
+       default:        goto yy4;
+       }
+yy19:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy25;
+       default:        goto yy4;
+       }
+yy20:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy9;
+       default:        goto yy4;
+       }
+yy21:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy12;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy19;
+       case 'c':
+               yyt2 = yyt3;
+               yyt4 = YYCURSOR;
+               goto yy24;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy14;
+       }
+yy22:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy22;
+       default:        goto yy14;
+       }
+yy24:
+       yyaccept = 2;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy12;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy19;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy16;
+       case 'd':       goto yy16;
+       default:
+               yyt2 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy14;
+       }
+yy25:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'd':
+               yyt2 = yyt3;
+               goto yy16;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/83.i.re b/re2c/test/posix_captures/repetition/83.i.re
new file mode 100644 (file)
index 0000000..51f6e62
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (ab|a|c|bcd){3,}(d*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/repetition/84.i.c b/re2c/test/posix_captures/repetition/84.i.c
new file mode 100644 (file)
index 0000000..ac9afb3
--- /dev/null
@@ -0,0 +1,307 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 10) YYFILL(10);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       case 'b':       goto yy8;
+       case 'c':       goto yy9;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       switch (yyaccept) {
+       case 0:         goto yy2;
+       case 1: 
+               yyt3 = YYCURSOR;
+               goto yy20;
+       default:
+               yyt2 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy20;
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy10;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       case 'b':       goto yy11;
+       case 'c':       goto yy9;
+       default:        goto yy4;
+       }
+yy7:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy12;
+       case 'b':       goto yy13;
+       case 'c':       goto yy14;
+       default:        goto yy4;
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       case 'b':       goto yy11;
+       case 'c':       goto yy15;
+       default:        goto yy4;
+       }
+yy9:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy12;
+       case 'b':       goto yy16;
+       case 'c':       goto yy14;
+       default:        goto yy4;
+       }
+yy10:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:        goto yy4;
+       }
+yy11:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy17;
+       default:        goto yy4;
+       }
+yy12:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy18;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy21;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy22;
+       default:        goto yy4;
+       }
+yy13:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy12;
+       case 'b':       goto yy16;
+       case 'c':       goto yy24;
+       default:        goto yy4;
+       }
+yy14:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+       case 'b':
+       case 'c':       goto yy23;
+       default:        goto yy4;
+       }
+yy15:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy12;
+       case 'b':       goto yy16;
+       case 'c':       goto yy14;
+       case 'd':       goto yy9;
+       default:        goto yy4;
+       }
+yy16:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy26;
+       default:        goto yy4;
+       }
+yy17:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy9;
+       default:        goto yy4;
+       }
+yy18:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy18;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy27;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy22;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy28;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy20;
+       }
+yy20:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[4] = yyt3;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt2;
+               yypmatch[3] = yyt3;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy21:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy18;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy25;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy30;
+       default:        goto yy4;
+       }
+yy22:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy23:
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy18;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy25;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy22;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy28;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy20;
+       }
+yy24:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+       case 'b':
+       case 'c':       goto yy23;
+       case 'd':       goto yy14;
+       default:        goto yy4;
+       }
+yy25:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy31;
+       default:        goto yy4;
+       }
+yy26:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy14;
+       default:        goto yy4;
+       }
+yy27:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy18;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy25;
+       case 'c':
+               yyt2 = yyt3;
+               yyt4 = YYCURSOR;
+               goto yy30;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy28;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy20;
+       }
+yy28:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy28;
+       default:        goto yy20;
+       }
+yy30:
+       yyaccept = 2;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy18;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy25;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy22;
+       case 'd':       goto yy22;
+       default:
+               yyt2 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy20;
+       }
+yy31:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'd':
+               yyt2 = yyt3;
+               goto yy22;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/84.i.re b/re2c/test/posix_captures/repetition/84.i.re
new file mode 100644 (file)
index 0000000..b3c2d8b
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (ab|a|c|bcd){4,}(d*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/repetition/85.i.c b/re2c/test/posix_captures/repetition/85.i.c
new file mode 100644 (file)
index 0000000..4761ebe
--- /dev/null
@@ -0,0 +1,925 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 31) YYFILL(31);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt4 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt4 = YYCURSOR;
+               goto yy4;
+       case 'c':
+               yyt1 = yyt4 = YYCURSOR;
+               goto yy6;
+       case 'd':
+               yyt2 = yyt4 = NULL;
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt2 = yyt4 = NULL;
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[4] = yyt3;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt4;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy9;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy10;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       case 'd':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy4:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy12;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       switch (yyaccept) {
+       case 0: 
+               yyt2 = yyt4 = NULL;
+               yyt1 = yyt3 = YYCURSOR;
+               goto yy2;
+       case 1: 
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       case 2: 
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       default:
+               yyt4 = yyt3;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy6:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy9;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy13;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       case 'd':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy7:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy8:
+       switch (yych) {
+       case 'd':       goto yy7;
+       default:        goto yy2;
+       }
+yy9:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy14;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy15;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy16;
+       case 'd':
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy10:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy9;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy13;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy17;
+       case 'd':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy11:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy14;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy18;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy16;
+       case 'd':
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy12:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:        goto yy5;
+       }
+yy13:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy19;
+       default:        goto yy5;
+       }
+yy14:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy20;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy21;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy22;
+       case 'd':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy15:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy14;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy18;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy23;
+       case 'd':
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy16:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy20;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy24;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy22;
+       case 'd':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy17:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy14;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy18;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy16;
+       case 'd':       goto yy11;
+       default:
+               yyt4 = yyt3;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy18:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy25;
+       default:        goto yy5;
+       }
+yy19:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy11;
+       default:        goto yy5;
+       }
+yy20:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy26;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy27;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy28;
+       case 'd':
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy21:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy20;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy24;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy29;
+       case 'd':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy22:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy26;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy30;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy28;
+       case 'd':
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy23:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy20;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy24;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy22;
+       case 'd':       goto yy16;
+       default:
+               yyt4 = yyt3;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy24:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy31;
+       default:        goto yy5;
+       }
+yy25:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy16;
+       default:        goto yy5;
+       }
+yy26:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy32;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy33;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy34;
+       case 'd':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy27:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy26;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy30;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy35;
+       case 'd':
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy28:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy32;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy36;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy34;
+       case 'd':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy29:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy26;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy30;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy28;
+       case 'd':       goto yy22;
+       default:
+               yyt4 = yyt3;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy30:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy37;
+       default:        goto yy5;
+       }
+yy31:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy22;
+       default:        goto yy5;
+       }
+yy32:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy38;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy39;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy40;
+       case 'd':
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy33:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy32;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy36;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy41;
+       case 'd':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy34:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy38;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy42;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy40;
+       case 'd':
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy35:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy32;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy36;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy34;
+       case 'd':       goto yy28;
+       default:
+               yyt4 = yyt3;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy36:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy43;
+       default:        goto yy5;
+       }
+yy37:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy28;
+       default:        goto yy5;
+       }
+yy38:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy44;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy45;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy46;
+       case 'd':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy39:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy38;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy42;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy47;
+       case 'd':
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy40:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy44;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy48;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy46;
+       case 'd':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy41:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy38;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy42;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy40;
+       case 'd':       goto yy34;
+       default:
+               yyt4 = yyt3;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy42:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy49;
+       default:        goto yy5;
+       }
+yy43:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy34;
+       default:        goto yy5;
+       }
+yy44:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy50;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy51;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy52;
+       case 'd':
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy45:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy44;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy48;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy53;
+       case 'd':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy46:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy50;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy54;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy52;
+       case 'd':
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy47:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy44;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy48;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy46;
+       case 'd':       goto yy40;
+       default:
+               yyt4 = yyt3;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy48:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy55;
+       default:        goto yy5;
+       }
+yy49:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy40;
+       default:        goto yy5;
+       }
+yy50:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy56;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy57;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy58;
+       case 'd':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy51:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy50;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy54;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy59;
+       case 'd':
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy52:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy56;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy60;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy58;
+       case 'd':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy53:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt4 = YYCURSOR;
+               goto yy50;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy54;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy52;
+       case 'd':       goto yy46;
+       default:
+               yyt4 = yyt3;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy54:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy61;
+       default:        goto yy5;
+       }
+yy55:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy46;
+       default:        goto yy5;
+       }
+yy56:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy58;
+       case 'd':
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt4 = yyt2;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy57:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy56;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy60;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy62;
+       case 'd':
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy7;
+       default:
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy58:
+       yych = *++YYCURSOR;
+       yyt4 = yyt2;
+       yyt2 = yyt3 = YYCURSOR;
+       goto yy8;
+yy59:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy56;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy60;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy58;
+       case 'd':       goto yy52;
+       default:
+               yyt4 = yyt3;
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy60:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy63;
+       default:        goto yy5;
+       }
+yy61:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy52;
+       default:        goto yy5;
+       }
+yy62:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy58;
+       default:
+               yyt2 = yyt3 = YYCURSOR;
+               goto yy2;
+       }
+yy63:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy58;
+       default:        goto yy5;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/repetition/85.i.re b/re2c/test/posix_captures/repetition/85.i.re
new file mode 100644 (file)
index 0000000..1622d39
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (ab|a|c|bcd){0,10}(d*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/repetition/86.i.c b/re2c/test/posix_captures/repetition/86.i.c
new file mode 100644 (file)
index 0000000..9e5af63
--- /dev/null
@@ -0,0 +1,821 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 31) YYFILL(31);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy7;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy8;
+       case 'b':       goto yy9;
+       case 'c':       goto yy10;
+       default:        goto yy12;
+       }
+yy4:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt2;
+               yypmatch[4] = yyt3;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               yypmatch[3] = yyt3;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy13;
+       default:        goto yy6;
+       }
+yy6:
+       YYCURSOR = YYMARKER;
+       switch (yyaccept) {
+       case 0:         goto yy2;
+       case 1: 
+               yyt3 = YYCURSOR;
+               goto yy4;
+       case 2: 
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy7:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy8;
+       case 'b':       goto yy14;
+       case 'c':       goto yy10;
+       default:        goto yy12;
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy15;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy16;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy17;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy9:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy8;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy14;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy18;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy10:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy15;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy19;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy17;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy11:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy12:
+       switch (yych) {
+       case 'd':       goto yy11;
+       default:        goto yy4;
+       }
+yy13:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy7;
+       default:        goto yy6;
+       }
+yy14:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy20;
+       default:        goto yy6;
+       }
+yy15:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy21;
+       case 'b':       goto yy22;
+       case 'c':       goto yy23;
+       default:        goto yy12;
+       }
+yy16:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy15;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy19;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy24;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy17:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy21;
+       case 'b':       goto yy25;
+       case 'c':       goto yy23;
+       default:        goto yy12;
+       }
+yy18:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy15;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy19;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy17;
+       case 'd':       goto yy10;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy19:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy26;
+       default:        goto yy6;
+       }
+yy20:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy10;
+       default:        goto yy6;
+       }
+yy21:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy27;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy28;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy29;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy22:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy21;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy25;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy30;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy23:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy27;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy31;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy29;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy24:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy21;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy25;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy23;
+       case 'd':       goto yy17;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy25:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy32;
+       default:        goto yy6;
+       }
+yy26:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy17;
+       default:        goto yy6;
+       }
+yy27:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy33;
+       case 'b':       goto yy34;
+       case 'c':       goto yy35;
+       default:        goto yy12;
+       }
+yy28:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy27;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy31;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy36;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy29:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy33;
+       case 'b':       goto yy37;
+       case 'c':       goto yy35;
+       default:        goto yy12;
+       }
+yy30:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy27;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy31;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy29;
+       case 'd':       goto yy23;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy31:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy38;
+       default:        goto yy6;
+       }
+yy32:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy23;
+       default:        goto yy6;
+       }
+yy33:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy39;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy40;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy41;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy34:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy33;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy37;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy42;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy35:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy39;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy43;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy41;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy36:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy33;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy37;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy35;
+       case 'd':       goto yy29;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy37:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy44;
+       default:        goto yy6;
+       }
+yy38:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy29;
+       default:        goto yy6;
+       }
+yy39:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy45;
+       case 'b':       goto yy46;
+       case 'c':       goto yy47;
+       default:        goto yy12;
+       }
+yy40:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy39;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy43;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy48;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy41:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy45;
+       case 'b':       goto yy49;
+       case 'c':       goto yy47;
+       default:        goto yy12;
+       }
+yy42:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy39;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy43;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy41;
+       case 'd':       goto yy35;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy43:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy50;
+       default:        goto yy6;
+       }
+yy44:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy35;
+       default:        goto yy6;
+       }
+yy45:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy51;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy52;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy53;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy46:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy45;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy49;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy54;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy47:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy51;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy55;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy53;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy48:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy45;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy49;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy47;
+       case 'd':       goto yy41;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy49:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy56;
+       default:        goto yy6;
+       }
+yy50:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy41;
+       default:        goto yy6;
+       }
+yy51:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy57;
+       case 'b':       goto yy58;
+       case 'c':       goto yy59;
+       default:        goto yy12;
+       }
+yy52:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy51;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy55;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy60;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy53:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy57;
+       case 'b':       goto yy61;
+       case 'c':       goto yy59;
+       default:        goto yy12;
+       }
+yy54:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy51;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy55;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy53;
+       case 'd':       goto yy47;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy55:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy62;
+       default:        goto yy6;
+       }
+yy56:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy47;
+       default:        goto yy6;
+       }
+yy57:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy59;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy58:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy57;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy61;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy63;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy59:
+       yych = *++YYCURSOR;
+       yyt1 = yyt3;
+       yyt3 = YYCURSOR;
+       goto yy12;
+yy60:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy57;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy61;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy59;
+       case 'd':       goto yy53;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy61:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy64;
+       default:        goto yy6;
+       }
+yy62:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy53;
+       default:        goto yy6;
+       }
+yy63:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy59;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy4;
+       }
+yy64:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy59;
+       default:        goto yy6;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/86.i.re b/re2c/test/posix_captures/repetition/86.i.re
new file mode 100644 (file)
index 0000000..c56d8f3
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (ab|a|c|bcd){1,10}(d*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/repetition/87.i.c b/re2c/test/posix_captures/repetition/87.i.c
new file mode 100644 (file)
index 0000000..097a8a2
--- /dev/null
@@ -0,0 +1,822 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 31) YYFILL(31);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy7;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy9;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy10;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       switch (yyaccept) {
+       case 0:         goto yy2;
+       case 1: 
+               yyt3 = YYCURSOR;
+               goto yy8;
+       case 2: 
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy11;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy7;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy12;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy10;
+       default:        goto yy4;
+       }
+yy7:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy13;
+       case 'b':       goto yy14;
+       case 'c':       goto yy15;
+       default:        goto yy17;
+       }
+yy8:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt2;
+               yypmatch[4] = yyt3;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               yypmatch[3] = yyt3;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy9:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy7;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy12;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy18;
+       default:        goto yy4;
+       }
+yy10:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy13;
+       case 'b':       goto yy19;
+       case 'c':       goto yy15;
+       default:        goto yy17;
+       }
+yy11:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:        goto yy4;
+       }
+yy12:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy20;
+       default:        goto yy4;
+       }
+yy13:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy21;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy22;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy23;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy14:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy13;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy19;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy24;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy15:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy21;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy25;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy23;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy16:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy17:
+       switch (yych) {
+       case 'd':       goto yy16;
+       default:        goto yy8;
+       }
+yy18:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy13;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy19;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy15;
+       case 'd':       goto yy10;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy19:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy26;
+       default:        goto yy4;
+       }
+yy20:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy10;
+       default:        goto yy4;
+       }
+yy21:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy27;
+       case 'b':       goto yy28;
+       case 'c':       goto yy29;
+       default:        goto yy17;
+       }
+yy22:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy21;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy25;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy30;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy23:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy27;
+       case 'b':       goto yy31;
+       case 'c':       goto yy29;
+       default:        goto yy17;
+       }
+yy24:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy21;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy25;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy23;
+       case 'd':       goto yy15;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy25:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy32;
+       default:        goto yy4;
+       }
+yy26:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy15;
+       default:        goto yy4;
+       }
+yy27:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy33;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy34;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy35;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy28:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy27;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy31;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy36;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy29:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy33;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy37;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy35;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy30:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy27;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy31;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy29;
+       case 'd':       goto yy23;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy31:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy38;
+       default:        goto yy4;
+       }
+yy32:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy23;
+       default:        goto yy4;
+       }
+yy33:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy39;
+       case 'b':       goto yy40;
+       case 'c':       goto yy41;
+       default:        goto yy17;
+       }
+yy34:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy33;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy37;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy42;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy35:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy39;
+       case 'b':       goto yy43;
+       case 'c':       goto yy41;
+       default:        goto yy17;
+       }
+yy36:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy33;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy37;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy35;
+       case 'd':       goto yy29;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy37:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy44;
+       default:        goto yy4;
+       }
+yy38:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy29;
+       default:        goto yy4;
+       }
+yy39:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy45;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy46;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy47;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy40:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy39;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy43;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy48;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy41:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy45;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy49;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy47;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy42:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy39;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy43;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy41;
+       case 'd':       goto yy35;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy43:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy50;
+       default:        goto yy4;
+       }
+yy44:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy35;
+       default:        goto yy4;
+       }
+yy45:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy51;
+       case 'b':       goto yy52;
+       case 'c':       goto yy53;
+       default:        goto yy17;
+       }
+yy46:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy45;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy49;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy54;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy47:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy51;
+       case 'b':       goto yy55;
+       case 'c':       goto yy53;
+       default:        goto yy17;
+       }
+yy48:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy45;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy49;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy47;
+       case 'd':       goto yy41;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy49:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy56;
+       default:        goto yy4;
+       }
+yy50:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy41;
+       default:        goto yy4;
+       }
+yy51:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy57;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy58;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy59;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy52:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy51;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy55;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy60;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy53:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy57;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy61;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy59;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy54:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy51;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy55;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy53;
+       case 'd':       goto yy47;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy55:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy62;
+       default:        goto yy4;
+       }
+yy56:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy47;
+       default:        goto yy4;
+       }
+yy57:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy59;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy58:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy57;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy61;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy63;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy16;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy59:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       goto yy17;
+yy60:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy57;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy61;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy59;
+       case 'd':       goto yy53;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy61:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy64;
+       default:        goto yy4;
+       }
+yy62:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy53;
+       default:        goto yy4;
+       }
+yy63:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy59;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy8;
+       }
+yy64:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy59;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/87.i.re b/re2c/test/posix_captures/repetition/87.i.re
new file mode 100644 (file)
index 0000000..4959dcf
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (ab|a|c|bcd){2,10}(d*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/repetition/88.i.c b/re2c/test/posix_captures/repetition/88.i.c
new file mode 100644 (file)
index 0000000..731222f
--- /dev/null
@@ -0,0 +1,779 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 31) YYFILL(31);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       case 'b':       goto yy8;
+       case 'c':       goto yy9;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       switch (yyaccept) {
+       case 0:         goto yy2;
+       case 1: 
+               yyt3 = YYCURSOR;
+               goto yy13;
+       case 2: 
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy10;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       case 'b':       goto yy11;
+       case 'c':       goto yy9;
+       default:        goto yy4;
+       }
+yy7:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy12;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy14;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy15;
+       default:        goto yy4;
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       case 'b':       goto yy11;
+       case 'c':       goto yy16;
+       default:        goto yy4;
+       }
+yy9:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy12;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy17;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy15;
+       default:        goto yy4;
+       }
+yy10:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:        goto yy4;
+       }
+yy11:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy18;
+       default:        goto yy4;
+       }
+yy12:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy19;
+       case 'b':       goto yy20;
+       case 'c':       goto yy21;
+       default:        goto yy23;
+       }
+yy13:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt2;
+               yypmatch[4] = yyt3;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               yypmatch[3] = yyt3;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy14:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy12;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy17;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy24;
+       default:        goto yy4;
+       }
+yy15:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy19;
+       case 'b':       goto yy25;
+       case 'c':       goto yy21;
+       default:        goto yy23;
+       }
+yy16:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy12;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy17;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy15;
+       case 'd':       goto yy9;
+       default:        goto yy4;
+       }
+yy17:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy26;
+       default:        goto yy4;
+       }
+yy18:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy9;
+       default:        goto yy4;
+       }
+yy19:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy27;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy28;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy29;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy20:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy19;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy25;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy30;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy21:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy27;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy31;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy29;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy22:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy23:
+       switch (yych) {
+       case 'd':       goto yy22;
+       default:        goto yy13;
+       }
+yy24:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy19;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy25;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy21;
+       case 'd':       goto yy15;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy25:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy32;
+       default:        goto yy4;
+       }
+yy26:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy15;
+       default:        goto yy4;
+       }
+yy27:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy33;
+       case 'b':       goto yy34;
+       case 'c':       goto yy35;
+       default:        goto yy23;
+       }
+yy28:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy27;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy31;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy36;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy29:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy33;
+       case 'b':       goto yy37;
+       case 'c':       goto yy35;
+       default:        goto yy23;
+       }
+yy30:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy27;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy31;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy29;
+       case 'd':       goto yy21;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy31:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy38;
+       default:        goto yy4;
+       }
+yy32:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy21;
+       default:        goto yy4;
+       }
+yy33:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy39;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy40;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy41;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy34:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy33;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy37;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy42;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy35:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy39;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy43;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy41;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy36:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy33;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy37;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy35;
+       case 'd':       goto yy29;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy37:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy44;
+       default:        goto yy4;
+       }
+yy38:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy29;
+       default:        goto yy4;
+       }
+yy39:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy45;
+       case 'b':       goto yy46;
+       case 'c':       goto yy47;
+       default:        goto yy23;
+       }
+yy40:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy39;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy43;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy48;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy41:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy45;
+       case 'b':       goto yy49;
+       case 'c':       goto yy47;
+       default:        goto yy23;
+       }
+yy42:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy39;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy43;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy41;
+       case 'd':       goto yy35;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy43:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy50;
+       default:        goto yy4;
+       }
+yy44:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy35;
+       default:        goto yy4;
+       }
+yy45:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy51;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy52;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy53;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy46:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy45;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy49;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy54;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy47:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy51;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy55;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy53;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy48:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy45;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy49;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy47;
+       case 'd':       goto yy41;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy49:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy56;
+       default:        goto yy4;
+       }
+yy50:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy41;
+       default:        goto yy4;
+       }
+yy51:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy57;
+       case 'b':       goto yy58;
+       case 'c':       goto yy59;
+       default:        goto yy23;
+       }
+yy52:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy51;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy55;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy60;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy53:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy57;
+       case 'b':       goto yy61;
+       case 'c':       goto yy59;
+       default:        goto yy23;
+       }
+yy54:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy51;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy55;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy53;
+       case 'd':       goto yy47;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy55:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy62;
+       default:        goto yy4;
+       }
+yy56:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy47;
+       default:        goto yy4;
+       }
+yy57:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy59;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy58:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy57;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy61;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy63;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy22;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy59:
+       yych = *++YYCURSOR;
+       yyt1 = yyt3;
+       yyt3 = YYCURSOR;
+       goto yy23;
+yy60:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy57;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy61;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy59;
+       case 'd':       goto yy53;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy61:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy64;
+       default:        goto yy4;
+       }
+yy62:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy53;
+       default:        goto yy4;
+       }
+yy63:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy59;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy13;
+       }
+yy64:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy59;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/88.i.re b/re2c/test/posix_captures/repetition/88.i.re
new file mode 100644 (file)
index 0000000..492f003
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (ab|a|c|bcd){3,10}(d*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/repetition/89.i.c b/re2c/test/posix_captures/repetition/89.i.c
new file mode 100644 (file)
index 0000000..bf9f02d
--- /dev/null
@@ -0,0 +1,752 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if ((YYLIMIT - YYCURSOR) < 31) YYFILL(31);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       case 'b':       goto yy8;
+       case 'c':       goto yy9;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       switch (yyaccept) {
+       case 0:         goto yy2;
+       case 1: 
+               yyt3 = YYCURSOR;
+               goto yy19;
+       case 2: 
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy10;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       case 'b':       goto yy11;
+       case 'c':       goto yy9;
+       default:        goto yy4;
+       }
+yy7:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy12;
+       case 'b':       goto yy13;
+       case 'c':       goto yy14;
+       default:        goto yy4;
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy7;
+       case 'b':       goto yy11;
+       case 'c':       goto yy15;
+       default:        goto yy4;
+       }
+yy9:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy12;
+       case 'b':       goto yy16;
+       case 'c':       goto yy14;
+       default:        goto yy4;
+       }
+yy10:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:        goto yy4;
+       }
+yy11:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy17;
+       default:        goto yy4;
+       }
+yy12:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy18;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy20;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy21;
+       default:        goto yy4;
+       }
+yy13:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy12;
+       case 'b':       goto yy16;
+       case 'c':       goto yy22;
+       default:        goto yy4;
+       }
+yy14:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy18;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy23;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy21;
+       default:        goto yy4;
+       }
+yy15:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy12;
+       case 'b':       goto yy16;
+       case 'c':       goto yy14;
+       case 'd':       goto yy9;
+       default:        goto yy4;
+       }
+yy16:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy24;
+       default:        goto yy4;
+       }
+yy17:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy9;
+       default:        goto yy4;
+       }
+yy18:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy25;
+       case 'b':       goto yy26;
+       case 'c':       goto yy27;
+       default:        goto yy29;
+       }
+yy19:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt2;
+               yypmatch[4] = yyt3;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt1;
+               yypmatch[3] = yyt3;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy20:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy18;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy23;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy30;
+       default:        goto yy4;
+       }
+yy21:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy25;
+       case 'b':       goto yy31;
+       case 'c':       goto yy27;
+       default:        goto yy29;
+       }
+yy22:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy18;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy23;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy21;
+       case 'd':       goto yy14;
+       default:        goto yy4;
+       }
+yy23:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy32;
+       default:        goto yy4;
+       }
+yy24:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy14;
+       default:        goto yy4;
+       }
+yy25:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy33;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy34;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy35;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy28;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy26:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy25;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy31;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy36;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy28;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy27:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy33;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy37;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy35;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy28;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy28:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy29:
+       switch (yych) {
+       case 'd':       goto yy28;
+       default:        goto yy19;
+       }
+yy30:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy25;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy31;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy27;
+       case 'd':       goto yy21;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy31:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy38;
+       default:        goto yy4;
+       }
+yy32:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy21;
+       default:        goto yy4;
+       }
+yy33:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy39;
+       case 'b':       goto yy40;
+       case 'c':       goto yy41;
+       default:        goto yy29;
+       }
+yy34:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy33;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy37;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy42;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy28;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy35:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy39;
+       case 'b':       goto yy43;
+       case 'c':       goto yy41;
+       default:        goto yy29;
+       }
+yy36:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy33;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy37;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy35;
+       case 'd':       goto yy27;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy37:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy44;
+       default:        goto yy4;
+       }
+yy38:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy27;
+       default:        goto yy4;
+       }
+yy39:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy45;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy46;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy47;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy28;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy40:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy39;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy43;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy48;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy28;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy41:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy45;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy49;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy47;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy28;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy42:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy39;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy43;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy41;
+       case 'd':       goto yy35;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy43:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy50;
+       default:        goto yy4;
+       }
+yy44:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy35;
+       default:        goto yy4;
+       }
+yy45:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy51;
+       case 'b':       goto yy52;
+       case 'c':       goto yy53;
+       default:        goto yy29;
+       }
+yy46:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy45;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy49;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy54;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy28;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy47:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       yyt3 = YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy51;
+       case 'b':       goto yy55;
+       case 'c':       goto yy53;
+       default:        goto yy29;
+       }
+yy48:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy45;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy49;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy47;
+       case 'd':       goto yy41;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy49:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy56;
+       default:        goto yy4;
+       }
+yy50:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy41;
+       default:        goto yy4;
+       }
+yy51:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy57;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy58;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy59;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy28;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy52:
+       yyaccept = 1;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy51;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy55;
+       case 'c':
+               yyt4 = YYCURSOR;
+               goto yy60;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy28;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy53:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy57;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy61;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy59;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy28;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy54:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt3 = YYCURSOR;
+               goto yy51;
+       case 'b':
+               yyt3 = YYCURSOR;
+               goto yy55;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy53;
+       case 'd':       goto yy47;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy55:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy62;
+       default:        goto yy4;
+       }
+yy56:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy47;
+       default:        goto yy4;
+       }
+yy57:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy59;
+       case 'd':
+               yyt3 = YYCURSOR;
+               goto yy28;
+       default:
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy58:
+       yyaccept = 2;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy57;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy61;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy63;
+       case 'd':
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy28;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy59:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       goto yy29;
+yy60:
+       yyaccept = 3;
+       yych = *(YYMARKER = ++YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy57;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy61;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy59;
+       case 'd':       goto yy53;
+       default:
+               yyt1 = yyt4;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy61:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy64;
+       default:        goto yy4;
+       }
+yy62:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy53;
+       default:        goto yy4;
+       }
+yy63:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy59;
+       default:
+               yyt1 = yyt3;
+               yyt3 = YYCURSOR;
+               goto yy19;
+       }
+yy64:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy59;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/89.i.re b/re2c/test/posix_captures/repetition/89.i.re
new file mode 100644 (file)
index 0000000..f01a70c
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (ab|a|c|bcd){4,10}(d*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/repetition/90.i.c b/re2c/test/posix_captures/repetition/90.i.c
new file mode 100644 (file)
index 0000000..b0a34bc
--- /dev/null
@@ -0,0 +1,199 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt5 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt5 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt1 = yyt5 = YYCURSOR;
+               goto yy7;
+       case 'd':
+               yyt2 = yyt5 = NULL;
+               yyt1 = yyt4 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt2 = yyt3 = NULL;
+               yyt1 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt1;
+               yypmatch[3] = yyt2;
+               yypmatch[4] = yyt4;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt5 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt2 = YYCURSOR;
+               goto yy11;
+       case 'c':
+               yyt5 = YYCURSOR;
+               goto yy7;
+       case 'd':
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt3 = yyt5;
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy5:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy12;
+       default:        goto yy6;
+       }
+yy6:
+       YYCURSOR = YYMARKER;
+       switch (yyaccept) {
+       case 0: 
+               yyt2 = yyt3 = NULL;
+               yyt1 = yyt4 = YYCURSOR;
+               goto yy2;
+       case 1: 
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy2;
+       default:
+               yyt3 = yyt2;
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy7:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt5 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = yyt5;
+               yyt5 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt5 = YYCURSOR;
+               goto yy7;
+       case 'd':
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt3 = yyt5;
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy9:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy9;
+       default:
+               yyt3 = yyt5;
+               goto yy2;
+       }
+yy11:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt5 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = yyt5;
+               yyt5 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy13;
+       case 'd':
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt3 = yyt5;
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy12:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy7;
+       default:        goto yy6;
+       }
+yy13:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt5 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt5 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt5 = YYCURSOR;
+               goto yy7;
+       case 'd':       goto yy14;
+       default:
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+yy14:
+       yyaccept = 2;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt5 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt5 = YYCURSOR;
+               goto yy5;
+       case 'c':
+               yyt5 = YYCURSOR;
+               goto yy7;
+       case 'd':
+               yyt5 = yyt2;
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy9;
+       default:
+               yyt3 = yyt2;
+               yyt2 = yyt4 = YYCURSOR;
+               goto yy2;
+       }
+}
+
+re2c: warning: line 5: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 6: unreachable rule (shadowed by rule at line 5) [-Wunreachable-rules]
diff --git a/re2c/test/posix_captures/repetition/90.i.re b/re2c/test/posix_captures/repetition/90.i.re
new file mode 100644 (file)
index 0000000..19ef905
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (ab|a|c|bcd)*(d*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/repetition/91.i.c b/re2c/test/posix_captures/repetition/91.i.c
new file mode 100644 (file)
index 0000000..7c416a4
--- /dev/null
@@ -0,0 +1,195 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       unsigned int yyaccept = 0;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy6;
+       case 'c':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy8;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt4 = YYCURSOR;
+               goto yy10;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy8;
+       case 'd':
+               yyt4 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt3 = yyt1;
+               yyt4 = YYCURSOR;
+               goto yy5;
+       }
+yy5:
+       {
+               const size_t yynmatch = 3;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = yyt2;
+               yypmatch[4] = yyt4;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[2] = yyt3;
+               yypmatch[3] = yyt4;
+               yypmatch[5] = YYCURSOR;
+               {}
+       }
+yy6:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy13;
+       default:        goto yy7;
+       }
+yy7:
+       YYCURSOR = YYMARKER;
+       switch (yyaccept) {
+       case 0:         goto yy2;
+       case 1: 
+               yyt4 = YYCURSOR;
+               goto yy5;
+       default:
+               yyt3 = yyt4;
+               yyt4 = YYCURSOR;
+               goto yy5;
+       }
+yy8:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = yyt1;
+               yyt1 = YYCURSOR;
+               goto yy6;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy8;
+       case 'd':
+               yyt4 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt3 = yyt1;
+               yyt4 = YYCURSOR;
+               goto yy5;
+       }
+yy10:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt3 = yyt1;
+               yyt1 = YYCURSOR;
+               goto yy6;
+       case 'c':
+               yyt3 = YYCURSOR;
+               goto yy14;
+       case 'd':
+               yyt4 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt3 = yyt1;
+               yyt4 = YYCURSOR;
+               goto yy5;
+       }
+yy11:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy11;
+       default:
+               yyt3 = yyt1;
+               goto yy5;
+       }
+yy13:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy8;
+       default:        goto yy7;
+       }
+yy14:
+       yyaccept = 1;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy8;
+       case 'd':       goto yy15;
+       default:
+               yyt4 = YYCURSOR;
+               goto yy5;
+       }
+yy15:
+       yyaccept = 2;
+       YYMARKER = ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':
+               yyt1 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy8;
+       case 'd':
+               yyt1 = yyt4;
+               yyt4 = YYCURSOR;
+               goto yy11;
+       default:
+               yyt3 = yyt4;
+               yyt4 = YYCURSOR;
+               goto yy5;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/repetition/91.i.re b/re2c/test/posix_captures/repetition/91.i.re
new file mode 100644 (file)
index 0000000..64c2a4d
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (ab|a|c|bcd)+(d*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/rightassoc/01.i.c b/re2c/test/posix_captures/rightassoc/01.i.c
new file mode 100644 (file)
index 0000000..92389d0
--- /dev/null
@@ -0,0 +1,87 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy8;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       goto yy10;
+yy7:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt2;
+               yypmatch[4] = yyt1;
+               yypmatch[6] = yyt3;
+               yypmatch[0] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt1;
+               yypmatch[5] = yyt3;
+               yypmatch[7] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy11;
+       default:        goto yy4;
+       }
+yy9:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy10:
+       switch (yych) {
+       case 'd':       goto yy9;
+       default:        goto yy7;
+       }
+yy11:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/rightassoc/01.i.re b/re2c/test/posix_captures/rightassoc/01.i.re
new file mode 100644 (file)
index 0000000..0d0a539
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a|ab)(c|bcd)(d*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/rightassoc/02.i.c b/re2c/test/posix_captures/rightassoc/02.i.c
new file mode 100644 (file)
index 0000000..92389d0
--- /dev/null
@@ -0,0 +1,87 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy8;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       goto yy10;
+yy7:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt2;
+               yypmatch[4] = yyt1;
+               yypmatch[6] = yyt3;
+               yypmatch[0] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt1;
+               yypmatch[5] = yyt3;
+               yypmatch[7] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy11;
+       default:        goto yy4;
+       }
+yy9:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy10:
+       switch (yych) {
+       case 'd':       goto yy9;
+       default:        goto yy7;
+       }
+yy11:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/rightassoc/02.i.re b/re2c/test/posix_captures/rightassoc/02.i.re
new file mode 100644 (file)
index 0000000..1e28ead
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a|ab)(bcd|c)(d*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/rightassoc/03.i.c b/re2c/test/posix_captures/rightassoc/03.i.c
new file mode 100644 (file)
index 0000000..92389d0
--- /dev/null
@@ -0,0 +1,87 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy8;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       goto yy10;
+yy7:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt2;
+               yypmatch[4] = yyt1;
+               yypmatch[6] = yyt3;
+               yypmatch[0] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt1;
+               yypmatch[5] = yyt3;
+               yypmatch[7] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy11;
+       default:        goto yy4;
+       }
+yy9:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy10:
+       switch (yych) {
+       case 'd':       goto yy9;
+       default:        goto yy7;
+       }
+yy11:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/rightassoc/03.i.re b/re2c/test/posix_captures/rightassoc/03.i.re
new file mode 100644 (file)
index 0000000..1fb9783
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (ab|a)(c|bcd)(d*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/rightassoc/04.i.c b/re2c/test/posix_captures/rightassoc/04.i.c
new file mode 100644 (file)
index 0000000..92389d0
--- /dev/null
@@ -0,0 +1,87 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy8;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       goto yy10;
+yy7:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt2;
+               yypmatch[4] = yyt1;
+               yypmatch[6] = yyt3;
+               yypmatch[0] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt1;
+               yypmatch[5] = yyt3;
+               yypmatch[7] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy11;
+       default:        goto yy4;
+       }
+yy9:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy10:
+       switch (yych) {
+       case 'd':       goto yy9;
+       default:        goto yy7;
+       }
+yy11:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/rightassoc/04.i.re b/re2c/test/posix_captures/rightassoc/04.i.re
new file mode 100644 (file)
index 0000000..5a298ca
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (ab|a)(bcd|c)(d*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/rightassoc/05.i.c b/re2c/test/posix_captures/rightassoc/05.i.c
new file mode 100644 (file)
index 0000000..262a9d1
--- /dev/null
@@ -0,0 +1,69 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy6:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       goto yy9;
+yy7:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt2;
+               yypmatch[4] = yyt1;
+               yypmatch[6] = yyt3;
+               yypmatch[0] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt1;
+               yypmatch[5] = yyt3;
+               yypmatch[7] = YYCURSOR;
+               {}
+       }
+yy8:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy9:
+       switch (yych) {
+       case 'c':       goto yy8;
+       default:        goto yy7;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/rightassoc/05.i.re b/re2c/test/posix_captures/rightassoc/05.i.re
new file mode 100644 (file)
index 0000000..7ac4196
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a*)(b|abc)(c*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/rightassoc/06.i.c b/re2c/test/posix_captures/rightassoc/06.i.c
new file mode 100644 (file)
index 0000000..262a9d1
--- /dev/null
@@ -0,0 +1,69 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy6:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       goto yy9;
+yy7:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt2;
+               yypmatch[4] = yyt1;
+               yypmatch[6] = yyt3;
+               yypmatch[0] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt1;
+               yypmatch[5] = yyt3;
+               yypmatch[7] = YYCURSOR;
+               {}
+       }
+yy8:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy9:
+       switch (yych) {
+       case 'c':       goto yy8;
+       default:        goto yy7;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/rightassoc/06.i.re b/re2c/test/posix_captures/rightassoc/06.i.re
new file mode 100644 (file)
index 0000000..7c18c7b
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a*)(abc|b)(c*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/rightassoc/07.i.c b/re2c/test/posix_captures/rightassoc/07.i.c
new file mode 100644 (file)
index 0000000..262a9d1
--- /dev/null
@@ -0,0 +1,69 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy6:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       goto yy9;
+yy7:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt2;
+               yypmatch[4] = yyt1;
+               yypmatch[6] = yyt3;
+               yypmatch[0] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt1;
+               yypmatch[5] = yyt3;
+               yypmatch[7] = YYCURSOR;
+               {}
+       }
+yy8:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy9:
+       switch (yych) {
+       case 'c':       goto yy8;
+       default:        goto yy7;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/rightassoc/07.i.re b/re2c/test/posix_captures/rightassoc/07.i.re
new file mode 100644 (file)
index 0000000..7ac4196
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a*)(b|abc)(c*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/rightassoc/08.i.c b/re2c/test/posix_captures/rightassoc/08.i.c
new file mode 100644 (file)
index 0000000..262a9d1
--- /dev/null
@@ -0,0 +1,69 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       case 'b':
+               yyt1 = yyt2 = YYCURSOR;
+               goto yy6;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       ++YYCURSOR;
+       if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+       yych = *YYCURSOR;
+       switch (yych) {
+       case 'a':       goto yy3;
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy5;
+       }
+yy5:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy6:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       goto yy9;
+yy7:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt2;
+               yypmatch[4] = yyt1;
+               yypmatch[6] = yyt3;
+               yypmatch[0] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt1;
+               yypmatch[5] = yyt3;
+               yypmatch[7] = YYCURSOR;
+               {}
+       }
+yy8:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy9:
+       switch (yych) {
+       case 'c':       goto yy8;
+       default:        goto yy7;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/rightassoc/08.i.re b/re2c/test/posix_captures/rightassoc/08.i.re
new file mode 100644 (file)
index 0000000..7c18c7b
--- /dev/null
@@ -0,0 +1,7 @@
+/*!re2c
+    re2c:flags:flex-syntax = 1;
+    re2c:flags:posix-captures = 1;
+    (a*)(abc|b)(c*)
+    {}
+    "" {}
+*/
diff --git a/re2c/test/posix_captures/rightassoc/09.i.c b/re2c/test/posix_captures/rightassoc/09.i.c
new file mode 100644 (file)
index 0000000..f430a48
--- /dev/null
@@ -0,0 +1,87 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy8;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       goto yy10;
+yy7:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt2;
+               yypmatch[4] = yyt1;
+               yypmatch[6] = yyt3;
+               yypmatch[0] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt1;
+               yypmatch[5] = yyt3;
+               yypmatch[7] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy11;
+       default:        goto yy4;
+       }
+yy9:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy10:
+       if (yych <= 0x00) goto yy7;
+       goto yy9;
+yy11:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/rightassoc/09.i.re b/re2c/test/posix_captures/rightassoc/09.i.re
new file mode 100644 (file)
index 0000000..ef70ff6
Binary files /dev/null and b/re2c/test/posix_captures/rightassoc/09.i.re differ
diff --git a/re2c/test/posix_captures/rightassoc/10.i.c b/re2c/test/posix_captures/rightassoc/10.i.c
new file mode 100644 (file)
index 0000000..f430a48
--- /dev/null
@@ -0,0 +1,87 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy8;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       goto yy10;
+yy7:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt2;
+               yypmatch[4] = yyt1;
+               yypmatch[6] = yyt3;
+               yypmatch[0] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt1;
+               yypmatch[5] = yyt3;
+               yypmatch[7] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy11;
+       default:        goto yy4;
+       }
+yy9:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy10:
+       if (yych <= 0x00) goto yy7;
+       goto yy9;
+yy11:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/rightassoc/10.i.re b/re2c/test/posix_captures/rightassoc/10.i.re
new file mode 100644 (file)
index 0000000..cf7001d
Binary files /dev/null and b/re2c/test/posix_captures/rightassoc/10.i.re differ
diff --git a/re2c/test/posix_captures/rightassoc/11.i.c b/re2c/test/posix_captures/rightassoc/11.i.c
new file mode 100644 (file)
index 0000000..f430a48
--- /dev/null
@@ -0,0 +1,87 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy8;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       goto yy10;
+yy7:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt2;
+               yypmatch[4] = yyt1;
+               yypmatch[6] = yyt3;
+               yypmatch[0] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt1;
+               yypmatch[5] = yyt3;
+               yypmatch[7] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy11;
+       default:        goto yy4;
+       }
+yy9:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy10:
+       if (yych <= 0x00) goto yy7;
+       goto yy9;
+yy11:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/rightassoc/11.i.re b/re2c/test/posix_captures/rightassoc/11.i.re
new file mode 100644 (file)
index 0000000..a33b730
Binary files /dev/null and b/re2c/test/posix_captures/rightassoc/11.i.re differ
diff --git a/re2c/test/posix_captures/rightassoc/12.i.c b/re2c/test/posix_captures/rightassoc/12.i.c
new file mode 100644 (file)
index 0000000..f430a48
--- /dev/null
@@ -0,0 +1,87 @@
+/* Generated by re2c */
+
+{
+       YYCTYPE yych;
+       if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+       yych = *(YYMARKER = YYCURSOR);
+       switch (yych) {
+       case 'a':
+               yyt2 = YYCURSOR;
+               goto yy3;
+       default:        goto yy2;
+       }
+yy2:
+       {
+               const size_t yynmatch = 1;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[0] = YYCURSOR;
+               yypmatch[1] = YYCURSOR;
+               {}
+       }
+yy3:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':       goto yy5;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy4:
+       YYCURSOR = YYMARKER;
+       goto yy2;
+yy5:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'b':
+               yyt1 = YYCURSOR;
+               goto yy8;
+       case 'c':
+               yyt1 = YYCURSOR;
+               goto yy6;
+       default:        goto yy4;
+       }
+yy6:
+       yych = *++YYCURSOR;
+       yyt3 = YYCURSOR;
+       goto yy10;
+yy7:
+       {
+               const size_t yynmatch = 4;
+               const YYCTYPE *yypmatch[yynmatch * 2];
+               yypmatch[2] = yyt2;
+               yypmatch[4] = yyt1;
+               yypmatch[6] = yyt3;
+               yypmatch[0] = yyt2;
+               yypmatch[1] = YYCURSOR;
+               yypmatch[3] = yyt1;
+               yypmatch[5] = yyt3;
+               yypmatch[7] = YYCURSOR;
+               {}
+       }
+yy8:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'c':       goto yy11;
+       default:        goto yy4;
+       }
+yy9:
+       ++YYCURSOR;
+       if (YYLIMIT <= YYCURSOR) YYFILL(1);
+       yych = *YYCURSOR;
+yy10:
+       if (yych <= 0x00) goto yy7;
+       goto yy9;
+yy11:
+       yych = *++YYCURSOR;
+       switch (yych) {
+       case 'd':       goto yy6;
+       default:        goto yy4;
+       }
+}
+
+re2c: warning: line 6: rule matches empty string [-Wmatch-empty-string]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
+re2c: warning: line 5: trailing context is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags]
diff --git a/re2c/test/posix_captures/rightassoc/12.i.re b/re2c/test/posix_captures/rightassoc/12.i.re
new file mode 100644 (file)
index 0000000..23519ae
Binary files /dev/null and b/re2c/test/posix_captures/rightassoc/12.i.re differ