public function parseExpression($exp)
    {
        $defineScope = false; // (local | global)
        $defineVar   = false; // var to define

        // extract defineScope from expression
        $exp = trim($exp);
        if (preg_match('/^(local|global)\s+(.*?)$/ism', $exp, $m)) {
            list(, $defineScope, $exp) = $m;
            $exp = trim($exp);
        }

        // extract varname and expression from remaining of expression
        list($defineVar, $exp) = $this->parseSetExpression($exp);
        if ($exp !== null) $exp = trim($exp);
        return array($defineScope, $defineVar, $exp);
    }
public function parseExpression($exp)
    {
        $defineScope = false; // (local | global)
        $defineVar   = false; // var to define

        // extract defineScope from expression
        $exp = trim($exp);
        if (preg_match('/^(local|global)\s+(.*?)$/ism', $exp, $m)) {
            list(, $defineScope, $exp) = $m;
            $exp = trim($exp);
        }

        // extract varname and expression from remaining of expression
        list($defineVar, $exp) = $this->parseSetExpression($exp);
        if ($exp !== null) $exp = trim($exp);
        return array($defineScope, $defineVar, $exp);
    }
public function parseExpression ( $ exp ) { $ defineScope = false ; // (local | global) $ defineVar = false ; // var to define // extract defineScope from expression $ exp = trim ( $ exp ) ; if ( preg_match ( '/^(local|global)\s+(.*?)$/ism' , $ exp , $ m ) ) { list ( , $ defineScope , $ exp ) = $ m ; $ exp = trim ( $ exp ) ; } // extract varname and expression from remaining of expression list ( $ defineVar , $ exp ) = $ this -> parseSetExpression ( $ exp ) ; if ( $ exp !== null ) $ exp = trim ( $ exp ) ; return array ( $ defineScope , $ defineVar , $ exp ) ; }
Parse the define expression, already splitted in sub parts by ';'.
Parse the define expression already splitted in sub parts by ; .