Bro script parser: shift/reduce conflicts.

Hi,

The bro policy script parser, parse.y has 71 shift/reduce conflicts.
(Which are resolved by bison by always choosing shift). This results in
bison issuing a warning.

Presumably these 71 conflicts are all fine and expected. So I would add
a %expect 71 clause the parse.y. This will make bison expect 71
shift/reduce conflicts. If the number differs, then bison will exit with
an error (and make exit with an error). If the number matches, bison
will be silent.

Question: are there any reason to not use this?

cu
Gregor

Presumably these 71 conflicts are all fine and expected. So I would add
a %expect 71 clause the parse.y.

Will byacc just ignore (or honor) such a clause, or will it complain?

    Vern

Depends. They either support and honor it, or I guess they complain if
they don't have support for it.

Some byacc's support it (e.g., the top hit on Google when searching for
byacc), but some don't.

That being said, as part of the move-to-CMake discussion the consensus
was to only support bison (and remove make-parser.pl). (IIRC)

cu
Gregor

That being said, as part of the move-to-CMake discussion the consensus
was to only support bison (and remove make-parser.pl). (IIRC)

Recollection confirmed.

- Jon