Changeset View
Changeset View
Standalone View
Standalone View
cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l
Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | #define YY_INPUT(buf,result,max_size) \ | ||||
} else { \ | } else { \ | ||||
int n; \ | int n; \ | ||||
for (n = 0; n < max_size && \ | for (n = 0; n < max_size && \ | ||||
yypcb->pcb_strptr < yypcb->pcb_string + yypcb->pcb_strlen; n++) \ | yypcb->pcb_strptr < yypcb->pcb_string + yypcb->pcb_strlen; n++) \ | ||||
buf[n] = *yypcb->pcb_strptr++; \ | buf[n] = *yypcb->pcb_strptr++; \ | ||||
result = n; \ | result = n; \ | ||||
} | } | ||||
/* | /* | ||||
* Do not EOF let tokens to be put back. This does not work with flex. | * Do not let EOF tokens be put back. This does not work with flex. | ||||
* On the other hand, leaving current buffer in same state it was when | * On the other hand, leaving current buffer in same state it was when | ||||
* last EOF was received guarantees that input() will keep returning EOF | * last EOF was received guarantees that input() will keep returning EOF | ||||
* for all subsequent invocations, which is the effect desired. | * for all subsequent invocations, which is the effect desired. | ||||
*/ | */ | ||||
#undef unput | #undef unput | ||||
#define unput(c) \ | #define unput(c) \ | ||||
do { \ | do { \ | ||||
int _c = c; \ | int _c = c; \ | ||||
if (_c != EOF) \ | if (_c != 0) \ | ||||
yyunput(_c, yytext_ptr); \ | yyunput(_c, yytext_ptr); \ | ||||
} while(0) | } while(0) | ||||
#endif | #endif | ||||
static int id_or_type(const char *); | static int id_or_type(const char *); | ||||
#ifdef illumos | #ifdef illumos | ||||
static int input(void); | static int input(void); | ||||
static void unput(int); | static void unput(int); | ||||
▲ Show 20 Lines • Show All 800 Lines • Show Last 20 Lines |