Просмотр исходного кода

Removed matching code and added fix for Cython 0.14 in Makefile.

Taddeus Kroes 14 лет назад
Родитель
Сommit
718d409d17
4 измененных файлов с 5 добавлено и 31 удалено
  1. 1 0
      .gitignore
  2. 4 0
      external/rules.mk
  3. 0 13
      src/match.py
  4. 0 18
      tests/test_match.py

+ 1 - 0
.gitignore

@@ -11,3 +11,4 @@
 core
 .coverage
 coverage
+config.mk

+ 4 - 0
external/rules.mk

@@ -19,8 +19,12 @@ $(b)pybison/bison_.o: $(b)pybison/bison_.c
 ifdef PYREX
 py2c := pyrexc
 else
+ifdef CYTHON_0_14
+py2c := cython --fast-fail --line-directives
+else
 py2c := cython -Wextra -Werror --fast-fail --line-directives
 endif
+endif
 
 $(b)pybison/%.c: $(d)pybison/src/pyrex/%.pyx
 	$(py2c) -o $@ $<

+ 0 - 13
src/match.py

@@ -1,13 +0,0 @@
-from node import Node, Leaf
-from parser import Parser
-
-from external.graph_drawing.graph import generate_graph
-from external.graph_drawing.line import generate_line
-
-
-patterns = {
-        #'': L('')
-        }
-
-def matches(exp, pattern):
-    pass

+ 0 - 18
tests/test_match.py

@@ -1,18 +0,0 @@
-import unittest
-
-from src.node import ExpressionNode as N, ExpressionLeaf as L
-from src.match import patterns, matches
-from src.parser import Parser
-
-from tests.parser import ParserWrapper
-
-
-class TestMatch(unittest.TestCase):
-    def setUp(self):
-        self.parser = ParserWrapper(Parser)
-
-    def test_constant(self):
-        pass
-
-    def assert_matches(self, exp, pattern_name):
-        self.assertTrue(matches(self.parser.run([exp]), patterns[pattern_name]))