- | CONST RE REGEX {
- pcre *brum;
- int erroroffset;
- const char* error;
- int ovector[OVECCOUNT];
-
- brum=pcre_compile($3,0,&error,&erroroffset,NULL);
- if (!brum){
- puts("Mnau");
- return 1;
- }
-
- int res=pcre_exec(brum,NULL,$1,strlen($1),0,0,ovector,OVECCOUNT);
-
- $$ = res >= 0;
- pcre_free(brum);
- }
- | CONST NRE REGEX {
- pcre *brum;
- int erroroffset;
- const char* error;
- int ovector[OVECCOUNT];
-
- brum=pcre_compile($3,0,&error,&erroroffset,NULL);
- if (!brum){
- puts("Mnau");
- return 1;
- }
-
- int res=pcre_exec(brum,NULL,$1,strlen($1),0,0,ovector,OVECCOUNT);
-
- $$ = res < 0;
- pcre_free(brum);
- }
+ | CONST RE REGEX { $$ = regex_cmp($1,$3) >= 0 }
+ | CONST NRE REGEX { $$ = regex_cmp($1,$3) < 0 }