A set of tools for lexical and syntactical analysis written in pure PHP.

Overview

Welcome to Dissect!

  • master build status - this branch always contains the last stable version.
  • develop build status - the unstable development branch.

Dissect is a set of tools for lexical and syntactical analysis written in pure PHP.

Documentation?

Here.

Comments
  • More specific error reporting

    More specific error reporting

    Changed lexer and exception so that it is able to accept additional parameters:

    • The token that caused the exception
    • The line in the original string that contained the erroneous token
    • The character position within that line where the token can be found
    opened by apalethorpe 2
  • Possible improvements

    Possible improvements

    Is it possible to not split Token and Regex for end-user? For example, define it as "Terminal" and check which Recognizer to choose internally in Dissect.

    What do you think about it?

    opened by cursedcoder 1
  • Composer issue

    Composer issue

    Hi,

    when you ship this (great, by the way) project to Packagist, could you remove the .git directory. It messes up my git installation by making your code as a submodule of my code that I have many pains to push.

    Each time I update I need to manually remove your .git directory, add all your files to my change list and then I can commit.

    Thanks

    opened by Hypoaristerolactotherapist 0
  • Replace double declaration of parameter

    Replace double declaration of parameter

    In PHP7, a function parameter cannot be declared twice. Since I am currently updating a project to PHP7 that makes use of this lib, I came across this error.

    opened by mweinreich 0
  • Composer always reports files are changed

    Composer always reports files are changed

    Every time I try and move from a git branch with this package installed to one that does not have it, I get an error that files in the package have changed.

    To test this I removed vendor/ and then ran composer install. This library is being required by lisachenko/go-aop-php which in turn was required by codeception/aspect-mock. This is the entry in composer.lock:

    {
        "name": "jakubledl/dissect",
        "version": "1.0.x-dev",
        "source": {
            "type": "git",
            "url": "https://github.com/jakubledl/dissect.git",
            "reference": "112ee99f32b0884821f7df4b93ba922461dcf916"
        },
        "dist": {
            "type": "zip",
            "url": "https://api.github.com/repos/jakubledl/dissect/zipball/112ee99f32b0884821f7df4b93ba922461dcf916",
            "reference": "112ee99f32b0884821f7df4b93ba922461dcf916",
            "shasum": ""
        },
        "require": {
            "php": ">=5.3.3"
        },
        "require-dev": {
            "symfony/console": "~2.1"
        },
        "suggest": {
            "symfony/console": "for the command-line tool"
        },
        "bin": [
            "bin/dissect.php",
            "bin/dissect"
        ],
        "type": "library",
        "autoload": {
            "psr-0": {
                "Dissect": [
                    "src/"
                ]
            }
        },
        "notification-url": "https://packagist.org/downloads/",
        "license": [
            "unlicense"
        ],
        "authors": [
            {
                "name": "Jakub Lédl",
                "email": "[email protected]"
            }
        ],
        "description": "Lexing and parsing in pure PHP",
        "homepage": "https://github.com/jakubledl/dissect",
        "keywords": [
            "ast",
            "lexing",
            "parser",
            "parsing"
        ],
        "time": "2013-01-15 19:48:58"
    }
    

    Immediately upon running composer install I cd vendor/jakubledl/dissect and run git status with this output:

    On branch 1.0
    Your branch is up-to-date with 'composer/1.0'.
    
    Changes not staged for commit:
      (use "git add <file>..." to update what will be committed)
      (use "git checkout -- <file>..." to discard changes in working directory)
    
        modified:   bin/dissect.php
    

    However upon opening bin/dissect.php there are no changes noted (or at least none recognised by my diff tool).

    Sadly I can't really suggest any further reasons why this might happening as it's never occured with another package and occurs every time I remove the package with this one, but I am submitting in case it's been spotted by anybody else.

    opened by M1ke 0
Owner
Jakub Lédl
Jakub Lédl
Deptrac is a static code analysis tool for PHP that helps you communicate, visualize and enforce architectural decisions in your projects

Deptrac is a static code analysis tool for PHP that helps you communicate, visualize and enforce architectural decisions in your projects. You can freely define your architectural layers over classes and which rules should apply to them.

QOSSMIC GmbH 2.2k Dec 30, 2022
PHP Static Analysis Tool - discover bugs in your code without running it!

