]> granicus.if.org Git - re2c/commit
Don't mix up empty code block with nonexistent one in rule actions.
authorUlya Trofimovich <skvadrik@gmail.com>
Thu, 27 Aug 2015 22:30:03 +0000 (23:30 +0100)
committerUlya Trofimovich <skvadrik@gmail.com>
Thu, 27 Aug 2015 22:30:03 +0000 (23:30 +0100)
commit67d11d5bf78bfc2340c08e8932e4fc29bf667d4c
treedeebdf926c2339ed348b6cac701e81abd690c40a
parentd9db9769980b384ad2af7e1f0a92c4f303240b4e
Don't mix up empty code block with nonexistent one in rule actions.

Turns out that re2c allows empty code blocks:
    /*!re2c
    <a> "a" :=
    */

re2c up to 0.14.3 handled this correctly (generated empty action).
Since then this behaviour has been broken: re2c started to autogenerate
jump to nonexistent condition.
re2c/bootstrap/src/parse/parser.cc
re2c/src/codegen/emit_action.cc
re2c/src/codegen/prepare_dfa.cc
re2c/src/ir/regexp/regexp_rule.h
re2c/src/parse/code.h
re2c/src/parse/parser.ypp
re2c/test/empty_code.c.c [new file with mode: 0644]
re2c/test/empty_code.c.re [new file with mode: 0644]