mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2024-11-11 09:33:49 +00:00
recognize lower case hexadecimal for enumerant value parsing - patch by tfogal@alumni.unh.edu
git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@556 783a27ee-832a-0410-bc00-9f386506c6dd
This commit is contained in:
parent
8de12f59f0
commit
75a173df62
@ -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-F]+|[A-Z][A-Z0-9_]*)$/,
|
||||
token => qr/^([A-Z][A-Z0-9_x]*)\s+((?:0x)?[0-9A-Fa-f]+|[A-Z][A-Z0-9_]*)$/,
|
||||
type => qr/^typedef\s+(.+)\s+([\*A-Za-z0-9_]+)$/,
|
||||
exact => qr/.*;$/,
|
||||
);
|
||||
@ -111,6 +111,8 @@ sub parse_ext($)
|
||||
rtype => $return,
|
||||
parms => $parms,
|
||||
};
|
||||
} else {
|
||||
print STDERR "'$_' matched no regex.\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -129,6 +131,8 @@ sub output_tokens($$)
|
||||
print "\n";
|
||||
print map { &{$fnc}($_, $tbl->{$_}) } sort { hex ${$tbl}{$a} <=> hex ${$tbl}{$b} } keys %{$tbl};
|
||||
print "\n";
|
||||
} else {
|
||||
print STDERR "no keys in table!";
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user