]> granicus.if.org Git - re2c/commit
Pick the shortest available path suffix when generating skeleton path cover.
authorUlya Trofimovich <skvadrik@gmail.com>
Sat, 28 Jul 2018 21:52:44 +0000 (22:52 +0100)
committerUlya Trofimovich <skvadrik@gmail.com>
Sat, 28 Jul 2018 21:52:44 +0000 (22:52 +0100)
commitbf658a52d2c3f6cc5af1b7415a5355b67f2d90e8
treef858b50a969918e361dab3a3916b36d1d481e823
parent26bd8967172800241a3796212af9d77872667b6f
Pick the shortest available path suffix when generating skeleton path cover.

This also fixes a error in the generation process: sometimes in case
of loops the current node's suffix was set before all of its children
were processed.

Updated test results (in some cases .input files became larger because
of the above fix, in some cases they became smaller because we now pick
the shortest suffix).

Added new test; this one was found by slyfox's fuzzer and revealed the
above bug.
16 files changed:
re2c/src/skeleton/generate_data.cc
re2c/src/skeleton/maxpath.cc
re2c/src/skeleton/path.h
re2c/test/input_custom_mjson.--skeleton--input(custom).c
re2c/test/php20150211_parse_iso_intervals.ig--skeleton.c
re2c/test/php20150211_pdo_sql_parser.ig--skeleton.c
re2c/test/php20150211_pdo_sql_parser_trimmed.ig--skeleton.c
re2c/test/php20150211_url_scanner_ex.ig--skeleton.c
re2c/test/php20150211_var_unserializer.ig--skeleton.c
re2c/test/php20150211_zend_ini_scanner.igcd--skeleton--flex-syntax--case-inverted.c
re2c/test/php20150211_zend_language_scanner.igcd--skeleton--flex-syntax--case-inverted.c
re2c/test/posix_captures/skeleton_01.i--posix-captures.c [new file with mode: 0644]
re2c/test/posix_captures/skeleton_01.i--posix-captures.re [new file with mode: 0644]
re2c/test/rexx.--skeleton.c
re2c/test/scanner.--skeleton.c
re2c/test/strip_003.b--skeleton.c