diff options
-rwxr-xr-x | bparser.py (renamed from parser.py) | 0 | ||||
-rwxr-xr-x | builder.py | 4 | ||||
-rwxr-xr-x | interpreter.py | 8 |
3 files changed, 6 insertions, 6 deletions
@@ -58,11 +58,11 @@ class BuilderApp(): raise RuntimeError('Source and build directories must not be the same. Create a pristine build directory.') if self.has_builder_file(ndir1): if self.has_builder_file(ndir2): - raise RuntimeError('Both directories contain a builder file %s.' % BuilderApp.builder_filename) + raise RuntimeError('Both directories contain a builder file %s.' % environment.builder_filename) return (ndir1, ndir2) if self.has_builder_file(ndir2): return (ndir2, ndir1) - raise RuntimeError('Neither directory contains a builder file %s.' % BuilderApp.builder_filename) + raise RuntimeError('Neither directory contains a builder file %s.' % environment.builder_filename) def generate(self): code = open(os.path.join(self.source_dir, environment.builder_filename)).read() diff --git a/interpreter.py b/interpreter.py index d63cb58..3194028 100755 --- a/interpreter.py +++ b/interpreter.py @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import parser +import bparser import nodes import environment import os, sys, platform @@ -42,7 +42,7 @@ class InterpreterObject(): # This currently returns data for the current environment. # It should return info for the target host. class Host(InterpreterObject): - + def __init__(self): InterpreterObject.__init__(self) @@ -276,7 +276,7 @@ class Interpreter(): def __init__(self, code, build): self.build = build - self.ast = parser.build_ast(code) + self.ast = bparser.build_ast(code) self.sanity_check_ast() self.variables = {} self.builtin = {} @@ -448,7 +448,7 @@ class Interpreter(): buildfilename = os.path.join(self.subdir, environment.builder_filename) code = open(os.path.join(self.environment.get_source_dir(), buildfilename)).read() assert(isinstance(code, str)) - codeblock = parser.build_ast(code) + codeblock = bparser.build_ast(code) print('Going to subdirectory "%s".' % self.subdir) self.evaluate_codeblock(codeblock) self.subdir = prev_subdir |