--- parser3/src/include/pa_stack.h 2001/02/22 13:33:24 1.2 +++ parser3/src/include/pa_stack.h 2002/02/08 07:27:45 1.12 @@ -1,12 +1,19 @@ -/* - $Id: pa_stack.h,v 1.2 2001/02/22 13:33:24 paf Exp $ +/** @file + Parser: stack class decl. + + Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) + Author: Alexander Petrosyan (http://paf.design.ru) + + $Id: pa_stack.h,v 1.12 2002/02/08 07:27:45 paf Exp $ */ #ifndef PA_STACK_H #define PA_STACK_H +#include "pa_config_includes.h" #include "pa_array.h" +/// simple stack based on Array class Stack : public Array { public: @@ -24,11 +31,8 @@ public: return get(--ftop); } - Item *operator [] (int top_offset) { - return get(ftop-top_offset-1); - } - - int top() { return ftop; } + int top_index() { return ftop-1; } + Item *top_value() { return get(top_index()); } private: