projects/06/assembler/SymbolTable.php
/**
     * Adds the pair to the table, generates an address if needed.
     */
Adds the pair to the table, generates an address if needed.
Adds the pair to the table generates an address if needed .
public function addEntry($symbol, $address = false)
    {
        if ($address === false) {
            $address = $this->next_variable;
            $this->next_variable++;
        }
        $this->symbols[$symbol] = $address;
        return $address;
    }
public function addEntry ( $ symbol , $ address = false ) { if ( $ address === false ) { $ address = $ this -> next_variable ; $ this -> next_variable ++ ; } $ this -> symbols [ $ symbol ] = $ address ; return $ address ; }
Adds the pair to the table, generates an address if needed.
Adds the pair to the table generates an address if needed .
// Create the address.