From 4b25b519ae46b283988a1847e56a19b01269b3a4 Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Mon, 18 May 2009 19:24:07 +0200 Subject: bitbake: [parser] Cary a Statement Node through the parsing When parsing we will collect a number of statements that can be evaluated...The plan is to be evaluate things twice (old+new) and then compare the result, it should be the same. Signed-off-by: Richard Purdie --- bitbake/lib/bb/parse/parse_py/ConfHandler.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'bitbake/lib/bb/parse/parse_py/ConfHandler.py') diff --git a/bitbake/lib/bb/parse/parse_py/ConfHandler.py b/bitbake/lib/bb/parse/parse_py/ConfHandler.py index 43a3a69bbb..69f2eea1b3 100644 --- a/bitbake/lib/bb/parse/parse_py/ConfHandler.py +++ b/bitbake/lib/bb/parse/parse_py/ConfHandler.py @@ -49,7 +49,7 @@ def init(data): def supports(fn, d): return fn[-5:] == ".conf" -def include(oldfn, fn, data, error_out): +def include(statements, oldfn, fn, data, error_out): """ error_out If True a ParseError will be reaised if the to be included @@ -70,13 +70,13 @@ def include(oldfn, fn, data, error_out): from bb.parse import handle try: - ret = handle(fn, data, True) + ret = handle(fn, data, True, statements) except IOError: if error_out: raise ParseError("Could not %(error_out)s file %(fn)s" % vars() ) bb.msg.debug(2, bb.msg.domain.Parsing, "CONF file '%s' not found" % fn) -def handle(fn, data, include = 0): +def handle(fn, data, include, statements): init(data) if include == 0: @@ -103,32 +103,32 @@ def handle(fn, data, include = 0): s2 = f.readline()[:-1].strip() lineno = lineno + 1 s = s[:-1] + s2 - feeder(lineno, s, fn, data) + feeder(lineno, s, fn, data, statements) if oldfile: bb.data.setVar('FILE', oldfile, data) return data -def feeder(lineno, s, fn, data): +def feeder(lineno, s, fn, data, statements): m = __config_regexp__.match(s) if m: groupd = m.groupdict() - ast.handleData(groupd, data) + ast.handleData(statements, groupd, data) return m = __include_regexp__.match(s) if m: - ast.handleInclude(m, fn, lineno, data, False) + ast.handleInclude(statements, m, fn, lineno, data, False) return m = __require_regexp__.match(s) if m: - ast.handleInclude(m, fn, lineno, data, True) + ast.handleInclude(statements, m, fn, lineno, data, True) return m = __export_regexp__.match(s) if m: - ast.handleExport(m, data) + ast.handleExport(statements, m, data) return raise ParseError("%s:%d: unparsed line: '%s'" % (fn, lineno, s)); -- cgit v1.2.3-54-g00ecf