You could use a "smart" lexer that divides the incoming stream into functions (based on counting "{" and "}") and run Parsec separately on each function.
You can't really divide the stream without parsing it, due to things that change the meaning of "{" and "}", like /* and ".