コード例 #1
0
ファイル: cli3.c プロジェクト: Rick33/freevms
static void
c_lex_one_token (c_token *token)
{
#if 0
  timevar_push (TV_LEX);
  token->type = c_lex_with_flags (&token->value, &token->location, NULL);
#else
  token->type = clilex();
  token->value = yylval.type_node_p;
#endif
}
コード例 #2
0
ファイル: c-lex.c プロジェクト: AhmadTux/DragonFlyBSD
enum cpp_ttype
c_lex (tree *value)
{
  location_t loc;
  return c_lex_with_flags (value, &loc, NULL);
}
コード例 #3
0
ファイル: cliexpr.c プロジェクト: Rick33/freevms
static void
c_lex_one_token (c_token *token)
{
#if 0
  timevar_push (TV_LEX);
  token->type = c_lex_with_flags (&token->value, &token->location, NULL);
#else
  token->type = clilex();
  token->value = yylval.type_node_p;
#endif
  token->in_system_header = in_system_header;
  switch (token->type)
    {
    case T_NAME:
    case CPP_NAME:
      token->id_kind = C_ID_NONE;
      token->keyword = RID_MAX;
      {
	tree decl;

	int objc_force_identifier = objc_need_raw_identifier;
#if 0
	OBJC_NEED_RAW_IDENTIFIER (0);
#endif

	if (0/*C_IS_RESERVED_WORD (token->value)*/)
	  {
	    enum rid rid_code = 0/*C_RID_CODE (token->value)*/;

#if 0
	    if (c_dialect_objc ())
	      {
		if (!OBJC_IS_AT_KEYWORD (rid_code)
		    && (!OBJC_IS_PQ_KEYWORD (rid_code) || objc_pq_context))
		  {
		    /* Return the canonical spelling for this keyword.  */
		    token->value = ridpointers[(int) rid_code];
		    token->type = CPP_KEYWORD;
		    token->keyword = rid_code;
		    break;
		  }
	      }
	    else
#endif
	      {
		/* Return the canonical spelling for this keyword.  */
#if 0
		token->value = ridpointers[(int) rid_code];
#endif
		token->type = CPP_KEYWORD;
		token->keyword = rid_code;
		break;
	      }
	  }

#if 0
	decl = lookup_name (token->value);
	if (decl)
	  {
	    if (TREE_CODE (decl) == TYPE_DECL)
	      {
		token->id_kind = C_ID_TYPENAME;
		break;
	      }
	  }
#if 0
	else if (c_dialect_objc ())
	  {
	    tree objc_interface_decl = objc_is_class_name (token->value);
	    /* Objective-C class names are in the same namespace as
	       variables and typedefs, and hence are shadowed by local
	       declarations.  */
	    if (objc_interface_decl
		&& (global_bindings_p ()
		    || (!objc_force_identifier && !decl)))
	      {
		token->value = objc_interface_decl;
		token->id_kind = C_ID_CLASSNAME;
		break;
	      }
	  }
#endif
#endif
      }
      token->id_kind = C_ID_ID;
      break;
#if 0
    case CPP_AT_NAME:
      /* This only happens in Objective-C; it must be a keyword.  */
      token->type = CPP_KEYWORD;
      token->id_kind = C_ID_NONE;
      token->keyword = C_RID_CODE (token->value);
      break;
#endif
    case ':':
    case ',':
    case ')':
    case ';':
    case CPP_COLON:
    case CPP_COMMA:
    case CPP_CLOSE_PAREN:
    case CPP_SEMICOLON:
      /* These tokens may affect the interpretation of any identifiers
	 following, if doing Objective-C.  */
#if 0
      OBJC_NEED_RAW_IDENTIFIER (0);
#endif
      token->id_kind = C_ID_NONE;
      token->keyword = RID_MAX;
      break;
    default:
      token->id_kind = C_ID_NONE;
      token->keyword = RID_MAX;
      break;
    }
#if 0
  timevar_pop (TV_LEX);
#endif
}