]> granicus.if.org Git - re2c/commit
Use 'std::vector' to store closure items during determinization.
authorUlya Trofimovich <skvadrik@gmail.com>
Tue, 27 Sep 2016 12:00:23 +0000 (13:00 +0100)
committerUlya Trofimovich <skvadrik@gmail.com>
Tue, 27 Sep 2016 12:00:23 +0000 (13:00 +0100)
commit756b938077eb4e572691f8935462ecc621d4d065
tree24737c46bebca1436dd67fa910d249dc6b6be1f2
parent101bad34f8a31a21a2a919f1109e1e9857e346b0
Use 'std::vector' to store closure items during determinization.

This makes code somewhat clearer compared to using plain C arrays:
all function accept one parameter (vector) instead of two (array
start, array end/array length).

However, vectors have nontrivial structure and 'ord_hash_set_t'
is not suitable for them. That's why instead of 'ord_hash_set_t'
we now use 'lookup_t': just like 'ord_hash_set_t' it has constant
random access ang logarithmic insertion complexity, but unike
'ord_hash_set_t' it is not meant to be a container (rather an index).
re2c/Makefile.am
re2c/src/ir/dfa/closure.cc
re2c/src/ir/dfa/closure.h
re2c/src/ir/dfa/determinization.cc
re2c/src/ir/dfa/find_state.cc
re2c/src/ir/dfa/find_state.h
re2c/src/util/hash32.h [new file with mode: 0644]
re2c/src/util/lookup.h [new file with mode: 0644]