<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/ionize/compiled_parser.rb</filename>
    </added>
    <added>
      <filename>tasks/benchmark.rake</filename>
    </added>
    <added>
      <filename>tasks/recompile.rake</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,5 @@
-require 'config/requirements'
-require 'config/hoe' # setup Hoe + all gem configuration
+# require 'config/requirements'
+# require 'config/hoe' # setup Hoe + all gem configuration
 
 Dir['tasks/**/*.rake'].each { |rake| load rake }
 </diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -21,9 +21,13 @@ module Ionize
       def convert_file(php_file, ruby_file = nil)
         ruby_file ||= php_file.gsub(&quot;.php&quot;, &quot;.rb&quot;)        
 
+        ruby_dir = File.dirname(ruby_file)
+        FileUtils.mkdir_p(ruby_dir) unless File.exists?(ruby_dir)
+
         File.open(ruby_file, &quot;w+&quot;) do |f|
           f.write(Ionize::Php.to_ruby(File.read(php_file)))
         end
+        puts &quot;Converted file #{php_file} and stored it as #{ruby_file}&quot;
       end
 
       def convert_directory(php_directory, ruby_directory = nil)
@@ -31,7 +35,7 @@ module Ionize
         FileUtils.mkdir ruby_directory unless File.exists?(ruby_directory) and File.stat(ruby_directory).directory?
         Dir[&quot;#{php_directory}/**/*&quot;].select {|f| f =~ /\.php$/ }.each do |php_file|
           ruby_file = php_file.gsub(php_directory, ruby_directory).gsub(&quot;.php&quot;, &quot;.rb&quot;)
-          puts &quot;Converting file #{php_file} and storing it as #{ruby_file}&quot;
+          puts &quot;Found file #{php_file}&quot;
           convert_file(php_file, ruby_file)
         end
       end</diff>
      <filename>bin/ionize</filename>
    </modified>
    <modified>
      <diff>@@ -9,14 +9,15 @@ require 'ruby2ruby'
 require 'ionize/translate'
 require 'ionize/environment'
 
+require 'ionize/parser'
+require 'ionize/compiled_parser'
 
 module Ionize
   module Php
-    CharacterLimit = 25000
+    CharacterLimit = 50000
 
     # Returns a Dhaka AST of a string
     def self.to_ast(string)
-      require 'ionize/parser'
       # TODO: Error handling could be better..
       # Maybe another time
 
@@ -24,19 +25,13 @@ module Ionize
         raise &quot;Your input is #{string.length}. Ionize::Php::Parser currently cannot handle inputs larger than #{CharacterLimit}, due to Dhaka's memory usage&quot;
       end
       
-      result = Php.to_tokens(string)
-      if result.is_a? Dhaka::TokenizerErrorResult
-        raise &quot;Could not tokenize at index #{result.unexpected_char_index}\n&quot; + string.slice(result.unexpected_char_index, 40).inspect
-      end
-
-      result = Php::CompiledParser.parse(result)
-
+      tokens = Php.to_tokens(string)
+      result = Php::CompiledParser.parse(tokens)
+      
       if result.is_a? Dhaka::ParseErrorResult
-        result.parser_state.actions = []
         error = %Q{ 
 Could not parse token.
 Token =&gt; #{result.unexpected_token.inspect}
-State =&gt; #{result.parser_state.inspect}
 
 }
         error &lt;&lt; string.slice(result.unexpected_token.input_position, 40) rescue nil
@@ -53,7 +48,13 @@ State =&gt; #{result.parser_state.inspect}
       require 'ionize/tokenizer'
       tokenizer = Php::Tokenizer.new(string)
       tokenizer.switch_to :php unless string =~ /&lt;\?php/i
-      tokenizer.run
+      tokens = tokenizer.run
+
+      if tokens.is_a? Dhaka::TokenizerErrorResult
+        raise &quot;Could not tokenize at index #{tokens.unexpected_char_index}\n&quot; + string.slice(tokens.unexpected_char_index, 40).inspect
+      end
+
+      tokens
     end
     
     # An S-expression of the string</diff>
      <filename>lib/ionize.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,5 @@
+
+
 require 'rubygems'
 require 'dhaka'
 
@@ -53,6 +55,7 @@ module Ionize
       for_symbol 'simple_statement' do
         line_statement                    %w{ expr ; }
         class_statement                   &quot; class word { statements } &quot;.split
+        class_extends_statement           &quot; class word extends word { statements } &quot;.split
         
         while_statement                   &quot; while ( expr ) block &quot;.split
         do_while_statement                &quot; do block while ( expr ) ; &quot;.split
@@ -64,6 +67,7 @@ module Ionize
         static_declaration                %w{ static variables ; }
         global_declaration                %w{ global variables ; }
         class_var_statement               %w{ var variable ; }
+        class_var_with_default_statement  %w{ var variable = expr ; }
         return_one                        %w{ return expr ; }
         print_statement                   %w{ print expr ; }      
         echo_statement                    %w{ echo expr ; }
@@ -100,6 +104,7 @@ module Ionize
         term_postop                       %w{ term postop }
         post_increment_var                %w{ term ++ }
         post_decrement_var                %w{ term -- }
+        reference_term                    %w{ &amp; term }
 
         term_or_expr                      %w{ term || expr }
         term_or_expr_with_or              %w{ term or expr }
@@ -114,8 +119,9 @@ module Ionize
         include_once_statement            %w{ include_once expr }
 
         list_assign                       %w{ list ( fun_args ) = expr }
-        oo_variable_variable_assign       %w{ one_var -&gt; variable = expr }
-        oo_assign                         %w{ oo_expr = expr }
+        oo_variable_variable_assign       %w{ oo_variable -&gt; variable = expr }
+        oo_array_assign                   %w{ oo_variable [ term ] = expr }
+        oo_assign                         %w{ oo_variable = expr }
 
         term_array_append                 %w{ variable [ ] = expr }
         term_array_assign                 %w{ variable [ expr ] = expr }
@@ -138,14 +144,18 @@ module Ionize
         true_value                        %w{ true }
         a_string                          %w{ a_string }
         a_variable                        %w{ one_var }
-        variable_reference                %w{ &amp; variable }
-        oo_call                           %w{ oo_variable ( fun_call_args ) }
+        class_method_call                 %w{ word :: word ( fun_call_args ) }
+
+        oo_call                           %w{ one_var oo_fragment ( fun_call_args ) }
+        oo_array_lookup                   %w{ one_var oo_fragment [ expr ] }
+
         fun_call_trailing_comma           %w{ word ( fun_call_args , ) }
         regular_fun_call                  %w{ word ( fun_call_args ) }
         var_call                          %w{ variable ( fun_call_args ) }
         user_constant                     %w{ word }
-        oo_expr                           %w{ oo_expr }      
-        new_object                        %w{ new term }
+        oo_expr                           %w{ one_var oo_fragment }
+        new_object                        %w{ new word }
+        new_variable_class_object         %w{ new variable }
         braced_lookup                     %w{ variable { expr } }
 
         pre_increment_var                 %w{ ++ term }
@@ -157,7 +167,7 @@ module Ionize
         
         preop_term                        %w{ preop term }      
         paren_cast                        %w{ ( cast ) term }
-        paren_expr                        %w{ ( expr ) }    
+        paren_expr                        %w{ ( expr ) }
       end
 
       for_symbol 'a_string' do
@@ -212,11 +222,14 @@ module Ionize
         array_variable                    %w{ array_lookup }
       end
 
-      for_symbol 'oo_expr' do
-        oo_variable_variable              %w{ one_var -&gt; variable }
-        oo_fun_call                       %w{ one_var -&gt; oo_fun_call }
-        oo_array_lookup                   %w{ one_var -&gt; word [ expr ] }
-        oo_variable                       %w{ one_var -&gt; word }      
+      for_symbol 'oo_term' do
+        oo_term_with_word                 %w{ -&gt; word }
+        oo_term_with_array                %w{ -&gt; word [ expr ] }
+      end
+
+      for_symbol 'oo_fragment' do
+        single_oo_fragment                %w{ oo_term }
+        multiple_oo_fragment              %w{ oo_fragment oo_term }
       end
 
       for_symbol 'fun_args' do
@@ -240,10 +253,18 @@ module Ionize
 end
 
 
-# Disable the logger
-null = Object.new.instance_eval do
-  def method_missing(*args, &amp;block); end  
-  self
+
+my_filename       = &quot;lib/ionize/parser.rb&quot;
+compiled_filename = &quot;lib/ionize/compiled_parser.rb&quot;
+
+if File.stat(my_filename).ctime &gt; File.stat(compiled_filename).ctime
+  puts &quot;Grammar newer than CompiledParser. Recompiling..&quot; 
+  null = Object.new.instance_eval do
+    def method_missing(*args, &amp;blk); end
+    self
+  end
+  File.open(&quot;lib/ionize/compiled_parser.rb&quot;, &quot;w+&quot;) do |f|     
+    f.write(Dhaka::Parser.new(Ionize::Php::Grammar, null).compile_to_ruby_source_as(&quot;Ionize::Php::CompiledParser&quot;)) 
+  end
 end
 
-eval(Dhaka::Parser.new(Ionize::Php::Grammar, null).compile_to_ruby_source_as(&quot;Ionize::Php::CompiledParser&quot;))</diff>
      <filename>lib/ionize/parser.rb</filename>
    </modified>
    <modified>
      <diff>@@ -29,7 +29,7 @@ module Ionize
       caret      = [&quot;^&quot;]
       ampersand  = [&quot;&amp;&quot;]    
 
-      Symbols = ['[', ']', '(', ')', '{', '}', ';', ':', ',', '!', '-']
+      Symbols = ['[', ']', '(', ')', '{', '}', ':', ';', ',', '!', '-']
 
       #
       # Why did I do it this way? Might be easier to read as 
@@ -42,7 +42,7 @@ module Ionize
         [&quot;^&quot;, &quot;?&quot;, '#', &quot;\r&quot;, &quot;/&quot;, &quot;\\&quot;]
 
       Keywords = %w(as and break case class default do echo 
-                    else exit for foreach function global 
+                    extends else exit for foreach function global 
                     if include include_once list new or print 
                     require require_once return static switch
                     var while)
@@ -53,8 +53,11 @@ module Ionize
       NonIdentifiers = Whitespace + ['&quot;', &quot;'&quot;, &quot;&gt;&quot;, &quot;&lt;&quot;, &quot;=&quot;] + Symbols + 
         [&quot;^&quot;, &quot;+&quot;, &quot;-&quot;, &quot;|&quot;, &quot;.&quot;, &quot;/&quot;, &quot;&amp;&quot;, &quot;\n&quot;, &quot;\\&quot;, &quot;$&quot;]
       
-      # Totally breaking Dhaka's encapsulation.. But these four
-      # methods make our grammar simplier, I think.    
+      # TODO: Adding these methods might be a sight that I should 
+      # switch to the Lexeme approach
+      
+      # Just have to figure out Dhaka's own regex engine
+      
       def peek
         @input[@curr_char_index+1] and @input[@curr_char_index+1].chr 
       end
@@ -111,7 +114,15 @@ module Ionize
           create_token curr_char, curr_char and advance
         end
 
-        for_character &quot;;&quot; do
+        for_characters [&quot;:&quot;] do
+          if peek == &quot;:&quot;
+            create_token &quot;::&quot;, &quot;::&quot; and 2.times { advance }
+          else
+            create_token curr_char, curr_char and advance
+          end
+        end
+
+        for_characters [&quot;;&quot;] do
           create_token curr_char, curr_char and advance
           # Double semicolons &quot;;;&quot; sometimes show up
           # Who came up with such an idiom, I dunno</diff>
      <filename>lib/ionize/tokenizer.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,4 @@
+
 load 'ionize/translate/debug.rb'
 load 'ionize/translate/ext.rb'
 load 'ionize/translate/translator.rb'</diff>
      <filename>lib/ionize/translate.rb</filename>
    </modified>
    <modified>
      <diff>@@ -22,6 +22,10 @@ module Ionize
           [:args]
         end
 
+        def handle_user_constant(node)
+          [:const, transform(node).to_sym]
+        end
+
         # Perhaps these two can be
         # cleaned up? Not sure..
 
@@ -30,13 +34,17 @@ module Ionize
           node.first.gsub(&quot;$&quot;, &quot;&quot;).to_sym
         end
 
-        def handle_a_variable(node)
+        def handle_a_variable(node)          
           debug &quot;Variable inside function args #{node.inspect}&quot;
+          # TODO: Clean this line up..
+          # I'm sure it could be split up into other handle_#{node}'s
           node.first.to_a.first.second.first.to_a.first.second.gsub(&quot;$&quot;, &quot;&quot;).to_sym
         end
 
-        def handle_variable_reference(node)
+        def handle_reference_term(node)
+          # For now, I say screw references..
           transform(node.second)
+          # TODO: But we might change this in the future.. Who knows.
         end
         
         ################</diff>
      <filename>lib/ionize/translate/function_args.rb</filename>
    </modified>
    <modified>
      <diff>@@ -55,7 +55,6 @@ module Ionize
             [:lasgn, var, [expr]]
           end          
         end
-
       end
     end
   end</diff>
      <filename>lib/ionize/translate/rewritable.rb</filename>
    </modified>
    <modified>
      <diff>@@ -6,6 +6,16 @@ load 'ionize/translate/term_statements.rb'
 load 'ionize/translate/composite_string_statements.rb'
 load 'ionize/translate/rails_for_php.rb'
 
+Object.class_eval do
+  def to_id
+    if is_a? String
+      to_sym
+    else
+      self
+    end
+  end
+end
+
 module Ionize
   module Php
     module Translate
@@ -34,8 +44,14 @@ module Ionize
 
         # TODO: This is such a stupid name for a node 
         def handle_regular_fun_call(node)
+          # TODO: Move rewrites into it's own pass,
+          # instead of injecting it into this one..
           Rewrites.new(self).handle_regular_fun_call(node)
         end
+
+        def handle_class_method_call(node)
+          [:call, [:const, transform(node.first).to_id], transform(node.third).to_id, transform(node.fifth)]
+        end
         
         def handle_multiple_variables(node)
           first = transform(node.first)
@@ -99,24 +115,20 @@ module Ionize
           [:vcall, :exit]
         end
 
-        def handle_require_once(node)
-          :require_once
-        end
-
         def handle_require_statement(node)
-          [:fcall, transform(node.first), [:array, transform(node.second)]]
+          [:fcall, :require, [:array, transform(node.second)]]
         end        
 
-        def handle_include(node)
-          :include
+        def handle_require_once_statement(node)
+          [:fcall, :require, [:array, transform(node.second)]]
         end
 
-        def handle_include_once(node)
-          :include_once
+        def handle_include_statement(node)
+          [:fcall, :load, [:array, transform(node.second)]]
         end
 
-        def handle_include_statement(node)
-          [:fcall, transform(node.first), [:array, transform(node.second)]]
+        def handle_include_once_statement(node)
+          [:fcall, :load, [:array, transform(node.second)]]
         end
 
         def handle_for_statement(node)
@@ -192,18 +204,34 @@ module Ionize
         #####################
 
         def handle_new_object(node)
-          [:call, transform(node.second), :new]
+          [:call, [:const, transform(node.second).to_id], :new]
+        end
+
+        def handle_new_variable_class_object(node)
+          [:call, 
+           [:call,
+            [:const, :Object], :const_get,
+            [:array, transform(node.second)]], :new]
         end
 
         def handle_class_statement(node)
-          [:class, transform(node.second).to_sym, nil, 
-           [:scope, transform(node[3]).to_block]]
+          [:class, transform(node.second).to_id, nil, 
+           [:scope, transform(node.fourth).to_block]]
+        end
+
+        def handle_class_extends_statement(node)
+          [:class, transform(node.second).to_id, [:const, transform(node.fourth).to_id],
+           [:scope, transform(node[5]).to_block]]          
         end
 
         def handle_class_var_statement(node)
           [:fcall, :attr_accessor, [:array, [:lit, transform(node.second).last]]]
         end
 
+        def handle_class_var_with_default_statement(node)
+          [:fcall, :attr_accessor, [:array, [:lit, transform(node.second).last], transform(node.fourth)]]
+        end
+
         def handle_braced_statements(node)
           transform(node.second)
         end
@@ -217,7 +245,7 @@ module Ionize
         end
 
         def handle_user_constant(node)
-          [:const, transform(node).to_sym]
+          [:const, transform(node).to_id]
         end
 
         def handle_word(node)
@@ -240,7 +268,7 @@ module Ionize
           if result.is_a? Array
             result
           else
-            [:lvar, result.gsub(&quot;$&quot;, &quot;&quot;).to_sym]
+            [:lvar, result.gsub(&quot;$&quot;, &quot;&quot;).to_id]
           end
         end
 
@@ -248,7 +276,7 @@ module Ionize
           if node == &quot;.=&quot;
             :&lt;&lt;
           else
-            node.to_sym
+            node.to_id
           end
         end
 
@@ -319,6 +347,10 @@ module Ionize
           [:call, transform(node.first), :[], [:array, transform(node.second)]]
         end
 
+        def handle_braced_lookup(node)
+          [:call, transform(node.first), :[], [:array, transform(node.third)]]          
+        end
+
         def handle_paren_expr(node)
           transform(node.second)
         end
@@ -340,7 +372,7 @@ module Ionize
         end
 
         def handle_paren_cast(node)
-          type = (&quot;to_&quot; + transform(node.second).to_s).to_sym
+          type = (&quot;to_&quot; + transform(node.second).to_s).to_id
           term = transform(node.fourth)
 
           [:call, term, type]
@@ -368,15 +400,15 @@ module Ionize
             function_block = [:block, parameters, body]
           end
 
-          [:defn, node.second.to_a.first.second.to_sym, 
+          [:defn, node.second.to_a.first.second.to_id, 
            [:scope, function_block]]
         end
         
         def handle_variable(node)
-          result = node.gsub(&quot;$&quot;, &quot;&quot;).to_sym
+          result = node.gsub(&quot;$&quot;, &quot;&quot;).to_id
 
           if self.globals.include? result
-            [:gvar, (&quot;$&quot; + result.to_s.gsub(&quot;$&quot;, &quot;&quot;)).to_sym]
+            [:gvar, (&quot;$&quot; + result.to_s.gsub(&quot;$&quot;, &quot;&quot;)).to_id]
           else
             [:lvar, result]
           end
@@ -424,7 +456,6 @@ module Ionize
           
           multiple_statements do
             first, second = transform(node.first), transform(node.second)
-            debug &quot;Multiple statements: first #{first.inspect}, second #{second.inspect}&quot;
             result = if second.composite_node?
                        if first.composite_node?
                          first + second
@@ -435,15 +466,11 @@ module Ionize
                        [first, second]
                      end
             
-            debug &quot;Multiple statements: result #{result.inspect}&quot;
             final_result = if level == 1
                              [:block] + result
                            else
                              result
-                           end
-            
-            debug &quot;Multiple statements: final #{result.inspect}&quot;
-
+                           end            
             final_result
           end        
         end
@@ -454,20 +481,30 @@ module Ionize
         ################
 
         def handle_oo_assign(node)
-          term = transform(node.first)
-          term.shift # discard leading :call
-          assigned = term.pop.to_s + &quot;=&quot; # pop off assigned to var
-          expr = transform(node.third)
-          
-          object = if term.first == [:lvar, :this]
-                     [:self]
-                   else
-                     term.first
-                   end
+          debug &quot;The oo assign node is #{node.inspect}&quot;
+          # TODO: Pretty this up some.. If possible..
+          object = transform(node.first)
 
+          debug &quot;The object to be set is #{object.inspect}&quot;
+          object.shift # discard leading :call
+
+          attribute = object.pop
+          debug &quot;The attribute to be set is #{attribute.inspect}&quot;
+          
+          assigned = attribute.to_s + &quot;=&quot; # pop off assigned to var
+          expr = transform(node.fifth)
           
+          # TODO: Move this rewrite to the Rewrites class
+          object = (if object.first == [:lvar, :this] then [:self] else object.first end)
 
-          [:attrasgn, object, assigned.to_sym, [:array, expr]]
+          [:attrasgn, object, assigned.to_id, [:array, expr]]
+        end
+        
+        def handle_oo_array_assign(node)
+          [:attrasgn, 
+           [:call, transform(node.first), transform(node.third).to_id], 
+           :[]=, 
+           [:array, transform(node.fifth), transform(node[7])]]
         end
 
         def handle_oo_variable_variable_assign(node)
@@ -476,25 +513,30 @@ module Ionize
 
         def handle_oo_variable(node)
           term = transform(node.first) 
+          # TODO: Move this rewrite to the Rewrites class
           object = (if term == [:lvar, :this] then [:self] else term end)
-          [:call, object, transform(node.third).to_sym]
+          [:call, object, transform(node.second).to_id]
         end
 
-        def handle_oo_array_lookup(node)
-          [:call, 
-           [:call, transform(node.first), transform(node.third).to_sym], :[], [:array, transform(node.fifth)]]
+        def handle_single_oo_fragment(node)
+          transform(node.second)
         end
 
+        def handle_oo_array_lookup(node)          
+          [:call, transform(node.first), :[], [:array, transform(node.third)]]
+        end
+        
         def handle_oo_expr(node)
-          transform(node.first)
+           transform(node)
         end
 
-        def handle_oo_fun_call(node)
+        def handle_oo_call(node)
+          puts &quot;oo call node is #{node.inspect}&quot;
           [:call, transform(node.first)] + transform(node.third)
         end
 
         def handle_oo_regular_fun_call(node)
-          [transform(node.first).to_sym, transform(node.third)]
+          [transform(node.first).to_id, transform(node.third)]
         end
         
         ################</diff>
      <filename>lib/ionize/translate/statements.rb</filename>
    </modified>
    <modified>
      <diff>@@ -53,6 +53,11 @@ module Ionize
           [:hash, transform(node.first), transform(node.third)]
         end
 
+        def handle_reference_term(node)
+          # For now, I say screw references..
+          transform(node.rest)
+          # TODO: But we might change this in the future.. Who knows.
+        end
 
         { &quot;plus&quot;          =&gt; :+,
           &quot;minus&quot;         =&gt; :-,</diff>
      <filename>lib/ionize/translate/term_statements.rb</filename>
    </modified>
    <modified>
      <diff>@@ -24,10 +24,10 @@ module Ionize
         end
 
         def send(method, arg)
-          if methods.grep(Regexp.new(method.to_s))
+          if methods.include? &quot;handle_#{method}&quot;
             __send__(&quot;handle_#{method}&quot;, arg)
           else
-            raise &quot;Couldn't find handler for #{method} in module #{self.name}&quot;
+            raise &quot;Couldn't find handler for #{method.inspect} in class #{self.class.name} for argument #{arg.inspect}&quot;
           end
         end
 </diff>
      <filename>lib/ionize/translate/translator.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,8 @@
 #!/usr/bin/env ruby
+
+# We're in development mode
+$DEV = true
+
 # File: script/console
 irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
 
@@ -7,4 +11,5 @@ libs =  &quot; -r irb/completion&quot;
 # libs &lt;&lt; &quot; -r #{File.dirname(__FILE__) + '/../lib/console_lib/console_logger.rb'}&quot;
 libs &lt;&lt;  &quot; -r #{File.dirname(__FILE__) + '/../lib/ionize.rb'}&quot;
 puts &quot;Loading ionize gem&quot;
+
 exec &quot;#{irb} #{libs} --simple-prompt&quot;</diff>
      <filename>script/console</filename>
    </modified>
    <modified>
      <diff>@@ -34,7 +34,6 @@ describe &quot;Transforms Php for miscellaneous functions&quot; do
     php_ast(%Q{ function_exists('file_get_contents'); }).should ==
       ruby_ast(%Q{ respond_to? 'file_get_contents' })
   end
-
 end
 
 describe &quot;Transforms Php for miscellaneous functions&quot; do</diff>
      <filename>spec/php_environment_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -11,16 +11,20 @@ describe &quot;Parsing Php&quot; do
     lambda { Ionize::Php.to_ast(text) }
   end
 
+  def parsing_file(filename)
+    parsing(File.read(filename))
+  end
+
   def parsing_fixture(filename)
-    parsing(File.read(&quot;spec/fixtures/#{filename}&quot;))
+    parsing_file(&quot;spec/fixtures/#{filename}&quot;)
   end
 
   it &quot;parses hello world as&quot; do
-    parsing(%Q{ print(&quot;Hello World!&quot;); }).should_not raise_error
+    parsing(%q{ print(&quot;Hello World!&quot;); }).should_not raise_error
   end  
 
   it &quot;parses a variable right next to a keyword&quot; do
-    parsing(%Q{ print$buffer; }).should_not raise_error
+    parsing(%q{ print$buffer; }).should_not raise_error
   end
 
   it &quot;parses a preop and an op in one line&quot; do
@@ -43,6 +47,14 @@ describe &quot;Parsing Php&quot; do
     parsing(%q{ $email{$i}; }).should_not raise_error
   end
 
+  it &quot;parses a class method call&quot; do
+    parsing(%q{ MyClass::call($variable); }).should_not raise_error
+  end
+
+  it &quot;parses a reference to an expression&quot; do
+    parsing(%q{ $obj =&amp; new $classname; }).should_not raise_error
+  end
+
   it &quot;parses an empty if else&quot; do
     parsing(%q{ if (true); else echo &quot;whatever&quot;; }).should_not raise_error
   end
@@ -55,29 +67,14 @@ describe &quot;Parsing Php&quot; do
     parsing(%q{ $default_val = &quot;$attributes[default]&quot;; }).should_not raise_error
   end
 
-  it &quot;parses a heredoc&quot; do 
-    code = %Q{
-$something =&lt;&lt;&lt;EOF
-okay
-EOF;
-}
-    parsing(code).should_not raise_error
-  end
- 
-  it &quot;parses an empty if else within an empty if else&quot; do
-    parsing(%q{
-if ($cond1);
-else 
-  if ($cond2);
-  else 
-    $regs[1] = &quot;&quot;;    
-}).should_not raise_error
-  end
-
   it &quot;parses an echo statement with a one line if statement&quot; do
     parsing(%q{ if($sql_debug) echo &quot;SQL query: &quot;; }).should_not raise_error
   end  
 
+  it &quot;parses multi oo expr&quot; do
+    parsing(%q{ $this-&gt;installer-&gt;config-&gt;getRegistry(); }).should_not raise_error
+  end
+
   it &quot;parses a complicated string&quot; do
     parsing(%q{ echo &quot;&lt;!-- tinyMCE --&gt;
 			&lt;script language=\&quot;javascript\&quot; type=\&quot;text/javascript\&quot; src=\&quot;includes/tiny_mce/tiny_mce.js\&quot;&gt;&lt;/script&gt;&quot;;}).should_not raise_error
@@ -93,11 +90,32 @@ else
 
   Dir['spec/fixtures/*.php'].each do |fixture|
     it &quot;parses #{fixture}&quot; do
-      parsing_fixture(fixture.split(&quot;/&quot;).last).should_not raise_error
+      parsing_file(fixture).should_not raise_error
     end
   end
 
   it &quot;parses PHP-NUKE's SQL Layer&quot; do
     parsing_fixture(&quot;php_nuke/sql_layer.php&quot;).should_not raise_error
   end
+  
+
+  it &quot;parses a heredoc&quot; do 
+    code = %q{
+$something =&lt;&lt;&lt;EOF
+okay
+EOF;
+}
+    parsing(code).should_not raise_error
+  end
+ 
+  it &quot;parses an empty if else within an empty if else&quot; do
+    parsing(%q{
+if ($cond1);
+else 
+  if ($cond2);
+  else 
+    $regs[1] = &quot;&quot;;    
+}).should_not raise_error
+  end
+
 end</diff>
      <filename>spec/php_parser_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -97,7 +97,43 @@ describe &quot;Transforms Php&quot; do
       ruby_ast(%q{ id = 0; other = mysql_close(id) rescue nil })
   end
 
-  it &quot;transforms an oo variable variable assignment&quot; do
+  it &quot;transforms a require_once into just a require&quot; do
+    php_ast(%q{ require_once &quot;PEAR.php&quot;; }).should ==
+      ruby_ast(%q{ require &quot;PEAR.php&quot; })
+  end
+
+  it &quot;transforms an include_once into a load&quot; do
+    php_ast(%q{ include_once &quot;PEAR.php&quot;; }).should ==
+      ruby_ast(%q{ load &quot;PEAR.php&quot; })
+  end
+
+  it &quot;transforms an include into a load&quot; do
+    php_ast(%q{ include &quot;PEAR.php&quot;; }).should ==
+      ruby_ast(%q{ load &quot;PEAR.php&quot; })
+  end
+
+  it &quot;transforms a class inheritance&quot; do
+    php_ast(%q{ class Something extends Another { var $foo; } }).should ==
+      ruby_ast(%q{ class Something &lt; Another; attr_accessor :foo; end })
+  end
+
+  it &quot;transforms a class variable default into an attr_access_with_default&quot; do
+    php_ast(%q{ class Something { var $foo = &quot;string&quot;; } }).should ==
+      ruby_ast(%q{ class Something; attr_accessor(:foo, &quot;string&quot;); end })
+  end
+
+  it &quot;transforms a braced lookup into a regular array-style lookup&quot; do
+    php_ast(%q{ $var = &quot;string&quot;; $var{0}; }).should ==
+      ruby_ast(%q{ var = &quot;string&quot;; var[0]; })
+  end
+
+  it &quot;transforms an object attribute array assignment&quot; do
+    php_ast(%q{ $method = 3; $classname = &quot;Object&quot;; $var = thing(); $var-&gt;attr[$method] = $classname; }).should ==
+      ruby_ast(%q{ method = 3; classname = &quot;Object&quot;; var = thing(); var.attr[method] = classname })
+  end
+
+
+  it &quot;transforms an object dynamic variable assignment&quot; do
     # In php, you can do this:
     #
     #   $var = &quot;foo&quot;;
@@ -108,15 +144,15 @@ describe &quot;Transforms Php&quot; do
     #   $obj-&gt;foo == &quot;bar&quot; 
     #
     # would be true
-    #
-    
+    #    
+    # TODO: Change this to a #send
     php_ast(%q{ $var = &quot;foo&quot;; $obj = new Object; $obj-&gt;$var = &quot;something&quot;; }).should ==
       ruby_ast(%q{ var = &quot;foo&quot;; obj = Object.new; obj[var] = &quot;something&quot; })
   end
 
   it &quot;transforms an array lookup on an object&quot; do
-    php_ast(%Q{ $user = new User; $user-&gt;data['user_id']; }).should ==
-      ruby_ast(%Q{ user = User.new; user.data[&quot;user_id&quot;] })
+    php_ast(%q{ $user = new User; $user-&gt;data['user_id']; }).should ==
+      ruby_ast(%q{ user = User.new; user.data[&quot;user_id&quot;] })
   end
 
   it &quot;transforms a while loop&quot; do 
@@ -139,6 +175,16 @@ describe &quot;Transforms Php&quot; do
       ruby_ast(%q{ some = yup(); some.thing = &quot;other&quot; })
   end
 
+  it &quot;transforms a multiple oo function call&quot; do
+    php_ast(%q{ $obj = new Object(); $obj-&gt;installer-&gt;something(1); }).should ==
+      ruby_ast(%q{ obj = Object.new; obj.installer.something(1) })
+  end
+
+  it &quot;transforms a multiple oo attribute&quot; do
+    php_ast(%q{ $obj = new Object(); obj-&gt;installer-&gt;something-&gt;config; }).should ==
+      ruby_ast(%q{ obj = Object.new; obj.installer.something.config })
+  end
+
   it &quot;transforms a return&quot; do
     php_ast(%q{ return $this-&gt;result; }).should == 
       ruby_ast(%q{ return self.result })
@@ -198,6 +244,16 @@ describe &quot;Transforms Php&quot; do
       ruby_ast(%q{ def db_add_column(ret, table, column, type, attributes = array()); print 'something'; end })
   end
 
+  it &quot;transforms a class method call&quot; do
+    php_ast(%q{ MyClass::foo(1, 'bar', 'baz'); }).should ==
+      ruby_ast(%Q{ MyClass.foo(1, 'bar', 'baz') })
+  end
+
+  it &quot;transforms a variable class name to a const_get&quot; do
+    php_ast(%q{ $classname = &quot;Foo&quot;; obj =&amp; new $classname; }).should == 
+      ruby_ast(%q{ classname = &quot;Foo&quot;; obj = Object.const_get(classname).new })
+  end
+
   it &quot;transforms an if statement&quot; do
     php_file_matches_ruby_file(&quot;if&quot;)
   end
@@ -205,6 +261,7 @@ describe &quot;Transforms Php&quot; do
   it &quot;transforms a class definition&quot; do
     php_file_matches_ruby_file(&quot;class_def&quot;)
   end
+  
 
   it &quot;transforms a function with an if statement&quot; do
     php_file_matches_ruby_file(&quot;fun_with_if&quot;)    </diff>
      <filename>spec/php_translator_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>d4f192aeda76575022f8b0ec34e13eaaaee4a406</id>
    </parent>
  </parents>
  <author>
    <name>Robin Hoode</name>
    <email>robinhoode@sorceror.(none)</email>
  </author>
  <url>http://github.com/farleyknight/ionize/commit/965eebe35e4a82492d2380ec3a868ff18c44bb93</url>
  <id>965eebe35e4a82492d2380ec3a868ff18c44bb93</id>
  <committed-date>2008-08-20T02:36:30-07:00</committed-date>
  <authored-date>2008-08-20T02:36:30-07:00</authored-date>
  <message>Intermediate (probably broken) commit</message>
  <tree>834781da9aa2871b5d7c819644bce78924306efc</tree>
  <committer>
    <name>Robin Hoode</name>
    <email>robinhoode@sorceror.(none)</email>
  </committer>
</commit>
