Add more call parsing tests (when in non top scope).
Fix issue where strings where produces instead of tokens.

Some references to rule "classname" wanted strings, and others wanted
tokens (to use the location of the token).

This adds a helper method to produce the text of an optional token
(token_text).
Add resource parse tests.

This adds tests for parsing of regular resources.
Also fixes several issues with the parsing/factory and tree dumper.