4 __author__ = "Oleg Broytman <phd@phdru.name>"
5 __copyright__ = "Copyright (C) 2014 PhiloSoft Design"
6 __license__ = "GNU GPL"
9 from ply.lex import LexError
11 from html.response import response
12 from parser.parser import parser
14 form = cgi.FieldStorage()
15 if not form.has_key('q'):
16 status = "400 Bad request"
18 body = "Required parameter is missing!"
23 tree = parser.parse(q)
27 status = "400 Bad request"
29 body = "Bad query syntax!"
31 response(title, body, status)