As heading shouts, I need to make source code formatter to format PHP Codes.
RobertoP have written nice Lexical analyzer that means no need for me to tokenize file.
I just do not know how to "juggle" with tokens to produce the formatted code.
I appreciate any pointer especially simple tutorial.
Analyzer class is here

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.