If the file name passed to parse_GL_API is None or "-", read from standard
input.  This allows use of GL API scripts in pipelines.
diff --git a/src/mesa/glapi/gl_XML.py b/src/mesa/glapi/gl_XML.py
index 64422be..ac936d1 100644
--- a/src/mesa/glapi/gl_XML.py
+++ b/src/mesa/glapi/gl_XML.py
@@ -30,6 +30,7 @@
 from xml.sax.handler import feature_namespaces
 
 import re
+import sys
 
 def is_attr_true( attrs, name ):
 	"""Read a name value from an element's attributes.
@@ -55,12 +56,17 @@
 	supplied SAX callback, which should be derived from
 	FilterGLAPISpecBase.
 	"""
+
 	parser = make_parser()
 	parser.setFeature(feature_namespaces, 1)
 	parser.setContentHandler( handler )
 
 	handler.printHeader()
-	parser.parse( file_name )
+
+	if not file_name or file_name == "-":
+		parser.parse( sys.stdin )
+	else:
+		parser.parse( file_name )
 
 	handler.printFooter()
 	return