X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/5422471cbb68d8b5775046702cc92209b0718f58..ee2f433512c2bfc1f8fe0f518f0e80e5e540bf26:/data/lalr1.cc diff --git a/data/lalr1.cc b/data/lalr1.cc index 1c3481ff..9ab9421e 100644 --- a/data/lalr1.cc +++ b/data/lalr1.cc @@ -288,6 +288,9 @@ b4_location_define])])[ /// Copy constructor. by_state (const by_state& other); + /// Record that this symbol is empty. + void clear (); + /// Steal the symbol type from \a that. void move (by_state& that); @@ -542,12 +545,19 @@ m4_if(b4_prefix, [yy], [], : state (other.state) {} + inline + void + ]b4_parser_class_name[::by_state::clear () + { + state = empty_state; + } + inline void ]b4_parser_class_name[::by_state::move (by_state& that) { state = that.state; - that.state = empty_state; + that.clear (); } inline