From 0b962be8588d701f4729926501b1c93dd9eb4dca Mon Sep 17 00:00:00 2001 From: Ulya Trofimovich Date: Fri, 3 Mar 2017 23:21:38 +0000 Subject: [PATCH] Added tests for POSIX captures. 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 ' ' 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 '("")'. --- re2c/test/posix_captures/.dat/basic.dat | 59 ++ re2c/test/posix_captures/.dat/categorize.dat | 11 + re2c/test/posix_captures/.dat/forcedassoc.dat | 28 + re2c/test/posix_captures/.dat/glennfowler.dat | 59 ++ re2c/test/posix_captures/.dat/nullsubexpr.dat | 51 + .../posix_captures/.dat/osxbsdcritical.dat | 7 + re2c/test/posix_captures/.dat/other.dat | 69 ++ re2c/test/posix_captures/.dat/repetition.dat | 94 ++ re2c/test/posix_captures/.dat/rightassoc.dat | 12 + re2c/test/posix_captures/.gen/__gen.sh | 25 + re2c/test/posix_captures/.gen/template | 7 + re2c/test/posix_captures/.run/__run.sh | 44 + re2c/test/posix_captures/.run/template | 45 + re2c/test/posix_captures/basic/01.i.c | 94 ++ re2c/test/posix_captures/basic/01.i.re | Bin 0 -> 126 bytes re2c/test/posix_captures/basic/02.i.c | 94 ++ re2c/test/posix_captures/basic/02.i.re | Bin 0 -> 126 bytes re2c/test/posix_captures/basic/03.i.c | 67 ++ re2c/test/posix_captures/basic/03.i.re | 7 + re2c/test/posix_captures/basic/04.i.c | 52 + re2c/test/posix_captures/basic/04.i.re | 7 + re2c/test/posix_captures/basic/05.i.c | 104 ++ re2c/test/posix_captures/basic/05.i.re | 7 + re2c/test/posix_captures/basic/06.i.c | 104 ++ re2c/test/posix_captures/basic/06.i.re | 7 + re2c/test/posix_captures/basic/07.i.c | 37 + re2c/test/posix_captures/basic/07.i.re | 7 + re2c/test/posix_captures/basic/08.i.c | 47 + re2c/test/posix_captures/basic/08.i.re | 7 + re2c/test/posix_captures/basic/09.i.c | 51 + re2c/test/posix_captures/basic/09.i.re | Bin 0 -> 112 bytes re2c/test/posix_captures/basic/10.i.c | 83 ++ re2c/test/posix_captures/basic/10.i.re | 7 + re2c/test/posix_captures/basic/11.i.c | 46 + re2c/test/posix_captures/basic/11.i.re | Bin 0 -> 111 bytes re2c/test/posix_captures/basic/12.i.c | 69 ++ re2c/test/posix_captures/basic/12.i.re | 7 + re2c/test/posix_captures/basic/13.i.c | 69 ++ re2c/test/posix_captures/basic/13.i.re | 7 + re2c/test/posix_captures/basic/14.i.c | 63 ++ re2c/test/posix_captures/basic/14.i.re | 7 + re2c/test/posix_captures/basic/15.i.c | 106 ++ re2c/test/posix_captures/basic/15.i.re | Bin 0 -> 137 bytes re2c/test/posix_captures/basic/16.i.c | 86 ++ re2c/test/posix_captures/basic/16.i.re | 7 + re2c/test/posix_captures/basic/17.i.c | 86 ++ re2c/test/posix_captures/basic/17.i.re | 7 + re2c/test/posix_captures/basic/18.i.c | 61 ++ re2c/test/posix_captures/basic/18.i.re | 7 + re2c/test/posix_captures/basic/19.i.c | 154 +++ re2c/test/posix_captures/basic/19.i.re | 7 + re2c/test/posix_captures/basic/20.i.c | 470 +++++++++ re2c/test/posix_captures/basic/20.i.re | Bin 0 -> 140 bytes re2c/test/posix_captures/basic/21.i.c | 51 + re2c/test/posix_captures/basic/21.i.re | 7 + re2c/test/posix_captures/basic/22.i.c | 90 ++ re2c/test/posix_captures/basic/22.i.re | 7 + re2c/test/posix_captures/basic/23.i.c | 100 ++ re2c/test/posix_captures/basic/23.i.re | 7 + re2c/test/posix_captures/basic/24.i.c | 137 +++ re2c/test/posix_captures/basic/24.i.re | 7 + re2c/test/posix_captures/basic/25.i.c | 47 + re2c/test/posix_captures/basic/25.i.re | 7 + re2c/test/posix_captures/basic/26.i.c | 56 ++ re2c/test/posix_captures/basic/26.i.re | 7 + re2c/test/posix_captures/basic/27.i.c | 56 ++ re2c/test/posix_captures/basic/27.i.re | 7 + re2c/test/posix_captures/basic/28.i.c | 54 + re2c/test/posix_captures/basic/28.i.re | 7 + re2c/test/posix_captures/basic/29.i.c | 54 + re2c/test/posix_captures/basic/29.i.re | 7 + re2c/test/posix_captures/basic/30.i.c | 48 + re2c/test/posix_captures/basic/30.i.re | 7 + re2c/test/posix_captures/basic/31.i.c | 46 + re2c/test/posix_captures/basic/31.i.re | 7 + re2c/test/posix_captures/basic/32.i.c | 46 + re2c/test/posix_captures/basic/32.i.re | 7 + re2c/test/posix_captures/basic/33.i.c | 34 + re2c/test/posix_captures/basic/33.i.re | 7 + re2c/test/posix_captures/basic/34.i.c | 49 + re2c/test/posix_captures/basic/34.i.re | 7 + re2c/test/posix_captures/basic/35.i.c | 32 + re2c/test/posix_captures/basic/35.i.re | 7 + re2c/test/posix_captures/basic/36.i.c | 39 + re2c/test/posix_captures/basic/36.i.re | 7 + re2c/test/posix_captures/basic/37.i.c | 34 + re2c/test/posix_captures/basic/37.i.re | 7 + re2c/test/posix_captures/basic/38.i.c | 60 ++ re2c/test/posix_captures/basic/38.i.re | 7 + re2c/test/posix_captures/basic/39.i.c | 61 ++ re2c/test/posix_captures/basic/39.i.re | 7 + re2c/test/posix_captures/basic/40.i.c | 60 ++ re2c/test/posix_captures/basic/40.i.re | 7 + re2c/test/posix_captures/basic/41.i.c | 47 + re2c/test/posix_captures/basic/41.i.re | 7 + re2c/test/posix_captures/basic/42.i.c | 58 ++ re2c/test/posix_captures/basic/42.i.re | 7 + re2c/test/posix_captures/basic/43.i.c | 109 +++ re2c/test/posix_captures/basic/43.i.re | 7 + re2c/test/posix_captures/basic/44.i.c | 34 + re2c/test/posix_captures/basic/44.i.re | 7 + re2c/test/posix_captures/basic/45.i.c | 45 + re2c/test/posix_captures/basic/45.i.re | 7 + re2c/test/posix_captures/basic/46.i.c | 62 ++ re2c/test/posix_captures/basic/46.i.re | 7 + re2c/test/posix_captures/basic/47.i.c | 53 + re2c/test/posix_captures/basic/47.i.re | 7 + re2c/test/posix_captures/basic/48.i.c | 53 + re2c/test/posix_captures/basic/48.i.re | 7 + re2c/test/posix_captures/basic/49.i.c | 61 ++ re2c/test/posix_captures/basic/49.i.re | 7 + re2c/test/posix_captures/basic/50.i.c | 58 ++ re2c/test/posix_captures/basic/50.i.re | 7 + re2c/test/posix_captures/basic/51.i.c | 73 ++ re2c/test/posix_captures/basic/51.i.re | 7 + re2c/test/posix_captures/basic/52.i.c | 96 ++ re2c/test/posix_captures/basic/52.i.re | 7 + re2c/test/posix_captures/basic/53.i.c | 66 ++ re2c/test/posix_captures/basic/53.i.re | 7 + re2c/test/posix_captures/basic/54.i.c | 59 ++ re2c/test/posix_captures/basic/54.i.re | 7 + re2c/test/posix_captures/basic/55.i.c | 48 + re2c/test/posix_captures/basic/55.i.re | 7 + re2c/test/posix_captures/basic/56.i.c | 74 ++ re2c/test/posix_captures/basic/56.i.re | Bin 0 -> 115 bytes re2c/test/posix_captures/basic/57.i.c | 53 + re2c/test/posix_captures/basic/57.i.re | 7 + re2c/test/posix_captures/basic/58.i.c | 50 + re2c/test/posix_captures/basic/58.i.re | 7 + re2c/test/posix_captures/basic/59.i.c | 73 ++ re2c/test/posix_captures/basic/59.i.re | 7 + re2c/test/posix_captures/categorize/01.i.c | 119 +++ re2c/test/posix_captures/categorize/01.i.re | 7 + re2c/test/posix_captures/categorize/02.i.c | 140 +++ re2c/test/posix_captures/categorize/02.i.re | 7 + re2c/test/posix_captures/categorize/03.i.c | 65 ++ re2c/test/posix_captures/categorize/03.i.re | Bin 0 -> 121 bytes re2c/test/posix_captures/categorize/04.i.c | 67 ++ re2c/test/posix_captures/categorize/04.i.re | 7 + re2c/test/posix_captures/categorize/05.i.c | 124 +++ re2c/test/posix_captures/categorize/05.i.re | 7 + re2c/test/posix_captures/categorize/06.i.c | 39 + re2c/test/posix_captures/categorize/06.i.re | 7 + re2c/test/posix_captures/categorize/07.i.c | 39 + re2c/test/posix_captures/categorize/07.i.re | 7 + re2c/test/posix_captures/categorize/08.i.c | 156 +++ re2c/test/posix_captures/categorize/08.i.re | 7 + re2c/test/posix_captures/categorize/09.i.c | 62 ++ re2c/test/posix_captures/categorize/09.i.re | 7 + re2c/test/posix_captures/categorize/10.i.c | 35 + re2c/test/posix_captures/categorize/10.i.re | Bin 0 -> 112 bytes re2c/test/posix_captures/categorize/11.i.c | 205 ++++ re2c/test/posix_captures/categorize/11.i.re | 7 + re2c/test/posix_captures/forcedassoc/01.i.c | 86 ++ re2c/test/posix_captures/forcedassoc/01.i.re | 7 + re2c/test/posix_captures/forcedassoc/02.i.c | 86 ++ re2c/test/posix_captures/forcedassoc/02.i.re | 7 + re2c/test/posix_captures/forcedassoc/03.i.c | 86 ++ re2c/test/posix_captures/forcedassoc/03.i.re | 7 + re2c/test/posix_captures/forcedassoc/04.i.c | 86 ++ re2c/test/posix_captures/forcedassoc/04.i.re | 7 + re2c/test/posix_captures/forcedassoc/05.i.c | 102 ++ re2c/test/posix_captures/forcedassoc/05.i.re | 7 + re2c/test/posix_captures/forcedassoc/06.i.c | 102 ++ re2c/test/posix_captures/forcedassoc/06.i.re | 7 + re2c/test/posix_captures/forcedassoc/07.i.c | 102 ++ re2c/test/posix_captures/forcedassoc/07.i.re | 7 + re2c/test/posix_captures/forcedassoc/08.i.c | 102 ++ re2c/test/posix_captures/forcedassoc/08.i.re | 7 + re2c/test/posix_captures/forcedassoc/09.i.c | 90 ++ re2c/test/posix_captures/forcedassoc/09.i.re | 7 + re2c/test/posix_captures/forcedassoc/10.i.c | 90 ++ re2c/test/posix_captures/forcedassoc/10.i.re | 7 + re2c/test/posix_captures/forcedassoc/11.i.c | 90 ++ re2c/test/posix_captures/forcedassoc/11.i.re | 7 + re2c/test/posix_captures/forcedassoc/12.i.c | 90 ++ re2c/test/posix_captures/forcedassoc/12.i.re | 7 + re2c/test/posix_captures/forcedassoc/13.i.c | 66 ++ re2c/test/posix_captures/forcedassoc/13.i.re | 7 + re2c/test/posix_captures/forcedassoc/14.i.c | 66 ++ re2c/test/posix_captures/forcedassoc/14.i.re | 7 + re2c/test/posix_captures/forcedassoc/15.i.c | 82 ++ re2c/test/posix_captures/forcedassoc/15.i.re | 7 + re2c/test/posix_captures/forcedassoc/16.i.c | 82 ++ re2c/test/posix_captures/forcedassoc/16.i.re | 7 + re2c/test/posix_captures/forcedassoc/17.i.c | 72 ++ re2c/test/posix_captures/forcedassoc/17.i.re | 7 + re2c/test/posix_captures/forcedassoc/18.i.c | 72 ++ re2c/test/posix_captures/forcedassoc/18.i.re | 7 + re2c/test/posix_captures/forcedassoc/19.i.c | 66 ++ re2c/test/posix_captures/forcedassoc/19.i.re | 7 + re2c/test/posix_captures/forcedassoc/20.i.c | 66 ++ re2c/test/posix_captures/forcedassoc/20.i.re | 7 + re2c/test/posix_captures/forcedassoc/21.i.c | 82 ++ re2c/test/posix_captures/forcedassoc/21.i.re | 7 + re2c/test/posix_captures/forcedassoc/22.i.c | 82 ++ re2c/test/posix_captures/forcedassoc/22.i.re | 7 + re2c/test/posix_captures/forcedassoc/23.i.c | 72 ++ re2c/test/posix_captures/forcedassoc/23.i.re | 7 + re2c/test/posix_captures/forcedassoc/24.i.c | 72 ++ re2c/test/posix_captures/forcedassoc/24.i.re | 7 + re2c/test/posix_captures/forcedassoc/25.i.c | 42 + re2c/test/posix_captures/forcedassoc/25.i.re | 7 + re2c/test/posix_captures/forcedassoc/26.i.c | 42 + re2c/test/posix_captures/forcedassoc/26.i.re | 7 + re2c/test/posix_captures/forcedassoc/27.i.c | 56 ++ re2c/test/posix_captures/forcedassoc/27.i.re | 7 + re2c/test/posix_captures/forcedassoc/28.i.c | 56 ++ re2c/test/posix_captures/forcedassoc/28.i.re | 7 + re2c/test/posix_captures/glennfowler/01.i.c | 64 ++ re2c/test/posix_captures/glennfowler/01.i.re | 7 + re2c/test/posix_captures/glennfowler/02.i.c | 94 ++ re2c/test/posix_captures/glennfowler/02.i.re | 7 + re2c/test/posix_captures/glennfowler/03.i.c | 78 ++ re2c/test/posix_captures/glennfowler/03.i.re | 7 + re2c/test/posix_captures/glennfowler/04.i.c | 97 ++ re2c/test/posix_captures/glennfowler/04.i.re | 7 + re2c/test/posix_captures/glennfowler/05.i.c | 26 + re2c/test/posix_captures/glennfowler/05.i.re | Bin 0 -> 107 bytes re2c/test/posix_captures/glennfowler/06.i.c | 26 + re2c/test/posix_captures/glennfowler/06.i.re | Bin 0 -> 110 bytes re2c/test/posix_captures/glennfowler/07.i.c | 34 + re2c/test/posix_captures/glennfowler/07.i.re | Bin 0 -> 114 bytes re2c/test/posix_captures/glennfowler/08.i.c | 32 + re2c/test/posix_captures/glennfowler/08.i.re | Bin 0 -> 110 bytes re2c/test/posix_captures/glennfowler/09.i.c | 36 + re2c/test/posix_captures/glennfowler/09.i.re | Bin 0 -> 108 bytes re2c/test/posix_captures/glennfowler/10.i.c | 28 + re2c/test/posix_captures/glennfowler/10.i.re | Bin 0 -> 112 bytes re2c/test/posix_captures/glennfowler/11.i.c | 28 + re2c/test/posix_captures/glennfowler/11.i.re | Bin 0 -> 115 bytes re2c/test/posix_captures/glennfowler/12.i.c | 41 + re2c/test/posix_captures/glennfowler/12.i.re | Bin 0 -> 124 bytes re2c/test/posix_captures/glennfowler/13.i.c | 39 + re2c/test/posix_captures/glennfowler/13.i.re | Bin 0 -> 115 bytes re2c/test/posix_captures/glennfowler/14.i.c | 54 + re2c/test/posix_captures/glennfowler/14.i.re | Bin 0 -> 136 bytes re2c/test/posix_captures/glennfowler/15.i.c | 49 + re2c/test/posix_captures/glennfowler/15.i.re | Bin 0 -> 115 bytes re2c/test/posix_captures/glennfowler/16.i.c | 43 + re2c/test/posix_captures/glennfowler/16.i.re | Bin 0 -> 113 bytes re2c/test/posix_captures/glennfowler/17.i.c | 91 ++ re2c/test/posix_captures/glennfowler/17.i.re | 7 + re2c/test/posix_captures/glennfowler/18.i.c | 91 ++ re2c/test/posix_captures/glennfowler/18.i.re | 7 + re2c/test/posix_captures/glennfowler/19.i.c | 88 ++ re2c/test/posix_captures/glennfowler/19.i.re | 7 + re2c/test/posix_captures/glennfowler/20.i.c | 39 + re2c/test/posix_captures/glennfowler/20.i.re | 7 + re2c/test/posix_captures/glennfowler/21.i.c | 77 ++ re2c/test/posix_captures/glennfowler/21.i.re | 7 + re2c/test/posix_captures/glennfowler/22.i.c | 67 ++ re2c/test/posix_captures/glennfowler/22.i.re | 7 + re2c/test/posix_captures/glennfowler/23.i.c | 54 + re2c/test/posix_captures/glennfowler/23.i.re | 7 + re2c/test/posix_captures/glennfowler/24.i.c | 84 ++ re2c/test/posix_captures/glennfowler/24.i.re | 7 + re2c/test/posix_captures/glennfowler/25.i.c | 85 ++ re2c/test/posix_captures/glennfowler/25.i.re | 7 + re2c/test/posix_captures/glennfowler/26.i.c | 63 ++ re2c/test/posix_captures/glennfowler/26.i.re | 7 + re2c/test/posix_captures/glennfowler/27.i.c | 124 +++ re2c/test/posix_captures/glennfowler/27.i.re | 7 + re2c/test/posix_captures/glennfowler/28.i.c | 212 ++++ re2c/test/posix_captures/glennfowler/28.i.re | 7 + re2c/test/posix_captures/glennfowler/29.i.c | 156 +++ re2c/test/posix_captures/glennfowler/29.i.re | 7 + re2c/test/posix_captures/glennfowler/30.i.c | 48 + re2c/test/posix_captures/glennfowler/30.i.re | 7 + re2c/test/posix_captures/glennfowler/31.i.c | 81 ++ re2c/test/posix_captures/glennfowler/31.i.re | 7 + re2c/test/posix_captures/glennfowler/32.i.c | 130 +++ re2c/test/posix_captures/glennfowler/32.i.re | 7 + re2c/test/posix_captures/glennfowler/33.i.c | 68 ++ re2c/test/posix_captures/glennfowler/33.i.re | 7 + re2c/test/posix_captures/glennfowler/34.i.c | 49 + re2c/test/posix_captures/glennfowler/34.i.re | 7 + re2c/test/posix_captures/glennfowler/35.i.c | 76 ++ re2c/test/posix_captures/glennfowler/35.i.re | 7 + re2c/test/posix_captures/glennfowler/36.i.c | 62 ++ re2c/test/posix_captures/glennfowler/36.i.re | 7 + re2c/test/posix_captures/glennfowler/37.i.c | 37 + re2c/test/posix_captures/glennfowler/37.i.re | Bin 0 -> 114 bytes re2c/test/posix_captures/glennfowler/38.i.c | 35 + re2c/test/posix_captures/glennfowler/38.i.re | Bin 0 -> 112 bytes re2c/test/posix_captures/glennfowler/39.i.c | 82 ++ re2c/test/posix_captures/glennfowler/39.i.re | Bin 0 -> 117 bytes re2c/test/posix_captures/glennfowler/40.i.c | 437 +++++++++ re2c/test/posix_captures/glennfowler/40.i.re | Bin 0 -> 134 bytes re2c/test/posix_captures/glennfowler/41.i.c | 178 ++++ re2c/test/posix_captures/glennfowler/41.i.re | Bin 0 -> 118 bytes re2c/test/posix_captures/glennfowler/42.i.c | 47 + re2c/test/posix_captures/glennfowler/42.i.re | Bin 0 -> 122 bytes re2c/test/posix_captures/glennfowler/43.i.c | 96 ++ re2c/test/posix_captures/glennfowler/43.i.re | Bin 0 -> 128 bytes re2c/test/posix_captures/glennfowler/44.i.c | 114 +++ re2c/test/posix_captures/glennfowler/44.i.re | Bin 0 -> 156 bytes re2c/test/posix_captures/glennfowler/45.i.c | 99 ++ re2c/test/posix_captures/glennfowler/45.i.re | Bin 0 -> 129 bytes re2c/test/posix_captures/nullsubexpr/01.i.c | 39 + re2c/test/posix_captures/nullsubexpr/01.i.re | 7 + re2c/test/posix_captures/nullsubexpr/02.i.c | 34 + re2c/test/posix_captures/nullsubexpr/02.i.re | 7 + re2c/test/posix_captures/nullsubexpr/03.i.c | 40 + re2c/test/posix_captures/nullsubexpr/03.i.re | 7 + re2c/test/posix_captures/nullsubexpr/04.i.c | 41 + re2c/test/posix_captures/nullsubexpr/04.i.re | 7 + re2c/test/posix_captures/nullsubexpr/05.i.c | 39 + re2c/test/posix_captures/nullsubexpr/05.i.re | 7 + re2c/test/posix_captures/nullsubexpr/06.i.c | 34 + re2c/test/posix_captures/nullsubexpr/06.i.re | 7 + re2c/test/posix_captures/nullsubexpr/07.i.c | 41 + re2c/test/posix_captures/nullsubexpr/07.i.re | Bin 0 -> 109 bytes re2c/test/posix_captures/nullsubexpr/08.i.c | 41 + re2c/test/posix_captures/nullsubexpr/08.i.re | 7 + re2c/test/posix_captures/nullsubexpr/09.i.c | 41 + re2c/test/posix_captures/nullsubexpr/09.i.re | Bin 0 -> 109 bytes re2c/test/posix_captures/nullsubexpr/10.i.c | 43 + re2c/test/posix_captures/nullsubexpr/10.i.re | Bin 0 -> 110 bytes re2c/test/posix_captures/nullsubexpr/11.i.c | 66 ++ re2c/test/posix_captures/nullsubexpr/11.i.re | 7 + re2c/test/posix_captures/nullsubexpr/12.i.c | 32 + re2c/test/posix_captures/nullsubexpr/12.i.re | 7 + re2c/test/posix_captures/nullsubexpr/13.i.c | 53 + re2c/test/posix_captures/nullsubexpr/13.i.re | 7 + re2c/test/posix_captures/nullsubexpr/14.i.c | 53 + re2c/test/posix_captures/nullsubexpr/14.i.re | 7 + re2c/test/posix_captures/nullsubexpr/15.i.c | 53 + re2c/test/posix_captures/nullsubexpr/15.i.re | 7 + re2c/test/posix_captures/nullsubexpr/16.i.c | 51 + re2c/test/posix_captures/nullsubexpr/16.i.re | 7 + re2c/test/posix_captures/nullsubexpr/17.i.c | 51 + re2c/test/posix_captures/nullsubexpr/17.i.re | 7 + re2c/test/posix_captures/nullsubexpr/18.i.c | 51 + re2c/test/posix_captures/nullsubexpr/18.i.re | 7 + re2c/test/posix_captures/nullsubexpr/19.i.c | 53 + re2c/test/posix_captures/nullsubexpr/19.i.re | 7 + re2c/test/posix_captures/nullsubexpr/20.i.c | 53 + re2c/test/posix_captures/nullsubexpr/20.i.re | 7 + re2c/test/posix_captures/nullsubexpr/21.i.c | 53 + re2c/test/posix_captures/nullsubexpr/21.i.re | 7 + .../test/posix_captures/osxbsdcritical/01.i.c | 66 ++ .../posix_captures/osxbsdcritical/01.i.re | Bin 0 -> 114 bytes .../test/posix_captures/osxbsdcritical/02.i.c | 66 ++ .../posix_captures/osxbsdcritical/02.i.re | 7 + .../test/posix_captures/osxbsdcritical/03.i.c | 94 ++ .../posix_captures/osxbsdcritical/03.i.re | 7 + .../test/posix_captures/osxbsdcritical/04.i.c | 66 ++ .../posix_captures/osxbsdcritical/04.i.re | Bin 0 -> 114 bytes .../test/posix_captures/osxbsdcritical/05.i.c | 66 ++ .../posix_captures/osxbsdcritical/05.i.re | 7 + .../test/posix_captures/osxbsdcritical/06.i.c | 94 ++ .../posix_captures/osxbsdcritical/06.i.re | 7 + .../test/posix_captures/osxbsdcritical/07.i.c | 58 ++ .../posix_captures/osxbsdcritical/07.i.re | Bin 0 -> 110 bytes re2c/test/posix_captures/other/01.i.c | 53 + re2c/test/posix_captures/other/01.i.re | 7 + re2c/test/posix_captures/other/02.i.c | 53 + re2c/test/posix_captures/other/02.i.re | 7 + re2c/test/posix_captures/other/03.i.c | 33 + re2c/test/posix_captures/other/03.i.re | 7 + re2c/test/posix_captures/other/04.i.c | 35 + re2c/test/posix_captures/other/04.i.re | 7 + re2c/test/posix_captures/other/05.i.c | 49 + re2c/test/posix_captures/other/05.i.re | 7 + re2c/test/posix_captures/other/06.i.c | 48 + re2c/test/posix_captures/other/06.i.re | 7 + re2c/test/posix_captures/other/07.i.c | 42 + re2c/test/posix_captures/other/07.i.re | 7 + re2c/test/posix_captures/other/08.i.c | 54 + re2c/test/posix_captures/other/08.i.re | 7 + re2c/test/posix_captures/other/09.i.c | 103 ++ re2c/test/posix_captures/other/09.i.re | 7 + re2c/test/posix_captures/other/10.i.c | 102 ++ re2c/test/posix_captures/other/10.i.re | 7 + re2c/test/posix_captures/other/11.i.c | 123 +++ re2c/test/posix_captures/other/11.i.re | 7 + re2c/test/posix_captures/other/12.i.c | 296 ++++++ re2c/test/posix_captures/other/12.i.re | 7 + re2c/test/posix_captures/other/13.i.c | 45 + re2c/test/posix_captures/other/13.i.re | 7 + re2c/test/posix_captures/other/14.i.c | 44 + re2c/test/posix_captures/other/14.i.re | 7 + re2c/test/posix_captures/other/15.i.c | 44 + re2c/test/posix_captures/other/15.i.re | 7 + re2c/test/posix_captures/other/16.i.c | 56 ++ re2c/test/posix_captures/other/16.i.re | 7 + re2c/test/posix_captures/other/17.i.c | 53 + re2c/test/posix_captures/other/17.i.re | 7 + re2c/test/posix_captures/other/18.i.c | 54 + re2c/test/posix_captures/other/18.i.re | 7 + re2c/test/posix_captures/other/19.i.c | 39 + re2c/test/posix_captures/other/19.i.re | 7 + re2c/test/posix_captures/other/20.i.c | 43 + re2c/test/posix_captures/other/20.i.re | 7 + re2c/test/posix_captures/other/21.i.c | 37 + re2c/test/posix_captures/other/21.i.re | 7 + re2c/test/posix_captures/other/22.i.c | 53 + re2c/test/posix_captures/other/22.i.re | 7 + re2c/test/posix_captures/other/23.i.c | 49 + re2c/test/posix_captures/other/23.i.re | 7 + re2c/test/posix_captures/other/24.i.c | 46 + re2c/test/posix_captures/other/24.i.re | 7 + re2c/test/posix_captures/other/25.i.c | 94 ++ re2c/test/posix_captures/other/25.i.re | 7 + re2c/test/posix_captures/other/26.i.c | 76 ++ re2c/test/posix_captures/other/26.i.re | 7 + re2c/test/posix_captures/repetition/01.i.c | 46 + re2c/test/posix_captures/repetition/01.i.re | Bin 0 -> 119 bytes re2c/test/posix_captures/repetition/02.i.c | 80 ++ re2c/test/posix_captures/repetition/02.i.re | Bin 0 -> 138 bytes re2c/test/posix_captures/repetition/03.i.c | 121 +++ re2c/test/posix_captures/repetition/03.i.re | Bin 0 -> 157 bytes re2c/test/posix_captures/repetition/04.i.c | 46 + re2c/test/posix_captures/repetition/04.i.re | Bin 0 -> 122 bytes re2c/test/posix_captures/repetition/05.i.c | 67 ++ re2c/test/posix_captures/repetition/05.i.re | Bin 0 -> 122 bytes re2c/test/posix_captures/repetition/06.i.c | 75 ++ re2c/test/posix_captures/repetition/06.i.re | Bin 0 -> 122 bytes re2c/test/posix_captures/repetition/07.i.c | 55 ++ re2c/test/posix_captures/repetition/07.i.re | Bin 0 -> 120 bytes re2c/test/posix_captures/repetition/08.i.c | 46 + re2c/test/posix_captures/repetition/08.i.re | Bin 0 -> 119 bytes re2c/test/posix_captures/repetition/09.i.c | 80 ++ re2c/test/posix_captures/repetition/09.i.re | Bin 0 -> 138 bytes re2c/test/posix_captures/repetition/10.i.c | 121 +++ re2c/test/posix_captures/repetition/10.i.re | Bin 0 -> 157 bytes re2c/test/posix_captures/repetition/11.i.c | 46 + re2c/test/posix_captures/repetition/11.i.re | Bin 0 -> 122 bytes re2c/test/posix_captures/repetition/12.i.c | 67 ++ re2c/test/posix_captures/repetition/12.i.re | Bin 0 -> 122 bytes re2c/test/posix_captures/repetition/13.i.c | 75 ++ re2c/test/posix_captures/repetition/13.i.re | Bin 0 -> 122 bytes re2c/test/posix_captures/repetition/14.i.c | 55 ++ re2c/test/posix_captures/repetition/14.i.re | Bin 0 -> 120 bytes re2c/test/posix_captures/repetition/15.i.c | 46 + re2c/test/posix_captures/repetition/15.i.re | Bin 0 -> 119 bytes re2c/test/posix_captures/repetition/16.i.c | 80 ++ re2c/test/posix_captures/repetition/16.i.re | Bin 0 -> 138 bytes re2c/test/posix_captures/repetition/17.i.c | 121 +++ re2c/test/posix_captures/repetition/17.i.re | Bin 0 -> 157 bytes re2c/test/posix_captures/repetition/18.i.c | 46 + re2c/test/posix_captures/repetition/18.i.re | Bin 0 -> 122 bytes re2c/test/posix_captures/repetition/19.i.c | 67 ++ re2c/test/posix_captures/repetition/19.i.re | Bin 0 -> 122 bytes re2c/test/posix_captures/repetition/20.i.c | 75 ++ re2c/test/posix_captures/repetition/20.i.re | Bin 0 -> 122 bytes re2c/test/posix_captures/repetition/21.i.c | 55 ++ re2c/test/posix_captures/repetition/21.i.re | Bin 0 -> 120 bytes re2c/test/posix_captures/repetition/22.i.c | 46 + re2c/test/posix_captures/repetition/22.i.re | Bin 0 -> 119 bytes re2c/test/posix_captures/repetition/23.i.c | 80 ++ re2c/test/posix_captures/repetition/23.i.re | Bin 0 -> 138 bytes re2c/test/posix_captures/repetition/24.i.c | 121 +++ re2c/test/posix_captures/repetition/24.i.re | Bin 0 -> 157 bytes re2c/test/posix_captures/repetition/25.i.c | 46 + re2c/test/posix_captures/repetition/25.i.re | Bin 0 -> 122 bytes re2c/test/posix_captures/repetition/26.i.c | 67 ++ re2c/test/posix_captures/repetition/26.i.re | Bin 0 -> 122 bytes re2c/test/posix_captures/repetition/27.i.c | 75 ++ re2c/test/posix_captures/repetition/27.i.re | Bin 0 -> 122 bytes re2c/test/posix_captures/repetition/28.i.c | 55 ++ re2c/test/posix_captures/repetition/28.i.re | Bin 0 -> 120 bytes re2c/test/posix_captures/repetition/29.i.c | 46 + re2c/test/posix_captures/repetition/29.i.re | Bin 0 -> 119 bytes re2c/test/posix_captures/repetition/30.i.c | 80 ++ re2c/test/posix_captures/repetition/30.i.re | Bin 0 -> 138 bytes re2c/test/posix_captures/repetition/31.i.c | 121 +++ re2c/test/posix_captures/repetition/31.i.re | Bin 0 -> 157 bytes re2c/test/posix_captures/repetition/32.i.c | 46 + re2c/test/posix_captures/repetition/32.i.re | Bin 0 -> 122 bytes re2c/test/posix_captures/repetition/33.i.c | 67 ++ re2c/test/posix_captures/repetition/33.i.re | Bin 0 -> 122 bytes re2c/test/posix_captures/repetition/34.i.c | 75 ++ re2c/test/posix_captures/repetition/34.i.re | Bin 0 -> 122 bytes re2c/test/posix_captures/repetition/35.i.c | 55 ++ re2c/test/posix_captures/repetition/35.i.re | Bin 0 -> 120 bytes re2c/test/posix_captures/repetition/36.i.c | 46 + re2c/test/posix_captures/repetition/36.i.re | Bin 0 -> 119 bytes re2c/test/posix_captures/repetition/37.i.c | 80 ++ re2c/test/posix_captures/repetition/37.i.re | Bin 0 -> 138 bytes re2c/test/posix_captures/repetition/38.i.c | 121 +++ re2c/test/posix_captures/repetition/38.i.re | Bin 0 -> 157 bytes re2c/test/posix_captures/repetition/39.i.c | 46 + re2c/test/posix_captures/repetition/39.i.re | Bin 0 -> 122 bytes re2c/test/posix_captures/repetition/40.i.c | 67 ++ re2c/test/posix_captures/repetition/40.i.re | Bin 0 -> 122 bytes re2c/test/posix_captures/repetition/41.i.c | 75 ++ re2c/test/posix_captures/repetition/41.i.re | Bin 0 -> 122 bytes re2c/test/posix_captures/repetition/42.i.c | 55 ++ re2c/test/posix_captures/repetition/42.i.re | Bin 0 -> 120 bytes re2c/test/posix_captures/repetition/43.i.c | 46 + re2c/test/posix_captures/repetition/43.i.re | Bin 0 -> 119 bytes re2c/test/posix_captures/repetition/44.i.c | 80 ++ re2c/test/posix_captures/repetition/44.i.re | Bin 0 -> 138 bytes re2c/test/posix_captures/repetition/45.i.c | 121 +++ re2c/test/posix_captures/repetition/45.i.re | Bin 0 -> 157 bytes re2c/test/posix_captures/repetition/46.i.c | 46 + re2c/test/posix_captures/repetition/46.i.re | Bin 0 -> 122 bytes re2c/test/posix_captures/repetition/47.i.c | 67 ++ re2c/test/posix_captures/repetition/47.i.re | Bin 0 -> 122 bytes re2c/test/posix_captures/repetition/48.i.c | 75 ++ re2c/test/posix_captures/repetition/48.i.re | Bin 0 -> 122 bytes re2c/test/posix_captures/repetition/49.i.c | 55 ++ re2c/test/posix_captures/repetition/49.i.re | Bin 0 -> 120 bytes re2c/test/posix_captures/repetition/50.i.c | 93 ++ re2c/test/posix_captures/repetition/50.i.re | Bin 0 -> 113 bytes re2c/test/posix_captures/repetition/51.i.c | 93 ++ re2c/test/posix_captures/repetition/51.i.re | Bin 0 -> 113 bytes re2c/test/posix_captures/repetition/52.i.c | 114 +++ re2c/test/posix_captures/repetition/52.i.re | Bin 0 -> 113 bytes re2c/test/posix_captures/repetition/53.i.c | 133 +++ re2c/test/posix_captures/repetition/53.i.re | Bin 0 -> 113 bytes re2c/test/posix_captures/repetition/54.i.c | 152 +++ re2c/test/posix_captures/repetition/54.i.re | Bin 0 -> 113 bytes re2c/test/posix_captures/repetition/55.i.c | 171 ++++ re2c/test/posix_captures/repetition/55.i.re | Bin 0 -> 113 bytes re2c/test/posix_captures/repetition/56.i.c | 190 ++++ re2c/test/posix_captures/repetition/56.i.re | Bin 0 -> 113 bytes re2c/test/posix_captures/repetition/57.i.c | 209 ++++ re2c/test/posix_captures/repetition/57.i.re | Bin 0 -> 113 bytes re2c/test/posix_captures/repetition/58.i.c | 228 +++++ re2c/test/posix_captures/repetition/58.i.re | Bin 0 -> 113 bytes re2c/test/posix_captures/repetition/59.i.c | 261 +++++ re2c/test/posix_captures/repetition/59.i.re | Bin 0 -> 114 bytes re2c/test/posix_captures/repetition/60.i.c | 257 +++++ re2c/test/posix_captures/repetition/60.i.re | Bin 0 -> 114 bytes re2c/test/posix_captures/repetition/61.i.c | 257 +++++ re2c/test/posix_captures/repetition/61.i.re | Bin 0 -> 114 bytes re2c/test/posix_captures/repetition/62.i.c | 248 +++++ re2c/test/posix_captures/repetition/62.i.re | Bin 0 -> 114 bytes re2c/test/posix_captures/repetition/63.i.c | 239 +++++ re2c/test/posix_captures/repetition/63.i.re | Bin 0 -> 114 bytes re2c/test/posix_captures/repetition/64.i.c | 230 +++++ re2c/test/posix_captures/repetition/64.i.re | Bin 0 -> 114 bytes re2c/test/posix_captures/repetition/65.i.c | 221 +++++ re2c/test/posix_captures/repetition/65.i.re | Bin 0 -> 114 bytes re2c/test/posix_captures/repetition/66.i.c | 215 ++++ re2c/test/posix_captures/repetition/66.i.re | Bin 0 -> 114 bytes re2c/test/posix_captures/repetition/67.i.c | 206 ++++ re2c/test/posix_captures/repetition/67.i.re | Bin 0 -> 114 bytes re2c/test/posix_captures/repetition/68.i.c | 172 ++++ re2c/test/posix_captures/repetition/68.i.re | 7 + re2c/test/posix_captures/repetition/69.i.c | 169 ++++ re2c/test/posix_captures/repetition/69.i.re | 7 + re2c/test/posix_captures/repetition/70.i.c | 217 ++++ re2c/test/posix_captures/repetition/70.i.re | 7 + re2c/test/posix_captures/repetition/71.i.c | 262 +++++ re2c/test/posix_captures/repetition/71.i.re | 7 + re2c/test/posix_captures/repetition/72.i.c | 307 ++++++ re2c/test/posix_captures/repetition/72.i.re | 7 + re2c/test/posix_captures/repetition/73.i.c | 925 ++++++++++++++++++ re2c/test/posix_captures/repetition/73.i.re | 7 + re2c/test/posix_captures/repetition/74.i.c | 821 ++++++++++++++++ re2c/test/posix_captures/repetition/74.i.re | 7 + re2c/test/posix_captures/repetition/75.i.c | 822 ++++++++++++++++ re2c/test/posix_captures/repetition/75.i.re | 7 + re2c/test/posix_captures/repetition/76.i.c | 779 +++++++++++++++ re2c/test/posix_captures/repetition/76.i.re | 7 + re2c/test/posix_captures/repetition/77.i.c | 752 ++++++++++++++ re2c/test/posix_captures/repetition/77.i.re | 7 + re2c/test/posix_captures/repetition/78.i.c | 172 ++++ re2c/test/posix_captures/repetition/78.i.re | 7 + re2c/test/posix_captures/repetition/79.i.c | 169 ++++ re2c/test/posix_captures/repetition/79.i.re | 7 + re2c/test/posix_captures/repetition/80.i.c | 199 ++++ re2c/test/posix_captures/repetition/80.i.re | 7 + re2c/test/posix_captures/repetition/81.i.c | 195 ++++ re2c/test/posix_captures/repetition/81.i.re | 7 + re2c/test/posix_captures/repetition/82.i.c | 217 ++++ re2c/test/posix_captures/repetition/82.i.re | 7 + re2c/test/posix_captures/repetition/83.i.c | 262 +++++ re2c/test/posix_captures/repetition/83.i.re | 7 + re2c/test/posix_captures/repetition/84.i.c | 307 ++++++ re2c/test/posix_captures/repetition/84.i.re | 7 + re2c/test/posix_captures/repetition/85.i.c | 925 ++++++++++++++++++ re2c/test/posix_captures/repetition/85.i.re | 7 + re2c/test/posix_captures/repetition/86.i.c | 821 ++++++++++++++++ re2c/test/posix_captures/repetition/86.i.re | 7 + re2c/test/posix_captures/repetition/87.i.c | 822 ++++++++++++++++ re2c/test/posix_captures/repetition/87.i.re | 7 + re2c/test/posix_captures/repetition/88.i.c | 779 +++++++++++++++ re2c/test/posix_captures/repetition/88.i.re | 7 + re2c/test/posix_captures/repetition/89.i.c | 752 ++++++++++++++ re2c/test/posix_captures/repetition/89.i.re | 7 + re2c/test/posix_captures/repetition/90.i.c | 199 ++++ re2c/test/posix_captures/repetition/90.i.re | 7 + re2c/test/posix_captures/repetition/91.i.c | 195 ++++ re2c/test/posix_captures/repetition/91.i.re | 7 + re2c/test/posix_captures/rightassoc/01.i.c | 87 ++ re2c/test/posix_captures/rightassoc/01.i.re | 7 + re2c/test/posix_captures/rightassoc/02.i.c | 87 ++ re2c/test/posix_captures/rightassoc/02.i.re | 7 + re2c/test/posix_captures/rightassoc/03.i.c | 87 ++ re2c/test/posix_captures/rightassoc/03.i.re | 7 + re2c/test/posix_captures/rightassoc/04.i.c | 87 ++ re2c/test/posix_captures/rightassoc/04.i.re | 7 + re2c/test/posix_captures/rightassoc/05.i.c | 69 ++ re2c/test/posix_captures/rightassoc/05.i.re | 7 + re2c/test/posix_captures/rightassoc/06.i.c | 69 ++ re2c/test/posix_captures/rightassoc/06.i.re | 7 + re2c/test/posix_captures/rightassoc/07.i.c | 69 ++ re2c/test/posix_captures/rightassoc/07.i.re | 7 + re2c/test/posix_captures/rightassoc/08.i.c | 69 ++ re2c/test/posix_captures/rightassoc/08.i.re | 7 + re2c/test/posix_captures/rightassoc/09.i.c | 87 ++ re2c/test/posix_captures/rightassoc/09.i.re | Bin 0 -> 122 bytes re2c/test/posix_captures/rightassoc/10.i.c | 87 ++ re2c/test/posix_captures/rightassoc/10.i.re | Bin 0 -> 122 bytes re2c/test/posix_captures/rightassoc/11.i.c | 87 ++ re2c/test/posix_captures/rightassoc/11.i.re | Bin 0 -> 122 bytes re2c/test/posix_captures/rightassoc/12.i.c | 87 ++ re2c/test/posix_captures/rightassoc/12.i.re | Bin 0 -> 122 bytes 613 files changed, 35364 insertions(+) create mode 100644 re2c/test/posix_captures/.dat/basic.dat create mode 100644 re2c/test/posix_captures/.dat/categorize.dat create mode 100644 re2c/test/posix_captures/.dat/forcedassoc.dat create mode 100644 re2c/test/posix_captures/.dat/glennfowler.dat create mode 100644 re2c/test/posix_captures/.dat/nullsubexpr.dat create mode 100644 re2c/test/posix_captures/.dat/osxbsdcritical.dat create mode 100644 re2c/test/posix_captures/.dat/other.dat create mode 100644 re2c/test/posix_captures/.dat/repetition.dat create mode 100644 re2c/test/posix_captures/.dat/rightassoc.dat create mode 100755 re2c/test/posix_captures/.gen/__gen.sh create mode 100644 re2c/test/posix_captures/.gen/template create mode 100755 re2c/test/posix_captures/.run/__run.sh create mode 100644 re2c/test/posix_captures/.run/template create mode 100644 re2c/test/posix_captures/basic/01.i.c create mode 100644 re2c/test/posix_captures/basic/01.i.re create mode 100644 re2c/test/posix_captures/basic/02.i.c create mode 100644 re2c/test/posix_captures/basic/02.i.re create mode 100644 re2c/test/posix_captures/basic/03.i.c create mode 100644 re2c/test/posix_captures/basic/03.i.re create mode 100644 re2c/test/posix_captures/basic/04.i.c create mode 100644 re2c/test/posix_captures/basic/04.i.re create mode 100644 re2c/test/posix_captures/basic/05.i.c create mode 100644 re2c/test/posix_captures/basic/05.i.re create mode 100644 re2c/test/posix_captures/basic/06.i.c create mode 100644 re2c/test/posix_captures/basic/06.i.re create mode 100644 re2c/test/posix_captures/basic/07.i.c create mode 100644 re2c/test/posix_captures/basic/07.i.re create mode 100644 re2c/test/posix_captures/basic/08.i.c create mode 100644 re2c/test/posix_captures/basic/08.i.re create mode 100644 re2c/test/posix_captures/basic/09.i.c create mode 100644 re2c/test/posix_captures/basic/09.i.re create mode 100644 re2c/test/posix_captures/basic/10.i.c create mode 100644 re2c/test/posix_captures/basic/10.i.re create mode 100644 re2c/test/posix_captures/basic/11.i.c create mode 100644 re2c/test/posix_captures/basic/11.i.re create mode 100644 re2c/test/posix_captures/basic/12.i.c create mode 100644 re2c/test/posix_captures/basic/12.i.re create mode 100644 re2c/test/posix_captures/basic/13.i.c create mode 100644 re2c/test/posix_captures/basic/13.i.re create mode 100644 re2c/test/posix_captures/basic/14.i.c create mode 100644 re2c/test/posix_captures/basic/14.i.re create mode 100644 re2c/test/posix_captures/basic/15.i.c create mode 100644 re2c/test/posix_captures/basic/15.i.re create mode 100644 re2c/test/posix_captures/basic/16.i.c create mode 100644 re2c/test/posix_captures/basic/16.i.re create mode 100644 re2c/test/posix_captures/basic/17.i.c create mode 100644 re2c/test/posix_captures/basic/17.i.re create mode 100644 re2c/test/posix_captures/basic/18.i.c create mode 100644 re2c/test/posix_captures/basic/18.i.re create mode 100644 re2c/test/posix_captures/basic/19.i.c create mode 100644 re2c/test/posix_captures/basic/19.i.re create mode 100644 re2c/test/posix_captures/basic/20.i.c create mode 100644 re2c/test/posix_captures/basic/20.i.re create mode 100644 re2c/test/posix_captures/basic/21.i.c create mode 100644 re2c/test/posix_captures/basic/21.i.re create mode 100644 re2c/test/posix_captures/basic/22.i.c create mode 100644 re2c/test/posix_captures/basic/22.i.re create mode 100644 re2c/test/posix_captures/basic/23.i.c create mode 100644 re2c/test/posix_captures/basic/23.i.re create mode 100644 re2c/test/posix_captures/basic/24.i.c create mode 100644 re2c/test/posix_captures/basic/24.i.re create mode 100644 re2c/test/posix_captures/basic/25.i.c create mode 100644 re2c/test/posix_captures/basic/25.i.re create mode 100644 re2c/test/posix_captures/basic/26.i.c create mode 100644 re2c/test/posix_captures/basic/26.i.re create mode 100644 re2c/test/posix_captures/basic/27.i.c create mode 100644 re2c/test/posix_captures/basic/27.i.re create mode 100644 re2c/test/posix_captures/basic/28.i.c create mode 100644 re2c/test/posix_captures/basic/28.i.re create mode 100644 re2c/test/posix_captures/basic/29.i.c create mode 100644 re2c/test/posix_captures/basic/29.i.re create mode 100644 re2c/test/posix_captures/basic/30.i.c create mode 100644 re2c/test/posix_captures/basic/30.i.re create mode 100644 re2c/test/posix_captures/basic/31.i.c create mode 100644 re2c/test/posix_captures/basic/31.i.re create mode 100644 re2c/test/posix_captures/basic/32.i.c create mode 100644 re2c/test/posix_captures/basic/32.i.re create mode 100644 re2c/test/posix_captures/basic/33.i.c create mode 100644 re2c/test/posix_captures/basic/33.i.re create mode 100644 re2c/test/posix_captures/basic/34.i.c create mode 100644 re2c/test/posix_captures/basic/34.i.re create mode 100644 re2c/test/posix_captures/basic/35.i.c create mode 100644 re2c/test/posix_captures/basic/35.i.re create mode 100644 re2c/test/posix_captures/basic/36.i.c create mode 100644 re2c/test/posix_captures/basic/36.i.re create mode 100644 re2c/test/posix_captures/basic/37.i.c create mode 100644 re2c/test/posix_captures/basic/37.i.re create mode 100644 re2c/test/posix_captures/basic/38.i.c create mode 100644 re2c/test/posix_captures/basic/38.i.re create mode 100644 re2c/test/posix_captures/basic/39.i.c create mode 100644 re2c/test/posix_captures/basic/39.i.re create mode 100644 re2c/test/posix_captures/basic/40.i.c create mode 100644 re2c/test/posix_captures/basic/40.i.re create mode 100644 re2c/test/posix_captures/basic/41.i.c create mode 100644 re2c/test/posix_captures/basic/41.i.re create mode 100644 re2c/test/posix_captures/basic/42.i.c create mode 100644 re2c/test/posix_captures/basic/42.i.re create mode 100644 re2c/test/posix_captures/basic/43.i.c create mode 100644 re2c/test/posix_captures/basic/43.i.re create mode 100644 re2c/test/posix_captures/basic/44.i.c create mode 100644 re2c/test/posix_captures/basic/44.i.re create mode 100644 re2c/test/posix_captures/basic/45.i.c create mode 100644 re2c/test/posix_captures/basic/45.i.re create mode 100644 re2c/test/posix_captures/basic/46.i.c create mode 100644 re2c/test/posix_captures/basic/46.i.re create mode 100644 re2c/test/posix_captures/basic/47.i.c create mode 100644 re2c/test/posix_captures/basic/47.i.re create mode 100644 re2c/test/posix_captures/basic/48.i.c create mode 100644 re2c/test/posix_captures/basic/48.i.re create mode 100644 re2c/test/posix_captures/basic/49.i.c create mode 100644 re2c/test/posix_captures/basic/49.i.re create mode 100644 re2c/test/posix_captures/basic/50.i.c create mode 100644 re2c/test/posix_captures/basic/50.i.re create mode 100644 re2c/test/posix_captures/basic/51.i.c create mode 100644 re2c/test/posix_captures/basic/51.i.re create mode 100644 re2c/test/posix_captures/basic/52.i.c create mode 100644 re2c/test/posix_captures/basic/52.i.re create mode 100644 re2c/test/posix_captures/basic/53.i.c create mode 100644 re2c/test/posix_captures/basic/53.i.re create mode 100644 re2c/test/posix_captures/basic/54.i.c create mode 100644 re2c/test/posix_captures/basic/54.i.re create mode 100644 re2c/test/posix_captures/basic/55.i.c create mode 100644 re2c/test/posix_captures/basic/55.i.re create mode 100644 re2c/test/posix_captures/basic/56.i.c create mode 100644 re2c/test/posix_captures/basic/56.i.re create mode 100644 re2c/test/posix_captures/basic/57.i.c create mode 100644 re2c/test/posix_captures/basic/57.i.re create mode 100644 re2c/test/posix_captures/basic/58.i.c create mode 100644 re2c/test/posix_captures/basic/58.i.re create mode 100644 re2c/test/posix_captures/basic/59.i.c create mode 100644 re2c/test/posix_captures/basic/59.i.re create mode 100644 re2c/test/posix_captures/categorize/01.i.c create mode 100644 re2c/test/posix_captures/categorize/01.i.re create mode 100644 re2c/test/posix_captures/categorize/02.i.c create mode 100644 re2c/test/posix_captures/categorize/02.i.re create mode 100644 re2c/test/posix_captures/categorize/03.i.c create mode 100644 re2c/test/posix_captures/categorize/03.i.re create mode 100644 re2c/test/posix_captures/categorize/04.i.c create mode 100644 re2c/test/posix_captures/categorize/04.i.re create mode 100644 re2c/test/posix_captures/categorize/05.i.c create mode 100644 re2c/test/posix_captures/categorize/05.i.re create mode 100644 re2c/test/posix_captures/categorize/06.i.c create mode 100644 re2c/test/posix_captures/categorize/06.i.re create mode 100644 re2c/test/posix_captures/categorize/07.i.c create mode 100644 re2c/test/posix_captures/categorize/07.i.re create mode 100644 re2c/test/posix_captures/categorize/08.i.c create mode 100644 re2c/test/posix_captures/categorize/08.i.re create mode 100644 re2c/test/posix_captures/categorize/09.i.c create mode 100644 re2c/test/posix_captures/categorize/09.i.re create mode 100644 re2c/test/posix_captures/categorize/10.i.c create mode 100644 re2c/test/posix_captures/categorize/10.i.re create mode 100644 re2c/test/posix_captures/categorize/11.i.c create mode 100644 re2c/test/posix_captures/categorize/11.i.re create mode 100644 re2c/test/posix_captures/forcedassoc/01.i.c create mode 100644 re2c/test/posix_captures/forcedassoc/01.i.re create mode 100644 re2c/test/posix_captures/forcedassoc/02.i.c create mode 100644 re2c/test/posix_captures/forcedassoc/02.i.re create mode 100644 re2c/test/posix_captures/forcedassoc/03.i.c create mode 100644 re2c/test/posix_captures/forcedassoc/03.i.re create mode 100644 re2c/test/posix_captures/forcedassoc/04.i.c create mode 100644 re2c/test/posix_captures/forcedassoc/04.i.re create mode 100644 re2c/test/posix_captures/forcedassoc/05.i.c create mode 100644 re2c/test/posix_captures/forcedassoc/05.i.re create mode 100644 re2c/test/posix_captures/forcedassoc/06.i.c create mode 100644 re2c/test/posix_captures/forcedassoc/06.i.re create mode 100644 re2c/test/posix_captures/forcedassoc/07.i.c create mode 100644 re2c/test/posix_captures/forcedassoc/07.i.re create mode 100644 re2c/test/posix_captures/forcedassoc/08.i.c create mode 100644 re2c/test/posix_captures/forcedassoc/08.i.re create mode 100644 re2c/test/posix_captures/forcedassoc/09.i.c create mode 100644 re2c/test/posix_captures/forcedassoc/09.i.re create mode 100644 re2c/test/posix_captures/forcedassoc/10.i.c create mode 100644 re2c/test/posix_captures/forcedassoc/10.i.re create mode 100644 re2c/test/posix_captures/forcedassoc/11.i.c create mode 100644 re2c/test/posix_captures/forcedassoc/11.i.re create mode 100644 re2c/test/posix_captures/forcedassoc/12.i.c create mode 100644 re2c/test/posix_captures/forcedassoc/12.i.re create mode 100644 re2c/test/posix_captures/forcedassoc/13.i.c create mode 100644 re2c/test/posix_captures/forcedassoc/13.i.re create mode 100644 re2c/test/posix_captures/forcedassoc/14.i.c create mode 100644 re2c/test/posix_captures/forcedassoc/14.i.re create mode 100644 re2c/test/posix_captures/forcedassoc/15.i.c create mode 100644 re2c/test/posix_captures/forcedassoc/15.i.re create mode 100644 re2c/test/posix_captures/forcedassoc/16.i.c create mode 100644 re2c/test/posix_captures/forcedassoc/16.i.re create mode 100644 re2c/test/posix_captures/forcedassoc/17.i.c create mode 100644 re2c/test/posix_captures/forcedassoc/17.i.re create mode 100644 re2c/test/posix_captures/forcedassoc/18.i.c create mode 100644 re2c/test/posix_captures/forcedassoc/18.i.re create mode 100644 re2c/test/posix_captures/forcedassoc/19.i.c create mode 100644 re2c/test/posix_captures/forcedassoc/19.i.re create mode 100644 re2c/test/posix_captures/forcedassoc/20.i.c create mode 100644 re2c/test/posix_captures/forcedassoc/20.i.re create mode 100644 re2c/test/posix_captures/forcedassoc/21.i.c create mode 100644 re2c/test/posix_captures/forcedassoc/21.i.re create mode 100644 re2c/test/posix_captures/forcedassoc/22.i.c create mode 100644 re2c/test/posix_captures/forcedassoc/22.i.re create mode 100644 re2c/test/posix_captures/forcedassoc/23.i.c create mode 100644 re2c/test/posix_captures/forcedassoc/23.i.re create mode 100644 re2c/test/posix_captures/forcedassoc/24.i.c create mode 100644 re2c/test/posix_captures/forcedassoc/24.i.re create mode 100644 re2c/test/posix_captures/forcedassoc/25.i.c create mode 100644 re2c/test/posix_captures/forcedassoc/25.i.re create mode 100644 re2c/test/posix_captures/forcedassoc/26.i.c create mode 100644 re2c/test/posix_captures/forcedassoc/26.i.re create mode 100644 re2c/test/posix_captures/forcedassoc/27.i.c create mode 100644 re2c/test/posix_captures/forcedassoc/27.i.re create mode 100644 re2c/test/posix_captures/forcedassoc/28.i.c create mode 100644 re2c/test/posix_captures/forcedassoc/28.i.re create mode 100644 re2c/test/posix_captures/glennfowler/01.i.c create mode 100644 re2c/test/posix_captures/glennfowler/01.i.re create mode 100644 re2c/test/posix_captures/glennfowler/02.i.c create mode 100644 re2c/test/posix_captures/glennfowler/02.i.re create mode 100644 re2c/test/posix_captures/glennfowler/03.i.c create mode 100644 re2c/test/posix_captures/glennfowler/03.i.re create mode 100644 re2c/test/posix_captures/glennfowler/04.i.c create mode 100644 re2c/test/posix_captures/glennfowler/04.i.re create mode 100644 re2c/test/posix_captures/glennfowler/05.i.c create mode 100644 re2c/test/posix_captures/glennfowler/05.i.re create mode 100644 re2c/test/posix_captures/glennfowler/06.i.c create mode 100644 re2c/test/posix_captures/glennfowler/06.i.re create mode 100644 re2c/test/posix_captures/glennfowler/07.i.c create mode 100644 re2c/test/posix_captures/glennfowler/07.i.re create mode 100644 re2c/test/posix_captures/glennfowler/08.i.c create mode 100644 re2c/test/posix_captures/glennfowler/08.i.re create mode 100644 re2c/test/posix_captures/glennfowler/09.i.c create mode 100644 re2c/test/posix_captures/glennfowler/09.i.re create mode 100644 re2c/test/posix_captures/glennfowler/10.i.c create mode 100644 re2c/test/posix_captures/glennfowler/10.i.re create mode 100644 re2c/test/posix_captures/glennfowler/11.i.c create mode 100644 re2c/test/posix_captures/glennfowler/11.i.re create mode 100644 re2c/test/posix_captures/glennfowler/12.i.c create mode 100644 re2c/test/posix_captures/glennfowler/12.i.re create mode 100644 re2c/test/posix_captures/glennfowler/13.i.c create mode 100644 re2c/test/posix_captures/glennfowler/13.i.re create mode 100644 re2c/test/posix_captures/glennfowler/14.i.c create mode 100644 re2c/test/posix_captures/glennfowler/14.i.re create mode 100644 re2c/test/posix_captures/glennfowler/15.i.c create mode 100644 re2c/test/posix_captures/glennfowler/15.i.re create mode 100644 re2c/test/posix_captures/glennfowler/16.i.c create mode 100644 re2c/test/posix_captures/glennfowler/16.i.re create mode 100644 re2c/test/posix_captures/glennfowler/17.i.c create mode 100644 re2c/test/posix_captures/glennfowler/17.i.re create mode 100644 re2c/test/posix_captures/glennfowler/18.i.c create mode 100644 re2c/test/posix_captures/glennfowler/18.i.re create mode 100644 re2c/test/posix_captures/glennfowler/19.i.c create mode 100644 re2c/test/posix_captures/glennfowler/19.i.re create mode 100644 re2c/test/posix_captures/glennfowler/20.i.c create mode 100644 re2c/test/posix_captures/glennfowler/20.i.re create mode 100644 re2c/test/posix_captures/glennfowler/21.i.c create mode 100644 re2c/test/posix_captures/glennfowler/21.i.re create mode 100644 re2c/test/posix_captures/glennfowler/22.i.c create mode 100644 re2c/test/posix_captures/glennfowler/22.i.re create mode 100644 re2c/test/posix_captures/glennfowler/23.i.c create mode 100644 re2c/test/posix_captures/glennfowler/23.i.re create mode 100644 re2c/test/posix_captures/glennfowler/24.i.c create mode 100644 re2c/test/posix_captures/glennfowler/24.i.re create mode 100644 re2c/test/posix_captures/glennfowler/25.i.c create mode 100644 re2c/test/posix_captures/glennfowler/25.i.re create mode 100644 re2c/test/posix_captures/glennfowler/26.i.c create mode 100644 re2c/test/posix_captures/glennfowler/26.i.re create mode 100644 re2c/test/posix_captures/glennfowler/27.i.c create mode 100644 re2c/test/posix_captures/glennfowler/27.i.re create mode 100644 re2c/test/posix_captures/glennfowler/28.i.c create mode 100644 re2c/test/posix_captures/glennfowler/28.i.re create mode 100644 re2c/test/posix_captures/glennfowler/29.i.c create mode 100644 re2c/test/posix_captures/glennfowler/29.i.re create mode 100644 re2c/test/posix_captures/glennfowler/30.i.c create mode 100644 re2c/test/posix_captures/glennfowler/30.i.re create mode 100644 re2c/test/posix_captures/glennfowler/31.i.c create mode 100644 re2c/test/posix_captures/glennfowler/31.i.re create mode 100644 re2c/test/posix_captures/glennfowler/32.i.c create mode 100644 re2c/test/posix_captures/glennfowler/32.i.re create mode 100644 re2c/test/posix_captures/glennfowler/33.i.c create mode 100644 re2c/test/posix_captures/glennfowler/33.i.re create mode 100644 re2c/test/posix_captures/glennfowler/34.i.c create mode 100644 re2c/test/posix_captures/glennfowler/34.i.re create mode 100644 re2c/test/posix_captures/glennfowler/35.i.c create mode 100644 re2c/test/posix_captures/glennfowler/35.i.re create mode 100644 re2c/test/posix_captures/glennfowler/36.i.c create mode 100644 re2c/test/posix_captures/glennfowler/36.i.re create mode 100644 re2c/test/posix_captures/glennfowler/37.i.c create mode 100644 re2c/test/posix_captures/glennfowler/37.i.re create mode 100644 re2c/test/posix_captures/glennfowler/38.i.c create mode 100644 re2c/test/posix_captures/glennfowler/38.i.re create mode 100644 re2c/test/posix_captures/glennfowler/39.i.c create mode 100644 re2c/test/posix_captures/glennfowler/39.i.re create mode 100644 re2c/test/posix_captures/glennfowler/40.i.c create mode 100644 re2c/test/posix_captures/glennfowler/40.i.re create mode 100644 re2c/test/posix_captures/glennfowler/41.i.c create mode 100644 re2c/test/posix_captures/glennfowler/41.i.re create mode 100644 re2c/test/posix_captures/glennfowler/42.i.c create mode 100644 re2c/test/posix_captures/glennfowler/42.i.re create mode 100644 re2c/test/posix_captures/glennfowler/43.i.c create mode 100644 re2c/test/posix_captures/glennfowler/43.i.re create mode 100644 re2c/test/posix_captures/glennfowler/44.i.c create mode 100644 re2c/test/posix_captures/glennfowler/44.i.re create mode 100644 re2c/test/posix_captures/glennfowler/45.i.c create mode 100644 re2c/test/posix_captures/glennfowler/45.i.re create mode 100644 re2c/test/posix_captures/nullsubexpr/01.i.c create mode 100644 re2c/test/posix_captures/nullsubexpr/01.i.re create mode 100644 re2c/test/posix_captures/nullsubexpr/02.i.c create mode 100644 re2c/test/posix_captures/nullsubexpr/02.i.re create mode 100644 re2c/test/posix_captures/nullsubexpr/03.i.c create mode 100644 re2c/test/posix_captures/nullsubexpr/03.i.re create mode 100644 re2c/test/posix_captures/nullsubexpr/04.i.c create mode 100644 re2c/test/posix_captures/nullsubexpr/04.i.re create mode 100644 re2c/test/posix_captures/nullsubexpr/05.i.c create mode 100644 re2c/test/posix_captures/nullsubexpr/05.i.re create mode 100644 re2c/test/posix_captures/nullsubexpr/06.i.c create mode 100644 re2c/test/posix_captures/nullsubexpr/06.i.re create mode 100644 re2c/test/posix_captures/nullsubexpr/07.i.c create mode 100644 re2c/test/posix_captures/nullsubexpr/07.i.re create mode 100644 re2c/test/posix_captures/nullsubexpr/08.i.c create mode 100644 re2c/test/posix_captures/nullsubexpr/08.i.re create mode 100644 re2c/test/posix_captures/nullsubexpr/09.i.c create mode 100644 re2c/test/posix_captures/nullsubexpr/09.i.re create mode 100644 re2c/test/posix_captures/nullsubexpr/10.i.c create mode 100644 re2c/test/posix_captures/nullsubexpr/10.i.re create mode 100644 re2c/test/posix_captures/nullsubexpr/11.i.c create mode 100644 re2c/test/posix_captures/nullsubexpr/11.i.re create mode 100644 re2c/test/posix_captures/nullsubexpr/12.i.c create mode 100644 re2c/test/posix_captures/nullsubexpr/12.i.re create mode 100644 re2c/test/posix_captures/nullsubexpr/13.i.c create mode 100644 re2c/test/posix_captures/nullsubexpr/13.i.re create mode 100644 re2c/test/posix_captures/nullsubexpr/14.i.c create mode 100644 re2c/test/posix_captures/nullsubexpr/14.i.re create mode 100644 re2c/test/posix_captures/nullsubexpr/15.i.c create mode 100644 re2c/test/posix_captures/nullsubexpr/15.i.re create mode 100644 re2c/test/posix_captures/nullsubexpr/16.i.c create mode 100644 re2c/test/posix_captures/nullsubexpr/16.i.re create mode 100644 re2c/test/posix_captures/nullsubexpr/17.i.c create mode 100644 re2c/test/posix_captures/nullsubexpr/17.i.re create mode 100644 re2c/test/posix_captures/nullsubexpr/18.i.c create mode 100644 re2c/test/posix_captures/nullsubexpr/18.i.re create mode 100644 re2c/test/posix_captures/nullsubexpr/19.i.c create mode 100644 re2c/test/posix_captures/nullsubexpr/19.i.re create mode 100644 re2c/test/posix_captures/nullsubexpr/20.i.c create mode 100644 re2c/test/posix_captures/nullsubexpr/20.i.re create mode 100644 re2c/test/posix_captures/nullsubexpr/21.i.c create mode 100644 re2c/test/posix_captures/nullsubexpr/21.i.re create mode 100644 re2c/test/posix_captures/osxbsdcritical/01.i.c create mode 100644 re2c/test/posix_captures/osxbsdcritical/01.i.re create mode 100644 re2c/test/posix_captures/osxbsdcritical/02.i.c create mode 100644 re2c/test/posix_captures/osxbsdcritical/02.i.re create mode 100644 re2c/test/posix_captures/osxbsdcritical/03.i.c create mode 100644 re2c/test/posix_captures/osxbsdcritical/03.i.re create mode 100644 re2c/test/posix_captures/osxbsdcritical/04.i.c create mode 100644 re2c/test/posix_captures/osxbsdcritical/04.i.re create mode 100644 re2c/test/posix_captures/osxbsdcritical/05.i.c create mode 100644 re2c/test/posix_captures/osxbsdcritical/05.i.re create mode 100644 re2c/test/posix_captures/osxbsdcritical/06.i.c create mode 100644 re2c/test/posix_captures/osxbsdcritical/06.i.re create mode 100644 re2c/test/posix_captures/osxbsdcritical/07.i.c create mode 100644 re2c/test/posix_captures/osxbsdcritical/07.i.re create mode 100644 re2c/test/posix_captures/other/01.i.c create mode 100644 re2c/test/posix_captures/other/01.i.re create mode 100644 re2c/test/posix_captures/other/02.i.c create mode 100644 re2c/test/posix_captures/other/02.i.re create mode 100644 re2c/test/posix_captures/other/03.i.c create mode 100644 re2c/test/posix_captures/other/03.i.re create mode 100644 re2c/test/posix_captures/other/04.i.c create mode 100644 re2c/test/posix_captures/other/04.i.re create mode 100644 re2c/test/posix_captures/other/05.i.c create mode 100644 re2c/test/posix_captures/other/05.i.re create mode 100644 re2c/test/posix_captures/other/06.i.c create mode 100644 re2c/test/posix_captures/other/06.i.re create mode 100644 re2c/test/posix_captures/other/07.i.c create mode 100644 re2c/test/posix_captures/other/07.i.re create mode 100644 re2c/test/posix_captures/other/08.i.c create mode 100644 re2c/test/posix_captures/other/08.i.re create mode 100644 re2c/test/posix_captures/other/09.i.c create mode 100644 re2c/test/posix_captures/other/09.i.re create mode 100644 re2c/test/posix_captures/other/10.i.c create mode 100644 re2c/test/posix_captures/other/10.i.re create mode 100644 re2c/test/posix_captures/other/11.i.c create mode 100644 re2c/test/posix_captures/other/11.i.re create mode 100644 re2c/test/posix_captures/other/12.i.c create mode 100644 re2c/test/posix_captures/other/12.i.re create mode 100644 re2c/test/posix_captures/other/13.i.c create mode 100644 re2c/test/posix_captures/other/13.i.re create mode 100644 re2c/test/posix_captures/other/14.i.c create mode 100644 re2c/test/posix_captures/other/14.i.re create mode 100644 re2c/test/posix_captures/other/15.i.c create mode 100644 re2c/test/posix_captures/other/15.i.re create mode 100644 re2c/test/posix_captures/other/16.i.c create mode 100644 re2c/test/posix_captures/other/16.i.re create mode 100644 re2c/test/posix_captures/other/17.i.c create mode 100644 re2c/test/posix_captures/other/17.i.re create mode 100644 re2c/test/posix_captures/other/18.i.c create mode 100644 re2c/test/posix_captures/other/18.i.re create mode 100644 re2c/test/posix_captures/other/19.i.c create mode 100644 re2c/test/posix_captures/other/19.i.re create mode 100644 re2c/test/posix_captures/other/20.i.c create mode 100644 re2c/test/posix_captures/other/20.i.re create mode 100644 re2c/test/posix_captures/other/21.i.c create mode 100644 re2c/test/posix_captures/other/21.i.re create mode 100644 re2c/test/posix_captures/other/22.i.c create mode 100644 re2c/test/posix_captures/other/22.i.re create mode 100644 re2c/test/posix_captures/other/23.i.c create mode 100644 re2c/test/posix_captures/other/23.i.re create mode 100644 re2c/test/posix_captures/other/24.i.c create mode 100644 re2c/test/posix_captures/other/24.i.re create mode 100644 re2c/test/posix_captures/other/25.i.c create mode 100644 re2c/test/posix_captures/other/25.i.re create mode 100644 re2c/test/posix_captures/other/26.i.c create mode 100644 re2c/test/posix_captures/other/26.i.re create mode 100644 re2c/test/posix_captures/repetition/01.i.c create mode 100644 re2c/test/posix_captures/repetition/01.i.re create mode 100644 re2c/test/posix_captures/repetition/02.i.c create mode 100644 re2c/test/posix_captures/repetition/02.i.re create mode 100644 re2c/test/posix_captures/repetition/03.i.c create mode 100644 re2c/test/posix_captures/repetition/03.i.re create mode 100644 re2c/test/posix_captures/repetition/04.i.c create mode 100644 re2c/test/posix_captures/repetition/04.i.re create mode 100644 re2c/test/posix_captures/repetition/05.i.c create mode 100644 re2c/test/posix_captures/repetition/05.i.re create mode 100644 re2c/test/posix_captures/repetition/06.i.c create mode 100644 re2c/test/posix_captures/repetition/06.i.re create mode 100644 re2c/test/posix_captures/repetition/07.i.c create mode 100644 re2c/test/posix_captures/repetition/07.i.re create mode 100644 re2c/test/posix_captures/repetition/08.i.c create mode 100644 re2c/test/posix_captures/repetition/08.i.re create mode 100644 re2c/test/posix_captures/repetition/09.i.c create mode 100644 re2c/test/posix_captures/repetition/09.i.re create mode 100644 re2c/test/posix_captures/repetition/10.i.c create mode 100644 re2c/test/posix_captures/repetition/10.i.re create mode 100644 re2c/test/posix_captures/repetition/11.i.c create mode 100644 re2c/test/posix_captures/repetition/11.i.re create mode 100644 re2c/test/posix_captures/repetition/12.i.c create mode 100644 re2c/test/posix_captures/repetition/12.i.re create mode 100644 re2c/test/posix_captures/repetition/13.i.c create mode 100644 re2c/test/posix_captures/repetition/13.i.re create mode 100644 re2c/test/posix_captures/repetition/14.i.c create mode 100644 re2c/test/posix_captures/repetition/14.i.re create mode 100644 re2c/test/posix_captures/repetition/15.i.c create mode 100644 re2c/test/posix_captures/repetition/15.i.re create mode 100644 re2c/test/posix_captures/repetition/16.i.c create mode 100644 re2c/test/posix_captures/repetition/16.i.re create mode 100644 re2c/test/posix_captures/repetition/17.i.c create mode 100644 re2c/test/posix_captures/repetition/17.i.re create mode 100644 re2c/test/posix_captures/repetition/18.i.c create mode 100644 re2c/test/posix_captures/repetition/18.i.re create mode 100644 re2c/test/posix_captures/repetition/19.i.c create mode 100644 re2c/test/posix_captures/repetition/19.i.re create mode 100644 re2c/test/posix_captures/repetition/20.i.c create mode 100644 re2c/test/posix_captures/repetition/20.i.re create mode 100644 re2c/test/posix_captures/repetition/21.i.c create mode 100644 re2c/test/posix_captures/repetition/21.i.re create mode 100644 re2c/test/posix_captures/repetition/22.i.c create mode 100644 re2c/test/posix_captures/repetition/22.i.re create mode 100644 re2c/test/posix_captures/repetition/23.i.c create mode 100644 re2c/test/posix_captures/repetition/23.i.re create mode 100644 re2c/test/posix_captures/repetition/24.i.c create mode 100644 re2c/test/posix_captures/repetition/24.i.re create mode 100644 re2c/test/posix_captures/repetition/25.i.c create mode 100644 re2c/test/posix_captures/repetition/25.i.re create mode 100644 re2c/test/posix_captures/repetition/26.i.c create mode 100644 re2c/test/posix_captures/repetition/26.i.re create mode 100644 re2c/test/posix_captures/repetition/27.i.c create mode 100644 re2c/test/posix_captures/repetition/27.i.re create mode 100644 re2c/test/posix_captures/repetition/28.i.c create mode 100644 re2c/test/posix_captures/repetition/28.i.re create mode 100644 re2c/test/posix_captures/repetition/29.i.c create mode 100644 re2c/test/posix_captures/repetition/29.i.re create mode 100644 re2c/test/posix_captures/repetition/30.i.c create mode 100644 re2c/test/posix_captures/repetition/30.i.re create mode 100644 re2c/test/posix_captures/repetition/31.i.c create mode 100644 re2c/test/posix_captures/repetition/31.i.re create mode 100644 re2c/test/posix_captures/repetition/32.i.c create mode 100644 re2c/test/posix_captures/repetition/32.i.re create mode 100644 re2c/test/posix_captures/repetition/33.i.c create mode 100644 re2c/test/posix_captures/repetition/33.i.re create mode 100644 re2c/test/posix_captures/repetition/34.i.c create mode 100644 re2c/test/posix_captures/repetition/34.i.re create mode 100644 re2c/test/posix_captures/repetition/35.i.c create mode 100644 re2c/test/posix_captures/repetition/35.i.re create mode 100644 re2c/test/posix_captures/repetition/36.i.c create mode 100644 re2c/test/posix_captures/repetition/36.i.re create mode 100644 re2c/test/posix_captures/repetition/37.i.c create mode 100644 re2c/test/posix_captures/repetition/37.i.re create mode 100644 re2c/test/posix_captures/repetition/38.i.c create mode 100644 re2c/test/posix_captures/repetition/38.i.re create mode 100644 re2c/test/posix_captures/repetition/39.i.c create mode 100644 re2c/test/posix_captures/repetition/39.i.re create mode 100644 re2c/test/posix_captures/repetition/40.i.c create mode 100644 re2c/test/posix_captures/repetition/40.i.re create mode 100644 re2c/test/posix_captures/repetition/41.i.c create mode 100644 re2c/test/posix_captures/repetition/41.i.re create mode 100644 re2c/test/posix_captures/repetition/42.i.c create mode 100644 re2c/test/posix_captures/repetition/42.i.re create mode 100644 re2c/test/posix_captures/repetition/43.i.c create mode 100644 re2c/test/posix_captures/repetition/43.i.re create mode 100644 re2c/test/posix_captures/repetition/44.i.c create mode 100644 re2c/test/posix_captures/repetition/44.i.re create mode 100644 re2c/test/posix_captures/repetition/45.i.c create mode 100644 re2c/test/posix_captures/repetition/45.i.re create mode 100644 re2c/test/posix_captures/repetition/46.i.c create mode 100644 re2c/test/posix_captures/repetition/46.i.re create mode 100644 re2c/test/posix_captures/repetition/47.i.c create mode 100644 re2c/test/posix_captures/repetition/47.i.re create mode 100644 re2c/test/posix_captures/repetition/48.i.c create mode 100644 re2c/test/posix_captures/repetition/48.i.re create mode 100644 re2c/test/posix_captures/repetition/49.i.c create mode 100644 re2c/test/posix_captures/repetition/49.i.re create mode 100644 re2c/test/posix_captures/repetition/50.i.c create mode 100644 re2c/test/posix_captures/repetition/50.i.re create mode 100644 re2c/test/posix_captures/repetition/51.i.c create mode 100644 re2c/test/posix_captures/repetition/51.i.re create mode 100644 re2c/test/posix_captures/repetition/52.i.c create mode 100644 re2c/test/posix_captures/repetition/52.i.re create mode 100644 re2c/test/posix_captures/repetition/53.i.c create mode 100644 re2c/test/posix_captures/repetition/53.i.re create mode 100644 re2c/test/posix_captures/repetition/54.i.c create mode 100644 re2c/test/posix_captures/repetition/54.i.re create mode 100644 re2c/test/posix_captures/repetition/55.i.c create mode 100644 re2c/test/posix_captures/repetition/55.i.re create mode 100644 re2c/test/posix_captures/repetition/56.i.c create mode 100644 re2c/test/posix_captures/repetition/56.i.re create mode 100644 re2c/test/posix_captures/repetition/57.i.c create mode 100644 re2c/test/posix_captures/repetition/57.i.re create mode 100644 re2c/test/posix_captures/repetition/58.i.c create mode 100644 re2c/test/posix_captures/repetition/58.i.re create mode 100644 re2c/test/posix_captures/repetition/59.i.c create mode 100644 re2c/test/posix_captures/repetition/59.i.re create mode 100644 re2c/test/posix_captures/repetition/60.i.c create mode 100644 re2c/test/posix_captures/repetition/60.i.re create mode 100644 re2c/test/posix_captures/repetition/61.i.c create mode 100644 re2c/test/posix_captures/repetition/61.i.re create mode 100644 re2c/test/posix_captures/repetition/62.i.c create mode 100644 re2c/test/posix_captures/repetition/62.i.re create mode 100644 re2c/test/posix_captures/repetition/63.i.c create mode 100644 re2c/test/posix_captures/repetition/63.i.re create mode 100644 re2c/test/posix_captures/repetition/64.i.c create mode 100644 re2c/test/posix_captures/repetition/64.i.re create mode 100644 re2c/test/posix_captures/repetition/65.i.c create mode 100644 re2c/test/posix_captures/repetition/65.i.re create mode 100644 re2c/test/posix_captures/repetition/66.i.c create mode 100644 re2c/test/posix_captures/repetition/66.i.re create mode 100644 re2c/test/posix_captures/repetition/67.i.c create mode 100644 re2c/test/posix_captures/repetition/67.i.re create mode 100644 re2c/test/posix_captures/repetition/68.i.c create mode 100644 re2c/test/posix_captures/repetition/68.i.re create mode 100644 re2c/test/posix_captures/repetition/69.i.c create mode 100644 re2c/test/posix_captures/repetition/69.i.re create mode 100644 re2c/test/posix_captures/repetition/70.i.c create mode 100644 re2c/test/posix_captures/repetition/70.i.re create mode 100644 re2c/test/posix_captures/repetition/71.i.c create mode 100644 re2c/test/posix_captures/repetition/71.i.re create mode 100644 re2c/test/posix_captures/repetition/72.i.c create mode 100644 re2c/test/posix_captures/repetition/72.i.re create mode 100644 re2c/test/posix_captures/repetition/73.i.c create mode 100644 re2c/test/posix_captures/repetition/73.i.re create mode 100644 re2c/test/posix_captures/repetition/74.i.c create mode 100644 re2c/test/posix_captures/repetition/74.i.re create mode 100644 re2c/test/posix_captures/repetition/75.i.c create mode 100644 re2c/test/posix_captures/repetition/75.i.re create mode 100644 re2c/test/posix_captures/repetition/76.i.c create mode 100644 re2c/test/posix_captures/repetition/76.i.re create mode 100644 re2c/test/posix_captures/repetition/77.i.c create mode 100644 re2c/test/posix_captures/repetition/77.i.re create mode 100644 re2c/test/posix_captures/repetition/78.i.c create mode 100644 re2c/test/posix_captures/repetition/78.i.re create mode 100644 re2c/test/posix_captures/repetition/79.i.c create mode 100644 re2c/test/posix_captures/repetition/79.i.re create mode 100644 re2c/test/posix_captures/repetition/80.i.c create mode 100644 re2c/test/posix_captures/repetition/80.i.re create mode 100644 re2c/test/posix_captures/repetition/81.i.c create mode 100644 re2c/test/posix_captures/repetition/81.i.re create mode 100644 re2c/test/posix_captures/repetition/82.i.c create mode 100644 re2c/test/posix_captures/repetition/82.i.re create mode 100644 re2c/test/posix_captures/repetition/83.i.c create mode 100644 re2c/test/posix_captures/repetition/83.i.re create mode 100644 re2c/test/posix_captures/repetition/84.i.c create mode 100644 re2c/test/posix_captures/repetition/84.i.re create mode 100644 re2c/test/posix_captures/repetition/85.i.c create mode 100644 re2c/test/posix_captures/repetition/85.i.re create mode 100644 re2c/test/posix_captures/repetition/86.i.c create mode 100644 re2c/test/posix_captures/repetition/86.i.re create mode 100644 re2c/test/posix_captures/repetition/87.i.c create mode 100644 re2c/test/posix_captures/repetition/87.i.re create mode 100644 re2c/test/posix_captures/repetition/88.i.c create mode 100644 re2c/test/posix_captures/repetition/88.i.re create mode 100644 re2c/test/posix_captures/repetition/89.i.c create mode 100644 re2c/test/posix_captures/repetition/89.i.re create mode 100644 re2c/test/posix_captures/repetition/90.i.c create mode 100644 re2c/test/posix_captures/repetition/90.i.re create mode 100644 re2c/test/posix_captures/repetition/91.i.c create mode 100644 re2c/test/posix_captures/repetition/91.i.re create mode 100644 re2c/test/posix_captures/rightassoc/01.i.c create mode 100644 re2c/test/posix_captures/rightassoc/01.i.re create mode 100644 re2c/test/posix_captures/rightassoc/02.i.c create mode 100644 re2c/test/posix_captures/rightassoc/02.i.re create mode 100644 re2c/test/posix_captures/rightassoc/03.i.c create mode 100644 re2c/test/posix_captures/rightassoc/03.i.re create mode 100644 re2c/test/posix_captures/rightassoc/04.i.c create mode 100644 re2c/test/posix_captures/rightassoc/04.i.re create mode 100644 re2c/test/posix_captures/rightassoc/05.i.c create mode 100644 re2c/test/posix_captures/rightassoc/05.i.re create mode 100644 re2c/test/posix_captures/rightassoc/06.i.c create mode 100644 re2c/test/posix_captures/rightassoc/06.i.re create mode 100644 re2c/test/posix_captures/rightassoc/07.i.c create mode 100644 re2c/test/posix_captures/rightassoc/07.i.re create mode 100644 re2c/test/posix_captures/rightassoc/08.i.c create mode 100644 re2c/test/posix_captures/rightassoc/08.i.re create mode 100644 re2c/test/posix_captures/rightassoc/09.i.c create mode 100644 re2c/test/posix_captures/rightassoc/09.i.re create mode 100644 re2c/test/posix_captures/rightassoc/10.i.c create mode 100644 re2c/test/posix_captures/rightassoc/10.i.re create mode 100644 re2c/test/posix_captures/rightassoc/11.i.c create mode 100644 re2c/test/posix_captures/rightassoc/11.i.re create mode 100644 re2c/test/posix_captures/rightassoc/12.i.c create mode 100644 re2c/test/posix_captures/rightassoc/12.i.re diff --git a/re2c/test/posix_captures/.dat/basic.dat b/re2c/test/posix_captures/.dat/basic.dat new file mode 100644 index 00000000..3ed2993f --- /dev/null +++ b/re2c/test/posix_captures/.dat/basic.dat @@ -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[-]?c ac (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 index 00000000..959646fc --- /dev/null +++ b/re2c/test/posix_captures/.dat/categorize.dat @@ -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 index 00000000..a7c7fb28 --- /dev/null +++ b/re2c/test/posix_captures/.dat/forcedassoc.dat @@ -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 index 00000000..f789c494 --- /dev/null +++ b/re2c/test/posix_captures/.dat/glennfowler.dat @@ -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 index 00000000..c9f92d01 --- /dev/null +++ b/re2c/test/posix_captures/.dat/nullsubexpr.dat @@ -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 index 00000000..fc6b5fd0 --- /dev/null +++ b/re2c/test/posix_captures/.dat/osxbsdcritical.dat @@ -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 index 00000000..261682b2 --- /dev/null +++ b/re2c/test/posix_captures/.dat/other.dat @@ -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 index 00000000..e5b2bba0 --- /dev/null +++ b/re2c/test/posix_captures/.dat/repetition.dat @@ -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 index 00000000..e0e146c0 --- /dev/null +++ b/re2c/test/posix_captures/.dat/rightassoc.dat @@ -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 index 00000000..cedd6a86 --- /dev/null +++ b/re2c/test/posix_captures/.gen/__gen.sh @@ -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/" > $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 index 00000000..d66eb2e4 --- /dev/null +++ b/re2c/test/posix_captures/.gen/template @@ -0,0 +1,7 @@ +/*!re2c + re2c:flags:flex-syntax = 1; + re2c:flags:posix-captures = 1; + <<<>>> + {} + "" {} +*/ diff --git a/re2c/test/posix_captures/.run/__run.sh b/re2c/test/posix_captures/.run/__run.sh new file mode 100755 index 00000000..c4eb3f01 --- /dev/null +++ b/re2c/test/posix_captures/.run/__run.sh @@ -0,0 +1,44 @@ + +# run [re2c-flags] +run() { + re2c=../../../.build/re2c + f="test_"`date +%y%m%d%H%M%S` + fail=0 + + cat template | sed "s/<<<>>>/$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 index 00000000..d36fe447 --- /dev/null +++ b/re2c/test/posix_captures/.run/template @@ -0,0 +1,45 @@ +#include + +static int lex(const char *YYCURSOR) +{ + const char *YYMARKER; + /*!tags:re2c format = "const char *@@;"; */ + /*!re2c + re2c:yyfill:enable = 0; + re2c:define:YYCTYPE = char; + + <<<>>> + { + 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 index 00000000..95f82f15 --- /dev/null +++ b/re2c/test/posix_captures/basic/01.i.c @@ -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 index 0000000000000000000000000000000000000000..8cd2f82d79a25cb8a5dd4c7f3f1e80f514d00e1e GIT binary patch literal 126 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H gBa~=F$1%i$u%;HA3E_fGsICQ5N=gbqmX= 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 index 0000000000000000000000000000000000000000..8cd2f82d79a25cb8a5dd4c7f3f1e80f514d00e1e GIT binary patch literal 126 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H gBa~=F$1%i$u%;HA3E_fGsICQ5N=gbqmX= 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 index 0000000000000000000000000000000000000000..3c4c9419e96a5c48bde8d4a9476766c6a70e5288 GIT binary patch literal 112 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H gBa|d+X(UF+F~rs+CTfE9RM&zjB_#zQOG}>%06st-;Q#;t literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/basic/10.i.c b/re2c/test/posix_captures/basic/10.i.c new file mode 100644 index 00000000..99cf3dd9 --- /dev/null +++ b/re2c/test/posix_captures/basic/10.i.c @@ -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 index 00000000..7b353052 --- /dev/null +++ b/re2c/test/posix_captures/basic/10.i.re @@ -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 index 00000000..d92f686a --- /dev/null +++ b/re2c/test/posix_captures/basic/11.i.c @@ -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 index 0000000000000000000000000000000000000000..9493389a7fb04c394f3979113bcc400f90a8288d GIT binary patch literal 111 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H fBa~<))+A}#N5?V5YJs&>*Mcb}B?TZ$OP>n>895$b literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/basic/12.i.c b/re2c/test/posix_captures/basic/12.i.c new file mode 100644 index 00000000..83126bff --- /dev/null +++ b/re2c/test/posix_captures/basic/12.i.c @@ -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 index 00000000..93eddb83 --- /dev/null +++ b/re2c/test/posix_captures/basic/12.i.re @@ -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 index 00000000..83126bff --- /dev/null +++ b/re2c/test/posix_captures/basic/13.i.c @@ -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 index 00000000..93eddb83 --- /dev/null +++ b/re2c/test/posix_captures/basic/13.i.re @@ -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 index 00000000..f0ad48b4 --- /dev/null +++ b/re2c/test/posix_captures/basic/14.i.c @@ -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 index 00000000..c4f67469 --- /dev/null +++ b/re2c/test/posix_captures/basic/14.i.re @@ -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 index 00000000..fd5a58ec --- /dev/null +++ b/re2c/test/posix_captures/basic/15.i.c @@ -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 index 0000000000000000000000000000000000000000..01aa58460faf6b3f38ffb7ed37da789b444b50a4 GIT binary patch literal 137 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H mBa~=F$1%hv)_}+)O%SOCW^18{gAJ>$1yf2&3P6^YJ{JJWqb0-u literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/basic/16.i.c b/re2c/test/posix_captures/basic/16.i.c new file mode 100644 index 00000000..ecec131f --- /dev/null +++ b/re2c/test/posix_captures/basic/16.i.c @@ -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 index 00000000..5ce187d4 --- /dev/null +++ b/re2c/test/posix_captures/basic/16.i.re @@ -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 index 00000000..ecec131f --- /dev/null +++ b/re2c/test/posix_captures/basic/17.i.c @@ -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 index 00000000..fada1d7e --- /dev/null +++ b/re2c/test/posix_captures/basic/17.i.re @@ -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 index 00000000..3cacffb4 --- /dev/null +++ b/re2c/test/posix_captures/basic/18.i.c @@ -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 index 00000000..1df26991 --- /dev/null +++ b/re2c/test/posix_captures/basic/18.i.re @@ -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 index 00000000..f8714511 --- /dev/null +++ b/re2c/test/posix_captures/basic/19.i.c @@ -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 index 00000000..658aef39 --- /dev/null +++ b/re2c/test/posix_captures/basic/19.i.re @@ -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 index 00000000..6e6595fc --- /dev/null +++ b/re2c/test/posix_captures/basic/20.i.c @@ -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 index 0000000000000000000000000000000000000000..390e663a90439215371cd2f658fa6986d2b7da1a GIT binary patch literal 140 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H qBa~<)M#nM4)_@2wOH->xBN4#`iG#2v*u3gmFr}oV0Ay+Da{&NLt0t}h literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/basic/21.i.c b/re2c/test/posix_captures/basic/21.i.c new file mode 100644 index 00000000..078eb9bc --- /dev/null +++ b/re2c/test/posix_captures/basic/21.i.c @@ -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 index 00000000..78a08746 --- /dev/null +++ b/re2c/test/posix_captures/basic/21.i.re @@ -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 index 00000000..66f5e7f0 --- /dev/null +++ b/re2c/test/posix_captures/basic/22.i.c @@ -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 index 00000000..efd6c497 --- /dev/null +++ b/re2c/test/posix_captures/basic/22.i.re @@ -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 index 00000000..4feb8ae8 --- /dev/null +++ b/re2c/test/posix_captures/basic/23.i.c @@ -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 index 00000000..b54b08ac --- /dev/null +++ b/re2c/test/posix_captures/basic/23.i.re @@ -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 index 00000000..bc0a9e8d --- /dev/null +++ b/re2c/test/posix_captures/basic/24.i.c @@ -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 index 00000000..a34a65c0 --- /dev/null +++ b/re2c/test/posix_captures/basic/24.i.re @@ -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 index 00000000..71861750 --- /dev/null +++ b/re2c/test/posix_captures/basic/25.i.c @@ -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 index 00000000..94ad0795 --- /dev/null +++ b/re2c/test/posix_captures/basic/25.i.re @@ -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 index 00000000..ea400447 --- /dev/null +++ b/re2c/test/posix_captures/basic/26.i.c @@ -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 index 00000000..a4f77f57 --- /dev/null +++ b/re2c/test/posix_captures/basic/26.i.re @@ -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 index 00000000..ea400447 --- /dev/null +++ b/re2c/test/posix_captures/basic/27.i.c @@ -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 index 00000000..a4f77f57 --- /dev/null +++ b/re2c/test/posix_captures/basic/27.i.re @@ -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 index 00000000..8302835a --- /dev/null +++ b/re2c/test/posix_captures/basic/28.i.c @@ -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 index 00000000..0e5eaeac --- /dev/null +++ b/re2c/test/posix_captures/basic/28.i.re @@ -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 index 00000000..8302835a --- /dev/null +++ b/re2c/test/posix_captures/basic/29.i.c @@ -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 index 00000000..0e5eaeac --- /dev/null +++ b/re2c/test/posix_captures/basic/29.i.re @@ -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 index 00000000..612068fb --- /dev/null +++ b/re2c/test/posix_captures/basic/30.i.c @@ -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 index 00000000..4d736721 --- /dev/null +++ b/re2c/test/posix_captures/basic/30.i.re @@ -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 index 00000000..2c713ec0 --- /dev/null +++ b/re2c/test/posix_captures/basic/31.i.c @@ -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 index 00000000..6eca49f5 --- /dev/null +++ b/re2c/test/posix_captures/basic/31.i.re @@ -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 index 00000000..2c713ec0 --- /dev/null +++ b/re2c/test/posix_captures/basic/32.i.c @@ -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 index 00000000..6eca49f5 --- /dev/null +++ b/re2c/test/posix_captures/basic/32.i.re @@ -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 index 00000000..db7b4bc5 --- /dev/null +++ b/re2c/test/posix_captures/basic/33.i.c @@ -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 index 00000000..01887060 --- /dev/null +++ b/re2c/test/posix_captures/basic/33.i.re @@ -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 index 00000000..6ac6e30f --- /dev/null +++ b/re2c/test/posix_captures/basic/34.i.c @@ -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 index 00000000..eae3b5bc --- /dev/null +++ b/re2c/test/posix_captures/basic/34.i.re @@ -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 index 00000000..9ecc668b --- /dev/null +++ b/re2c/test/posix_captures/basic/35.i.c @@ -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 index 00000000..179c1487 --- /dev/null +++ b/re2c/test/posix_captures/basic/35.i.re @@ -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 index 00000000..a0e369b4 --- /dev/null +++ b/re2c/test/posix_captures/basic/36.i.c @@ -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 index 00000000..6c647641 --- /dev/null +++ b/re2c/test/posix_captures/basic/36.i.re @@ -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 index 00000000..dee1de1d --- /dev/null +++ b/re2c/test/posix_captures/basic/37.i.c @@ -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 index 00000000..8131d005 --- /dev/null +++ b/re2c/test/posix_captures/basic/37.i.re @@ -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 index 00000000..c66d2ab0 --- /dev/null +++ b/re2c/test/posix_captures/basic/38.i.c @@ -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 index 00000000..c891a0dc --- /dev/null +++ b/re2c/test/posix_captures/basic/38.i.re @@ -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 index 00000000..e09de1ff --- /dev/null +++ b/re2c/test/posix_captures/basic/39.i.c @@ -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 index 00000000..635389bd --- /dev/null +++ b/re2c/test/posix_captures/basic/39.i.re @@ -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 index 00000000..7cf2e62b --- /dev/null +++ b/re2c/test/posix_captures/basic/40.i.c @@ -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 index 00000000..e672a883 --- /dev/null +++ b/re2c/test/posix_captures/basic/40.i.re @@ -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 index 00000000..52c95db0 --- /dev/null +++ b/re2c/test/posix_captures/basic/41.i.c @@ -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 index 00000000..4593eb04 --- /dev/null +++ b/re2c/test/posix_captures/basic/41.i.re @@ -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 index 00000000..be44ca34 --- /dev/null +++ b/re2c/test/posix_captures/basic/42.i.c @@ -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 index 00000000..1926bec1 --- /dev/null +++ b/re2c/test/posix_captures/basic/42.i.re @@ -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 index 00000000..06690e40 --- /dev/null +++ b/re2c/test/posix_captures/basic/43.i.c @@ -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 index 00000000..9c3c05bb --- /dev/null +++ b/re2c/test/posix_captures/basic/43.i.re @@ -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 index 00000000..1e45b314 --- /dev/null +++ b/re2c/test/posix_captures/basic/44.i.c @@ -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 index 00000000..c574d434 --- /dev/null +++ b/re2c/test/posix_captures/basic/44.i.re @@ -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 index 00000000..d2724cdf --- /dev/null +++ b/re2c/test/posix_captures/basic/45.i.c @@ -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 index 00000000..713730c4 --- /dev/null +++ b/re2c/test/posix_captures/basic/45.i.re @@ -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 index 00000000..add0f6fb --- /dev/null +++ b/re2c/test/posix_captures/basic/46.i.c @@ -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 index 00000000..9988bbc6 --- /dev/null +++ b/re2c/test/posix_captures/basic/46.i.re @@ -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 index 00000000..5fa27efc --- /dev/null +++ b/re2c/test/posix_captures/basic/47.i.c @@ -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 index 00000000..e30d847e --- /dev/null +++ b/re2c/test/posix_captures/basic/47.i.re @@ -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 index 00000000..e64ceab8 --- /dev/null +++ b/re2c/test/posix_captures/basic/48.i.c @@ -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 index 00000000..0354a955 --- /dev/null +++ b/re2c/test/posix_captures/basic/48.i.re @@ -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 index 00000000..ab09f5d0 --- /dev/null +++ b/re2c/test/posix_captures/basic/49.i.c @@ -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 index 00000000..518c84a2 --- /dev/null +++ b/re2c/test/posix_captures/basic/49.i.re @@ -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 index 00000000..2733ed48 --- /dev/null +++ b/re2c/test/posix_captures/basic/50.i.c @@ -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 index 00000000..11f19616 --- /dev/null +++ b/re2c/test/posix_captures/basic/50.i.re @@ -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 index 00000000..78c6cfbd --- /dev/null +++ b/re2c/test/posix_captures/basic/51.i.c @@ -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 index 00000000..63a580a7 --- /dev/null +++ b/re2c/test/posix_captures/basic/51.i.re @@ -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 index 00000000..2ffa8f34 --- /dev/null +++ b/re2c/test/posix_captures/basic/52.i.c @@ -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 index 00000000..c4943a0e --- /dev/null +++ b/re2c/test/posix_captures/basic/52.i.re @@ -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 index 00000000..37112624 --- /dev/null +++ b/re2c/test/posix_captures/basic/53.i.c @@ -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 index 00000000..ef8f0d91 --- /dev/null +++ b/re2c/test/posix_captures/basic/53.i.re @@ -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 index 00000000..7c37fa94 --- /dev/null +++ b/re2c/test/posix_captures/basic/54.i.c @@ -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 index 00000000..a34a7a26 --- /dev/null +++ b/re2c/test/posix_captures/basic/54.i.re @@ -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 index 00000000..49d5c2d8 --- /dev/null +++ b/re2c/test/posix_captures/basic/55.i.c @@ -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 index 00000000..c75c2c6a --- /dev/null +++ b/re2c/test/posix_captures/basic/55.i.re @@ -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 index 00000000..c7edbc27 --- /dev/null +++ b/re2c/test/posix_captures/basic/56.i.c @@ -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 index 0000000000000000000000000000000000000000..b0e627f8f5af9276e036e31aad98a391e797d038 GIT binary patch literal 115 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H eBa~=F$1%ieX(mHyu(s-2Fr}oV0Ay+Da{&N~5gye5 literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/basic/57.i.c b/re2c/test/posix_captures/basic/57.i.c new file mode 100644 index 00000000..c7b34a50 --- /dev/null +++ b/re2c/test/posix_captures/basic/57.i.c @@ -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 index 00000000..09c333ca --- /dev/null +++ b/re2c/test/posix_captures/basic/57.i.re @@ -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 index 00000000..42747ff5 --- /dev/null +++ b/re2c/test/posix_captures/basic/58.i.c @@ -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 index 00000000..548dd7e3 --- /dev/null +++ b/re2c/test/posix_captures/basic/58.i.re @@ -0,0 +1,7 @@ +/*!re2c + re2c:flags:flex-syntax = 1; + re2c:flags:posix-captures = 1; + a[-]?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 index 00000000..5339041a --- /dev/null +++ b/re2c/test/posix_captures/basic/59.i.c @@ -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 index 00000000..28e6bef8 --- /dev/null +++ b/re2c/test/posix_captures/basic/59.i.re @@ -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 index 00000000..833d38b7 --- /dev/null +++ b/re2c/test/posix_captures/categorize/01.i.c @@ -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 index 00000000..0ef51ecf --- /dev/null +++ b/re2c/test/posix_captures/categorize/01.i.re @@ -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 index 00000000..04dac1a9 --- /dev/null +++ b/re2c/test/posix_captures/categorize/02.i.c @@ -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 index 00000000..2f49506a --- /dev/null +++ b/re2c/test/posix_captures/categorize/02.i.re @@ -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 index 00000000..7bed7f69 --- /dev/null +++ b/re2c/test/posix_captures/categorize/03.i.c @@ -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 index 0000000000000000000000000000000000000000..5357fe43c645f891d7c9f3e661d6cb661aeca585 GIT binary patch literal 121 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H gBa~=F$1%jhusw)juc-yrTwM#Ml#~>JEG>O509-X7p#T5? literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/categorize/04.i.c b/re2c/test/posix_captures/categorize/04.i.c new file mode 100644 index 00000000..5cad290a --- /dev/null +++ b/re2c/test/posix_captures/categorize/04.i.c @@ -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 index 00000000..771d410d --- /dev/null +++ b/re2c/test/posix_captures/categorize/04.i.re @@ -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 index 00000000..35d4c96c --- /dev/null +++ b/re2c/test/posix_captures/categorize/05.i.c @@ -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 index 00000000..2c4417f8 --- /dev/null +++ b/re2c/test/posix_captures/categorize/05.i.re @@ -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 index 00000000..0a468540 --- /dev/null +++ b/re2c/test/posix_captures/categorize/06.i.c @@ -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 index 00000000..1cc0b312 --- /dev/null +++ b/re2c/test/posix_captures/categorize/06.i.re @@ -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 index 00000000..a0e369b4 --- /dev/null +++ b/re2c/test/posix_captures/categorize/07.i.c @@ -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 index 00000000..6c647641 --- /dev/null +++ b/re2c/test/posix_captures/categorize/07.i.re @@ -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 index 00000000..d6cfefe0 --- /dev/null +++ b/re2c/test/posix_captures/categorize/08.i.c @@ -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 index 00000000..a12b35d3 --- /dev/null +++ b/re2c/test/posix_captures/categorize/08.i.re @@ -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 index 00000000..310504fa --- /dev/null +++ b/re2c/test/posix_captures/categorize/09.i.c @@ -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 index 00000000..3a4e3a2f --- /dev/null +++ b/re2c/test/posix_captures/categorize/09.i.re @@ -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 index 00000000..aaf30b8d --- /dev/null +++ b/re2c/test/posix_captures/categorize/10.i.c @@ -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 index 0000000000000000000000000000000000000000..17991be6b2cc8effcfb8a62c03730c3153a60e9a GIT binary patch literal 112 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H dBa}qPF~n+VfJsfTp6XgKrKF?)WNGPh0RSs|9w7h# literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/categorize/11.i.c b/re2c/test/posix_captures/categorize/11.i.c new file mode 100644 index 00000000..c3b4568a --- /dev/null +++ b/re2c/test/posix_captures/categorize/11.i.c @@ -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 index 00000000..12e93fd7 --- /dev/null +++ b/re2c/test/posix_captures/categorize/11.i.re @@ -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 index 00000000..dd96b7fa --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/01.i.c @@ -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 index 00000000..4cd57761 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/01.i.re @@ -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 index 00000000..dd96b7fa --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/02.i.c @@ -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 index 00000000..1045d7f2 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/02.i.re @@ -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 index 00000000..dd96b7fa --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/03.i.c @@ -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 index 00000000..712586e5 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/03.i.re @@ -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 index 00000000..dd96b7fa --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/04.i.c @@ -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 index 00000000..68fbbdec --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/04.i.re @@ -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 index 00000000..77d6ea15 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/05.i.c @@ -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 index 00000000..2bffe439 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/05.i.re @@ -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 index 00000000..77d6ea15 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/06.i.c @@ -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 index 00000000..4899b651 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/06.i.re @@ -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 index 00000000..77d6ea15 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/07.i.c @@ -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 index 00000000..a7c60330 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/07.i.re @@ -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 index 00000000..77d6ea15 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/08.i.c @@ -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 index 00000000..bbaf0218 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/08.i.re @@ -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 index 00000000..9533c662 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/09.i.c @@ -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 index 00000000..679364e6 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/09.i.re @@ -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 index 00000000..9533c662 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/10.i.c @@ -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 index 00000000..31d4fb7b --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/10.i.re @@ -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 index 00000000..9533c662 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/11.i.c @@ -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 index 00000000..3453ed0a --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/11.i.re @@ -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 index 00000000..9533c662 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/12.i.c @@ -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 index 00000000..f98e95e3 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/12.i.re @@ -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 index 00000000..bbe2e4a5 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/13.i.c @@ -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 index 00000000..33f680d8 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/13.i.re @@ -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 index 00000000..bbe2e4a5 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/14.i.c @@ -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 index 00000000..bda28c7e --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/14.i.re @@ -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 index 00000000..99a7f0ff --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/15.i.c @@ -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 index 00000000..23e1454a --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/15.i.re @@ -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 index 00000000..99a7f0ff --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/16.i.c @@ -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 index 00000000..75836fe7 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/16.i.re @@ -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 index 00000000..6793e590 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/17.i.c @@ -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 index 00000000..efb0e6c6 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/17.i.re @@ -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 index 00000000..6793e590 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/18.i.c @@ -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 index 00000000..d2ee1fd9 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/18.i.re @@ -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 index 00000000..bbe2e4a5 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/19.i.c @@ -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 index 00000000..33f680d8 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/19.i.re @@ -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 index 00000000..bbe2e4a5 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/20.i.c @@ -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 index 00000000..bda28c7e --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/20.i.re @@ -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 index 00000000..99a7f0ff --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/21.i.c @@ -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 index 00000000..23e1454a --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/21.i.re @@ -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 index 00000000..99a7f0ff --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/22.i.c @@ -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 index 00000000..75836fe7 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/22.i.re @@ -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 index 00000000..6793e590 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/23.i.c @@ -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 index 00000000..efb0e6c6 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/23.i.re @@ -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 index 00000000..6793e590 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/24.i.c @@ -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 index 00000000..d2ee1fd9 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/24.i.re @@ -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 index 00000000..0298fe97 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/25.i.c @@ -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 index 00000000..dbe97542 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/25.i.re @@ -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 index 00000000..0298fe97 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/26.i.c @@ -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 index 00000000..98fe6b64 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/26.i.re @@ -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 index 00000000..b341cf97 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/27.i.c @@ -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 index 00000000..dd4048b3 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/27.i.re @@ -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 index 00000000..b341cf97 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/28.i.c @@ -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 index 00000000..d7d6b551 --- /dev/null +++ b/re2c/test/posix_captures/forcedassoc/28.i.re @@ -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 index 00000000..ad3818f8 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/01.i.c @@ -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 index 00000000..9ba890a2 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/01.i.re @@ -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 index 00000000..07129cc2 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/02.i.c @@ -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 index 00000000..3e2edd11 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/02.i.re @@ -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 index 00000000..6ddc52fe --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/03.i.c @@ -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 index 00000000..675f01f8 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/03.i.re @@ -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 index 00000000..7db38aea --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/04.i.c @@ -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 index 00000000..230d9df3 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/04.i.re @@ -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 index 00000000..78ad0e25 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/05.i.c @@ -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 index 0000000000000000000000000000000000000000..4611985bb92f1e7341002bf06b14feaf654f2d13 GIT binary patch literal 107 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H bBa~=F$1%j(Yl4+m*Mcb}B?TZ$OP>n>ki{JK literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/glennfowler/06.i.c b/re2c/test/posix_captures/glennfowler/06.i.c new file mode 100644 index 00000000..78ad0e25 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/06.i.c @@ -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 index 0000000000000000000000000000000000000000..102f0cf05e038558fed9196c167c5edc1307be35 GIT binary patch literal 110 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H dBa~=F$1%j(YgQZ9f^}3wC?zEYAWKW13jp@j9v=Vz literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/glennfowler/07.i.c b/re2c/test/posix_captures/glennfowler/07.i.c new file mode 100644 index 00000000..544fc4d3 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/07.i.c @@ -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 index 0000000000000000000000000000000000000000..a96d64d9487378db1cb936d6d61345f3261d2ce5 GIT binary patch literal 114 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H dBa~=F$1%j(YeFfouIgGarKF?)WNGPh0RU= 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 index 0000000000000000000000000000000000000000..0e0134fced85cf7c17d74cd4f27dcc48470aef70 GIT binary patch literal 110 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H dBa~=F$1%j(YgQZ8f^}3wC?zEYAWKW13jp@)9v}b! literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/glennfowler/09.i.c b/re2c/test/posix_captures/glennfowler/09.i.c new file mode 100644 index 00000000..7f88bc61 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/09.i.c @@ -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 index 0000000000000000000000000000000000000000..ea30b305847abf26dcd5db768b884a1ea61a030e GIT binary patch literal 108 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H cBa~=F$1%j(YifbjSJ#3mB_#zQOG}>%0Ih-@AOHXW literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/glennfowler/10.i.c b/re2c/test/posix_captures/glennfowler/10.i.c new file mode 100644 index 00000000..5a5ca6f2 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/10.i.c @@ -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 index 0000000000000000000000000000000000000000..48404453b51920583ee80eca2396121da5d36a52 GIT binary patch literal 112 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H dBa~=F$1%j(g9%Nrp6XgKrKF?)WNGPh0RS&D9!mfK literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/glennfowler/11.i.c b/re2c/test/posix_captures/glennfowler/11.i.c new file mode 100644 index 00000000..5a5ca6f2 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/11.i.c @@ -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 index 0000000000000000000000000000000000000000..80f113b155034a2de6ed33fed95473325ac3b6c4 GIT binary patch literal 115 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H fBa~=F$1%j(g9*)Q!&2m=9nL!_P literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/glennfowler/12.i.c b/re2c/test/posix_captures/glennfowler/12.i.c new file mode 100644 index 00000000..a10ba406 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/12.i.c @@ -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 index 0000000000000000000000000000000000000000..67711d5df307eceb668f700aa71ee758428cad25 GIT binary patch literal 124 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H eBa~=F$1%j(g9%M!HdudkEtpbLQUJ2F^tk}PEFne! literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/glennfowler/13.i.c b/re2c/test/posix_captures/glennfowler/13.i.c new file mode 100644 index 00000000..f56d32a2 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/13.i.c @@ -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 index 0000000000000000000000000000000000000000..7971eaefa5e8c6c28bc267de80d6bc571154d442 GIT binary patch literal 115 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H fBa~=F$1%j(g9*)Qqgt@GY6zvIqyS`T>2m=9nOGln literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/glennfowler/14.i.c b/re2c/test/posix_captures/glennfowler/14.i.c new file mode 100644 index 00000000..ae67d1b3 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/14.i.c @@ -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 index 0000000000000000000000000000000000000000..698b36655fc34015bb395bb295bbce9c2e487397 GIT binary patch literal 136 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H fBa~=F$1%j(g9%MsY_M6?wO~p~Ndd^x(&qvIa`_}d literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/glennfowler/15.i.c b/re2c/test/posix_captures/glennfowler/15.i.c new file mode 100644 index 00000000..64107e4b --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/15.i.c @@ -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 index 0000000000000000000000000000000000000000..1f196a88f558e6e96acd49ddd557fc8cb03955e5 GIT binary patch literal 115 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H fBa~=F$1%j(g9*)Q<65w`Y6zvIqyS`T>2m=9nQtF< literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/glennfowler/16.i.c b/re2c/test/posix_captures/glennfowler/16.i.c new file mode 100644 index 00000000..bfb8b509 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/16.i.c @@ -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 index 0000000000000000000000000000000000000000..ed51ad8cac36ee269f0901f1302cd0551fca72bd GIT binary patch literal 113 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H eBa~=F$1%j(g9%M7u%_x-Fr}oV0Ay+Da{&NNL>_ej literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/glennfowler/17.i.c b/re2c/test/posix_captures/glennfowler/17.i.c new file mode 100644 index 00000000..d19b0aba --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/17.i.c @@ -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 index 00000000..458fa6ea --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/17.i.re @@ -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 index 00000000..8dc3a9d9 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/18.i.c @@ -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 index 00000000..54514fbc --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/18.i.re @@ -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 index 00000000..0424afc9 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/19.i.c @@ -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 index 00000000..0915ba25 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/19.i.re @@ -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 index 00000000..0a468540 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/20.i.c @@ -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 index 00000000..1cc0b312 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/20.i.re @@ -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 index 00000000..d2a9e424 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/21.i.c @@ -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 index 00000000..55e8cbda --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/21.i.re @@ -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 index 00000000..3b6a8205 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/22.i.c @@ -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 index 00000000..c1dcea2e --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/22.i.re @@ -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 index 00000000..70cd89f1 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/23.i.c @@ -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 index 00000000..e4e800c2 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/23.i.re @@ -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 index 00000000..63f38184 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/24.i.c @@ -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 index 00000000..26194641 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/24.i.re @@ -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 index 00000000..aa92b617 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/25.i.c @@ -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 index 00000000..3c8515ee --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/25.i.re @@ -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 index 00000000..c265c15d --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/26.i.c @@ -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 index 00000000..97050cdc --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/26.i.re @@ -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 index 00000000..35d4c96c --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/27.i.c @@ -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 index 00000000..2c4417f8 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/27.i.re @@ -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 index 00000000..a353abe5 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/28.i.c @@ -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 index 00000000..7de698aa --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/28.i.re @@ -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 index 00000000..d6cfefe0 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/29.i.c @@ -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 index 00000000..a12b35d3 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/29.i.re @@ -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 index 00000000..74d26604 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/30.i.c @@ -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 index 00000000..539c3eff --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/30.i.re @@ -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 index 00000000..b39c3e59 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/31.i.c @@ -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 index 00000000..07d74325 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/31.i.re @@ -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 index 00000000..953fff0a --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/32.i.c @@ -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 index 00000000..97d8be16 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/32.i.re @@ -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 index 00000000..f3edb1a9 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/33.i.c @@ -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 index 00000000..fef9735d --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/33.i.re @@ -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 index 00000000..677466b3 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/34.i.c @@ -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 index 00000000..71a22472 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/34.i.re @@ -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 index 00000000..79496b96 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/35.i.c @@ -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 index 00000000..682135a3 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/35.i.re @@ -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 index 00000000..310504fa --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/36.i.c @@ -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 index 00000000..3a4e3a2f --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/36.i.re @@ -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 index 00000000..bf2721f1 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/37.i.c @@ -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 index 0000000000000000000000000000000000000000..21ba51650a0ad0a46bd855abd6e60efe682f878c GIT binary patch literal 114 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H dBa~=F$1%ieX+kNmuIgGarKF?)WNGPh0RUyr9&!Kx literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/glennfowler/38.i.c b/re2c/test/posix_captures/glennfowler/38.i.c new file mode 100644 index 00000000..aaf30b8d --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/38.i.c @@ -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 index 0000000000000000000000000000000000000000..17991be6b2cc8effcfb8a62c03730c3153a60e9a GIT binary patch literal 112 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H dBa}qPF~n+VfJsfTp6XgKrKF?)WNGPh0RSs|9w7h# literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/glennfowler/39.i.c b/re2c/test/posix_captures/glennfowler/39.i.c new file mode 100644 index 00000000..268f7815 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/39.i.c @@ -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 index 0000000000000000000000000000000000000000..b971d233e149dc112a0b0cf6ef9152560dce65a1 GIT binary patch literal 117 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H iBa~<)M#nM4YE{)Ff$2(3u*T|IFr}oV0Ay+Da{&P8z93To literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/glennfowler/40.i.c b/re2c/test/posix_captures/glennfowler/40.i.c new file mode 100644 index 00000000..136b5259 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/40.i.c @@ -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 index 0000000000000000000000000000000000000000..f0befe0c1fd460ba916e82ffd130d9b783f251d6 GIT binary patch literal 134 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H kBa~<)M#nM4YE{)Ff$2(33<0o7)wN(sNl5|7($ePw0AtZ5RsaA1 literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/glennfowler/41.i.c b/re2c/test/posix_captures/glennfowler/41.i.c new file mode 100644 index 00000000..7608e9df --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/41.i.c @@ -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 index 0000000000000000000000000000000000000000..a738619253a51cb2ac30c959b6cf82d4a780a2d2 GIT binary patch literal 118 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H jBa~<)M#nM4YE{)Ff$2(3EwIk&S}>)gqyS`T>2m=92= 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 index 0000000000000000000000000000000000000000..01bed5da839268e1b4016552f513c9fc9766eea0 GIT binary patch literal 122 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H iBa~=F$1%j#fCv!Q1aq}C!Mdw!!IYAc0+6Mp&jkR2J0S1? literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/glennfowler/43.i.c b/re2c/test/posix_captures/glennfowler/43.i.c new file mode 100644 index 00000000..462354c9 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/43.i.c @@ -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 index 0000000000000000000000000000000000000000..895f60ee82671b8398972c46cde905cc5457b169 GIT binary patch literal 128 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H iBa~=pM8`42g0Q9*oC)D-g3YL|1yf2&3P6^YJ{JH(-y#J7 literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/glennfowler/44.i.c b/re2c/test/posix_captures/glennfowler/44.i.c new file mode 100644 index 00000000..fbb25c32 --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/44.i.c @@ -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 index 0000000000000000000000000000000000000000..36f76efed4f19431d984c4b7241deda67e1e426c GIT binary patch literal 156 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H kBa~=pM8`42g0Q9*oC)D-;*$fLUtJ5Pl#~>JEG>O50Dzq+x&QzG literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/glennfowler/45.i.c b/re2c/test/posix_captures/glennfowler/45.i.c new file mode 100644 index 00000000..af408fed --- /dev/null +++ b/re2c/test/posix_captures/glennfowler/45.i.c @@ -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 index 0000000000000000000000000000000000000000..662fa27fe83c75c96f5856855220c1a637ed225d GIT binary patch literal 129 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H jBa~=pM8`42g0Q9*oC)D-YJm-@t_4#{N(w-hmOd8%Wve1D literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/nullsubexpr/01.i.c b/re2c/test/posix_captures/nullsubexpr/01.i.c new file mode 100644 index 00000000..a0e369b4 --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/01.i.c @@ -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 index 00000000..6c647641 --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/01.i.re @@ -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 index 00000000..dee1de1d --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/02.i.c @@ -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 index 00000000..8131d005 --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/02.i.re @@ -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 index 00000000..7a6bbb89 --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/03.i.c @@ -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 index 00000000..72e5eee6 --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/03.i.re @@ -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 index 00000000..8e50e10d --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/04.i.c @@ -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 index 00000000..a9df0712 --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/04.i.re @@ -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 index 00000000..a0e369b4 --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/05.i.c @@ -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 index 00000000..31566425 --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/05.i.re @@ -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 index 00000000..dee1de1d --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/06.i.c @@ -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 index 00000000..bfdf4861 --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/06.i.re @@ -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 index 00000000..b80f90ea --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/07.i.c @@ -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 index 0000000000000000000000000000000000000000..60775615a326ad5ca46c2149eaf1b69e8055d4e4 GIT binary patch literal 109 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H dBa~=F$1x1t3dHp9=u+aUIS8 literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/nullsubexpr/11.i.c b/re2c/test/posix_captures/nullsubexpr/11.i.c new file mode 100644 index 00000000..77ad3e77 --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/11.i.c @@ -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 index 00000000..f6c0b6d0 --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/11.i.re @@ -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 index 00000000..820993ae --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/12.i.c @@ -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 index 00000000..57cae250 --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/12.i.re @@ -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 index 00000000..9619fe95 --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/13.i.c @@ -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 index 00000000..5e20a85b --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/13.i.re @@ -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 index 00000000..9619fe95 --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/14.i.c @@ -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 index 00000000..5e20a85b --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/14.i.re @@ -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 index 00000000..9619fe95 --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/15.i.c @@ -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 index 00000000..5e20a85b --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/15.i.re @@ -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 index 00000000..5b22f954 --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/16.i.c @@ -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 index 00000000..5eef26b2 --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/16.i.re @@ -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 index 00000000..5b22f954 --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/17.i.c @@ -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 index 00000000..5eef26b2 --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/17.i.re @@ -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 index 00000000..5b22f954 --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/18.i.c @@ -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 index 00000000..5eef26b2 --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/18.i.re @@ -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 index 00000000..603e34af --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/19.i.c @@ -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 index 00000000..6a5de218 --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/19.i.re @@ -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 index 00000000..603e34af --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/20.i.c @@ -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 index 00000000..6a5de218 --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/20.i.re @@ -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 index 00000000..603e34af --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/21.i.c @@ -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 index 00000000..6a5de218 --- /dev/null +++ b/re2c/test/posix_captures/nullsubexpr/21.i.re @@ -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 index 00000000..a1255d86 --- /dev/null +++ b/re2c/test/posix_captures/osxbsdcritical/01.i.c @@ -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 index 0000000000000000000000000000000000000000..9e5477f2214bdefcf0fbad5a895ab3a3e858480b GIT binary patch literal 114 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H iBa~=pC@E>yM8`42YHB2Df^}8bf+-~>1t3dHp9=tF%pQ9H literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/osxbsdcritical/02.i.c b/re2c/test/posix_captures/osxbsdcritical/02.i.c new file mode 100644 index 00000000..541db4ea --- /dev/null +++ b/re2c/test/posix_captures/osxbsdcritical/02.i.c @@ -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 index 00000000..2ce1bdd1 --- /dev/null +++ b/re2c/test/posix_captures/osxbsdcritical/02.i.re @@ -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 index 00000000..808dc38f --- /dev/null +++ b/re2c/test/posix_captures/osxbsdcritical/03.i.c @@ -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 index 00000000..fcebb5aa --- /dev/null +++ b/re2c/test/posix_captures/osxbsdcritical/03.i.re @@ -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 index 00000000..a1255d86 --- /dev/null +++ b/re2c/test/posix_captures/osxbsdcritical/04.i.c @@ -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 index 0000000000000000000000000000000000000000..74eabd7fd77649c222f012092497c3e60232dc30 GIT binary patch literal 114 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H iBa~=F$1%j#XecRZYHB2Df^}8bf+-~>1t3dHp9=tIQ675$ literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/osxbsdcritical/05.i.c b/re2c/test/posix_captures/osxbsdcritical/05.i.c new file mode 100644 index 00000000..541db4ea --- /dev/null +++ b/re2c/test/posix_captures/osxbsdcritical/05.i.c @@ -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 index 00000000..75448dfa --- /dev/null +++ b/re2c/test/posix_captures/osxbsdcritical/05.i.re @@ -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 index 00000000..808dc38f --- /dev/null +++ b/re2c/test/posix_captures/osxbsdcritical/06.i.c @@ -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 index 00000000..dca00d17 --- /dev/null +++ b/re2c/test/posix_captures/osxbsdcritical/06.i.re @@ -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 index 00000000..66524850 --- /dev/null +++ b/re2c/test/posix_captures/osxbsdcritical/07.i.c @@ -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 index 0000000000000000000000000000000000000000..9e3528b50778d6b94336a6ee484326607d876f5b GIT binary patch literal 110 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H eBa~=F$1%j(YicBEf^}5af+-~>1t3dHp9=u&JRPY3 literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/other/01.i.c b/re2c/test/posix_captures/other/01.i.c new file mode 100644 index 00000000..da7cef60 --- /dev/null +++ b/re2c/test/posix_captures/other/01.i.c @@ -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 index 00000000..c8907442 --- /dev/null +++ b/re2c/test/posix_captures/other/01.i.re @@ -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 index 00000000..da7cef60 --- /dev/null +++ b/re2c/test/posix_captures/other/02.i.c @@ -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 index 00000000..50049d70 --- /dev/null +++ b/re2c/test/posix_captures/other/02.i.re @@ -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 index 00000000..b6873b87 --- /dev/null +++ b/re2c/test/posix_captures/other/03.i.c @@ -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 index 00000000..4b1b283e --- /dev/null +++ b/re2c/test/posix_captures/other/03.i.re @@ -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 index 00000000..66ce719d --- /dev/null +++ b/re2c/test/posix_captures/other/04.i.c @@ -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 index 00000000..1d7d4bb1 --- /dev/null +++ b/re2c/test/posix_captures/other/04.i.re @@ -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 index 00000000..a269155f --- /dev/null +++ b/re2c/test/posix_captures/other/05.i.c @@ -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 index 00000000..b06c9de7 --- /dev/null +++ b/re2c/test/posix_captures/other/05.i.re @@ -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 index 00000000..043bf064 --- /dev/null +++ b/re2c/test/posix_captures/other/06.i.c @@ -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 index 00000000..45fd9735 --- /dev/null +++ b/re2c/test/posix_captures/other/06.i.re @@ -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 index 00000000..416db364 --- /dev/null +++ b/re2c/test/posix_captures/other/07.i.c @@ -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 index 00000000..074db3a5 --- /dev/null +++ b/re2c/test/posix_captures/other/07.i.re @@ -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 index 00000000..fbbd9db4 --- /dev/null +++ b/re2c/test/posix_captures/other/08.i.c @@ -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 index 00000000..999b7857 --- /dev/null +++ b/re2c/test/posix_captures/other/08.i.re @@ -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 index 00000000..600ffd67 --- /dev/null +++ b/re2c/test/posix_captures/other/09.i.c @@ -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 index 00000000..5f6a5d6c --- /dev/null +++ b/re2c/test/posix_captures/other/09.i.re @@ -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 index 00000000..1116c204 --- /dev/null +++ b/re2c/test/posix_captures/other/10.i.c @@ -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 index 00000000..5c1d8177 --- /dev/null +++ b/re2c/test/posix_captures/other/10.i.re @@ -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 index 00000000..25a06336 --- /dev/null +++ b/re2c/test/posix_captures/other/11.i.c @@ -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 index 00000000..d3c9da13 --- /dev/null +++ b/re2c/test/posix_captures/other/11.i.re @@ -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 index 00000000..eb2ec89a --- /dev/null +++ b/re2c/test/posix_captures/other/12.i.c @@ -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 index 00000000..07917a0f --- /dev/null +++ b/re2c/test/posix_captures/other/12.i.re @@ -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 index 00000000..99af72a6 --- /dev/null +++ b/re2c/test/posix_captures/other/13.i.c @@ -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 index 00000000..dcc4ad44 --- /dev/null +++ b/re2c/test/posix_captures/other/13.i.re @@ -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 index 00000000..bac8d622 --- /dev/null +++ b/re2c/test/posix_captures/other/14.i.c @@ -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 index 00000000..bed5653e --- /dev/null +++ b/re2c/test/posix_captures/other/14.i.re @@ -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 index 00000000..9602d8c4 --- /dev/null +++ b/re2c/test/posix_captures/other/15.i.c @@ -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 index 00000000..5ef68723 --- /dev/null +++ b/re2c/test/posix_captures/other/15.i.re @@ -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 index 00000000..975cd9ac --- /dev/null +++ b/re2c/test/posix_captures/other/16.i.c @@ -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 index 00000000..6a304633 --- /dev/null +++ b/re2c/test/posix_captures/other/16.i.re @@ -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 index 00000000..39b65be5 --- /dev/null +++ b/re2c/test/posix_captures/other/17.i.c @@ -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 index 00000000..24285e32 --- /dev/null +++ b/re2c/test/posix_captures/other/17.i.re @@ -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 index 00000000..989611f5 --- /dev/null +++ b/re2c/test/posix_captures/other/18.i.c @@ -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 index 00000000..4b37f5cb --- /dev/null +++ b/re2c/test/posix_captures/other/18.i.re @@ -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 index 00000000..1e8acbf8 --- /dev/null +++ b/re2c/test/posix_captures/other/19.i.c @@ -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 index 00000000..cec56907 --- /dev/null +++ b/re2c/test/posix_captures/other/19.i.re @@ -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 index 00000000..4d30a682 --- /dev/null +++ b/re2c/test/posix_captures/other/20.i.c @@ -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 index 00000000..402cb997 --- /dev/null +++ b/re2c/test/posix_captures/other/20.i.re @@ -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 index 00000000..57fb270e --- /dev/null +++ b/re2c/test/posix_captures/other/21.i.c @@ -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 index 00000000..45aa282f --- /dev/null +++ b/re2c/test/posix_captures/other/21.i.re @@ -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 index 00000000..401ea462 --- /dev/null +++ b/re2c/test/posix_captures/other/22.i.c @@ -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 index 00000000..58b58113 --- /dev/null +++ b/re2c/test/posix_captures/other/22.i.re @@ -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 index 00000000..38f8b853 --- /dev/null +++ b/re2c/test/posix_captures/other/23.i.c @@ -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 index 00000000..62e01a08 --- /dev/null +++ b/re2c/test/posix_captures/other/23.i.re @@ -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 index 00000000..306f7f20 --- /dev/null +++ b/re2c/test/posix_captures/other/24.i.c @@ -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 index 00000000..9bdaa513 --- /dev/null +++ b/re2c/test/posix_captures/other/24.i.re @@ -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 index 00000000..6f5ff5a8 --- /dev/null +++ b/re2c/test/posix_captures/other/25.i.c @@ -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 index 00000000..c1630e82 --- /dev/null +++ b/re2c/test/posix_captures/other/25.i.re @@ -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 index 00000000..ebc2950a --- /dev/null +++ b/re2c/test/posix_captures/other/26.i.c @@ -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 index 00000000..58a3a784 --- /dev/null +++ b/re2c/test/posix_captures/other/26.i.re @@ -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 index 00000000..bf274990 --- /dev/null +++ b/re2c/test/posix_captures/repetition/01.i.c @@ -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 index 0000000000000000000000000000000000000000..5d82396923bdf3a962dfb6c4507344f4a0d539ce GIT binary patch literal 119 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H hBa~=pM8`42g0N-{n5n4=)>>T)rj(QvfGjP2E&vlHAOQdX literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/02.i.c b/re2c/test/posix_captures/repetition/02.i.c new file mode 100644 index 00000000..246c6c30 --- /dev/null +++ b/re2c/test/posix_captures/repetition/02.i.c @@ -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 index 0000000000000000000000000000000000000000..059cec209ee6526eb0b29b3736189e05f2ec2ba7 GIT binary patch literal 138 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H jBa~=pM8`42g0N-{n5n6WMF?zKbuE}uQc?i2wDh?Eym2J5 literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/03.i.c b/re2c/test/posix_captures/repetition/03.i.c new file mode 100644 index 00000000..a9a4df28 --- /dev/null +++ b/re2c/test/posix_captures/repetition/03.i.c @@ -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 index 0000000000000000000000000000000000000000..861c3736d86b3a3d0bd3741fac1fafdd3f653c42 GIT binary patch literal 157 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H kBa~=pM8`42g0N-{n5n5roDkT8>RK?Rq@)03Y3XwT0KV@jV*mgE literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/04.i.c b/re2c/test/posix_captures/repetition/04.i.c new file mode 100644 index 00000000..bf274990 --- /dev/null +++ b/re2c/test/posix_captures/repetition/04.i.c @@ -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 index 0000000000000000000000000000000000000000..631119cb7170571123a18273975accff02b2d301 GIT binary patch literal 122 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H jBa~=pM8`42g0N-{n5n5*ZCDG|T@9g>loWt0EqyKkf>t3a literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/05.i.c b/re2c/test/posix_captures/repetition/05.i.c new file mode 100644 index 00000000..00727335 --- /dev/null +++ b/re2c/test/posix_captures/repetition/05.i.c @@ -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 index 0000000000000000000000000000000000000000..ae118296a21fccf13645d3df3d428adee999348a GIT binary patch literal 122 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H jBa~=pM8`42g0N-{n5n5*ZBz@^T@9g>loWt0EqyKkf^8uy literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/06.i.c b/re2c/test/posix_captures/repetition/06.i.c new file mode 100644 index 00000000..bffac179 --- /dev/null +++ b/re2c/test/posix_captures/repetition/06.i.c @@ -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 index 0000000000000000000000000000000000000000..cce92f93a95e26315884e7f7429d0f971c529235 GIT binary patch literal 122 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H jBa~=pM8`42g0N-{n5n5*ZCnf1T@9g>loWt0EqyKkf`lO~ literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/07.i.c b/re2c/test/posix_captures/repetition/07.i.c new file mode 100644 index 00000000..d0efdecb --- /dev/null +++ b/re2c/test/posix_captures/repetition/07.i.c @@ -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 index 0000000000000000000000000000000000000000..7e64e15fddfb152c76b48632a5aceca221089d10 GIT binary patch literal 120 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H iBa~=pM8`42g0N-{n5n6$1=d?#3#OEm6o4!(eJ%hp?I0@v literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/08.i.c b/re2c/test/posix_captures/repetition/08.i.c new file mode 100644 index 00000000..bf274990 --- /dev/null +++ b/re2c/test/posix_captures/repetition/08.i.c @@ -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 index 0000000000000000000000000000000000000000..5d82396923bdf3a962dfb6c4507344f4a0d539ce GIT binary patch literal 119 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H hBa~=pM8`42g0N-{n5n4=)>>T)rj(QvfGjP2E&vlHAOQdX literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/09.i.c b/re2c/test/posix_captures/repetition/09.i.c new file mode 100644 index 00000000..246c6c30 --- /dev/null +++ b/re2c/test/posix_captures/repetition/09.i.c @@ -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 index 0000000000000000000000000000000000000000..059cec209ee6526eb0b29b3736189e05f2ec2ba7 GIT binary patch literal 138 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H jBa~=pM8`42g0N-{n5n6WMF?zKbuE}uQc?i2wDh?Eym2J5 literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/10.i.c b/re2c/test/posix_captures/repetition/10.i.c new file mode 100644 index 00000000..a9a4df28 --- /dev/null +++ b/re2c/test/posix_captures/repetition/10.i.c @@ -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 index 0000000000000000000000000000000000000000..861c3736d86b3a3d0bd3741fac1fafdd3f653c42 GIT binary patch literal 157 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H kBa~=pM8`42g0N-{n5n5roDkT8>RK?Rq@)03Y3XwT0KV@jV*mgE literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/11.i.c b/re2c/test/posix_captures/repetition/11.i.c new file mode 100644 index 00000000..bf274990 --- /dev/null +++ b/re2c/test/posix_captures/repetition/11.i.c @@ -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 index 0000000000000000000000000000000000000000..631119cb7170571123a18273975accff02b2d301 GIT binary patch literal 122 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H jBa~=pM8`42g0N-{n5n5*ZCDG|T@9g>loWt0EqyKkf>t3a literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/12.i.c b/re2c/test/posix_captures/repetition/12.i.c new file mode 100644 index 00000000..00727335 --- /dev/null +++ b/re2c/test/posix_captures/repetition/12.i.c @@ -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 index 0000000000000000000000000000000000000000..ae118296a21fccf13645d3df3d428adee999348a GIT binary patch literal 122 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H jBa~=pM8`42g0N-{n5n5*ZBz@^T@9g>loWt0EqyKkf^8uy literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/13.i.c b/re2c/test/posix_captures/repetition/13.i.c new file mode 100644 index 00000000..bffac179 --- /dev/null +++ b/re2c/test/posix_captures/repetition/13.i.c @@ -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 index 0000000000000000000000000000000000000000..cce92f93a95e26315884e7f7429d0f971c529235 GIT binary patch literal 122 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H jBa~=pM8`42g0N-{n5n5*ZCnf1T@9g>loWt0EqyKkf`lO~ literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/14.i.c b/re2c/test/posix_captures/repetition/14.i.c new file mode 100644 index 00000000..d0efdecb --- /dev/null +++ b/re2c/test/posix_captures/repetition/14.i.c @@ -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 index 0000000000000000000000000000000000000000..7e64e15fddfb152c76b48632a5aceca221089d10 GIT binary patch literal 120 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H iBa~=pM8`42g0N-{n5n6$1=d?#3#OEm6o4!(eJ%hp?I0@v literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/15.i.c b/re2c/test/posix_captures/repetition/15.i.c new file mode 100644 index 00000000..bf274990 --- /dev/null +++ b/re2c/test/posix_captures/repetition/15.i.c @@ -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 index 0000000000000000000000000000000000000000..5d82396923bdf3a962dfb6c4507344f4a0d539ce GIT binary patch literal 119 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H hBa~=pM8`42g0N-{n5n4=)>>T)rj(QvfGjP2E&vlHAOQdX literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/16.i.c b/re2c/test/posix_captures/repetition/16.i.c new file mode 100644 index 00000000..246c6c30 --- /dev/null +++ b/re2c/test/posix_captures/repetition/16.i.c @@ -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 index 0000000000000000000000000000000000000000..059cec209ee6526eb0b29b3736189e05f2ec2ba7 GIT binary patch literal 138 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H jBa~=pM8`42g0N-{n5n6WMF?zKbuE}uQc?i2wDh?Eym2J5 literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/17.i.c b/re2c/test/posix_captures/repetition/17.i.c new file mode 100644 index 00000000..a9a4df28 --- /dev/null +++ b/re2c/test/posix_captures/repetition/17.i.c @@ -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 index 0000000000000000000000000000000000000000..861c3736d86b3a3d0bd3741fac1fafdd3f653c42 GIT binary patch literal 157 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H kBa~=pM8`42g0N-{n5n5roDkT8>RK?Rq@)03Y3XwT0KV@jV*mgE literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/18.i.c b/re2c/test/posix_captures/repetition/18.i.c new file mode 100644 index 00000000..bf274990 --- /dev/null +++ b/re2c/test/posix_captures/repetition/18.i.c @@ -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 index 0000000000000000000000000000000000000000..631119cb7170571123a18273975accff02b2d301 GIT binary patch literal 122 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H jBa~=pM8`42g0N-{n5n5*ZCDG|T@9g>loWt0EqyKkf>t3a literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/19.i.c b/re2c/test/posix_captures/repetition/19.i.c new file mode 100644 index 00000000..00727335 --- /dev/null +++ b/re2c/test/posix_captures/repetition/19.i.c @@ -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 index 0000000000000000000000000000000000000000..ae118296a21fccf13645d3df3d428adee999348a GIT binary patch literal 122 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H jBa~=pM8`42g0N-{n5n5*ZBz@^T@9g>loWt0EqyKkf^8uy literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/20.i.c b/re2c/test/posix_captures/repetition/20.i.c new file mode 100644 index 00000000..bffac179 --- /dev/null +++ b/re2c/test/posix_captures/repetition/20.i.c @@ -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 index 0000000000000000000000000000000000000000..cce92f93a95e26315884e7f7429d0f971c529235 GIT binary patch literal 122 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H jBa~=pM8`42g0N-{n5n5*ZCnf1T@9g>loWt0EqyKkf`lO~ literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/21.i.c b/re2c/test/posix_captures/repetition/21.i.c new file mode 100644 index 00000000..d0efdecb --- /dev/null +++ b/re2c/test/posix_captures/repetition/21.i.c @@ -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 index 0000000000000000000000000000000000000000..7e64e15fddfb152c76b48632a5aceca221089d10 GIT binary patch literal 120 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H iBa~=pM8`42g0N-{n5n6$1=d?#3#OEm6o4!(eJ%hp?I0@v literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/22.i.c b/re2c/test/posix_captures/repetition/22.i.c new file mode 100644 index 00000000..bf274990 --- /dev/null +++ b/re2c/test/posix_captures/repetition/22.i.c @@ -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 index 0000000000000000000000000000000000000000..5d82396923bdf3a962dfb6c4507344f4a0d539ce GIT binary patch literal 119 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H hBa~=pM8`42g0N-{n5n4=)>>T)rj(QvfGjP2E&vlHAOQdX literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/23.i.c b/re2c/test/posix_captures/repetition/23.i.c new file mode 100644 index 00000000..246c6c30 --- /dev/null +++ b/re2c/test/posix_captures/repetition/23.i.c @@ -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 index 0000000000000000000000000000000000000000..059cec209ee6526eb0b29b3736189e05f2ec2ba7 GIT binary patch literal 138 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H jBa~=pM8`42g0N-{n5n6WMF?zKbuE}uQc?i2wDh?Eym2J5 literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/24.i.c b/re2c/test/posix_captures/repetition/24.i.c new file mode 100644 index 00000000..a9a4df28 --- /dev/null +++ b/re2c/test/posix_captures/repetition/24.i.c @@ -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 index 0000000000000000000000000000000000000000..861c3736d86b3a3d0bd3741fac1fafdd3f653c42 GIT binary patch literal 157 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H kBa~=pM8`42g0N-{n5n5roDkT8>RK?Rq@)03Y3XwT0KV@jV*mgE literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/25.i.c b/re2c/test/posix_captures/repetition/25.i.c new file mode 100644 index 00000000..bf274990 --- /dev/null +++ b/re2c/test/posix_captures/repetition/25.i.c @@ -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 index 0000000000000000000000000000000000000000..631119cb7170571123a18273975accff02b2d301 GIT binary patch literal 122 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H jBa~=pM8`42g0N-{n5n5*ZCDG|T@9g>loWt0EqyKkf>t3a literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/26.i.c b/re2c/test/posix_captures/repetition/26.i.c new file mode 100644 index 00000000..00727335 --- /dev/null +++ b/re2c/test/posix_captures/repetition/26.i.c @@ -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 index 0000000000000000000000000000000000000000..ae118296a21fccf13645d3df3d428adee999348a GIT binary patch literal 122 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H jBa~=pM8`42g0N-{n5n5*ZBz@^T@9g>loWt0EqyKkf^8uy literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/27.i.c b/re2c/test/posix_captures/repetition/27.i.c new file mode 100644 index 00000000..bffac179 --- /dev/null +++ b/re2c/test/posix_captures/repetition/27.i.c @@ -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 index 0000000000000000000000000000000000000000..cce92f93a95e26315884e7f7429d0f971c529235 GIT binary patch literal 122 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H jBa~=pM8`42g0N-{n5n5*ZCnf1T@9g>loWt0EqyKkf`lO~ literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/28.i.c b/re2c/test/posix_captures/repetition/28.i.c new file mode 100644 index 00000000..d0efdecb --- /dev/null +++ b/re2c/test/posix_captures/repetition/28.i.c @@ -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 index 0000000000000000000000000000000000000000..7e64e15fddfb152c76b48632a5aceca221089d10 GIT binary patch literal 120 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H iBa~=pM8`42g0N-{n5n6$1=d?#3#OEm6o4!(eJ%hp?I0@v literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/29.i.c b/re2c/test/posix_captures/repetition/29.i.c new file mode 100644 index 00000000..bf274990 --- /dev/null +++ b/re2c/test/posix_captures/repetition/29.i.c @@ -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 index 0000000000000000000000000000000000000000..5d82396923bdf3a962dfb6c4507344f4a0d539ce GIT binary patch literal 119 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H hBa~=pM8`42g0N-{n5n4=)>>T)rj(QvfGjP2E&vlHAOQdX literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/30.i.c b/re2c/test/posix_captures/repetition/30.i.c new file mode 100644 index 00000000..246c6c30 --- /dev/null +++ b/re2c/test/posix_captures/repetition/30.i.c @@ -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 index 0000000000000000000000000000000000000000..059cec209ee6526eb0b29b3736189e05f2ec2ba7 GIT binary patch literal 138 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H jBa~=pM8`42g0N-{n5n6WMF?zKbuE}uQc?i2wDh?Eym2J5 literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/31.i.c b/re2c/test/posix_captures/repetition/31.i.c new file mode 100644 index 00000000..a9a4df28 --- /dev/null +++ b/re2c/test/posix_captures/repetition/31.i.c @@ -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 index 0000000000000000000000000000000000000000..861c3736d86b3a3d0bd3741fac1fafdd3f653c42 GIT binary patch literal 157 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H kBa~=pM8`42g0N-{n5n5roDkT8>RK?Rq@)03Y3XwT0KV@jV*mgE literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/32.i.c b/re2c/test/posix_captures/repetition/32.i.c new file mode 100644 index 00000000..bf274990 --- /dev/null +++ b/re2c/test/posix_captures/repetition/32.i.c @@ -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 index 0000000000000000000000000000000000000000..631119cb7170571123a18273975accff02b2d301 GIT binary patch literal 122 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H jBa~=pM8`42g0N-{n5n5*ZCDG|T@9g>loWt0EqyKkf>t3a literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/33.i.c b/re2c/test/posix_captures/repetition/33.i.c new file mode 100644 index 00000000..00727335 --- /dev/null +++ b/re2c/test/posix_captures/repetition/33.i.c @@ -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 index 0000000000000000000000000000000000000000..ae118296a21fccf13645d3df3d428adee999348a GIT binary patch literal 122 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H jBa~=pM8`42g0N-{n5n5*ZBz@^T@9g>loWt0EqyKkf^8uy literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/34.i.c b/re2c/test/posix_captures/repetition/34.i.c new file mode 100644 index 00000000..bffac179 --- /dev/null +++ b/re2c/test/posix_captures/repetition/34.i.c @@ -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 index 0000000000000000000000000000000000000000..cce92f93a95e26315884e7f7429d0f971c529235 GIT binary patch literal 122 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H jBa~=pM8`42g0N-{n5n5*ZCnf1T@9g>loWt0EqyKkf`lO~ literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/35.i.c b/re2c/test/posix_captures/repetition/35.i.c new file mode 100644 index 00000000..d0efdecb --- /dev/null +++ b/re2c/test/posix_captures/repetition/35.i.c @@ -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 index 0000000000000000000000000000000000000000..7e64e15fddfb152c76b48632a5aceca221089d10 GIT binary patch literal 120 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H iBa~=pM8`42g0N-{n5n6$1=d?#3#OEm6o4!(eJ%hp?I0@v literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/36.i.c b/re2c/test/posix_captures/repetition/36.i.c new file mode 100644 index 00000000..bf274990 --- /dev/null +++ b/re2c/test/posix_captures/repetition/36.i.c @@ -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 index 0000000000000000000000000000000000000000..5d82396923bdf3a962dfb6c4507344f4a0d539ce GIT binary patch literal 119 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H hBa~=pM8`42g0N-{n5n4=)>>T)rj(QvfGjP2E&vlHAOQdX literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/37.i.c b/re2c/test/posix_captures/repetition/37.i.c new file mode 100644 index 00000000..246c6c30 --- /dev/null +++ b/re2c/test/posix_captures/repetition/37.i.c @@ -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 index 0000000000000000000000000000000000000000..059cec209ee6526eb0b29b3736189e05f2ec2ba7 GIT binary patch literal 138 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H jBa~=pM8`42g0N-{n5n6WMF?zKbuE}uQc?i2wDh?Eym2J5 literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/38.i.c b/re2c/test/posix_captures/repetition/38.i.c new file mode 100644 index 00000000..a9a4df28 --- /dev/null +++ b/re2c/test/posix_captures/repetition/38.i.c @@ -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 index 0000000000000000000000000000000000000000..861c3736d86b3a3d0bd3741fac1fafdd3f653c42 GIT binary patch literal 157 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H kBa~=pM8`42g0N-{n5n5roDkT8>RK?Rq@)03Y3XwT0KV@jV*mgE literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/39.i.c b/re2c/test/posix_captures/repetition/39.i.c new file mode 100644 index 00000000..bf274990 --- /dev/null +++ b/re2c/test/posix_captures/repetition/39.i.c @@ -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 index 0000000000000000000000000000000000000000..631119cb7170571123a18273975accff02b2d301 GIT binary patch literal 122 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H jBa~=pM8`42g0N-{n5n5*ZCDG|T@9g>loWt0EqyKkf>t3a literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/40.i.c b/re2c/test/posix_captures/repetition/40.i.c new file mode 100644 index 00000000..00727335 --- /dev/null +++ b/re2c/test/posix_captures/repetition/40.i.c @@ -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 index 0000000000000000000000000000000000000000..ae118296a21fccf13645d3df3d428adee999348a GIT binary patch literal 122 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H jBa~=pM8`42g0N-{n5n5*ZBz@^T@9g>loWt0EqyKkf^8uy literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/41.i.c b/re2c/test/posix_captures/repetition/41.i.c new file mode 100644 index 00000000..bffac179 --- /dev/null +++ b/re2c/test/posix_captures/repetition/41.i.c @@ -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 index 0000000000000000000000000000000000000000..cce92f93a95e26315884e7f7429d0f971c529235 GIT binary patch literal 122 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H jBa~=pM8`42g0N-{n5n5*ZCnf1T@9g>loWt0EqyKkf`lO~ literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/42.i.c b/re2c/test/posix_captures/repetition/42.i.c new file mode 100644 index 00000000..d0efdecb --- /dev/null +++ b/re2c/test/posix_captures/repetition/42.i.c @@ -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 index 0000000000000000000000000000000000000000..7e64e15fddfb152c76b48632a5aceca221089d10 GIT binary patch literal 120 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H iBa~=pM8`42g0N-{n5n6$1=d?#3#OEm6o4!(eJ%hp?I0@v literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/43.i.c b/re2c/test/posix_captures/repetition/43.i.c new file mode 100644 index 00000000..bf274990 --- /dev/null +++ b/re2c/test/posix_captures/repetition/43.i.c @@ -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 index 0000000000000000000000000000000000000000..5d82396923bdf3a962dfb6c4507344f4a0d539ce GIT binary patch literal 119 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H hBa~=pM8`42g0N-{n5n4=)>>T)rj(QvfGjP2E&vlHAOQdX literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/44.i.c b/re2c/test/posix_captures/repetition/44.i.c new file mode 100644 index 00000000..246c6c30 --- /dev/null +++ b/re2c/test/posix_captures/repetition/44.i.c @@ -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 index 0000000000000000000000000000000000000000..059cec209ee6526eb0b29b3736189e05f2ec2ba7 GIT binary patch literal 138 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H jBa~=pM8`42g0N-{n5n6WMF?zKbuE}uQc?i2wDh?Eym2J5 literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/45.i.c b/re2c/test/posix_captures/repetition/45.i.c new file mode 100644 index 00000000..a9a4df28 --- /dev/null +++ b/re2c/test/posix_captures/repetition/45.i.c @@ -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 index 0000000000000000000000000000000000000000..861c3736d86b3a3d0bd3741fac1fafdd3f653c42 GIT binary patch literal 157 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H kBa~=pM8`42g0N-{n5n5roDkT8>RK?Rq@)03Y3XwT0KV@jV*mgE literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/46.i.c b/re2c/test/posix_captures/repetition/46.i.c new file mode 100644 index 00000000..bf274990 --- /dev/null +++ b/re2c/test/posix_captures/repetition/46.i.c @@ -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 index 0000000000000000000000000000000000000000..631119cb7170571123a18273975accff02b2d301 GIT binary patch literal 122 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H jBa~=pM8`42g0N-{n5n5*ZCDG|T@9g>loWt0EqyKkf>t3a literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/47.i.c b/re2c/test/posix_captures/repetition/47.i.c new file mode 100644 index 00000000..00727335 --- /dev/null +++ b/re2c/test/posix_captures/repetition/47.i.c @@ -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 index 0000000000000000000000000000000000000000..ae118296a21fccf13645d3df3d428adee999348a GIT binary patch literal 122 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H jBa~=pM8`42g0N-{n5n5*ZBz@^T@9g>loWt0EqyKkf^8uy literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/48.i.c b/re2c/test/posix_captures/repetition/48.i.c new file mode 100644 index 00000000..bffac179 --- /dev/null +++ b/re2c/test/posix_captures/repetition/48.i.c @@ -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 index 0000000000000000000000000000000000000000..cce92f93a95e26315884e7f7429d0f971c529235 GIT binary patch literal 122 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H jBa~=pM8`42g0N-{n5n5*ZCnf1T@9g>loWt0EqyKkf`lO~ literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/49.i.c b/re2c/test/posix_captures/repetition/49.i.c new file mode 100644 index 00000000..d0efdecb --- /dev/null +++ b/re2c/test/posix_captures/repetition/49.i.c @@ -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 index 0000000000000000000000000000000000000000..7e64e15fddfb152c76b48632a5aceca221089d10 GIT binary patch literal 120 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H iBa~=pM8`42g0N-{n5n6$1=d?#3#OEm6o4!(eJ%hp?I0@v literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/50.i.c b/re2c/test/posix_captures/repetition/50.i.c new file mode 100644 index 00000000..80222219 --- /dev/null +++ b/re2c/test/posix_captures/repetition/50.i.c @@ -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 index 0000000000000000000000000000000000000000..ad1cd58361aca4fe385c3882dc931eef495d2de5 GIT binary patch literal 113 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H hBa}pFM8`42+G|!D=+s7nHC5MwDJ3NZAWKW13jkTu9{T_Q literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/51.i.c b/re2c/test/posix_captures/repetition/51.i.c new file mode 100644 index 00000000..57cfb4f7 --- /dev/null +++ b/re2c/test/posix_captures/repetition/51.i.c @@ -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 index 0000000000000000000000000000000000000000..667bcf54a8d9617d5f3decd0be2a88a1e276bb6a GIT binary patch literal 113 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H hBa}pFM8`42+G|!D>eNPpHC5MwDJ3NZAWKW13jkT{9{d0R literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/52.i.c b/re2c/test/posix_captures/repetition/52.i.c new file mode 100644 index 00000000..31da2611 --- /dev/null +++ b/re2c/test/posix_captures/repetition/52.i.c @@ -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 index 0000000000000000000000000000000000000000..1a37b773a8ec61e9f1f3622b5455e43f9a47bc2d GIT binary patch literal 113 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H hBa}pFM8`42+G|!D>C{GoHC5MwDJ3NZAWKW13jkUL9{m6S literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/53.i.c b/re2c/test/posix_captures/repetition/53.i.c new file mode 100644 index 00000000..cacde3ea --- /dev/null +++ b/re2c/test/posix_captures/repetition/53.i.c @@ -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 index 0000000000000000000000000000000000000000..9c2d9957751c98163d0d2c0417e8305181e53fd7 GIT binary patch literal 113 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H hBa}pFM8`42+G|!D>(oYqHC5MwDJ3NZAWKW13jkUk9{vCT literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/54.i.c b/re2c/test/posix_captures/repetition/54.i.c new file mode 100644 index 00000000..8ff75c25 --- /dev/null +++ b/re2c/test/posix_captures/repetition/54.i.c @@ -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 index 0000000000000000000000000000000000000000..397f53b799e7c8c4bb45c331ac3047b288777d39 GIT binary patch literal 113 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H hBa}pFM8`42+G|#u=+s7nHC5MwDJ3NZAWKW13jkU-9{&IU literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/55.i.c b/re2c/test/posix_captures/repetition/55.i.c new file mode 100644 index 00000000..e0a15d82 --- /dev/null +++ b/re2c/test/posix_captures/repetition/55.i.c @@ -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 index 0000000000000000000000000000000000000000..89f3171ad08e1db01e2bef8c69260cfbd2df267b GIT binary patch literal 113 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H hBa}pFM8`42+G|#u>eNPpHC5MwDJ3NZAWKW13jkVB9{>OV literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/56.i.c b/re2c/test/posix_captures/repetition/56.i.c new file mode 100644 index 00000000..e0508806 --- /dev/null +++ b/re2c/test/posix_captures/repetition/56.i.c @@ -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 index 0000000000000000000000000000000000000000..a922075bf918510b6c2cb451aa5d5efe41b75919 GIT binary patch literal 113 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H hBa}pFM8`42+G|#u>C{GoHC5MwDJ3NZAWKW13jkVa9{~UW literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/57.i.c b/re2c/test/posix_captures/repetition/57.i.c new file mode 100644 index 00000000..11112dcb --- /dev/null +++ b/re2c/test/posix_captures/repetition/57.i.c @@ -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 index 0000000000000000000000000000000000000000..50bbeba6acfe3567852bda0bebf09bee9414cd30 GIT binary patch literal 113 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H hBa}pFM8`42+G|#u>(oYqHC5MwDJ3NZAWKW13jkVz9|8aX literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/58.i.c b/re2c/test/posix_captures/repetition/58.i.c new file mode 100644 index 00000000..8ca5d07b --- /dev/null +++ b/re2c/test/posix_captures/repetition/58.i.c @@ -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 index 0000000000000000000000000000000000000000..6199ad7ec21cab847de58b9cdd0343565d00f022 GIT binary patch literal 113 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H hBa}pFM8`42+G|!@=+s7nHC5MwDJ3NZAWKW13jkW19|HgY literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/59.i.c b/re2c/test/posix_captures/repetition/59.i.c new file mode 100644 index 00000000..71e40ade --- /dev/null +++ b/re2c/test/posix_captures/repetition/59.i.c @@ -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 index 0000000000000000000000000000000000000000..ce6b6852cb8d7ea3f7cbafa16a214160ed6e6752 GIT binary patch literal 114 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H iBa}pFM8`42+G|!D=vdT7f^}8bf+-~>1t3dHp9=taV;?gB literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/60.i.c b/re2c/test/posix_captures/repetition/60.i.c new file mode 100644 index 00000000..03a49077 --- /dev/null +++ b/re2c/test/posix_captures/repetition/60.i.c @@ -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 index 0000000000000000000000000000000000000000..9edf58bd11ed9410fd42bfae198b32fac3ad264a GIT binary patch literal 114 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H iBa}pFM8`42+G|!D>R8l9f^}8bf+-~>1t3dHp9=taeIGOc literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/61.i.c b/re2c/test/posix_captures/repetition/61.i.c new file mode 100644 index 00000000..5263c666 --- /dev/null +++ b/re2c/test/posix_captures/repetition/61.i.c @@ -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 index 0000000000000000000000000000000000000000..6540264439325fa8fd071f4338b210b29675316f GIT binary patch literal 114 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H iBa}pFM8`42+G|!D=~&c8f^}8bf+-~>1t3dHp9=tammf6% literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/62.i.c b/re2c/test/posix_captures/repetition/62.i.c new file mode 100644 index 00000000..939ee1fd --- /dev/null +++ b/re2c/test/posix_captures/repetition/62.i.c @@ -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 index 0000000000000000000000000000000000000000..96bf479e6031806c72914ebe9a68446783858bf7 GIT binary patch literal 114 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H iBa}pFM8`42+G|!D>sZuAf^}8bf+-~>1t3dHp9=tau^%=7 literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/63.i.c b/re2c/test/posix_captures/repetition/63.i.c new file mode 100644 index 00000000..79db53b4 --- /dev/null +++ b/re2c/test/posix_captures/repetition/63.i.c @@ -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 index 0000000000000000000000000000000000000000..ce6776b65313e2a5a93c23d4e9bc9fac6a327d40 GIT binary patch literal 114 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H iBa}pFM8`42+G|#u=vdT7f^}8bf+-~>1t3dHp9=ta%O5uY literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/64.i.c b/re2c/test/posix_captures/repetition/64.i.c new file mode 100644 index 00000000..9a77ab98 --- /dev/null +++ b/re2c/test/posix_captures/repetition/64.i.c @@ -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 index 0000000000000000000000000000000000000000..00171941e7bb13a6a3d2f4d92b438168fb2dae47 GIT binary patch literal 114 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H iBa}pFM8`42+G|#u>R8l9f^}8bf+-~>1t3dHp9=ta1t3dHp9=ta{~tL3 literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/66.i.c b/re2c/test/posix_captures/repetition/66.i.c new file mode 100644 index 00000000..3077b8c8 --- /dev/null +++ b/re2c/test/posix_captures/repetition/66.i.c @@ -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 index 0000000000000000000000000000000000000000..accc8c946464748a54807d00364cad346d132c8f GIT binary patch literal 114 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H iBa}pFM8`42+G|#u>sZuAf^}8bf+-~>1t3dHp9=tb86P?T literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/67.i.c b/re2c/test/posix_captures/repetition/67.i.c new file mode 100644 index 00000000..f9732075 --- /dev/null +++ b/re2c/test/posix_captures/repetition/67.i.c @@ -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 index 0000000000000000000000000000000000000000..4d26ddd8ca12e6b6d89753abdf800335a0ff7318 GIT binary patch literal 114 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H iBa}pFM8`42+G|!@=vdT7f^}8bf+-~>1t3dHp9=tbGaowu literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/repetition/68.i.c b/re2c/test/posix_captures/repetition/68.i.c new file mode 100644 index 00000000..6ab7d036 --- /dev/null +++ b/re2c/test/posix_captures/repetition/68.i.c @@ -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 index 00000000..1170ccef --- /dev/null +++ b/re2c/test/posix_captures/repetition/68.i.re @@ -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 index 00000000..51b6f316 --- /dev/null +++ b/re2c/test/posix_captures/repetition/69.i.c @@ -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 index 00000000..70097a01 --- /dev/null +++ b/re2c/test/posix_captures/repetition/69.i.re @@ -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 index 00000000..e5cee6d9 --- /dev/null +++ b/re2c/test/posix_captures/repetition/70.i.c @@ -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 index 00000000..9e6be9eb --- /dev/null +++ b/re2c/test/posix_captures/repetition/70.i.re @@ -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 index 00000000..ebc20aea --- /dev/null +++ b/re2c/test/posix_captures/repetition/71.i.c @@ -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 index 00000000..2aff0a90 --- /dev/null +++ b/re2c/test/posix_captures/repetition/71.i.re @@ -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 index 00000000..ac9afb37 --- /dev/null +++ b/re2c/test/posix_captures/repetition/72.i.c @@ -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 index 00000000..e272a8c8 --- /dev/null +++ b/re2c/test/posix_captures/repetition/72.i.re @@ -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 index 00000000..4761ebe0 --- /dev/null +++ b/re2c/test/posix_captures/repetition/73.i.c @@ -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 index 00000000..d920cd13 --- /dev/null +++ b/re2c/test/posix_captures/repetition/73.i.re @@ -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 index 00000000..9e5af639 --- /dev/null +++ b/re2c/test/posix_captures/repetition/74.i.c @@ -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 index 00000000..6775c092 --- /dev/null +++ b/re2c/test/posix_captures/repetition/74.i.re @@ -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 index 00000000..097a8a24 --- /dev/null +++ b/re2c/test/posix_captures/repetition/75.i.c @@ -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 index 00000000..e83968a0 --- /dev/null +++ b/re2c/test/posix_captures/repetition/75.i.re @@ -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 index 00000000..731222f5 --- /dev/null +++ b/re2c/test/posix_captures/repetition/76.i.c @@ -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 index 00000000..37586efd --- /dev/null +++ b/re2c/test/posix_captures/repetition/76.i.re @@ -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 index 00000000..bf9f02d9 --- /dev/null +++ b/re2c/test/posix_captures/repetition/77.i.c @@ -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 index 00000000..e51b21e9 --- /dev/null +++ b/re2c/test/posix_captures/repetition/77.i.re @@ -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 index 00000000..6ab7d036 --- /dev/null +++ b/re2c/test/posix_captures/repetition/78.i.c @@ -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 index 00000000..f25fd115 --- /dev/null +++ b/re2c/test/posix_captures/repetition/78.i.re @@ -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 index 00000000..51b6f316 --- /dev/null +++ b/re2c/test/posix_captures/repetition/79.i.c @@ -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 index 00000000..1d38e9df --- /dev/null +++ b/re2c/test/posix_captures/repetition/79.i.re @@ -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 index 00000000..b0a34bca --- /dev/null +++ b/re2c/test/posix_captures/repetition/80.i.c @@ -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 index 00000000..7cc2b7ad --- /dev/null +++ b/re2c/test/posix_captures/repetition/80.i.re @@ -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 index 00000000..7c416a40 --- /dev/null +++ b/re2c/test/posix_captures/repetition/81.i.c @@ -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 index 00000000..516493e2 --- /dev/null +++ b/re2c/test/posix_captures/repetition/81.i.re @@ -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 index 00000000..e5cee6d9 --- /dev/null +++ b/re2c/test/posix_captures/repetition/82.i.c @@ -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 index 00000000..23250466 --- /dev/null +++ b/re2c/test/posix_captures/repetition/82.i.re @@ -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 index 00000000..ebc20aea --- /dev/null +++ b/re2c/test/posix_captures/repetition/83.i.c @@ -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 index 00000000..51f6e62f --- /dev/null +++ b/re2c/test/posix_captures/repetition/83.i.re @@ -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 index 00000000..ac9afb37 --- /dev/null +++ b/re2c/test/posix_captures/repetition/84.i.c @@ -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 index 00000000..b3c2d8b9 --- /dev/null +++ b/re2c/test/posix_captures/repetition/84.i.re @@ -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 index 00000000..4761ebe0 --- /dev/null +++ b/re2c/test/posix_captures/repetition/85.i.c @@ -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 index 00000000..1622d39e --- /dev/null +++ b/re2c/test/posix_captures/repetition/85.i.re @@ -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 index 00000000..9e5af639 --- /dev/null +++ b/re2c/test/posix_captures/repetition/86.i.c @@ -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 index 00000000..c56d8f3e --- /dev/null +++ b/re2c/test/posix_captures/repetition/86.i.re @@ -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 index 00000000..097a8a24 --- /dev/null +++ b/re2c/test/posix_captures/repetition/87.i.c @@ -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 index 00000000..4959dcfb --- /dev/null +++ b/re2c/test/posix_captures/repetition/87.i.re @@ -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 index 00000000..731222f5 --- /dev/null +++ b/re2c/test/posix_captures/repetition/88.i.c @@ -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 index 00000000..492f003f --- /dev/null +++ b/re2c/test/posix_captures/repetition/88.i.re @@ -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 index 00000000..bf9f02d9 --- /dev/null +++ b/re2c/test/posix_captures/repetition/89.i.c @@ -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 index 00000000..f01a70cf --- /dev/null +++ b/re2c/test/posix_captures/repetition/89.i.re @@ -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 index 00000000..b0a34bca --- /dev/null +++ b/re2c/test/posix_captures/repetition/90.i.c @@ -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 index 00000000..19ef9054 --- /dev/null +++ b/re2c/test/posix_captures/repetition/90.i.re @@ -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 index 00000000..7c416a40 --- /dev/null +++ b/re2c/test/posix_captures/repetition/91.i.c @@ -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 index 00000000..64c2a4df --- /dev/null +++ b/re2c/test/posix_captures/repetition/91.i.re @@ -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 index 00000000..92389d0e --- /dev/null +++ b/re2c/test/posix_captures/rightassoc/01.i.c @@ -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 index 00000000..0d0a539d --- /dev/null +++ b/re2c/test/posix_captures/rightassoc/01.i.re @@ -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 index 00000000..92389d0e --- /dev/null +++ b/re2c/test/posix_captures/rightassoc/02.i.c @@ -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 index 00000000..1e28eadf --- /dev/null +++ b/re2c/test/posix_captures/rightassoc/02.i.re @@ -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 index 00000000..92389d0e --- /dev/null +++ b/re2c/test/posix_captures/rightassoc/03.i.c @@ -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 index 00000000..1fb9783c --- /dev/null +++ b/re2c/test/posix_captures/rightassoc/03.i.re @@ -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 index 00000000..92389d0e --- /dev/null +++ b/re2c/test/posix_captures/rightassoc/04.i.c @@ -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 index 00000000..5a298cac --- /dev/null +++ b/re2c/test/posix_captures/rightassoc/04.i.re @@ -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 index 00000000..262a9d1f --- /dev/null +++ b/re2c/test/posix_captures/rightassoc/05.i.c @@ -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 index 00000000..7ac4196e --- /dev/null +++ b/re2c/test/posix_captures/rightassoc/05.i.re @@ -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 index 00000000..262a9d1f --- /dev/null +++ b/re2c/test/posix_captures/rightassoc/06.i.c @@ -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 index 00000000..7c18c7bb --- /dev/null +++ b/re2c/test/posix_captures/rightassoc/06.i.re @@ -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 index 00000000..262a9d1f --- /dev/null +++ b/re2c/test/posix_captures/rightassoc/07.i.c @@ -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 index 00000000..7ac4196e --- /dev/null +++ b/re2c/test/posix_captures/rightassoc/07.i.re @@ -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 index 00000000..262a9d1f --- /dev/null +++ b/re2c/test/posix_captures/rightassoc/08.i.c @@ -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 index 00000000..7c18c7bb --- /dev/null +++ b/re2c/test/posix_captures/rightassoc/08.i.re @@ -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 index 00000000..f430a482 --- /dev/null +++ b/re2c/test/posix_captures/rightassoc/09.i.c @@ -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 index 0000000000000000000000000000000000000000..ef70ff66f5efbca6b5bffcabc8b98f0d767aa331 GIT binary patch literal 122 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H qBa~<))+8orY9!YrC8ua=q|`*mF~n+Vf^}Edf+-~>1t3dHp9=t{`63Gd literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/rightassoc/10.i.c b/re2c/test/posix_captures/rightassoc/10.i.c new file mode 100644 index 00000000..f430a482 --- /dev/null +++ b/re2c/test/posix_captures/rightassoc/10.i.c @@ -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 index 0000000000000000000000000000000000000000..cf7001dfa9997cb913244923d6136da13f0d4040 GIT binary patch literal 122 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H qBa~<))+8orY9uA6)Ff+aq|`*mF~n+Vf^}Edf+-~>1t3dHp9=t{$07>= literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/rightassoc/11.i.c b/re2c/test/posix_captures/rightassoc/11.i.c new file mode 100644 index 00000000..f430a482 --- /dev/null +++ b/re2c/test/posix_captures/rightassoc/11.i.c @@ -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 index 0000000000000000000000000000000000000000..a33b730951a1f460f91b87d1babba24c90daacf3 GIT binary patch literal 122 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H qBa~<)Ce1t3dHp9=t{;35kE literal 0 HcmV?d00001 diff --git a/re2c/test/posix_captures/rightassoc/12.i.c b/re2c/test/posix_captures/rightassoc/12.i.c new file mode 100644 index 00000000..f430a482 --- /dev/null +++ b/re2c/test/posix_captures/rightassoc/12.i.c @@ -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 index 0000000000000000000000000000000000000000..23519aea6af878be3e5f032693f37c0338f7f644 GIT binary patch literal 122 zcmdPbQY=a}O6F1k0uaM0EhjO(7)Yj8=oVMzl_XXu*eV!WqstfM7iU)JCMOn@loq8H qBa~<)Ce1t3dHp9=t{t|AKn literal 0 HcmV?d00001 -- 2.40.0