]> code.ossystems Code Review - openembedded-core.git/commitdiff
parse.ast: drop __word__ regular expression
authorChris Larson <chris_larson@mentor.com>
Tue, 4 Jan 2011 20:07:27 +0000 (13:07 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 6 Jan 2011 10:49:29 +0000 (10:49 +0000)
We can use the string split method for this instead.

(Bitbake rev: aa9646717b3ee1006628246a7c495f601e62391c)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/parse/ast.py

index fe2674d43284de4e76b19e0c017c810529e74ac0..e34f1fe894f5d2585834729d7645dc3f03aaee44 100644 (file)
@@ -31,7 +31,6 @@ import itertools
 from bb import methodpool
 from bb.parse import logger
 
-__word__ = re.compile(r"\S+")
 __parsed_methods__ = bb.methodpool.get_parsed_dict()
 _bbversions_re = re.compile(r"\[(?P<from>[0-9]+)-(?P<to>[0-9]+)\]")
 
@@ -180,7 +179,7 @@ class MethodFlagsNode(AstNode):
 
 class ExportFuncsNode(AstNode):
     def __init__(self, fns, classes):
-        self.n = __word__.findall(fns)
+        self.n = fns.split()
         self.classes = classes
 
     def eval(self, data):
@@ -250,7 +249,7 @@ class AddTaskNode(AstNode):
 
 class BBHandlerNode(AstNode):
     def __init__(self, fns):
-        self.hs = __word__.findall(fns)
+        self.hs = fns.split()
 
     def eval(self, data):
         bbhands = bb.data.getVar('__BBHANDLERS', data) or []
@@ -301,7 +300,7 @@ def handleBBHandlers(statements, m):
 
 def handleInherit(statements, m):
     classes = m.group(1)
-    statements.append(InheritNode(__word__.findall(classes)))
+    statements.append(InheritNode(classes.split()))
 
 def finalize(fn, d, variant = None):
     for lazykey in bb.data.getVar("__lazy_assigned", d) or ():