The parser may have allocated memory and must exit normally in order to
free it.
Have the code for null do a setjmp and, if setjmp returns a non-zero
value, meaning somebody's done a longjmp, do YYABORT, so we cleanly
return from the parser, returning a value of 1.
Have pcap_compile() treat a non-zero return value from the parser as
meaning an error occurred; clean up and return -1.
This means that compiler_state_t must be defined in gencode.h, so that
the jmp_buf is available in grammar.y; have most of the state in a
private structure, opaque outside of gencode.c, pointed to by a pointer
in the compiler_state_t structure.
Have the private data for optimizer and for icode_to_fcode() have their
own jmp_bufs, and have the optimizer and icode_for_fcode() do their own
setjmp(), and clean up and return a value indicating an error if
setjmp() returns a non-zero value. Have their callers check for the
error and, if an error occurred, clean up and return an error
indication.
Don't use bpf_error() except in the parser and code called by the
parser, as, if the parser isn't running, there's no place to which to
longjmp.