Commit graph

15 commits

Author SHA1 Message Date
Sei Lisa
f854e94349 New copyright year 2024-04-14 11:40:21 +02:00
Sei Lisa
231c16b90e New copyright year 2023-02-03 13:06:18 +01:00
Sei Lisa
8d413f910e Forgot to update copyright year 2022-06-07 19:46:31 +02:00
Sei Lisa
81906475ff Update copyright year 2021-01-05 23:27:21 +01:00
Sei Lisa
5e88adcff3 Update to latest pcpp, remove expression evaluator
PCPP now includes a decent expression evaluator instead of relying on Python's, therefore our evaluator is removed. The corresponding license text no longer applies, because the snippet that used it has been removed.

This patch also corrects the handling of include files, which was supposed to raise an exception or return something (and now it needs an extra parameter). We just report an error and raise the special exception that pcpp uses to ignore and remove the directive.

This patch also handles #error and invalid directives, which were passed through in previous versions. #warning and #line are also passed through.
2020-11-04 13:09:34 +01:00
Sei Lisa
8db8872dbe Import the changes to cpreproc.py from the preprocessor branch
These changes make it ready for prime time, but main.py still does not expose the functionality.

Changes include:

- Instead of passing paths, we pass parameters, which are parsed to extract the paths (no syspaths, only regular paths) and the defines.
- Errors in the preprocessor are reported to the caller (i.e. to main).
2020-11-02 11:16:36 +01:00
Sei Lisa
5755bb1c30 Explain the origin of the PCPP License that applies to the excerpt used 2020-04-23 00:38:20 +02:00
Sei Lisa
234b9b23a3 Bump copyright year 2020-04-23 00:38:20 +02:00
Sei Lisa
326091624c Fix non-compliance problem with octal/hex literals without U suffix
To follow the standard, hexadecimal and octal values that don't fit an intmax_t must be of type uintmax_t, regardless of the presence of the U suffix.
2019-01-21 16:28:15 +01:00
Sei Lisa
138d042b2e Fix bug in type conciliation function
Casting wasn't enough, it needed to call to_uint().
2019-01-15 01:22:44 +01:00
Sei Lisa
4a9cc9e20f Add support for comment passthrough to expression evaluator 2019-01-13 13:51:13 +01:00
Sei Lisa
a1b5f1bb45 Avoid exposing our sint/uint class outside 2019-01-13 03:40:24 +01:00
Sei Lisa
7dcd7aa315 Add link to ned14/pcpp, moving the long link further down. 2019-01-12 20:35:10 +01:00
Sei Lisa
d2c25c7812 Simplify a comparison in cpreproc.c 2019-01-12 00:29:06 +01:00
Sei Lisa
c0168c8a34 Add files necessary to add an internal preprocessor (not implemented yet)
Includes PCPP as a submodule (which in turn pulls PLY as a submodule, so be sure to initialize submodules recursively). Also includes a file to interface PCPP with the optimizer, patching its behaviour according to our needs.

Special thanks to Niall Douglas and David Bezley for authoring PCPP.
2019-01-11 21:21:36 +01:00