throw when tokenizer encounters empty square braces
throw when a node contains an invalid character