mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 17:23:02 +00:00
stack::size instead of stack::height.
* data/lalr1.cc (stack::height): Rename as... (stack::size): this. Fix the output type. Comment changes.
This commit is contained in:
@@ -1,3 +1,11 @@
|
|||||||
|
2008-11-03 Akim Demaille <demaille@gostai.com>
|
||||||
|
|
||||||
|
stack::size instead of stack::height.
|
||||||
|
* data/lalr1.cc (stack::height): Rename as...
|
||||||
|
(stack::size): this.
|
||||||
|
Fix the output type.
|
||||||
|
Comment changes.
|
||||||
|
|
||||||
2008-11-03 Akim Demaille <demaille@gostai.com>
|
2008-11-03 Akim Demaille <demaille@gostai.com>
|
||||||
|
|
||||||
Use variants to support objects as semantic values.
|
Use variants to support objects as semantic values.
|
||||||
|
|||||||
@@ -897,7 +897,7 @@ b4_error_verbose_if([, yytoken])[));
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Pop the current state because it cannot handle the error token. */
|
/* Pop the current state because it cannot handle the error token. */
|
||||||
if (yystate_stack_.height () == 1)
|
if (yystate_stack_.size () == 1)
|
||||||
YYABORT;
|
YYABORT;
|
||||||
|
|
||||||
yyerror_range[0] = yylocation_stack_[0];
|
yyerror_range[0] = yylocation_stack_[0];
|
||||||
@@ -940,7 +940,7 @@ b4_error_verbose_if([, yytoken])[));
|
|||||||
/* Do not reclaim the symbols of the rule which action triggered
|
/* Do not reclaim the symbols of the rule which action triggered
|
||||||
this YYABORT or YYACCEPT. */
|
this YYABORT or YYACCEPT. */
|
||||||
yypop_ (yylen);
|
yypop_ (yylen);
|
||||||
while (yystate_stack_.height () != 1)
|
while (yystate_stack_.size () != 1)
|
||||||
{
|
{
|
||||||
yydestruct_ ("Cleanup: popping",
|
yydestruct_ ("Cleanup: popping",
|
||||||
yystos_[yystate_stack_[0]],
|
yystos_[yystate_stack_[0]],
|
||||||
@@ -1235,17 +1235,17 @@ b4_copyright([Stack handling for Bison parsers in C++],
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline
|
inline
|
||||||
unsigned int
|
typename S::size_type
|
||||||
height () const
|
size () const
|
||||||
{
|
{
|
||||||
return seq_.size ();
|
return seq_.size ();
|
||||||
}
|
}
|
||||||
|
|
||||||
inline const_iterator begin () const { return seq_.rbegin (); }
|
inline const_iterator begin () const { return seq_.rbegin (); }
|
||||||
inline const_iterator end () const { return seq_.rend (); }
|
inline const_iterator end () const { return seq_.rend (); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
/// The wrapped container.
|
||||||
S seq_;
|
S seq_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user