fix texinfo usage

xref was incorrect, and add more ignores
fix endif in lexer spec
exit on malloc errors

and some reformatting
add test target