1
0
mirror of https://git.savannah.gnu.org/git/gperf.git synced 2025-12-02 21:19:24 +00:00

Improve debugging output.

This commit is contained in:
Bruno Haible
2003-03-04 06:05:14 +00:00
parent 9fa3ac42b3
commit 9492f0dad7
6 changed files with 149 additions and 30 deletions

View File

@@ -31,6 +31,7 @@
class Positions
{
friend class PositionIterator;
friend class PositionReverseIterator;
public:
/* Denotes the last char of a keyword, depending on the keyword's length. */
enum { LASTCHAR = 0 };
@@ -99,6 +100,26 @@ private:
unsigned int _index;
};
/* This class denotes an iterator in reverse direction through a set of
byte positions. */
class PositionReverseIterator
{
public:
/* Initializes an iterator through POSITIONS. */
PositionReverseIterator (Positions const& positions);
/* End of iteration marker. */
enum { EOS = -1 };
/* Retrieves the next position, or EOS past the end. */
int next ();
private:
const Positions& _set;
unsigned int _index;
};
#ifdef __OPTIMIZE__
#include <string.h>