]> granicus.if.org Git - re2c/commit
Don't loose 'yyaccept' when fallback and initial states coincide.
authorUlya Trofimovich <skvadrik@gmail.com>
Tue, 15 Nov 2016 17:09:53 +0000 (17:09 +0000)
committerUlya Trofimovich <skvadrik@gmail.com>
Tue, 15 Nov 2016 17:09:53 +0000 (17:09 +0000)
commit2ad801e63600c2e3e4b4b58c16c96dbb1e3d9cf6
tree09b62273f519ffe6cc6b6001ac174969128470c4
parent1188662b4ecea1b164fc2c96343a37f87f58fb39
Don't loose 'yyaccept' when fallback and initial states coincide.

Before code generation each DFA state is assigned a specific action.
Actions are mutually exclussive except for one: inital state may
coincide with fallback state. The bug was in overriding fallback
action with initial action (we lost 'yyaccept' which cause the wrong
match).

The bug was found with '--skeleton'.
re2c/src/codegen/emit_action.cc
re2c/src/ir/adfa/action.h
re2c/src/ir/adfa/adfa.cc
re2c/test/yyaccept_initial.i.c [new file with mode: 0644]
re2c/test/yyaccept_initial.i.re [new file with mode: 0644]