equal
deleted
inserted
replaced
520 enable_code_generation_pragma "{enable code generation}" |
520 enable_code_generation_pragma "{enable code generation}" |
521 |
521 |
522 |
522 |
523 /* Any other pragma... */ |
523 /* Any other pragma... */ |
524 |
524 |
525 pragma "{"[^}]*"}" |
525 pragma "{"[^}]*"}"|"{{"([^}]|"}"[^}])*"}}" |
526 |
526 |
527 /* NOTE: this seemingly unnecessary complex definition is required |
527 /* NOTE: this seemingly unnecessary complex definition is required |
528 * to be able to eat up comments such as: |
528 * to be able to eat up comments such as: |
529 * '(* Testing... ! ***** ******)' |
529 * '(* Testing... ! ***** ******)' |
530 * without using the trailing context command in flex (/{context}) |
530 * without using the trailing context command in flex (/{context}) |
857 <body_state>{enable_code_generation_pragma} return enable_code_generation_pragma_token; |
857 <body_state>{enable_code_generation_pragma} return enable_code_generation_pragma_token; |
858 |
858 |
859 /* Any other pragma we find, we just pass it up to the syntax parser... */ |
859 /* Any other pragma we find, we just pass it up to the syntax parser... */ |
860 /* Note that the <body_state> state is exclusive, so we have to include it here too. */ |
860 /* Note that the <body_state> state is exclusive, so we have to include it here too. */ |
861 {pragma} {/* return the pragmma without the enclosing '{' and '}' */ |
861 {pragma} {/* return the pragmma without the enclosing '{' and '}' */ |
862 yytext[strlen(yytext)-1] = '\0'; |
862 int cut = yytext[1]=='{'?2:1; |
863 yylval.ID=strdup(yytext+1); |
863 yytext[strlen(yytext)-cut] = '\0'; |
|
864 yylval.ID=strdup(yytext+cut); |
864 return pragma_token; |
865 return pragma_token; |
865 } |
866 } |
866 <body_state>{pragma} {/* return the pragmma without the enclosing '{' and '}' */ |
867 <body_state>{pragma} {/* return the pragmma without the enclosing '{' and '}' */ |
867 yytext[strlen(yytext)-1] = '\0'; |
868 int cut = yytext[1]=='{'?2:1; |
868 yylval.ID=strdup(yytext+1); |
869 yytext[strlen(yytext)-cut] = '\0'; |
|
870 yylval.ID=strdup(yytext+cut); |
869 return pragma_token; |
871 return pragma_token; |
870 } |
872 } |
871 |
873 |
872 |
874 |
873 /*********************************/ |
875 /*********************************/ |