Running Coder update:Warning: Unexpected character in input: ''' (ASCII=39) state=1 in C:\wamp\www\drupal7\sites\all\libraries\grammar_parser\engine\reader.inc on line 3127

Comments

solotandem’s picture

Project: Grammar Parser Library » Grammar Parser
Version: 7.x-1.0 » 7.x-1.x-dev

What version of grammar parser are you running?

Would you attach a small text file with (or paste) several lines surrounding line 3127, so I have some context?

nancydru’s picture

; Information added by drupal.org packaging script on 2011-08-18
version = "7.x-1.2"
core = "7.x"
project = "grammar_parser"
datestamp = "1313631716"
  /**
   * Sets the code snippet to be parsed.
   *
   * TODO Why would tokens need to be shared among classes?
   *
   * @param string $snippet
   *   A code snippet string.
   */
  public function setSnippet(&$snippet = NULL) {
    // Clear tokens.
    $this->clearArray($this->tokens);
    $this->resetTokens();
    if ($snippet) {
      $this->tokens = token_get_all($snippet);
    }
  }
solotandem’s picture

Category: bug » support

Line 3127 is token_get_all($snippet). So, what module or project were you running through coder upgrade? This error would seem to indicate one of the files in that project is poorly formatted, or has invalid syntax. At this point, it does not appear to be a bug with the grammar parser.

nancydru’s picture

Sitedoc. If you tell what the error is, I'll be happy to fix it.

solotandem’s picture

I ran the module through the grammar parser 7.x-1.2 and it works without a hitch. That would lead me to conclude this error is related to your server setup.

FYI, unless you just want to take time to debug this, you could run this code through the upgrade site for the incredible bargain of $5. It will do a nice job.

nancydru’s picture

Windows XP, SP2
Apache 2.2.1
MySql 5.5.20
PHP 5.2.9-2

I've already started converting it manually. No one has offered the $5, and Boombatower makes more than I do.

solotandem’s picture

Status: Active » Fixed
nancydru’s picture

Status: Fixed » Closed (works as designed)