fix tag parser failing on empty input
add support for [tag] syntax

[Closes #40]