Re reverse engineering: a fairly detailed description of the Yacc state machine is given in at least one of the standard Yacc references -- see "man yacc" -- so the *algorithm* can hardly be called a trade secret.