PHPStan - PHP Static Analysis Tool PHPStan focuses on finding errors in your code without actually running it. It catches whole classes of bugs even b

PHPStan 11.6k Dec 30, 2022
Performs advanced static analysis on PHP code

PHP Analyzer Please report bugs or feature requests via our website support system ? in bottom right or by emailing [email protected]. Contri

Continuous Inspection 443 Sep 23, 2022
The Exakat Engine : smart static analysis for PHP

Exakat The Exakat Engine is an automated code reviewing engine for PHP. Installation Installation with the phar Phar is the recommended installation p

Exakat 370 Dec 28, 2022
A static php code analysis tool using the Graph Theory

Mondrian Ok guyz, you have a master degree in Graph Theory, you follow Law of Demeter and you live on S.O.L.I.D principles ? Let's have some Fun ! (^ω

Florent Genette 391 Nov 30, 2022
A static analysis tool for finding errors in PHP applications

Psalm Psalm is a static analysis tool for finding errors in PHP applications. Installation To get started, check out the installation guide. Live Demo

Vimeo 5k Jan 2, 2023
Static code analysis to find violations in a dependency graph

PhpDependencyAnalysis PhpDependencyAnalysis is an extendable static code analysis for object-oriented PHP-Projects to generate dependency graphs from

Marco Muths 546 Dec 7, 2022
A project to add Psalm support for Drupal for security testing, focused only on taint analysis.

psalm-plugin-drupal A Drupal integration for Psalm focused on security scanning (SAST) taint analysis. Features Stubs for sinks, sources, and sanitize

Samuel Mortenson 38 Aug 29, 2022
A static analysis tool for security

progpilot A static analyzer for security purposes Only PHP language is currently supported Installation Option 1: use standalone phar Download the lat

null 271 Dec 27, 2022
Static Analysis Results Baseliner

Static Analysis Results Baseliner (SARB) Why SARB Requirements Installing Using SARB Examples Further reading Why SARB? If you've tried to introduce a

Dave Liddament 151 Jan 3, 2023
Infection Static Analysis Plugin

Static analysis on top of mutation testing - prevents escaped mutants from being invalid according to static analysis

Roave, LLC 108 Jan 2, 2023
PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.

About PHP_CodeSniffer is a set of two PHP scripts; the main phpcs script that tokenizes PHP, JavaScript and CSS files to detect violations of a define

Squiz Labs 9.9k Jan 4, 2023
phpcs-security-audit is a set of PHP_CodeSniffer rules that finds vulnerabilities and weaknesses related to security in PHP code

phpcs-security-audit v3 About phpcs-security-audit is a set of PHP_CodeSniffer rules that finds vulnerabilities and weaknesses related to security in

Floe design + technologies 655 Jan 3, 2023
A collection of tools to help with PHP command line utilities

PHP Command Line Tools A collection of functions and classes to assist with command line development. Requirements PHP >= 5.3 Suggested PHP extensions

WP-CLI 651 Dec 21, 2022
Skeleton Application for Laminas API Tools

Laminas API Tools Skeleton Application Requirements Please see the composer.json file. Installation Via release tarball Grab the latest release via th

Laminas API Tools 43 Dec 8, 2022
A PHP parser written in PHP

PHP Parser This is a PHP 5.2 to PHP 8.0 parser written in PHP. Its purpose is to simplify static code analysis and manipulation. Documentation for ver

Nikita Popov 15.9k Jan 3, 2023
PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD. PHPMD can be seen as an user friendly frontend application for the raw metrics stream measured by PHP Depend.

PHPMD PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD. PHPMD can be seen as an user friendly

PHP Mess Detector 2.1k Jan 8, 2023
Search PHP source code for function & method calls, variables, and more from PHP.

Searching PHP source code made easy Search PHP source code for function & method calls, variable assignments, classes and more directly from PHP. Inst

Permafrost Software 22 Nov 24, 2022
Phan is a static analyzer for PHP. Phan prefers to avoid false-positives and attempts to prove incorrectness rather than correctness.

Phan is a static analyzer for PHP that prefers to minimize false-positives. Phan attempts to prove incorrectness rather than correctness. Phan looks f

null 5.4k Jan 7, 2023