projects/06/assembler/Parser.php
/**
     * The value of the A command.
     */
The value of the A command.
The value of the A command .
public function symbol()
    {
        $cmd = $this->commands[$this->current_command];
        $symbol = substr($cmd, 1);
        if (is_numeric($symbol)) {
            return $symbol;
        }
        if ($this->symbols->contains($symbol)) {
            return $this->symbols->getAddress($symbol);
        }
        return $this->symbols->addEntry($symbol);
    }
public function symbol ( ) { $ cmd = $ this -> commands [ $ this -> current_command ] ; $ symbol = substr ( $ cmd , 1 ) ; if ( is_numeric ( $ symbol ) ) { return $ symbol ; } if ( $ this -> symbols -> contains ( $ symbol ) ) { return $ this -> symbols -> getAddress ( $ symbol ) ; } return $ this -> symbols -> addEntry ( $ symbol ) ; }
The value of the A command.
The value of the A command .
// remove the @ as the first character. // Already an address.