Giter Site home page Giter Site logo

phpparser's People

Contributors

sidharthkuruvila avatar

Watchers

 avatar  avatar

phpparser's Issues

Contact

I've a offer Please contact me 

Thanks

Original issue reported on code.google.com by [email protected] on 18 Sep 2014 at 8:43

Refine token names

Would you consider some minor refinements to the symbol names you are
using? This would clarify the generated code.
At issue: Your use of the word "Brace".  So far as I am aware, Brace always
refers to a curly bracket: {}, and *never* to a round bracket as you have
it in your symbols. See other grammars, wikipedia etc to see if you agree
(I also checked four PHP books, all refer to {} as braces.).
By contrast, "bracket" can apply to any of the ()[]{} or <>, with
adjectives: round, square, curly and angle.

Anyhow, I suggest the following:
LParen, RParen for left and right ( ) (Round parentheses)
LSquare, RSquare for [ ] (Square brackets)
LCurly, RCurly for { }   (Curly braces)

I *think* this should be unambiguous, and matches well with other grammars.

-- Graham

Original issue reported on code.google.com by [email protected] on 28 May 2009 at 2:12

final keword

Please check:

class C extends A {
final function X() {}
}

final keyword is not interpreted as a separate constant and it should.
right now you have to catch it from PhpLexer.UnquotedString constant.

Original issue reported on code.google.com by [email protected] on 12 Aug 2010 at 8:43

If..else problem

When trying to parse the code below:
    if ($this->getRequest()->isPost()) {
        $formData = $this->getRequest()->getPost();
        if ($form->isValid($formData)) {
            ...
        } else {
            ...
        }
    } else {
        $id = $this->_request->getParam('id', 0);
        if ($id > 0) {
            ...
        }
    }

It throws MismatchedTokenException 'else' at the line with second else.

Original issue reported on code.google.com by [email protected] on 23 Jan 2010 at 11:46

Optional Default of Switch not handled

The following code does not parse

switch ($i) {
    case 0:
        echo "i égal 0";
        break;
    case 1:
        echo "i égal 1";
        break;
    case 2:
        echo "i égal 2";
        break;
}

We fixed it by updating the cases rule:

cases 
    : casestatement*  defaultcase?
    ;

Original issue reported on code.google.com by [email protected] on 25 Sep 2012 at 3:36

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.