logological / gpp

GPP, a generic preprocessor
https://logological.org/gpp
GNU Lesser General Public License v3.0
197 stars 31 forks source link

PHP parsing problem #13

Closed tazziedave closed 4 years ago

tazziedave commented 7 years ago

I'd like to use gpp to parse php to get different build versions. If I use the default option, the output is stripped of lonely '\' characters. A problem when specifying '\r\n' => 'rn' but more importantly it removes the namespace separators. A real issue when trying to specify the root namespace: \call() => call() which becomes a current namespace call. Infinite recursion here I come!

As far as I can tell none of the standard formats work completely (-C is closest but it strips all comments!). Any suggestions? Thanks

Dave

logological commented 4 years ago

@tazziedave: Sorry for the delayed response. I think you may have overlooked that by default, GPP uses \ as the quote character. That is, this is a duplicate of Issue #15 and Issue #46, which you should consult for the solution. (If I'm wrong, feel free to reopen this issue and provide further details.)