现在的位置: 首页 > 综合 > 正文

C–语言编译器语法分析完成,小小的记录一下

2012年08月24日 ⁄ 综合 ⁄ 共 1054字 ⁄ 字号 评论关闭

 

  Begin Analysis!
Move in : int
Reduce : type-specifier -->   int   ●
Reduce : declaration-specifiers -->   type-specifier   ●
Move in : hello
Reduce : direct-declarator -->   identifier   ●
Reduce : declarator -->   direct-declarator   ●
Reduce : init-declarator -->   declarator   ●
Reduce : init-declarator-list -->   init-declarator   ●
Move in : ;
Reduce : declaration -->   declaration-specifiers  init-declarator-list  ;   ●
Reduce : external-declaration -->   declaration   ●
Reduce : translation-unit -->   external-declaration   ●
Move in : char
Reduce : type-specifier -->   char   ●
Reduce : declaration-specifiers -->   type-specifier   ●
Move in : wuhaiwen
Reduce : direct-declarator -->   identifier   ●
Reduce : declarator -->   direct-declarator   ●
Reduce : init-declarator -->   declarator   ●
Reduce : init-declarator-list -->   init-declarator   ●
Move in : ;
Reduce : declaration -->   declaration-specifiers  init-declarator-list  ;   ●
Reduce : external-declaration -->   declaration   ●
Reduce : translation-unit -->   translation-unit  external-declaration   ●

   接收,语法分析完成!!

  Grammar Analysis Succeed ! Your code is legal !

  Grammar Analyze Succeeded !

抱歉!评论已关闭.