Print this page
new smatch

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/smatch/src/token.h
          +++ new/usr/src/tools/smatch/src/token.h
↓ open down ↓ 72 lines elided ↑ open up ↑
  73   73          struct symbol *symbols; /* Pointer to semantic meaning list */
  74   74          unsigned char len;      /* Length of identifier name */
  75   75          unsigned char tainted:1,
  76   76                        reserved:1,
  77   77                        keyword:1;
  78   78          char name[];            /* Actual identifier */
  79   79  };
  80   80  
  81   81  enum token_type {
  82   82          TOKEN_EOF,
       83 +        TOKEN_BAD,
  83   84          TOKEN_ERROR,
  84   85          TOKEN_IDENT,
  85   86          TOKEN_ZERO_IDENT,
  86   87          TOKEN_NUMBER,
  87   88          TOKEN_CHAR,
  88   89          TOKEN_CHAR_EMBEDDED_0,
  89   90          TOKEN_CHAR_EMBEDDED_1,
  90   91          TOKEN_CHAR_EMBEDDED_2,
  91   92          TOKEN_CHAR_EMBEDDED_3,
  92   93          TOKEN_WIDE_CHAR,
↓ open down ↓ 138 lines elided ↑ open up ↑
 231  232  extern void show_identifier_stats(void);
 232  233  extern void init_include_path(void);
 233  234  extern struct token *preprocess(struct token *);
 234  235  
 235  236  extern void store_all_tokens(struct token *token);
 236  237  extern struct token *pos_get_token(struct position pos);
 237  238  extern char *pos_ident(struct position pos);
 238  239  
 239  240  extern void store_macro_pos(struct token *);
 240  241  extern char *get_macro_name(struct position pos);
      242 +extern char *get_inner_macro(struct position pos);
      243 +extern struct string_list *get_all_macros(struct position pos);
 241  244  
 242  245  static inline int match_op(struct token *token, unsigned int op)
 243  246  {
 244  247          return token->pos.type == TOKEN_SPECIAL && token->special == op;
 245  248  }
 246  249  
 247  250  static inline int match_ident(struct token *token, struct ident *id)
 248  251  {
 249  252          return token->pos.type == TOKEN_IDENT && token->ident == id;
 250  253  }
 251  254  
 252  255  #endif
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX