lib/p-lang.rb in p-lang-0.1.1 vs lib/p-lang.rb in p-lang-0.2.0

- old
+ new

@@ -1,31 +1,21 @@ ROOT_PATH = File.expand_path(File.dirname(__FILE__)) -require 'rubygems' -require 'treetop' +require File.join(ROOT_PATH, '/parser/lexer') +require File.join(ROOT_PATH, '/parser/error') +require File.join(ROOT_PATH, '/parser/token') +require File.join(ROOT_PATH, '/parser/syntax_analyser') +require File.join(ROOT_PATH, '/parser/node') -Treetop.load File.join(ROOT_PATH, '/parser/p-lang') - -require File.join(ROOT_PATH, '/parser/nodes') -require File.join(ROOT_PATH, '/parser/ast') - -require File.join(ROOT_PATH, '/vm/environment') -require File.join(ROOT_PATH, '/vm/vm') -require File.join(ROOT_PATH, '/vm/proc') +require File.join(ROOT_PATH, '/vm/pfunctions') +require File.join(ROOT_PATH, '/vm/interpreter') require File.join(ROOT_PATH, '/vm/pobject') -require File.join(ROOT_PATH, '/vm/perror') +require File.join(ROOT_PATH, '/vm/environment') +require File.join(ROOT_PATH, '/vm/plambda') -require File.join(ROOT_PATH, '/vm/std/pio') -require File.join(ROOT_PATH, '/vm/std/pstring') -require File.join(ROOT_PATH, '/vm/std/pinteger') -require File.join(ROOT_PATH, '/vm/std/pdecimal') - -module PLang - class VM - def initialize_global_environment(env) - PIO.def_pfunctions(env) - PString.def_pfunctions(env) - PInteger.def_pfunctions(env) - PDecimal.def_pfunctions(env) - end - end -end \ No newline at end of file +require File.join(ROOT_PATH, '/vm/core/pinteger') +require File.join(ROOT_PATH, '/vm/core/pboolean') +require File.join(ROOT_PATH, '/vm/core/pdecimal') +require File.join(ROOT_PATH, '/vm/core/pstring') +require File.join(ROOT_PATH, '/vm/core/pchar') +require File.join(ROOT_PATH, '/vm/core/plist') +require File.join(ROOT_PATH, '/vm/core/pio')