#!/usr/bin/env ruby require File.join(File.expand_path(File.dirname(__FILE__)), '/../lib/p-lang') if ARGV[0] @parser = PLangParser.new ast = @parser.parse(File.readlines(ARGV[0]).join("")) if ast vm = PLang::VM.new(ast.build.collect(&:to_sexp)) vm.execute! else puts @parser.failure_reason end end