expression.php
public function newVar($str) {
		$str = trim($str);
		
		// Try to make it a variable
		if (preg_match('/^[a-zA-Z0-9\'_][a-zA-Z0-9\'_-]*$/', $str))
			return new Atom(EXPR_VAR, $str);
		else {
			return false;
		}
	}
public function newVar($str) {
		$str = trim($str);
		
		// Try to make it a variable
		if (preg_match('/^[a-zA-Z0-9\'_][a-zA-Z0-9\'_-]*$/', $str))
			return new Atom(EXPR_VAR, $str);
		else {
			return false;
		}
	}
public function newVar ( $ str ) { $ str = trim ( $ str ) ; // Try to make it a variable if ( preg_match ( '/^[a-zA-Z0-9\'_][a-zA-Z0-9\'_-]*$/' , $ str ) ) return new Atom ( EXPR_VAR , $ str ) ; else { return false ; } }
Creates a new variable atom, subsequent to validating that the string
is correct for a variable

@param str the name of the variable
@return the newly created atom
Creates a new variable atom subsequent to validating that the string is correct for a variable