* src/neverparse/neverclaimparse.yy: Prefer accepting labels in aliases.
This commit is contained in:
parent
dd4d03e3a9
commit
c05ec36dd0
1 changed files with 12 additions and 3 deletions
|
|
@ -114,9 +114,18 @@ ident_list:
|
||||||
| ident_list IDENT ':'
|
| ident_list IDENT ':'
|
||||||
{
|
{
|
||||||
result->add_state_alias(*$2, *$1);
|
result->add_state_alias(*$2, *$1);
|
||||||
|
// Keep any identifier that start with accept.
|
||||||
|
if (strncmp("accept", $1->c_str(), 6))
|
||||||
|
{
|
||||||
delete $1;
|
delete $1;
|
||||||
$$ = $2;
|
$$ = $2;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
delete $2;
|
||||||
|
$$ = $1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
state:
|
state:
|
||||||
ident_list "skip"
|
ident_list "skip"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue