public function generate($document)
    {
        $lexer = new Lexer();
        $tokenStream = $lexer->tokenize($document);
        $tokenParser = new TokenParser();
        $nodeStream = $tokenParser->parse($tokenStream);
        $nodeParser = new NodeParser();
        $this->classBuilder = $nodeParser->parse($nodeStream);
        $compiler = new Compiler($this->options);
        $this->streamWriter = $compiler->compile($this->classBuilder);

        return $this;
    }
public function generate($document)
    {
        $lexer = new Lexer();
        $tokenStream = $lexer->tokenize($document);
        $tokenParser = new TokenParser();
        $nodeStream = $tokenParser->parse($tokenStream);
        $nodeParser = new NodeParser();
        $this->classBuilder = $nodeParser->parse($nodeStream);
        $compiler = new Compiler($this->options);
        $this->streamWriter = $compiler->compile($this->classBuilder);

        return $this;
    }
public function generate ( $ document ) { $ lexer = new Lexer ( ) ; $ tokenStream = $ lexer -> tokenize ( $ document ) ; $ tokenParser = new TokenParser ( ) ; $ nodeStream = $ tokenParser -> parse ( $ tokenStream ) ; $ nodeParser = new NodeParser ( ) ; $ this -> classBuilder = $ nodeParser -> parse ( $ nodeStream ) ; $ compiler = new Compiler ( $ this -> options ) ; $ this -> streamWriter = $ compiler -> compile ( $ this -> classBuilder ) ; return $ this ; }
Generate a PHP class from .pcg content

@param string $document

@return ClassGenerator
Generate a PHP class from . pcg content