add main back to QueryParser.py so we can create the parsetab.py file where we want it
[python-rwhoisd.git] / rwhoisd / QueryParser.py
index 7b9ed84..8133c30 100644 (file)
@@ -234,3 +234,10 @@ def parse(p, query):
         return p.parse(query)
     except (lex.LexError, yacc.YaccError), e:
         raise Rwhois.RwhoisError, (350, "Invalid Query Syntax: " + e.message)
+
+
+# NOTE: if you change the grammar, run this module from the 'rwhoisd'
+# directory to create the parsetab.py module there, rather than
+# wherever you run pyrwhoisd from.
+if __name__ == "__main__":
+    get_parser()