rem: result = sn_insert_symbol(SN_FUNC_DEF, NULL, current_function, sn_current_file(), current_function_line_start, current_function_column_start, current_function_line_end, current_function_column_end, 0 , NULL , NULL , current_function_args , NULL , current_function_highlight_line, current_function_highlight_column_start, current_function_highlight_line, current_function_highlight_column_end );  assert(result == 0);  ckfree(current_function); current_function = NULL; ckfree(current_function_args); current_function_args = NULL;  if (global_var_table) { global_var_table->destroy( &global_var_table ); global_var_table = NULL; }
add: emit_function_declaration();
context: YY_DECL	{	register yy_state_type yy_current_state;	register char *yy_cp = NULL, *yy_bp = NULL;	register int yy_act;#line 194 "phpbrowser.l"	if ( yy_init )		{		yy_init = 0;#ifdef YY_USER_INIT		YY_USER_INIT;#endif		if ( ! yy_start )			yy_start = 1;	/* first start state */		if ( ! yyin )			yyin = stdin;		if ( ! yyout )			yyout = stdout;		if ( ! yy_current_buffer )			yy_current_buffer =				yy_create_buffer( yyin, YY_BUF_SIZE );		yy_load_buffer_state();		}	while ( 1 )		/* loops until end-of-file is reached */		{		yy_cp = yy_c_buf_p;		/* Support of yytext. */		*yy_cp = yy_hold_char;		/* yy_bp points to the position in yy_ch_buf of the start of		 * the current run.		 */		yy_bp = yy_cp;		yy_current_state = yy_start;yy_match:		do			{			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];			if ( yy_accept[yy_current_state] )				{				yy_last_accepting_state = yy_current_state;				yy_last_accepting_cpos = yy_cp;				}			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )				{				yy_current_state = (int) yy_def[yy_current_state];				if ( yy_current_state >= 550 )					yy_c = yy_meta[(unsigned int) yy_c];				}			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];			++yy_cp;			}		while ( yy_base[yy_current_state] != 763 );yy_find_action:		yy_act = yy_accept[yy_current_state];		if ( yy_act == 0 )			{ /* have to back up */			yy_cp = yy_last_accepting_cpos;			yy_current_state = yy_last_accepting_state;			yy_act = yy_accept[yy_current_state];			}		YY_DO_BEFORE_ACTION;do_action:	/* This label is used only to access EOF actions. */		switch ( yy_act )	{ /* beginning of action switch */			case 0: /* must back up */			/* undo the effects of YY_DO_BEFORE_ACTION */			*yy_cp = yy_hold_char;			yy_cp = yy_last_accepting_cpos;			yy_current_state = yy_last_accepting_state;			goto yy_find_action;case 1:YY_RULE_SETUP#line 196 "phpbrowser.l"{ /* HTML -> PHP mode */    matched_pattern("<?", yytext);    BEGIN(PHP);    sn_advance_column(2);}	YY_BREAKcase 2:YY_RULE_SETUP#line 202 "phpbrowser.l"{ /* PHP -> HTML mode */    matched_pattern("?>", yytext);    BEGIN(INITIAL);    sn_advance_column(2);}	YY_BREAKcase 3:YY_RULE_SETUP#line 208 "phpbrowser.l"{ /* A C style multi-line comment, just like this! */    matched_pattern("/*", yytext);    BEGIN(COMMENT);    sn_advance_column(2);    LongStringInit(&cbuff,0);    cbuff_start_line = sn_line();    cbuff_start_column = sn_column();}	YY_BREAKcase 4:YY_RULE_SETUP#line 217 "phpbrowser.l"{ /* A C++ style line comment -> // This function is quite nice. <- */  char * x = (char *) yytext;  char * y = x + yyleng - 1;  matched_pattern("//.*\\n", yytext);  while (*x != '/') { x++; }  x++;  assert(*x == '/');  x++;  sn_advance_column(x - yytext);  assert(*y == '\n');  *y = '\0';  sn_insert_comment(    /* classname */ NULL,    /* funcname */ NULL,    sn_current_file(),    x,    sn_line(),    sn_column());  sn_advance_line();  sn_reset_column();}	YY_BREAKcase 5:YY_RULE_SETUP#line 245 "phpbrowser.l"{    matched_pattern("[^\\*\\n]*", yytext);    #if COMMENT_DUMP    fprintf(stderr, "comment(1) \"%s\", %d\n", yytext, yyleng);    #endif    cbuff.append( &cbuff,        yytext, yyleng );    sn_advance_column(yyleng);    }	YY_BREAKcase 6:YY_RULE_SETUP#line 255 "phpbrowser.l"{    matched_pattern("[^\\*\\n]*\\n", yytext);    #if COMMENT_DUMP    fprintf(stderr, "comment(2) \"%s\", %d\n", yytext, yyleng);    #endif    cbuff.append( &cbuff,        yytext, yyleng );    sn_advance_line();    sn_reset_column();    }	YY_BREAKcase 7:YY_RULE_SETUP#line 267 "phpbrowser.l"{    matched_pattern("\\*+[^\\*/\\n]*", yytext);    #if COMMENT_DUMP    fprintf(stderr, "comment(3) \"%s\", %d\n", yytext, yyleng);    #endif    cbuff.append( &cbuff,        yytext, yyleng );    sn_advance_column(yyleng);  }	YY_BREAKcase 8:YY_RULE_SETUP#line 278 "phpbrowser.l"{    matched_pattern("\\*+[^\\*/\\n]*\\n", yytext);    #if COMMENT_DUMP    fprintf(stderr, "comment(4) \"%s\", %d\n", yytext, yyleng);    #endif    cbuff.append( &cbuff,        yytext, yyleng );    sn_advance_line();    sn_reset_column();  }	YY_BREAKcase 9:YY_RULE_SETUP#line 290 "phpbrowser.l"{    char * comment;    matched_pattern("\\*+/", yytext);    /* Include multiple '*' characters in the comment */    if (yyleng > 2) {        comment = (char *) yytext + yyleng - 1;        assert(*comment == '/');        comment--;        assert(*comment == '*');        *comment = '0';        yyleng -= 2;        cbuff.append( &cbuff,            yytext, yyleng );    }    comment = cbuff.buf;    #if COMMENT_DUMP    fprintf(stderr, "eating comment \"%s\"\n", comment);    #endif    sn_insert_comment(        /* classname */ NULL,        /* funcname */ NULL,        sn_current_file(),        comment,        cbuff_start_line,        cbuff_start_column);    cbuff.free(&cbuff);    sn_advance_column(yyleng);    BEGIN(PHP);  }	YY_BREAKcase 10:YY_RULE_SETUP#line 327 "phpbrowser.l"{  Token* tok;  matched_pattern("(", yytext);  tok = AllocToken();  tok->type = OPEN_PAREN;  tok->strval = NULL;  tok->line = sn_line();  tok->column = sn_column();  add_token(tok);  sn_advance_column(yyleng);}	YY_BREAKcase 11:YY_RULE_SETUP#line 339 "phpbrowser.l"{  Token* tok;  matched_pattern(")", yytext);  tok = AllocToken();  tok->type = CLOSE_PAREN;  tok->strval = NULL;  tok->line = sn_line();  tok->column = sn_column();  add_token(tok);  sn_advance_column(yyleng);}	YY_BREAKcase 12:YY_RULE_SETUP#line 351 "phpbrowser.l"{  Token* tok;  matched_pattern("[", yytext);  sn_advance_column(yyleng);  tok = AllocToken();  tok->type = OPEN_BRACKET;  tok->strval = NULL;  tok->line = sn_line();  tok->column = sn_column();  add_token(tok);  sn_advance_column(yyleng);}	YY_BREAKcase 13:YY_RULE_SETUP#line 364 "phpbrowser.l"{  Token* tok;  matched_pattern("]", yytext);  tok = AllocToken();  tok->type = CLOSE_BRACKET;  tok->strval = NULL;  tok->line = sn_line();  tok->column = sn_column();  add_token(tok);  sn_advance_column(yyleng);}	YY_BREAKcase 14:YY_RULE_SETUP#line 376 "phpbrowser.l"{  Token* tok;  matched_pattern("{", yytext);  tok = AllocToken();  tok->type = OPEN_BRACE;  tok->strval = NULL;  tok->line = sn_line();  tok->column = sn_column();  add_token(tok);  sn_advance_column(yyleng);}	YY_BREAKcase 15:YY_RULE_SETUP#line 388 "phpbrowser.l"{  Token* tok;  matched_pattern("}", yytext);  tok = AllocToken();  tok->type = CLOSE_BRACE;  tok->strval = NULL;  tok->line = sn_line();  tok->column = sn_column();  add_token(tok);  sn_advance_column(yyleng);}	YY_BREAKcase 16:YY_RULE_SETUP#line 400 "phpbrowser.l"{  Token* tok;  matched_pattern("}", yytext);  tok = AllocToken();  tok->type = SEMICOLON;  tok->strval = NULL;  add_token(tok);  tok->line = sn_line();  tok->column = sn_column();  sn_advance_column(yyleng);}	YY_BREAKcase 17:YY_RULE_SETUP#line 412 "phpbrowser.l"{  Token* tok;  matched_pattern("=", yytext);  tok = AllocToken();  tok->type = ASSIGNMENT_OPERATOR;  tok->strval = NULL;  tok->line = sn_line();  tok->column = sn_column();  add_token(tok);  sn_advance_column(yyleng);}	YY_BREAKcase 18:YY_RULE_SETUP#line 424 "phpbrowser.l"{  Token* tok;  matched_pattern("{assignment-operators}", yytext);  tok = AllocToken();  tok->type = ASSIGNMENT_OPERATORS;  tok->strval = SN_StrDup(yytext);  tok->line = sn_line();  tok->column = sn_column();  add_token(tok);  sn_advance_column(yyleng);}	YY_BREAKcase 19:YY_RULE_SETUP#line 436 "phpbrowser.l"{  Token* tok;  matched_pattern("function", yytext);  tok = AllocToken();  tok->type = FUNCTION_KEYWORD;  tok->strval = SN_StrDup(yytext);  tok->line = sn_line();  tok->column = sn_column();  add_token(tok);  sn_advance_column(yyleng);}	YY_BREAKcase 20:YY_RULE_SETUP#line 448 "phpbrowser.l"{  Token* tok;  matched_pattern("global", yytext);  tok = AllocToken();  tok->type = GLOBAL_KEYWORD;  tok->strval = SN_StrDup(yytext);  tok->line = sn_line();  tok->column = sn_column();  add_token(tok);  sn_advance_column(yyleng);}	YY_BREAKcase 21:YY_RULE_SETUP#line 460 "phpbrowser.l"{  Token* tok;  matched_pattern("{include-keywords}", yytext);  tok = AllocToken();  tok->type = INCLUDE_KEYWORD;  tok->strval = SN_StrDup(yytext);  tok->line = sn_line();  tok->column = sn_column();  add_token(tok);  sn_advance_column(yyleng);}	YY_BREAKcase 22:YY_RULE_SETUP#line 472 "phpbrowser.l"{  Token* tok;  matched_pattern("{keywords}", yytext);  tok = AllocToken();  tok->type = KEYWORD;  tok->strval = SN_StrDup(yytext);  tok->line = sn_line();  tok->column = sn_column();  add_token(tok);  sn_advance_column(yyleng);}	YY_BREAKcase 23:YY_RULE_SETUP#line 484 "phpbrowser.l"{  Token* tok;  matched_pattern("{q-string}", yytext);  tok = AllocToken();  if (*yytext == '\"') {    tok->type = DOUBLE_QUOTED_STRING;  } else {    tok->type = SINGLE_QUOTED_STRING;  }  *(yytext + yyleng - 1) = 0;  tok->strval = SN_StrDup(yytext+1);  tok->line = sn_line();  tok->column = sn_column();  add_token(tok);  sn_advance_column(yyleng);}	YY_BREAKcase 24:YY_RULE_SETUP#line 501 "phpbrowser.l"{  Token* tok;  matched_pattern("{someword}", yytext);  tok = AllocToken();  tok->type = SOMEWORD;  tok->strval = SN_StrDup(yytext);  tok->line = sn_line();  tok->column = sn_column();  add_token(tok);  sn_advance_column(yyleng);}	YY_BREAKcase 25:YY_RULE_SETUP#line 513 "phpbrowser.l"{  matched_pattern("\\$", yytext);  sn_advance_column(yyleng); /* ignore \$ */}	YY_BREAKcase 26:YY_RULE_SETUP#line 518 "phpbrowser.l"{  Token* tok;  matched_pattern("${varname}", yytext);  sn_advance_column(1);  tok = AllocToken();  tok->type = VARIABLE;  tok->strval = SN_StrDup(yytext+1);  tok->line = sn_line();  tok->column = sn_column();  add_token(tok);  sn_advance_column(yyleng-1);}	YY_BREAKcase 27:YY_RULE_SETUP#line 533 "phpbrowser.l"{  matched_pattern("\\n", yytext);  sn_advance_line();  sn_reset_column();}	YY_BREAKcase 28:YY_RULE_SETUP#line 539 "phpbrowser.l"{  matched_pattern(".", yytext);  sn_advance_column(yyleng); /* eat text */}	YY_BREAKcase 29:YY_RULE_SETUP#line 546 "phpbrowser.l"{  int parens, noargs;  LongString abuff;#ifdef TOKEN_DEBUG  fprintf(tokenout, "function declaration at token %d\n", token_index);  fprintf(tokenout, "match text was \"%s\"\n", yytext);#endif  assert(tokens_head->type == FUNCTION_KEYWORD);  current_function_line_start = tokens_head->line;  current_function_column_start = tokens_head->column;  free_head_token(); /* FUNCTION_KEYWORD */  /* FIXME: It would be better to create a state stack and push     the current state onto that (class, function, namespace) */  assert(current_function == NULL);  current_function = SN_StrDup(tokens_head->strval);  current_function_highlight_line = tokens_head->line;  current_function_highlight_column_start = tokens_head->column;  current_function_highlight_column_end = tokens_head->column;  current_function_highlight_column_end += strlen(current_function);  free_head_token(); /* SOMEWORD */  free_head_token(); /* OPEN_PAREN */  /* Save function arguments in current_function_args */    parens = 1;  noargs = 1;  LongStringInit(&abuff,0);  while (parens > 0) {    if (tokens_head->type == OPEN_PAREN) {      parens++;    } else if (tokens_head->type == CLOSE_PAREN) {      parens--;    } else if (tokens_head->type == VARIABLE) {        /* We just ignore default values for arguments */        if (!noargs) {            abuff.append( &abuff, ",", -1);        }        abuff.append( &abuff, tokens_head->strval, -1);        noargs = 0;    }    free_head_token(); /* ... */  }  assert(current_function_args == NULL);  if (!noargs) {      current_function_args = SN_StrDup(abuff.buf);  }  abuff.free(&abuff);  free_head_token(); /* OPEN_BRACE */  current_function_brace_count = 1;}	YY_BREAKcase 30:YY_RULE_SETUP#line 606 "phpbrowser.l"{  if (current_function) {    current_function_brace_count++;  }  free_head_token(); /* OPEN_BRACE */}	YY_BREAKcase 31:YY_RULE_SETUP#line 613 "phpbrowser.l"{  if (current_function && (--current_function_brace_count == 0)) {#ifdef TOKEN_DEBUG    fprintf(tokenout, "end of function %s at token %d\n",        current_function, token_index);#endif    current_function_line_end = tokens_head->line;    current_function_column_end = tokens_head->column + 1;    result = sn_insert_symbol(SN_FUNC_DEF,            NULL,            current_function,            sn_current_file(),             current_function_line_start, current_function_column_start,            current_function_line_end, current_function_column_end,            0 /* attribute */,            NULL /* return type */,            NULL /* argument types */,            current_function_args /* argument names */,            NULL /* comment */,            current_function_highlight_line,            current_function_highlight_column_start,            current_function_highlight_line,            current_function_highlight_column_end );    assert(result == 0);    ckfree(current_function);    current_function = NULL;    ckfree(current_function_args);    current_function_args = NULL;    if (global_var_table) {      global_var_table->destroy( &global_var_table );      global_var_table = NULL;    }  }  free_head_token(); /* CLOSE_BRACE */}	YY_BREAKcase 32:YY_RULE_SETUP#line 655 "phpbrowser.l"{  int line_start, line_end, column_start, column_end;  char * filename;#ifdef TOKEN_DEBUG  fprintf(tokenout, "include statement begins at token %d\n", token_index);#endif  free_head_token(); /* INCLUDE_KEYWORD */  if (tokens_head->type == OPEN_PAREN) {    free_head_token(); /* OPEN_PAREN */  }  assert((tokens_head->type == SINGLE_QUOTED_STRING) ||           (tokens_head->type == DOUBLE_QUOTED_STRING));  /* FIXME: Quoted strings can span lines so line_end needs fixing */  line_end = line_start = tokens_head->line;  column_start = tokens_head->column + 1;  filename = tokens_head->strval;  column_end = column_start + strlen(filename);  result = sn_insert_symbol(SN_INCLUDE_DEF,          /* classname */ NULL,          filename,          sn_current_file(),          line_start, column_start,          line_end, column_end,          /* attr */ 0,          /* ret */ NULL,          /* arg_types */ NULL,          /* arg_names */ NULL,          /* comment */ NULL,          line_start, column_start,          line_end, column_end);  assert(result == 0);  free_head_token(); /* SINGLE_QUOTED_STRING || DOUBLE_QUOTED_STRING */  if (tokens_head->type == CLOSE_PAREN) {    free_head_token(); /* CLOSE_PAREN */  }  free_head_token(); /* SEMICOLON */}	YY_BREAKcase 33:YY_RULE_SETUP#line 703 "phpbrowser.l"{  SearchEntry entry;#ifdef TOKEN_DEBUG  fprintf(tokenout, "global statement found at %d\n", token_index);#endif  free_head_token(); /* GLOBAL_KEYWORD */  if (current_function && (global_var_table == NULL)) {    global_var_table = SearchTableCreate(100, SEARCH_HASH_TABLE, FreeGlobalEntry);  }  /* Insert the variable name into the function's global table */  while (tokens_head->type == VARIABLE) {    if (current_function) {        entry.key = tokens_head->strval;        entry.key_len = -1;        if (global_var_table->search( &global_var_table, entry ) == NULL)        {            entry.data = NULL;            entry.data_len = 0;            entry.flag = SEARCH_DUP_KEY; /* add copy of entry.key */            global_var_table->add( &global_var_table, entry );#ifdef TOKEN_DEBUG  fprintf(tokenout, "added global \"%s\"\n", entry.key);#endif        }    }    free_head_token(); /* VARIABLE */  }  free_head_token(); /* SEMICOLON */}	YY_BREAKcase 34:YY_RULE_SETUP#line 742 "phpbrowser.l"{  char* fname;  int line;#ifdef TOKEN_DEBUG  fprintf(tokenout, "found function call tokens at %d\n", token_index);  fprintf(tokenout, "match text was \"%s\"\n", yytext);#endif  fname = tokens_head->strval;#ifdef TOKEN_DEBUG  fprintf(tokenout, "function name is \"%s\"\n", fname);#endif  line = tokens_head->line;  result = sn_insert_xref(SN_REF_TO_FUNCTION,                 SN_FUNC_DEF,                 SN_REF_SCOPE_GLOBAL,                 NULL,                 (current_function == NULL) ? "GLOBAL" : current_function,                 NULL,                 NULL,                 fname,                 NULL,                  sn_current_file(),                 line,                 SN_REF_PASS);  assert(result == 0);  free_head_token(); /* SOMEWORD */  free_head_token(); /* OPEN_PAREN */}	YY_BREAKcase 35:YY_RULE_SETUP#line 776 "phpbrowser.l"{  char* varname = tokens_head->strval;  SearchEntry entry;  int ref_to_symbol_type, ref_to_symbol_scope, symbol_def_type;  int line_start, line_end, column_start, column_end;  line_end = line_start = tokens_head->line;  column_start = tokens_head->column;  column_end = column_start;  if (varname == NULL) {    column_end += 1;  } else {    column_end += strlen(varname);  }#ifdef TOKEN_DEBUG  fprintf(tokenout, "variable assignment at token %d\n", token_index);#endif  /*   * If we are not in a function or the variable is in the   * function's global table then it is a global.   */  entry.key = varname;  entry.key_len = -1;  if ((current_function == NULL) ||      (global_var_table &&        (global_var_table->search( &global_var_table, entry ) != NULL))) {    ref_to_symbol_type = SN_REF_TO_GLOB_VAR;    ref_to_symbol_scope = SN_REF_SCOPE_GLOBAL;    symbol_def_type = SN_GLOB_VAR_DEF;#ifdef TOKEN_DEBUG    fprintf(tokenout, "global var \"%s\"\n", varname);#endif  } else {    ref_to_symbol_type = SN_REF_TO_LOCAL_VAR;    ref_to_symbol_scope = SN_REF_SCOPE_LOCAL;    symbol_def_type = SN_LOCAL_VAR_DEF;#ifdef TOKEN_DEBUG    fprintf(tokenout, "local var \"%s\"\n", varname);#endif  }  /* I think setting a global variable should emit     a symbol declaration. I am not really     sure if we should emit just one symbol     declaration, or multiple ones. Multiple     ones breaks xref but it does present     the symbol multiple times in the     file's symbol list which would be     nice if it worked correctly */  result = sn_insert_symbol(symbol_def_type,                            NULL,			    varname,			    sn_current_file(),			    line_start, column_start,			    line_end, column_end,			    0,			    NULL,			    NULL,			    NULL,			    NULL,			    line_start, column_start,			    line_end, column_end                            );  assert(result == 0);  /* FIXME: The second argument to sn_insert_xref must be one of SN_FUNC_DEF,   * SN_MBR_FUNC_DEF, or SN_SUBR_DEF. This is too restrictive, there   * needs to be an option to pass when not in a function. Currently,   * we just pretend to be in a function named "GLOBAL".   */  if ((ref_to_symbol_type == SN_REF_TO_GLOB_VAR) ||      ((ref_to_symbol_type == SN_REF_TO_LOCAL_VAR) &&          ((int) sn_getopt(SN_OPT_LOCAL_VARS) != 0))) {    result = sn_insert_xref(ref_to_symbol_type,                 SN_FUNC_DEF, /* Not really in a function definition */                 ref_to_symbol_scope,                 NULL,                 (current_function == NULL) ? "GLOBAL" : current_function,                 NULL,                 NULL,                 varname,                 NULL,                 sn_current_file(),                 line_start,                 SN_REF_WRITE);    assert(result == 0);  }  free_head_token(); /* VARIABLE */  free_head_token(); /* ASSIGNMENT_OPERATOR || ASSIGNMENT_OPERATORS */}	YY_BREAKcase 36:YY_RULE_SETUP#line 876 "phpbrowser.l"{  char* varname = tokens_head->strval;  SearchEntry entry;  int line_num = tokens_head->line;  int ref_to_symbol_type, ref_to_symbol_scope;#ifdef TOKEN_DEBUG  fprintf(tokenout, "variable access at token %d\n", token_index);#endif  /*   * If we are not in a function or the variable is in the   * function's global table then it is a global.   */  entry.key = varname;  entry.key_len = -1;  if ((current_function == NULL) ||      (global_var_table &&        (global_var_table->search( &global_var_table, entry ) != NULL))) {    ref_to_symbol_type = SN_REF_TO_GLOB_VAR;    ref_to_symbol_scope = SN_REF_SCOPE_GLOBAL;#ifdef TOKEN_DEBUG    fprintf(tokenout, "global var \"%s\"\n", varname);#endif  } else {    ref_to_symbol_type = SN_REF_TO_LOCAL_VAR;    ref_to_symbol_scope = SN_REF_SCOPE_LOCAL;#ifdef TOKEN_DEBUG    fprintf(tokenout, "local var \"%s\"\n", varname);#endif  }  /* FIXME: The second argument to sn_insert_xref must be one of SN_FUNC_DEF,   * SN_MBR_FUNC_DEF, or SN_SUBR_DEF. This is too restrictive, there   * needs to be an option to pass when not in a function. Currently,   * we just pretend to be in a function named "GLOBAL".   */  if ((ref_to_symbol_type == SN_REF_TO_GLOB_VAR) ||      ((ref_to_symbol_type == SN_REF_TO_LOCAL_VAR) &&          ((int) sn_getopt(SN_OPT_LOCAL_VARS) != 0))) {    result = sn_insert_xref(ref_to_symbol_type,                 SN_FUNC_DEF, /* Not really in a function definition */                 ref_to_symbol_scope,                 NULL,                 (current_function == NULL) ? "GLOBAL" : current_function,                 NULL,                 NULL,                 varname,                 NULL,                 sn_current_file(),                 line_num,                 SN_REF_READ);    assert(result == 0);  }  free_head_token(); /* VARIABLE */}	YY_BREAKcase 37:YY_RULE_SETUP#line 939 "phpbrowser.l"{#ifdef TOKEN_DEBUG  fprintf(tokenout, "ate token %d %s", token_index,          TokenTypeToString(tokens_head));  if (tokens_head->strval) {      fprintf(tokenout, " \"%s\"", tokens_head->strval);  }  fprintf(tokenout, "\n");#endif  free_head_token(); /* ... */}	YY_BREAKcase 38:YY_RULE_SETUP#line 952 "phpbrowser.l"	YY_BREAKcase 39:YY_RULE_SETUP#line 954 "phpbrowser.l"{#ifdef TOKEN_DEBUG    fprintf(tokenout, "matched unknown character \"%s\"\n", yytext);#endif}	YY_BREAKcase YY_STATE_EOF(TOKEN):#line 960 "phpbrowser.l"{#ifdef TOKEN_DEBUG    fprintf(tokenout, "reached EOF in TOKEN buffer\n");#endif    assert(tokens_head == NULL);    yy_delete_buffer( YY_CURRENT_BUFFER );    yy_switch_to_buffer( original_buffer );    BEGIN(INITIAL);    yyterminate();}	YY_BREAKcase YY_STATE_EOF(INITIAL):case YY_STATE_EOF(PHP):#line 973 "phpbrowser.l"{  LongString token_buffer;  char *base;  int i;  Token* tok;  yy_size_t size;  YY_BUFFER_STATE yybs;#ifdef TOKEN_DEBUG  tokenout = fopen("tokens.out", "a");  fprintf(tokenout, "reached EOF in lex input buffer\n");#endif  /* If no tokens were generated, then quit now */  if (tokens_head == NULL) {#ifdef TOKEN_DEBUG    fprintf(tokenout, "no TOKENs generated\n");#endif    yyterminate();  }  LongStringInit(&token_buffer,0);  /* Print token info to in memory buffer and then reload     the input state machine and start out in the TOKEN mode. */  for (i=0, tok = tokens_head ; tok ; tok = tok->next, i++) {        int token_length;#ifdef TOKEN_DEBUG        fprintf(tokenout, "token %d %s", i, TokenTypeToString(tok));        if (tok->strval) {            fprintf(tokenout, " \"%s\"", tok->strval);            token_length = strlen(tok->strval);        } else {            token_length = 1;        }        fprintf(tokenout, " (%d.%d -> %d.%d)",            tok->line,            tok->column,            tok->line,            tok->column + token_length        );        fprintf(tokenout, "\n");#endif                token_buffer.append( &token_buffer, TokenTypeToString(tok), -1);        token_buffer.append( &token_buffer, " ", -1);  }#ifdef TOKEN_DEBUG  fprintf(tokenout, "token buffer data is \"%s\"\n", token_buffer.buf);#endif  original_buffer = YY_CURRENT_BUFFER;  yy_switch_to_buffer( yy_scan_string(token_buffer.buf) );  token_buffer.free(&token_buffer);#ifdef TOKEN_DEBUG  fprintf(tokenout, "switching to token mode\n");#endif  BEGIN(TOKEN);}	YY_BREAKcase 40:YY_RULE_SETUP#line 1038 "phpbrowser.l"ECHO;	YY_BREAKcase YY_STATE_EOF(COMMENT):	yyterminate();	case YY_END_OF_BUFFER:		{		/* Amount of text matched not including the EOB char. */		int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;		/* Undo the effects of YY_DO_BEFORE_ACTION. */		*yy_cp = yy_hold_char;		YY_RESTORE_YY_MORE_OFFSET		if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )			{			/* We're scanning a new file or input source.  It's			 * possible that this happened because the user			 * just pointed yyin at a new source and called			 * yylex().  If so, then we have to assure			 * consistency between yy_current_buffer and our			 * globals.  Here is the right place to do so, because			 * this is the first action (other than possibly a			 * back-up) that will match for the new input source.			 */			yy_n_chars = yy_current_buffer->yy_n_chars;			yy_current_buffer->yy_input_file = yyin;			yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;			}		/* Note that here we test for yy_c_buf_p "<=" to the position		 * of the first EOB in the buffer, since yy_c_buf_p will		 * already have been incremented past the NUL character		 * (since all states make transitions on EOB to the		 * end-of-buffer state).  Contrast this with the test		 * in input().		 */		if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )			{ /* This was really a NUL. */			yy_state_type yy_next_state;			yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;			yy_current_state = yy_get_previous_state();			/* Okay, we're now positioned to make the NUL			 * transition.  We couldn't have			 * yy_get_previous_state() go ahead and do it			 * for us because it doesn't know how to deal			 * with the possibility of jamming (and we don't			 * want to build jamming into it because then it			 * will run more slowly).			 */			yy_next_state = yy_try_NUL_trans( yy_current_state );			yy_bp = yytext_ptr + YY_MORE_ADJ;			if ( yy_next_state )				{				/* Consume the NUL. */				yy_cp = ++yy_c_buf_p;				yy_current_state = yy_next_state;				goto yy_match;				}			else				{				yy_cp = yy_c_buf_p;				goto yy_find_action;				}			}		else switch ( yy_get_next_buffer() )			{			case EOB_ACT_END_OF_FILE:				{				yy_did_buffer_switch_on_eof = 0;				if ( yywrap() )					{					/* Note: because we've taken care in					 * yy_get_next_buffer() to have set up					 * yytext, we can now set up					 * yy_c_buf_p so that if some total					 * hoser (like flex itself) wants to					 * call the scanner after we return the					 * YY_NULL, it'll still work - another					 * YY_NULL will get returned.					 */					yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;					yy_act = YY_STATE_EOF(YY_START);					goto do_action;					}				else					{					if ( ! yy_did_buffer_switch_on_eof )						YY_NEW_FILE;					}				break;				}			case EOB_ACT_CONTINUE_SCAN:				yy_c_buf_p =					yytext_ptr + yy_amount_of_matched_text;				yy_current_state = yy_get_previous_state();				yy_cp = yy_c_buf_p;				yy_bp = yytext_ptr + YY_MORE_ADJ;				goto yy_match;			case EOB_ACT_LAST_MATCH:				yy_c_buf_p =				&yy_current_buffer->yy_ch_buf[yy_n_chars];				yy_current_state = yy_get_previous_state();				yy_cp = yy_c_buf_p;				yy_bp = yytext_ptr + YY_MORE_ADJ;				goto yy_find_action;			}		break;		}	default:		YY_FATAL_ERROR(			"fatal flex scanner internal error--no action found" );	} /* end of action switch */		} /* end of scanning one token */	} /* end of yylex */