rem: case 49: YY_RULE_SETUP #line 847 "phpbrowser.l"
add: case 51: YY_RULE_SETUP #line 868 "phpbrowser.l"
context: YY_DECL	{	register yy_state_type yy_current_state;	register char *yy_cp = NULL, *yy_bp = NULL;	register int yy_act;#line 222 "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 >= 785 )					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] != 1117 );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 224 "phpbrowser.l"{ /* HTML -> PHP mode */    matched_pattern("<?", yytext);    BEGIN(PHP);    sn_advance_column(2);}	YY_BREAKcase 2:YY_RULE_SETUP#line 230 "phpbrowser.l"{ /* PHP -> HTML mode */    matched_pattern("?>", yytext);    BEGIN(INITIAL);    sn_advance_column(2);}	YY_BREAKcase 3:YY_RULE_SETUP#line 236 "phpbrowser.l"{  char * x = (char *) yytext;  char * y;  int newline = 0;  matched_pattern("{ws}*(//|#).*\\n", yytext);  while (*x == ' ' || *x == '\t') { x++; }  assert(*x == '#' || (*x == '/' && *(x+1) == '/'));  if (*x == '#') {    x++;  } else if (*x == '/') {    x += 2;  }  sn_advance_column(x - yytext);  /* Check for ?> in the text leading up to the newline.   * PHP has this special rule where a line comment   * can be terminated before the newline.   */  for (y=x; *y; y++) {    if (*y == '?' && *(y+1) == '>') {        int offset = (int) (y - yytext);        yyless(offset); /* send everything after ?> back */        break;    }  }  y = yytext + yyleng - 1;  if (*y == '\n') {    newline = 1;    *y = 0;  }  sn_insert_comment(    /* classname */ NULL,    /* funcname */ NULL,    sn_current_file(),    x,    sn_line(),    sn_column());  if (newline) {    sn_advance_line();    sn_reset_column();  } else {    sn_advance_column(yyleng - (x - yytext));  }}	YY_BREAKcase 4:YY_RULE_SETUP#line 287 "phpbrowser.l"{ /* A C style multi-line comment, just like this! */    matched_pattern("/*", yytext);    BEGIN(COMMENT);    sn_advance_column(2);    LongStringInit(&mode_buff,0);    mode_start_line = sn_line();    mode_start_column = sn_column();}	YY_BREAKcase 5:YY_RULE_SETUP#line 297 "phpbrowser.l"{    matched_pattern("[^\\*\\n]*", yytext);    #if COMMENT_DUMP    fprintf(stderr, "comment(1) \"%s\", %d\n", yytext, yyleng);    #endif    mode_buff.append( &mode_buff,        yytext, yyleng );    sn_advance_column(yyleng);  }	YY_BREAKcase 6:YY_RULE_SETUP#line 307 "phpbrowser.l"{    matched_pattern("[^\\*\\n]*\\n", yytext);    #if COMMENT_DUMP    fprintf(stderr, "comment(2) \"%s\", %d\n", yytext, yyleng);    #endif    mode_buff.append( &mode_buff,        yytext, yyleng );    sn_advance_line();    sn_reset_column();  }	YY_BREAKcase 7:YY_RULE_SETUP#line 319 "phpbrowser.l"{    matched_pattern("\\*+[^\\*/\\n]*", yytext);    #if COMMENT_DUMP    fprintf(stderr, "comment(3) \"%s\", %d\n", yytext, yyleng);    #endif    mode_buff.append( &mode_buff,        yytext, yyleng );    sn_advance_column(yyleng);  }	YY_BREAKcase 8:YY_RULE_SETUP#line 330 "phpbrowser.l"{    matched_pattern("\\*+[^\\*/\\n]*\\n", yytext);    #if COMMENT_DUMP    fprintf(stderr, "comment(4) \"%s\", %d\n", yytext, yyleng);    #endif    mode_buff.append( &mode_buff,        yytext, yyleng );    sn_advance_line();    sn_reset_column();  }	YY_BREAKcase 9:YY_RULE_SETUP#line 342 "phpbrowser.l"{    matched_pattern("\\*+/", yytext);    /* Include multiple '*' characters in the comment */    if (yyleng > 2) {        int to_append = yyleng;        char *comment = (char *) yytext + yyleng - 1;        assert(*comment == '/');        comment--;        assert(*comment == '*');        *comment = '0';        to_append -= 2;        mode_buff.append( &mode_buff,            yytext, to_append );    }    emit_comment();    sn_advance_column(yyleng);    BEGIN(PHP);  }	YY_BREAKcase 10:YY_RULE_SETUP#line 364 "phpbrowser.l"{  matched_pattern("\\\"\\\"", yytext);  /* FIXME: Can we pass NULL instead of "" after length issues worked out ? */  append_token(DOUBLE_QUOTED_STRING, "",          sn_line(),          sn_column(),          sn_line(),          sn_column() + yyleng);  sn_advance_column(yyleng);}	YY_BREAKcase 11:YY_RULE_SETUP#line 375 "phpbrowser.l"{  matched_pattern("\\\"", yytext);#if DQSTRING_DUMP  fprintf(stderr, "dqstring started at (%d.%d)\n", sn_line(), sn_column());#endif  LongStringInit(&mode_buff,0);  mode_start_line = sn_line();  mode_start_column = sn_column();  sn_advance_column(yyleng);  BEGIN(DQSTRING);}	YY_BREAKcase 12:YY_RULE_SETUP#line 388 "phpbrowser.l"{    matched_pattern("[^\\\"\\n\\\\]*", yytext);    #if DQSTRING_DUMP    fprintf(stderr, "dqstring(1) \"%s\", %d\n", yytext, yyleng);    #endif    mode_buff.append( &mode_buff,        yytext, yyleng );    sn_advance_column(yyleng);  }	YY_BREAKcase 13:YY_RULE_SETUP#line 398 "phpbrowser.l"{    matched_pattern("[^\\\"\\n\\\\]*\\n", yytext);    #if DQSTRING_DUMP    fprintf(stderr, "dqstring(2) \"%s\", %d\n", yytext, yyleng);    #endif    mode_buff.append( &mode_buff,        yytext, yyleng );    sn_advance_line();    sn_reset_column();  }	YY_BREAKcase 14:YY_RULE_SETUP#line 409 "phpbrowser.l"{    matched_pattern("\\\"+[^\\\"/\\n\\\\]*", yytext);    #if DQSTRING_DUMP    fprintf(stderr, "dqstring(3) \"%s\", %d\n", yytext, yyleng);    #endif    mode_buff.append( &mode_buff,        yytext, yyleng );    sn_advance_column(yyleng);  }	YY_BREAKcase 15:YY_RULE_SETUP#line 420 "phpbrowser.l"{    matched_pattern("\\\"+[^\\\"\\n\\\\]*\\n", yytext);    #if DQSTRING_DUMP    fprintf(stderr, "dqstring(4) \"%s\", %d\n", yytext, yyleng);    #endif    mode_buff.append( &mode_buff,        yytext, yyleng );    sn_advance_line();    sn_reset_column();  }	YY_BREAKcase 16:YY_RULE_SETUP#line 432 "phpbrowser.l"{    matched_pattern("\\\\", yytext);    #if DQSTRING_DUMP    fprintf(stderr, "dqstring(5) \"%s\", %d\n", yytext, yyleng);    #endif    mode_buff.append( &mode_buff,        yytext, yyleng );    sn_advance_column(yyleng);  }	YY_BREAKcase 17:YY_RULE_SETUP#line 443 "phpbrowser.l"{    matched_pattern("\\\"", yytext);    sn_advance_column(yyleng);    emit_dqstring();    BEGIN(PHP);  }	YY_BREAKcase 18:YY_RULE_SETUP#line 451 "phpbrowser.l"{  matched_pattern("\\\'\\\'", yytext);  /* FIXME: Can we pass NULL instead of "" after length issues worked out ? */  append_token(SINGLE_QUOTED_STRING, "",          sn_line(),          sn_column(),          sn_line(),          sn_column() + yyleng);  sn_advance_column(yyleng);}	YY_BREAKcase 19:YY_RULE_SETUP#line 462 "phpbrowser.l"{  matched_pattern("\\\'", yytext);#if SQSTRING_DUMP  fprintf(stderr, "sqstring started at (%d.%d)\n", sn_line(), sn_column());#endif  LongStringInit(&mode_buff,0);  mode_start_line = sn_line();  mode_start_column = sn_column();  sn_advance_column(yyleng);  BEGIN(SQSTRING);}	YY_BREAKcase 20:YY_RULE_SETUP#line 475 "phpbrowser.l"{    matched_pattern("[^\\\'\\n\\\\]*", yytext);    #if SQSTRING_DUMP    fprintf(stderr, "sqstring(1) \"%s\", %d\n", yytext, yyleng);    #endif    mode_buff.append( &mode_buff,        yytext, yyleng );    sn_advance_column(yyleng);  }	YY_BREAKcase 21:YY_RULE_SETUP#line 485 "phpbrowser.l"{    matched_pattern("[^\\\'\\n\\\\]*\\n", yytext);    #if SQSTRING_DUMP    fprintf(stderr, "sqstring(2) \"%s\", %d\n", yytext, yyleng);    #endif    mode_buff.append( &mode_buff,        yytext, yyleng );    sn_advance_line();    sn_reset_column();  }	YY_BREAKcase 22:YY_RULE_SETUP#line 497 "phpbrowser.l"{    matched_pattern("\\\'+[^\\\'/\\n\\\\]*", yytext);    #if SQSTRING_DUMP    fprintf(stderr, "sqstring(3) \"%s\", %d\n", yytext, yyleng);    #endif    mode_buff.append( &mode_buff,        yytext, yyleng );    sn_advance_column(yyleng);  }	YY_BREAKcase 23:YY_RULE_SETUP#line 508 "phpbrowser.l"{    matched_pattern("\\\'+[^\\\'\\n\\\\]*\\n", yytext);    #if SQSTRING_DUMP    fprintf(stderr, "sqstring(4) \"%s\", %d\n", yytext, yyleng);    #endif    mode_buff.append( &mode_buff,        yytext, yyleng );    sn_advance_line();    sn_reset_column();  }	YY_BREAKcase 24:YY_RULE_SETUP#line 520 "phpbrowser.l"{    matched_pattern("\\\\", yytext);    #if SQSTRING_DUMP    fprintf(stderr, "sqstring(5) \"%s\", %d\n", yytext, yyleng);    #endif    mode_buff.append( &mode_buff,        yytext, yyleng );    sn_advance_column(yyleng);  }	YY_BREAKcase 25:YY_RULE_SETUP#line 531 "phpbrowser.l"{    matched_pattern("\\\'", yytext);    sn_advance_column(yyleng);    emit_sqstring();    BEGIN(PHP);  }	YY_BREAKcase 26:YY_RULE_SETUP#line 539 "phpbrowser.l"{  char *x = yytext;  char *y;  matched_pattern("<<<{ws}*{heredoc-id}\\n", yytext);  mode_start_line = sn_line();  mode_start_column = sn_column();  x += 3;  while(*x == ' ' || *x == '\t') { x++; }  y = x;  while(*y != '\n') { y++; }  *y = 0;  LongStringInit(&mode_buff,0);  mode_buff.append( &mode_buff,          x, -1 );  mode_buff.append( &mode_buff,          ";\n", -1 );  heredoc_id = SN_StrDup(mode_buff.buf);  mode_buff.free(&mode_buff);#if HDSTRING_DUMP  fprintf(stderr, "hdstring started at (%d.%d)\n", sn_line(), sn_column());  fprintf(stderr, "hdstring id is \"%s\"\n", heredoc_id);#endif  LongStringInit(&mode_buff,0);  sn_advance_line();  sn_reset_column();  BEGIN(HDSTRING);}	YY_BREAKcase 27:YY_RULE_SETUP#line 575 "phpbrowser.l"{  matched_pattern(".*\n", yytext);  #if HDSTRING_DUMP  fprintf(stderr, "hdstring(1) \"%s\", %d\n", yytext, yyleng);  #endif  if (strcmp(yytext, heredoc_id) == 0) {  #if HDSTRING_DUMP      fprintf(stderr, "hdstring end matched\n");  #endif      sn_advance_column(yyleng-2); /* advance to ; */      emit_hdstring();      sn_advance_line();      sn_reset_column();      BEGIN(PHP);  } else {      if (mode_buff.len != 0) {          /* Only append newline if more than one line in heredoc */          mode_buff.append( &mode_buff, "\n", 1 );      }      mode_buff.append( &mode_buff, yytext, yyleng-1 );      sn_advance_line();      sn_reset_column();  }}	YY_BREAKcase 28:YY_RULE_SETUP#line 602 "phpbrowser.l"{  matched_pattern("(", yytext);  append_token(OPEN_PAREN, NULL,          sn_line(),          sn_column(),          sn_line(),          sn_column() + yyleng);  sn_advance_column(yyleng);}	YY_BREAKcase 29:YY_RULE_SETUP#line 612 "phpbrowser.l"{  matched_pattern(")", yytext);  append_token(CLOSE_PAREN, NULL,          sn_line(),          sn_column(),          sn_line(),          sn_column() + yyleng);  sn_advance_column(yyleng);}	YY_BREAKcase 30:YY_RULE_SETUP#line 622 "phpbrowser.l"{  matched_pattern("[", yytext);  append_token(OPEN_BRACKET, NULL,          sn_line(),          sn_column(),          sn_line(),          sn_column() + yyleng);  sn_advance_column(yyleng);}	YY_BREAKcase 31:YY_RULE_SETUP#line 632 "phpbrowser.l"{  matched_pattern("]", yytext);  append_token(CLOSE_BRACKET, NULL,          sn_line(),          sn_column(),          sn_line(),          sn_column() + yyleng);  sn_advance_column(yyleng);}	YY_BREAKcase 32:YY_RULE_SETUP#line 642 "phpbrowser.l"{  matched_pattern("{", yytext);  append_token(OPEN_BRACE, NULL,          sn_line(),          sn_column(),          sn_line(),          sn_column() + yyleng);  sn_advance_column(yyleng);}	YY_BREAKcase 33:YY_RULE_SETUP#line 652 "phpbrowser.l"{  matched_pattern("}", yytext);  append_token(CLOSE_BRACE, NULL,          sn_line(),          sn_column(),          sn_line(),          sn_column() + yyleng);  sn_advance_column(yyleng);}	YY_BREAKcase 34:YY_RULE_SETUP#line 662 "phpbrowser.l"{  matched_pattern("}", yytext);  append_token(SEMICOLON, NULL,          sn_line(),          sn_column(),          sn_line(),          sn_column() + yyleng);  sn_advance_column(yyleng);}	YY_BREAKcase 35:YY_RULE_SETUP#line 672 "phpbrowser.l"{  matched_pattern("=", yytext);  append_token(ASSIGNMENT_OPERATOR, NULL,          sn_line(),          sn_column(),          sn_line(),          sn_column() + yyleng);  sn_advance_column(yyleng);}	YY_BREAKcase 36:YY_RULE_SETUP#line 682 "phpbrowser.l"{  matched_pattern("{comparison-operators}", yytext);  append_token(COMPARISON_OPERATORS, yytext,          sn_line(),          sn_column(),          sn_line(),          sn_column() + yyleng);  sn_advance_column(yyleng);}	YY_BREAKcase 37:YY_RULE_SETUP#line 692 "phpbrowser.l"{  matched_pattern("{assignment-operators}", yytext);  append_token(ASSIGNMENT_OPERATORS, yytext,          sn_line(),          sn_column(),          sn_line(),          sn_column() + yyleng);  sn_advance_column(yyleng);}	YY_BREAKcase 38:YY_RULE_SETUP#line 702 "phpbrowser.l"{  matched_pattern("function", yytext);  append_token(FUNCTION_KEYWORD, yytext,          sn_line(),          sn_column(),          sn_line(),          sn_column() + yyleng);  sn_advance_column(yyleng);}	YY_BREAKcase 39:YY_RULE_SETUP#line 712 "phpbrowser.l"{  matched_pattern("global", yytext);  append_token(GLOBAL_KEYWORD, yytext,          sn_line(),          sn_column(),          sn_line(),          sn_column() + yyleng);  sn_advance_column(yyleng);}	YY_BREAKcase 40:YY_RULE_SETUP#line 722 "phpbrowser.l"{  matched_pattern("{include-keywords}", yytext);  append_token(INCLUDE_KEYWORD, yytext,          sn_line(),          sn_column(),          sn_line(),          sn_column() + yyleng);  sn_advance_column(yyleng);}	YY_BREAKcase 41:YY_RULE_SETUP#line 732 "phpbrowser.l"{  matched_pattern("{keywords}", yytext);  append_token(KEYWORD, yytext,          sn_line(),          sn_column(),          sn_line(),          sn_column() + yyleng);  sn_advance_column(yyleng);}	YY_BREAKcase 42:YY_RULE_SETUP#line 742 "phpbrowser.l"{  matched_pattern("{someword}", yytext);  append_token(SOMEWORD, yytext,          sn_line(),          sn_column(),          sn_line(),          sn_column() + yyleng);  sn_advance_column(yyleng);}	YY_BREAKcase 43:YY_RULE_SETUP#line 752 "phpbrowser.l"{  matched_pattern("\\$", yytext);  sn_advance_column(yyleng); /* ignore \$ */}	YY_BREAKcase 44:YY_RULE_SETUP#line 757 "phpbrowser.l"{  matched_pattern("${varname}", yytext);  sn_advance_column(1);  append_token(VARIABLE, yytext+1,          sn_line(),          sn_column(),          sn_line(),          sn_column() + yyleng - 1);  sn_advance_column(yyleng-1);}	YY_BREAKcase 45:YY_RULE_SETUP#line 768 "phpbrowser.l"{  matched_pattern("\\n", yytext);  sn_advance_line();  sn_reset_column();}	YY_BREAKcase 46:YY_RULE_SETUP#line 774 "phpbrowser.l"{  matched_pattern(".", yytext);  sn_advance_column(yyleng); /* eat text */}	YY_BREAKcase 47:YY_RULE_SETUP#line 781 "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->start_line;  current_function_column_start = tokens_head->start_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->start_line;  current_function_highlight_column_start = tokens_head->start_column;  current_function_highlight_column_end = tokens_head->end_column;  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 48:YY_RULE_SETUP#line 840 "phpbrowser.l"{  if (current_function) {    current_function_brace_count++;  }  free_head_token(); /* OPEN_BRACE */}	YY_BREAKcase 49:YY_RULE_SETUP#line 847 "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->end_line;    current_function_column_end = tokens_head->end_column;    emit_function_declaration();  }  free_head_token(); /* CLOSE_BRACE */}	YY_BREAKcase 50:YY_RULE_SETUP#line 863 "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));  line_start = tokens_head->start_line;  column_start = tokens_head->start_column + 1;  line_end = tokens_head->end_line;  column_end = tokens_head->end_column - 1;  filename = tokens_head->strval;  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 51:YY_RULE_SETUP#line 912 "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 52:YY_RULE_SETUP#line 951 "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->start_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 53:YY_RULE_SETUP#line 985 "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;  int offset;  line_start = tokens_head->start_line;  column_start = tokens_head->start_column;  line_end = tokens_head->end_line;  column_end = tokens_head->end_column;#ifdef TOKEN_DEBUG  fprintf(tokenout, "variable write 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);  }  /* Eat the variable token and send the rest of the tokens   * back for further matching. This is needed so that   * expressions like "$var[$one] = 1;" generate both   * a write xref for $var and a read xref for $one.   */  free_head_token(); /* VARIABLE */  offset = strlen("VARIABLE"); /* send back everything after the VARIABLE token */  yyless(offset);}	YY_BREAKcase 54:YY_RULE_SETUP#line 1089 "phpbrowser.l"{  char* varname = tokens_head->strval;  SearchEntry entry;  int line_num = tokens_head->start_line;  int ref_to_symbol_type, ref_to_symbol_scope;#ifdef TOKEN_DEBUG  fprintf(tokenout, "variable read 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);  }  /* FIXME: Could add {var-array-tokens} to this match but it is not   * clear why this is needed right now. Also, a handy way to count   * the number of tokens in a match (given yytext) would make it   * easy to know the number of tokens to free.   */  free_head_token(); /* VARIABLE */}	YY_BREAKcase 55:YY_RULE_SETUP#line 1158 "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 56:YY_RULE_SETUP#line 1171 "phpbrowser.l"	YY_BREAKcase 57:YY_RULE_SETUP#line 1173 "phpbrowser.l"{#ifdef TOKEN_DEBUG    fprintf(tokenout, "matched unknown character \"%s\"\n", yytext);#endif}	YY_BREAKcase YY_STATE_EOF(TOKEN):#line 1179 "phpbrowser.l"{#ifdef TOKEN_DEBUG    fprintf(tokenout, "reached EOF in TOKEN buffer\n");#endif    /* A function closing brace was not found before we hit EOF */    if (current_function) {        current_function_line_end = sn_line();        current_function_column_end = sn_column();#ifdef TOKEN_DEBUG        fprintf(tokenout, "found unfinished function at EOF in %s\n", sn_current_file());#endif        emit_function_declaration();    }    assert(!tokens_head); /* all tokens were processed */    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):case YY_STATE_EOF(COMMENT):case YY_STATE_EOF(DQSTRING):case YY_STATE_EOF(SQSTRING):case YY_STATE_EOF(HDSTRING):#line 1204 "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 in mode %s\n", modestring());#endif  /* See if we ran off the end of the lex input buffer in a special mode */  switch (YY_START) {    case COMMENT:      emit_comment();      break;    case DQSTRING:      emit_dqstring();      break;    case SQSTRING:      emit_sqstring();      break;    case HDSTRING:       emit_hdstring();      break;  }  /* 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++) {#ifdef TOKEN_DEBUG        fprintf(tokenout, "token %d %s", i, TokenTypeToString(tok));        if (tok->strval) {            fprintf(tokenout, " \"%s\"", tok->strval);        }        fprintf(tokenout, " (%d.%d -> %d.%d)",            tok->start_line,            tok->start_column,            tok->end_line,            tok->end_column        );        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 58:YY_RULE_SETUP#line 1281 "phpbrowser.l"ECHO;	YY_BREAK	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 */