GCC主要数据结构之c_parser

 

/* The actual parser and external interface.  ??? Does this need to be    garbage-collected?  */

static GTY (()) c_parser *the_parser;

 

/* A parser structure recording information about the state and    context of parsing.  Includes lexer information with up to two    tokens of look-ahead; more are not needed for C.  */ struct GTY(()) c_parser {   /* The look-ahead tokens.  */   c_token * GTY((skip)) tokens;   /* Buffer for look-ahead tokens.  */   c_token tokens_buf[4];   /* How many look-ahead tokens are available (0 - 4, or      more if parsing from pre-lexed tokens).  */   unsigned int tokens_avail;   /* True if a syntax error is being recovered from; false otherwise.      c_parser_error sets this flag.  It should clear this flag when      enough tokens have been consumed to recover from the error.  */   BOOL_BITFIELD error : 1;   /* True if we're processing a pragma, and shouldn't automatically      consume CPP_PRAGMA_EOL.  */   BOOL_BITFIELD in_pragma : 1;   /* True if we're parsing the outermost block of an if statement.  */   BOOL_BITFIELD in_if_block : 1;   /* True if we want to lex an untranslated string.  */   BOOL_BITFIELD lex_untranslated_string : 1;

  /* Objective-C specific parser/lexer information.  */

  /* True if we are in a context where the Objective-C "PQ" keywords      are considered keywords.  */   BOOL_BITFIELD objc_pq_context : 1;   /* True if we are parsing a (potential) Objective-C foreach      statement.  This is set to true after we parsed 'for (' and while      we wait for 'in' or ';' to decide if it's a standard C for loop or an      Objective-C foreach loop.  */   BOOL_BITFIELD objc_could_be_foreach_context : 1;   /* The following flag is needed to contextualize Objective-C lexical      analysis.  In some cases (e.g., 'int NSObject;'), it is      undesirable to bind an identifier to an Objective-C class, even      if a class with that name exists.  */   BOOL_BITFIELD objc_need_raw_identifier : 1;   /* Nonzero if we're processing a __transaction statement.  The value      is 1 | TM_STMT_ATTR_*.  */   unsigned int in_transaction : 4;   /* True if we are in a context where the Objective-C "Property attribute"      keywords are valid.  */   BOOL_BITFIELD objc_property_attr_context : 1;

  /* Cilk Plus specific parser/lexer information.  */

  /* Buffer to hold all the tokens from parsing the vector attribute for the      SIMD-enabled functions (formerly known as elemental functions).  */   vec <c_token, va_gc> *cilk_simd_fn_tokens; };

 
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值