mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2024-11-26 08:31:56 +00:00
Tolerate u or ull suffixes on tokens - GL_INVALID_INDEX, GL_TIMEOUT_IGNORED
This commit is contained in:
parent
5505e52896
commit
b3ff4606be
@ -10,7 +10,7 @@ my %regex = (
|
||||
extname => qr/^[A-Z][A-Za-z0-9_]+$/,
|
||||
exturl => qr/^http.+$/,
|
||||
function => qr/^(.+) ([a-z][a-z0-9_]*) \((.+)\)$/i,
|
||||
token => qr/^([A-Z][A-Z0-9_x]*)\s+((?:0x)?[0-9A-Fa-f]+|[A-Z][A-Z0-9_]*)$/,
|
||||
token => qr/^([A-Z][A-Z0-9_x]*)\s+((?:0x)?[0-9A-Fa-f]+(u(ll)?)?|[A-Z][A-Z0-9_]*)$/,
|
||||
type => qr/^typedef\s+(.+)$/,
|
||||
exact => qr/.*;$/,
|
||||
);
|
||||
|
@ -149,7 +149,7 @@ my %regex = (
|
||||
prefix => qr/^(?:[aw]?gl|glX)/, # gl | agl | wgl | glX
|
||||
tprefix => qr/^(?:[AW]?GL|GLX)_/, # GL_ | AGL_ | WGL_ | GLX_
|
||||
section => compile_regex('^(', join('|', @sections), ')$'), # sections in spec
|
||||
token => qr/^([A-Z0-9][A-Z0-9_x]*):?\s+((?:0x)?[0-9A-Fa-f]+)(|\s[^\?]*)$/, # define tokens
|
||||
token => qr/^([A-Z0-9][A-Z0-9_x]*):?\s+((?:0x)?[0-9A-Fa-f]+(u(ll)?)?)(|\s[^\?]*)$/, # define tokens
|
||||
types => compile_regex('\b(', join('|', keys %typemap), ')\b'), # var types
|
||||
voidtype => compile_regex('\b(', keys %voidtypemap, ')\b '), # void type
|
||||
);
|
||||
@ -352,6 +352,16 @@ foreach my $spec (sort @speclist)
|
||||
} else {
|
||||
if (${$tokens}{$b} =~ /_/) {
|
||||
1
|
||||
} else {
|
||||
if (${$tokens}{$a} =~ /u(ll)?$/) {
|
||||
if (${$tokens}{$b} =~ /u(ll)?$/) {
|
||||
$a cmp $b
|
||||
} else {
|
||||
-1
|
||||
}
|
||||
} else {
|
||||
if (${$tokens}{$b} =~ /u(ll)?$/) {
|
||||
1
|
||||
} else {
|
||||
if (hex ${$tokens}{$a} eq hex ${$tokens}{$b})
|
||||
{
|
||||
@ -362,6 +372,8 @@ foreach my $spec (sort @speclist)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} keys %{$tokens})
|
||||
{
|
||||
if ($token =~ /^$prefix\_.*/i)
|
||||
|
Loading…
Reference in New Issue
Block a user