Permalink
Browse files

Fix a few bugs.

  • Loading branch information...
1 parent 85f83be commit 258fa8d03d21e8915659e0fe9150fabf8554ea38 @peter17 committed Apr 26, 2012
Showing with 7 additions and 5 deletions.
  1. +2 −0 pijnu/library/node.py
  2. +1 −1 pijnu/library/pattern.py
  3. +3 −3 pijnu/library/testValidParser.py
  4. +1 −1 tests/test_toolset.py
View
@@ -572,6 +572,8 @@ def join(node):
'''
if node.kind is Node.LEAF:
return
+ if isinstance(node.value, str):
+ return
toLeaves(node)
childTexts = []
for child in node.value:
View
@@ -444,7 +444,7 @@ def testSuiteDict(self, sources, method_name="parse", multiline = False):
else:
print "test_suite_dict = {"
for (source, result) in d.items():
- print " \"%s\": \"%r\"" % (source, result.value)
+ print " \"%s\": \"%r\"" % (source, result)
print "}"
return d
@@ -46,9 +46,9 @@ def noX(node):
raise Invalidation(message, pattern=pattern, source=source,pos=pos)
### <definition>
-x = Word('x', format='"x"')(noX)
-letter = Klass(format='[a..z]', charset='abcdefghijklmnopqrstuvwxyz')(noX)
-text = Repetition(letter, numMin=4,numMax=6, format='letter{4..6}')
+x = Word('x', expression='"x"')(noX)
+letter = Klass(format='[a..z]', expression='abcdefghijklmnopqrstuvwxyz')(noX)
+text = Repetition(letter, numMin=4,numMax=6, expression='letter{4..6}')
View
@@ -1,4 +1,4 @@
-from pijnu.tests import ParserTestCase
+from tests import ParserTestCase
from pijnu import makeParser

0 comments on commit 258fa8d

Please sign in to comment.