mirror of
https://github.com/nigels-com/glew.git
synced 2024-11-13 09:43:48 +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_]+$/,
|
extname => qr/^[A-Z][A-Za-z0-9_]+$/,
|
||||||
exturl => qr/^http.+$/,
|
exturl => qr/^http.+$/,
|
||||||
function => qr/^(.+) ([a-z][a-z0-9_]*) \((.+)\)$/i,
|
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+(.+)$/,
|
type => qr/^typedef\s+(.+)$/,
|
||||||
exact => qr/.*;$/,
|
exact => qr/.*;$/,
|
||||||
);
|
);
|
||||||
|
@ -149,7 +149,7 @@ my %regex = (
|
|||||||
prefix => qr/^(?:[aw]?gl|glX)/, # gl | agl | wgl | glX
|
prefix => qr/^(?:[aw]?gl|glX)/, # gl | agl | wgl | glX
|
||||||
tprefix => 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
|
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
|
types => compile_regex('\b(', join('|', keys %typemap), ')\b'), # var types
|
||||||
voidtype => compile_regex('\b(', keys %voidtypemap, ')\b '), # void type
|
voidtype => compile_regex('\b(', keys %voidtypemap, ')\b '), # void type
|
||||||
);
|
);
|
||||||
@ -353,11 +353,23 @@ foreach my $spec (sort @speclist)
|
|||||||
if (${$tokens}{$b} =~ /_/) {
|
if (${$tokens}{$b} =~ /_/) {
|
||||||
1
|
1
|
||||||
} else {
|
} else {
|
||||||
if (hex ${$tokens}{$a} eq hex ${$tokens}{$b})
|
if (${$tokens}{$a} =~ /u(ll)?$/) {
|
||||||
{
|
if (${$tokens}{$b} =~ /u(ll)?$/) {
|
||||||
$a cmp $b
|
$a cmp $b
|
||||||
} else {
|
} else {
|
||||||
hex ${$tokens}{$a} <=> hex ${$tokens}{$b}
|
-1
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (${$tokens}{$b} =~ /u(ll)?$/) {
|
||||||
|
1
|
||||||
|
} else {
|
||||||
|
if (hex ${$tokens}{$a} eq hex ${$tokens}{$b})
|
||||||
|
{
|
||||||
|
$a cmp $b
|
||||||
|
} else {
|
||||||
|
hex ${$tokens}{$a} <=> hex ${$tokens}{$b}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user