xflouris / libpll

Phylogenetic Likelihood Library
GNU Affero General Public License v3.0
26 stars 6 forks source link

Do not write Bison/flex errors to the console #97

Closed amkozlov closed 7 years ago

amkozlov commented 8 years ago

Parsing functions (e.g., pll_rtree_parse_newick) write (rather uninformative) Bison/Flex error messages directly to the console/stderr:

syntax error, unexpected $end, expecting STRING

which is not the optimal behavior, especially in the cases where user program will attempt to fix the problem (e.g., by calling pll_utree_parse_newick next).

So they should better set pll_errno/pll_errmsg instead.

xflouris commented 7 years ago

@amkozlov : is this still the case (writing to console) or shall we close it?

amkozlov commented 7 years ago

@xflouris: it's fixed now for newick parser functions, but the same problem still exists in pll_phylip_parse_msa. Could you please implement similar solution there, and also report the position of error?

xflouris commented 7 years ago

thanks! I'll update this today together with all error codes.