Skip to content

re2c cannot accept {0,} #21

Closed
Closed
@skvadrik

Description

@skvadrik

It actually crashes if this form is ever used.

I attached a patch and a test case for this bug.

With this branch working it might be possible to
express one of the “factor” alternatives in “parser.y” as:

| primary close
{
switch($2){
case ‘*’:
$$ = new CloseVOp($1, 0, -1);
break;
case ‘+’:
$$ = new CloseVOp($1, 1, -1);
break;
case ‘?’:
$$ = new CloseVOp($1, 0, 1);
break;
}
}

IMHO, but might be easier to read.

Original comment by: alder

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions