2008-01-26 04:33:34 +00:00
|
|
|
/* $Id: ins.h 535 2006-05-25 13:36:14Z helly $ */
|
2006-02-24 04:48:15 +00:00
|
|
|
#ifndef _ins_h
|
|
|
|
#define _ins_h
|
|
|
|
|
|
|
|
#include "basics.h"
|
|
|
|
|
2006-05-25 04:32:20 +00:00
|
|
|
namespace re2c
|
|
|
|
{
|
|
|
|
|
|
|
|
typedef unsigned short Char;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
const uint CHAR = 0;
|
|
|
|
const uint GOTO = 1;
|
|
|
|
const uint FORK = 2;
|
|
|
|
const uint TERM = 3;
|
|
|
|
const uint CTXT = 4;
|
|
|
|
|
|
|
|
union Ins {
|
2006-05-25 04:32:20 +00:00
|
|
|
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
byte tag;
|
|
|
|
byte marked;
|
|
|
|
void *link;
|
|
|
|
}
|
|
|
|
|
|
|
|
i;
|
|
|
|
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
ushort value;
|
|
|
|
ushort bump;
|
|
|
|
void *link;
|
|
|
|
}
|
|
|
|
|
|
|
|
c;
|
2006-02-24 04:48:15 +00:00
|
|
|
};
|
|
|
|
|
2006-05-25 04:32:20 +00:00
|
|
|
inline bool isMarked(Ins *i)
|
|
|
|
{
|
|
|
|
return i->i.marked != 0;
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
|
2006-05-25 04:32:20 +00:00
|
|
|
inline void mark(Ins *i)
|
|
|
|
{
|
|
|
|
i->i.marked = true;
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
|
2006-05-25 04:32:20 +00:00
|
|
|
inline void unmark(Ins *i)
|
|
|
|
{
|
|
|
|
i->i.marked = false;
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
|
2006-05-25 04:32:20 +00:00
|
|
|
} // end namespace re2c
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
#endif
|