summaryrefslogtreecommitdiff
path: root/pptok.pl
AgeCommit message (Collapse)AuthorFilesLines
2013-06-30make: Fix nasm build with MSVCMarat Dukhan1-1/+1
http://bugzilla.nasm.us/show_bug.cgi?id=3392258 Signed-off-by: Marat Dukhan <maratek@gmail.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-11-07Fix Perl deprecation warnings.Victor van den Elzen1-1/+1
Use of defined on aggregates (hashes and arrays) is deprecated. You should instead use a simple test for size.
2009-06-28Add copyright verbiage to Perl scripts; update LICENSEH. Peter Anvin1-0/+33
This adds copyright verbiage to the Perl scripts. Scripts that are known to be clean w.r.t. the 2-clause BSD license are given that license; unclear ones are given the "LGPL for now". Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-06-21pp_directives_len can be uint8_tH. Peter Anvin1-1/+1
Save a few hundred bytes...
2008-06-19macros.c: compress by tokenizing macro directivesH. Peter Anvin1-4/+37
Compress macros.c by representing macro directives with a single byte. We can do this because we only use the ASCII character range inside the standard macro files. Note: we could save significant additional space by not having a pointer array, and instead relying on the fact that we sweep sequentially through the output array.
2007-10-19Formatting: kill off "stealth whitespace"H. Peter Anvin1-10/+10
"Stealth whitespace" makes it harder to read diffs, and just generally cause unwanted weirdness. Do a source-wide pass to get rid of it.
2007-10-02Portability fixesH. Peter Anvin1-0/+1
Concentrate compiler dependencies to compiler.h; make sure compiler.h is included first in every .c file (since some prototypes may depend on the presence of feature request macros.) Actually use the conditional inclusion of various functions (totally broken in previous releases.)
2007-10-02Use the crc64 we already use as the perfect hash function prehashH. Peter Anvin1-14/+8
Use the same crc64 that we already use for the symbol table hash as the perfect hash function prehash. We appear to get radically faster convergence this way, and the crc64 is probably *faster*, since the table likely to be resident in memory.
2007-09-18Change the token prehash function for better convergenceH. Peter Anvin1-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.
2007-09-13pptok.c: don't insist on C99 compiler behaviourH. Peter Anvin1-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.
2007-09-12pptok.c: quick-and-dirty downcasing during prehashingH. Peter Anvin1-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.)
2007-09-12pptok.c: handle holes in the pp_directives arrayH. Peter Anvin1-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.
2007-09-12More automation in the preprocessor conditionals handlingH. Peter Anvin1-23/+64
Further automate the production of preprocessor conditionals. Now the code automatically folds if/elif and the negatives.
2007-09-12pptok.c: fix spacingH. Peter Anvin1-1/+1
2007-09-12Generate automatically correct tests for %if and %elifH. Peter Anvin1-0/+14
Automatically generate macros to test for %if and %elif variants, which are guaranteed to be correct across future changes.
2007-09-12Use a perfect hash to look up preprocessor directivesH. Peter Anvin1-0/+147
Use a perfect hash to look up preprocessor directives, and generate the preprocessor directive list automatically.