remaining ones.
svn path=/trunk/yasm/; revision=1678
s->tok = NULL;
s->ptr = NULL;
s->cur = NULL;
- s->pos = NULL;
s->lim = NULL;
s->top = NULL;
s->eof = NULL;
- s->tchar = 0;
- s->tline = 0;
- s->cline = 1;
}
void
s->tok = s->bot;
s->ptr -= cnt;
*cursor -= cnt;
- s->pos -= cnt;
s->lim -= cnt;
}
if (!s->bot)
s->tok = buf;
s->ptr = &buf[s->ptr - s->bot];
*cursor = &buf[*cursor - s->bot];
- s->pos = &buf[s->pos - s->bot];
s->lim = &buf[s->lim - s->bot];
s->top = &s->lim[BSIZE];
if (s->bot)
/** Re2c scanner state. */
typedef struct yasm_scanner {
- unsigned char *bot, *tok, *ptr, *cur, *pos, *lim, *top, *eof;
- unsigned int tchar, tline, cline;
+ unsigned char *bot; /**< Bottom of scan buffer */
+ unsigned char *tok; /**< Start of token */
+ unsigned char *ptr; /**< Scan marker */
+ unsigned char *cur; /**< Cursor (1 past end of token) */
+ unsigned char *lim; /**< Limit of good data */
+ unsigned char *top; /**< Top of scan buffer */
+ unsigned char *eof; /**< End of file */
} yasm_scanner;
/** Initialize scanner state.
#define RETURN(i) {s->cur = cursor; return i;}
-#define SCANINIT() { \
- s->tchar = cursor - s->pos; \
- s->tline = s->cline; \
- s->tok = cursor; \
- }
+#define SCANINIT() {s->tok = cursor;}
#define TOK ((char *)s->tok)
#define TOKLEN (size_t)(cursor-s->tok)
s->tok = s->bot;
s->ptr -= cnt;
cursor -= cnt;
- s->pos -= cnt;
s->lim -= cnt;
}
if (!s->bot)
s->tok = buf;
s->ptr = &buf[s->ptr - s->bot];
cursor = &buf[cursor - s->bot];
- s->pos = &buf[s->pos - s->bot];
s->lim = &buf[s->lim - s->bot];
s->top = &s->lim[BSIZE];
if (s->bot)
s->tok = NULL;
s->ptr = NULL;
s->cur = NULL;
- s->pos = NULL;
s->lim = NULL;
s->top = NULL;
s->eof = NULL;
#define RETURN(i) {s->cur = cursor; return i;}
-#define SCANINIT() { \
- s->tchar = cursor - s->pos; \
- s->tline = s->cline; \
- s->tok = cursor; \
- }
+#define SCANINIT() {s->tok = cursor;}
#define TOK ((char *)s->tok)
#define TOKLEN (size_t)(cursor-s->tok)