summaryrefslogtreecommitdiff
path: root/pptok.pl
Commit message (Collapse)AuthorAgeFilesLines
* Change the token prehash function for better convergenceH. Peter Anvin2007-09-181-2/+2
| | | | | | | Combining arithmetric (add) and bitwise (xor) mixing seems to give better result than either. With the new prehash function, we find a valid hash much quicker.
* pptok.c: don't insist on C99 compiler behaviourH. Peter Anvin2007-09-131-2/+3
| | | | | | Declarations that are not at the head is C99 behaviour, but it's rather pointless for this little piece of code. Fix to work with older compilers.
* pptok.c: quick-and-dirty downcasing during prehashingH. Peter Anvin2007-09-121-1/+7
| | | | | | | | Speed up pptok.c by just doing |= 0x20 instead of calling tolower() for every character during prehashing. This is good enough for our needs, since we don't have any tokens containing the characters @ [ \ ] _ nor any high-bit characters (in which case we'd have to worry about multibyte anyway.)
* pptok.c: handle holes in the pp_directives arrayH. Peter Anvin2007-09-121-1/+1
| | | | | We need to fail if we land in a hole in the pp_directives array, since we have a noncontiguous enum preproc_token now.
* More automation in the preprocessor conditionals handlingH. Peter Anvin2007-09-121-23/+64
| | | | | Further automate the production of preprocessor conditionals. Now the code automatically folds if/elif and the negatives.
* pptok.c: fix spacingH. Peter Anvin2007-09-121-1/+1
|
* Generate automatically correct tests for %if and %elifH. Peter Anvin2007-09-121-0/+14
| | | | | Automatically generate macros to test for %if and %elif variants, which are guaranteed to be correct across future changes.
* Use a perfect hash to look up preprocessor directivesH. Peter Anvin2007-09-121-0/+147
Use a perfect hash to look up preprocessor directives, and generate the preprocessor directive list automatically.