Giter Club home page Giter Club logo

Comments (7)

dabeaz avatar dabeaz commented on July 21, 2024 1

Regrettably, I'm not able to help with course assignments or projects that happen to use PLY. For the specific issue at hand in this bug report, if you want to return multiple things from a grammar rule, you need to use some kind of container (list, tuple, etc.) and assign that to p[0].

from ply.

dabeaz avatar dabeaz commented on July 21, 2024 1

I'd look at Crafting Interpreters (https://craftinginterpreters.com).

from ply.

dabeaz avatar dabeaz commented on July 21, 2024

It doesn't work?

from ply.

euleriscoding avatar euleriscoding commented on July 21, 2024

Yes but there are two problems in the code. I'm not sure if the above code works properly because I can't test it. To tell about main issue takes long time and I can't write all of that in a comment line, so, let me share with you the link of the question in stack overflow where I describe what is the problem. Here is link

from ply.

euleriscoding avatar euleriscoding commented on July 21, 2024

First of all, thank you for your immediate attention. If I hadn't tried every way I could think of, I wouldn't have asked you for help for my project. About other Issue, I got that the code shown above is correct for assingment. Did you mean it?

from ply.

dabeaz avatar dabeaz commented on July 21, 2024

If you're assigning multiple values to p[0], you need to use a tuple or list:

p[0] = (p[1], p[2])

or something similar.

from ply.

euleriscoding avatar euleriscoding commented on July 21, 2024

Thanks a lot. Are there any examples for AST construction that I can study on?

from ply.

Related Issues (20)

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.