hi all

i am new in lex programming,i tried to find one token (i.e. "="),then change
value of after "="  
i succeed in find token one occurence in one line using  follwing code

=[^\n<>"]*      {
                        
                        printf ("\n token value is   %s\n",yytext);
                        printf ("\nenter new value\n ");
                        memset (chr,0x00,sizeof(chr));  
                        memset (next_char,0x00,sizeof(next_char));
                        next_char[0] = '=';
                        next_char[1] = ' ';

                                scanf("%s",chr);
                                strcpy(yytext,"=");
                                strcat(next_char,chr);
                                fputs(next_char,yyout);
                                
                                        
                } 


but problem  if one line contain more than one occurence of "="  in same line
it change only first occurence token
so please anybody suggest best regular expression to solve this problem



_______________________________________________
help-flex mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-flex

Reply via email to