]> granicus.if.org Git - re2c/commit
No need to NULL-terminate array of known size.
authorUlya Trofimovich <skvadrik@gmail.com>
Fri, 28 Aug 2015 22:15:40 +0000 (23:15 +0100)
committerUlya Trofimovich <skvadrik@gmail.com>
Fri, 28 Aug 2015 22:15:40 +0000 (23:15 +0100)
commitb5441f223475e842166d861539c8fca39bfb9991
treecffbf1e450caf1d4e6d92de14ec397f1e3117def
parent2c11437f906899dd33f350b502bf6dbdb9254d3c
No need to NULL-terminate array of known size.

For some reason (which I yet do not understand) re2c uses size of DFA
state's "kernel" to determine whether a new state should be constructed
or some already constructed state (of the same "kernel" size) will do.

Since re2c knows "kernel" size for each state anyway, there's no need
to NULL-terminate "kernel" array while iterating over it: we can use
pre-calculated size instead.
re2c/src/ir/dfa/dfa.cc
re2c/src/ir/dfa/state.h