+#include "scanner.h"
+
+
+
/*****************************************************************************/
/* Data */
/*****************************************************************************/
/* Struct holding a token */
typedef struct TokNode TokNode;
struct TokNode {
- TokNode* Next; /* For single linked list */
- enum Token Tok; /* Token value */
- int WS; /* Whitespace before token? */
- long IVal; /* Integer token attribute */
- char SVal [1]; /* String attribute, dyn. allocated */
+ TokNode* Next; /* For single linked list */
+ enum Token Tok; /* Token value */
+ int WS; /* Whitespace before token? */
+ long IVal; /* Integer token attribute */
+ char SVal [1]; /* String attribute, dyn. allocated */
};
/* Struct holding a token list */
typedef struct TokList TokList;
struct TokList {
- TokList* Next; /* Single linked list (for replay) */
- TokNode* Root; /* First node in list */
- TokNode* Last; /* Last node in list or replay */
- unsigned Repeat; /* Repeat counter (used for replay) */
- unsigned Count; /* Token count */
+ TokList* Next; /* Single linked list (for replay) */
+ TokNode* Root; /* First node in list */
+ TokNode* Last; /* Last node in list or replay */
+ unsigned RepCount; /* Repeat counter (used for replay) */
+ unsigned RepMax; /* Maximum repeat count for replay */
+ unsigned Count; /* Token count */
+ void (*Check)(TokList*); /* Token check function */
+ void* Data; /* Additional data for check */
};