]> git.phdru.name Git - phdru.name/cgi-bin/blog-ru/search-tags.git/blobdiff - parser/build_ast.py
Use parsimonious instead of grako
[phdru.name/cgi-bin/blog-ru/search-tags.git] / parser / build_ast.py
diff --git a/parser/build_ast.py b/parser/build_ast.py
deleted file mode 100644 (file)
index 42bf920..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-
-from parser import TagsSemantics as _TagsSemantics
-
-class TagsSemantics(_TagsSemantics):
-    def or_expression(self, ast):
-        return ('OR', ast[0], ast[2])
-
-    def and_expression(self, ast):
-        return ('AND', ast[0], ast[2])
-
-    def not_expression(self, ast):
-        return ('NOT', ast[1])
-
-    def parens_expression(self, ast):
-        return ('PARENS', ast[1])
-
-    def name(self, ast):
-        return ('NAME', str(ast))
-
-    def and_op(self, ast):
-        return 'AND'
-
-    def or_op(self, ast):
-        return 'OR'
-
-    def not_op(self, ast):
-        return 'NOT'