lex.c revision 96ed62425310854fd6f6f06bfb7651b3e4c17ee7
2N/Atypedef struct inputsource {
unsigned int ignored;
void * input;
char * name;
unsigned long line;
unsigned long saved_line;
} inputsource;
struct isc_lex {
unsigned int magic;
char * data;
unsigned int options;
unsigned int comments;
unsigned int paren_count;
unsigned int saved_paren_count;
static inline isc_result_t
char *new;
return (ISC_R_NOMEMORY);
return (ISC_R_SUCCESS);
return (ISC_R_NOMEMORY);
return (ISC_R_NOMEMORY);
return (ISC_R_SUCCESS);
static inline isc_result_t
return (ISC_R_NOMEMORY);
return (ISC_R_NOMEMORY);
return (result);
return (ISC_R_SUCCESS);
return (result);
#ifdef HAVE_FLOCKFILE
return (result);
#ifdef HAVE_FLOCKFILE
return (ISC_R_NOMORE);
#ifdef HAVE_FLOCKFILE
return (ISC_R_SUCCESS);
} lexstate;
if (c == EOF) {
static isc_result_t
unsigned int oldlen;
return (result);
return (ISC_R_SUCCESS);
unsigned long ulong;
unsigned int saved_options;
return (ISC_R_SUCCESS);
return (ISC_R_NOMORE);
return (ISC_R_UNBALANCED);
return (ISC_R_SUCCESS);
return (ISC_R_EOF);
if (c == EOF) {
c = EOF;
if (c != EOF) {
c = EOF;
ISC_LEXCOMMENT_CPLUSPLUS)) != 0) {
switch (state) {
case lexstate_start:
if (c == EOF) {
return (ISC_R_UNBALANCED);
return (ISC_R_EOF);
return (ISC_R_UNBALANCED);
options =
} else if (isdigit((unsigned char)c) &&
goto no_read;
goto no_read;
case lexstate_crlf:
case lexstate_number:
int base;
base = 0;
return (ISC_R_RANGE);
isc_tokenvalue_t *v;
if (remaining == 0) {
return (result);
*curr++ = c;
remaining--;
case lexstate_string:
if ((!escaped &&
if (remaining == 0) {
return (result);
*curr++ = c;
remaining--;
case lexstate_maybecomment:
goto no_read;
case lexstate_ccomment:
if (c == EOF)
return (ISC_R_UNEXPECTEDEND);
case lexstate_ccommentend:
if (c == EOF)
return (ISC_R_UNEXPECTEDEND);
goto no_read;
case lexstate_eatline:
if (c == EOF)
return (ISC_R_UNEXPECTEDEND);
goto no_read;
case lexstate_qstring:
if (c == EOF)
return (ISC_R_UNEXPECTEDEND);
if (escaped) {
return (ISC_R_UNBALANCEDQUOTES);
if (remaining == 0) {
return (result);
*curr++ = c;
remaining--;
state);
} while (!done);
return (ISC_R_SUCCESS);
return (result);
return (ISC_R_SUCCESS);
return (ISC_R_SUCCESS);
return (ISC_R_UNEXPECTEDEND);
return (ISC_R_UNEXPECTEDTOKEN);
return (ISC_R_SUCCESS);
return(NULL);
return (ISC_FALSE);