Git Product home page Git Product logo

Comments (6)

philip-h-dye avatar philip-h-dye commented on July 21, 2024

docopt-parser includes PEG grammar for the docopt language completed and working with Arpeggio's clean peg parser.

The grammar is docopt.peg. The python test code is parser.py.

from docopt-ng.

itdaniher avatar itdaniher commented on July 21, 2024

Oohh Exciting! This was a big dream of mine when I was working with the codebase last, thanks!

from docopt-ng.

itdaniher avatar itdaniher commented on July 21, 2024

This is so cool! I am extremely into this train of thought, the current parser is a nightmare - adding type hints and my 2019ish refactoring was an effort at adding sanity to a fundamentally insane-ish design. It's better than it was, but deserves more love - and a PEG sounds like just the thing.

from docopt-ng.

blaisep avatar blaisep commented on July 21, 2024

Hi @philip-h-dye , @itdaniher , I have a bit of time since I'm currently "available for employment" and new to jazzband.
Is this issue stalled at some stage? What is missing for it to move forward?
Is it a matter of including the grammar files from docopt-parser into a PR?
RTFMs gratefully accepted....

from docopt-ng.

NickCrews avatar NickCrews commented on July 21, 2024

@blaisep this is really late, but perhaps you or someone else still is motivated. I would totally merge this if it comes together fairly cleanly. I took a look at docopt-parser and it looks like it is a bit messy, so it won't be a simple matter of just copying stuff over.

I think steps would be:

  • create a new branch
  • add the .peg grammar files
  • add scripts/whatever to make it easy/reproducible to generate the .py parser from the .peg files. The generated parser should also be checked into git. It will need to stay in sync with the grammar files.
  • modify the existing docopt/__init__.py to use this generated parser instead of the custom parsing logic in there now.
  • ensure all existing tests pass. Maybe add some more tests if you think you are finding a new edge case.
  • submit a PR for this branch

I think you're going to have to be mostly self-directed for those stages, I can provide some help but don't really want to sink a ton of time into it.

from docopt-ng.

NickCrews avatar NickCrews commented on July 21, 2024

See EBNF grammar from docopts port: https://github.com/docopt/docopts/wiki/Home/443b839150f8aec2fc581f5a7a70b8bb7648d5c2

from docopt-ng.

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.