fix infinite loop when parsing "$a $"
fixes #33, #36
fix parsing of "{$foo->bar()}"

   fixes #28