* etc/bench.pl.in (generate_grammar_list): Do not accumulate all
the values, to limit memory pressure.
+2008-11-11 Akim Demaille <demaille@gostai.com>
+
+ Less memory pressure on the "list" bench.
+ * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
+ the values, to limit memory pressure.
+
2008-11-11 Akim Demaille <demaille@gostai.com>
Introduce make_symbol.
2008-11-11 Akim Demaille <demaille@gostai.com>
Introduce make_symbol.
text:
/* nothing */ { /* This will generate an empty string */ }
text:
/* nothing */ { /* This will generate an empty string */ }
-| text TEXT { std::swap($$,$1); $$.append($2); }
+| text TEXT { std::swap ($$, $2); }
- std::swap($$,$1);
- std::ostringstream ss;
text:
/* nothing */ { $$ = new std::string; }
text:
/* nothing */ { $$ = new std::string; }
-| text TEXT { $$->append(*$2); delete $2; }
+| text TEXT { delete $1; $$ = $2; }
+ delete $1;
+ std::ostringstream ss;
+ $$ = new std::string (ss.str());