145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#ifndef re2c_ins_h
245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#define re2c_ins_h
345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org
445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#include "tools/re2c/basics.h"
545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org
645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#define nChars 256
745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgtypedef unsigned char Char;
845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org
945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#define CHAR 0
1045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#define GOTO 1
1145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#define FORK 2
1245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#define TERM 3
1345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#define CTXT 4
1445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org
1545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgtypedef union Ins {
1645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org    struct {
1745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org	byte	tag;
1845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org	byte	marked;
1945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org	void	*link;
2045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org    }			i;
2145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org    struct {
2245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org	unsigned short	value;
2345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org	unsigned short	bump;
2445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org	void	*link;
2545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org    }			c;
2645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org} Ins;
2745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org
2845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgstatic int isMarked(Ins *i){
2945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org    return i->i.marked != 0;
3045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org}
3145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org
3245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgstatic void mark(Ins *i){
3345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org    i->i.marked = 1;
3445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org}
3545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org
3645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgstatic void unmark(Ins *i){
3745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org    i->i.marked = 0;
3845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org}
3945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org
4045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#endif
41