Change yacc spec to work properly with a full tree
Fail gracefully for unmatched tags
Actually check tag contents when matching