From 5cc845713d83d5f55d991cc2c84ea1de0cadac14 Mon Sep 17 00:00:00 2001 From: "Stefanos A." Date: Sun, 27 Oct 2013 01:24:04 +0200 Subject: [PATCH] Improved extension detection in .spec parser. Instead of using a hardcoded list of extensions, the parser will now use a regex to detect extension names. This gives better results on new specs without manual editing. --- Source/Bind/Specifications/GL2/signatures.xml | 60 +++++++++---------- Source/Converter/GLParser.cs | 4 +- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/Source/Bind/Specifications/GL2/signatures.xml b/Source/Bind/Specifications/GL2/signatures.xml index abe05e3e..f4730720 100644 --- a/Source/Bind/Specifications/GL2/signatures.xml +++ b/Source/Bind/Specifications/GL2/signatures.xml @@ -16283,6 +16283,21 @@ + + + + + + + + + + + + + + + @@ -16329,6 +16344,21 @@ + + + + + + + + + + + + + + + @@ -20101,13 +20131,6 @@ - - - - - - - @@ -20155,29 +20178,6 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Source/Converter/GLParser.cs b/Source/Converter/GLParser.cs index eb1da7f0..307d0c17 100644 --- a/Source/Converter/GLParser.cs +++ b/Source/Converter/GLParser.cs @@ -35,8 +35,8 @@ namespace CHeaderToXML class GLParser : Parser { static readonly Regex extensions = new Regex( - @"3DFX|(?!(?<=[1-4])D)[A-Z]{2,}", - RegexOptions.RightToLeft | RegexOptions.Compiled); + @"3DFX|(?!(?<=[1-4])D)[A-Z]{2,}$", + RegexOptions.Compiled); static readonly char[] splitters = new char[] { ' ', '\t', ',', '(', ')', ';', '\n', '\r' }; enum ParserModes { None, Enum, Func };