ref: de5cabceafbda54d1a7397e6297f5fc1fb4759ce
parent: 9c01b9a9580effc1b379e5ae04264c49f5849a15
author: cinap_lenrek <[email protected]>
date: Mon May 2 17:16:04 EDT 2016
libregexp: reverting this shit. this is clearly broken.
--- a/sys/src/libregexp/regcomp.c
+++ b/sys/src/libregexp/regcomp.c
@@ -78,14 +78,14 @@
Renode *n;
n = e3(plex);
- while(lex(plex) == LREP) {
+ if(lex(plex) == LREP) {
switch(plex->rune) {
case L'*':
- n = node(plex, TSTAR, n, nil);
+ return node(plex, TSTAR, n, nil);
case L'+':
- n = node(plex, TPLUS, n, nil);
+ return node(plex, TPLUS, n, nil);
case L'?':
- n = node(plex, TQUES, n, nil);
+ return node(plex, TQUES, n, nil);
}
}
plex->peek = 1;