libregexp/regcomp.c: fix parser for e2 production (thanks, spew)

front
stanley lieber 2016-05-02 14:48:11 -04:00
parent 9ccbf1dcb1
commit 9c01b9a958
1 changed files with 4 additions and 4 deletions

View File

@ -78,14 +78,14 @@ e2(Parselex *plex)
Renode *n;
n = e3(plex);
if(lex(plex) == LREP) {
while(lex(plex) == LREP) {
switch(plex->rune) {
case L'*':
return node(plex, TSTAR, n, nil);
n = node(plex, TSTAR, n, nil);
case L'+':
return node(plex, TPLUS, n, nil);
n = node(plex, TPLUS, n, nil);
case L'?':
return node(plex, TQUES, n, nil);
n = node(plex, TQUES, n, nil);
}
}
plex->peek = 1;