Frank Heckenbach wrote:
Gale Paeper wrote:
While working on a MacPascal dialect to GPC porting project, I was surprised to encounter preprocessor errors in conditional compilation directives where the conditional expression directly or indirectly (i.e., a macro expansion) contained $ hex constants. A short example (thanks Afriaan):
<snip>
That's right. Neither EP 16#1 constants yet.
When I'll reimplement the preprocessor based on the Pascal lexer as planned, this support will come for free. In the meantime all work on the existing preprocessor will eventually be wasted when it's replaced.
That said, if you (or someone else) would like to add support for `$' for now, feel free to do so. The relevant code is in gpcpp.c: yylex (): "if (*lexptr >= '0' && *lexptr <= '9') ..."
One thing worth doing now it to write test for preprocessor. I have recently checked converage of our testsute and I must say that most of the preprocessor is untested. There may be dead code in preprocessor, but a quick looks gave me an impression that tests just do not use features available in the preprocessor (for example line continuations or non-trivial expressions as conditions).