tweak parser rules for declarative functions

the previous syntax was ambiguous and would have required lookahead
logic in the parser.