Commit f0e93e8c authored by Rob Pike's avatar Rob Pike

fix a couple of inconsequential glitches in regexp code.

R=rsc
DELTA=2  (0 added, 1 deleted, 1 changed)
OCL=17589
CL=17595
parent beee6915
...@@ -14,7 +14,6 @@ import ( ...@@ -14,7 +14,6 @@ import (
export var debug = false; export var debug = false;
export var ErrUnimplemented = os.NewError("unimplemented");
export var ErrInternal = os.NewError("internal error"); export var ErrInternal = os.NewError("internal error");
export var ErrUnmatchedLpar = os.NewError("unmatched '('"); export var ErrUnmatchedLpar = os.NewError("unmatched '('");
export var ErrUnmatchedRpar = os.NewError("unmatched ')'"); export var ErrUnmatchedRpar = os.NewError("unmatched ')'");
...@@ -397,7 +396,7 @@ func (p *Parser) Term() (start, end Inst) { ...@@ -397,7 +396,7 @@ func (p *Parser) Term() (start, end Inst) {
switch c := p.c(); c { switch c := p.c(); c {
case '|', EOF: case '|', EOF:
return NULL, NULL; return NULL, NULL;
case '*', '+', '|': case '*', '+':
p.re.Error(ErrBareClosure); p.re.Error(ErrBareClosure);
case ')': case ')':
if p.nlpar == 0 { if p.nlpar == 0 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment