auto import from //depot/cupcake/@135843
diff --git a/opengl/tools/glgen/src/ParameterChecker.java b/opengl/tools/glgen/src/ParameterChecker.java
new file mode 100644
index 0000000..df26acd
--- /dev/null
+++ b/opengl/tools/glgen/src/ParameterChecker.java
@@ -0,0 +1,28 @@
+
+import java.io.BufferedReader;
+import java.util.HashMap;
+
+public class ParameterChecker {
+
+    HashMap<String,String[]> map = new HashMap<String,String[]>();
+
+    public ParameterChecker(BufferedReader reader) throws Exception {
+        String s;
+        while ((s = reader.readLine()) != null) {
+            String[] tokens = s.split("\\s");
+            map.put(tokens[0], tokens);
+        }
+    }
+
+    public String[] getChecks(String functionName) {
+        String[] checks = map.get(functionName);
+        if (checks == null &&
+            (functionName.endsWith("fv") ||
+             functionName.endsWith("xv") ||
+             functionName.endsWith("iv"))) {
+            functionName = functionName.substring(0, functionName.length() - 2);
+            checks = map.get(functionName);
+        }
+        return checks;
+    }
+}