static function compile($code, $options = array())
  {
    $lexer = new Lexer($code, $options);

    if (isset($options['filename']))
    {
      Parser::$FILE = $options['filename'];
    }

    if (isset($options['tokens']))
    {
      $tokens = & $options['tokens'];
    }

    if (isset($options['trace']))
    {
      Parser::Trace(fopen($options['trace'], 'w', TRUE), '> ');
    }

    try
    {
      $parser = new Parser();

      foreach (($tokens = $lexer->tokenize()) as $token)
      {
        $parser->parse($token);
      }

      $js = $parser->parse(NULL)->compile($options);
    }
    catch (\Exception $e)
    {
      throw new Error("In {$options['filename']}, ".$e->getMessage());
    }

    if ( ! isset($options['header']) || $options['header'])
    {
       $js = '// Generated by CoffeeScript PHP ' . COFFEESCRIPT_VERSION . "\n" . $js;
    }

    return $js;
  }