1
0
mirror of https://github.com/danog/PHP-Parser.git synced 2025-01-22 13:51:12 +01:00
2011-05-30 22:15:17 +02:00
2011-05-30 22:15:17 +02:00
2011-05-30 22:15:17 +02:00
2011-05-30 22:11:11 +02:00
2011-05-27 18:54:01 +02:00
2011-05-30 19:21:25 +02:00
2011-05-30 19:21:25 +02:00

This is a PHP parser written in PHP.

This project is work in progress, but it basically works and was tested on a large code base.

Usage:

    $parser = new Parser();
    $stmts = $parser->yyparse(
        new Lexer('<?php // some code'),
        function($msg) {
            // this is the error callback, which is fired in case of
            // a parse error. It is passed the error message.
            echo $msg, "\n";
        }
    );

    // the return value of Parser->yyparse will either be false (which
    // signifies that an error occured) or an array of statements (Nodes)
    if (false !== $stmts) {
        // dump nodes
        $nodeDumper = new NodeDumper();
        echo $nodeDumper->dump($stmts);
    }
Description
No description provided
Readme BSD-3-Clause 6.2 MiB
Languages
PHP 90.6%
Yacc 9.4%