]> granicus.if.org Git - re2c/commit
Skeleton data generation: suffix should be multipath as well as prefix.
authorUlya Trofimovich <skvadrik@gmail.com>
Tue, 24 Nov 2015 17:51:25 +0000 (17:51 +0000)
committerUlya Trofimovich <skvadrik@gmail.com>
Sun, 29 Nov 2015 13:58:19 +0000 (13:58 +0000)
commitd314f55b0c133b9702dbbb636f47d5d0d0e782e7
tree33b6c496d9f258f15698bc3017c6cc4f2678ef61
parent3962cf0456f8e1a2420cacdaf337f210c081bb46
Skeleton data generation: suffix should be multipath as well as prefix.

Prefix of current path under construction is a multipath, because prefix
arcs have not been covered yet. Suffix can be a simple path (that is, a
multipath of width 1), because all alternative suffix arcs have already
been covered.

prefix       suffix
_________   _________
...      \ /
--------- o
_________/

But nothing prevents us from alternating suffix arcs also, as long as
suffix remains a single multipath:

_________   _________
...      \ / ...
--------- o ---------
_________/ \_________

The resulting path's width is the maximum of prefix ans suffix width
(hence the growth in size of those tests in which suffix is wider
than prefix), but it only makes a small difference. And the generated
paths are more "variable".
18 files changed:
re2c/src/codegen/skeleton/generate_data.cc
re2c/src/codegen/skeleton/path.h
re2c/src/codegen/skeleton/skeleton.h
re2c/test/config10.S.c
re2c/test/control_flow_yymarker_yyaccept_fail.S.c
re2c/test/ctx.S.c
re2c/test/input_custom_mjson.S--input(custom).c
re2c/test/php20150211_parse_date.Sig.c
re2c/test/php20150211_parse_iso_intervals.Sig.c
re2c/test/php20150211_pdo_sql_parser.Sig.c
re2c/test/php20150211_url_scanner_ex.Sig.c
re2c/test/php20150211_var_unserializer.Sig.c
re2c/test/php20150211_zend_ini_scanner.SigcFd--case-inverted.c
re2c/test/php20150211_zend_language_scanner.SigcFd--case-inverted.c
re2c/test/push.S.c
re2c/test/rexx.S.c
re2c/test/scanner.S.c
re2c/test/unicode_blocks.S8--encoding-policy(ignore).c