stage1_2/iec_flex.ll
changeset 637 1b6f337222e0
parent 634 736b36a83548
child 701 562c01f82afb
equal deleted inserted replaced
636:dd57e63bdc3d 637:1b6f337222e0
   847 <body_state>{enable_code_generation_pragma}    return enable_code_generation_pragma_token;
   847 <body_state>{enable_code_generation_pragma}    return enable_code_generation_pragma_token;
   848 
   848 
   849 	/* Any other pragma we find, we just pass it up to the syntax parser...   */
   849 	/* Any other pragma we find, we just pass it up to the syntax parser...   */
   850 	/* Note that the <body_state> state is exclusive, so we have to include it here too. */
   850 	/* Note that the <body_state> state is exclusive, so we have to include it here too. */
   851 {pragma}	{/* return the pragmma without the enclosing '{' and '}' */
   851 {pragma}	{/* return the pragmma without the enclosing '{' and '}' */
   852          uint cut = yytext[1]=='{'?2:1;
   852          int cut = yytext[1]=='{'?2:1;
   853 		 yytext[strlen(yytext)-cut] = '\0';
   853 		 yytext[strlen(yytext)-cut] = '\0';
   854 		 yylval.ID=strdup(yytext+cut);
   854 		 yylval.ID=strdup(yytext+cut);
   855 		 return pragma_token;
   855 		 return pragma_token;
   856 		}
   856 		}
   857 <body_state>{pragma} {/* return the pragmma without the enclosing '{' and '}' */
   857 <body_state>{pragma} {/* return the pragmma without the enclosing '{' and '}' */