You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks to a 5km limit covid lockdown in my country, a public holiday where we were
supposed to be away meant I was stuck at home instead. I took the full day to finish
the https://github.com/ned14/pcpp/tree/yacc_expression_evaluator branch which is a
proper C preprocessor expression evaluator based on http://www.dabeaz.com/ply/ 's
yacc module. This was a very long outstanding piece of work which had been in
progress for nearly two years. It just needed a full day of my time to get it done,
and now it is indeed done at long last.
BREAKING CHANGE: Thanks to the new expression evaluator, fix a long standing bug
where unknown function macros in expressions were parsed as 0(0) which obviously
enough does not work. Fixing this changes how the on_unknown_macro_in_expr()
hook works, and there is now an added on_unknown_macro_function_in_expr() hook.
Add a new passthru option --passthru-includes which enables selected #include
to be passed through, in addition to being executed. Thanks to schra for suggesting
this, including a PR. The original implementation had some subtle corner case bugs,
thanks to trelau for reporting those.
Fix a token expansion ordering bug whereby if a function macro used the same
macro in more than one argument, expansion in one argument evaluation caused overly
eager expansion in later argument evaluations. This fix ought to fix pcpp's ability
to parse Boost (untested). Thanks to joaquintides for reporting this.
Now that pcpp no longer ever calls eval(), pcpp is PyPy compatible and is
probably also compatible with Pyston (untested). Typical speedup is about 2.2x-2.3x,
though it can also be slower occasionally for some inputs. PyPy compatibility is now
being tested by CI to ensure it remains working going forth.
Fix internal preprocessor error and failure to insert newlines before #include
caused by certain sequence of line continuations in a macro. Thanks to dslijepcevic
for reporting this.