Giter Club home page Giter Club logo

peg-parser's Introduction

xonsh-parser

Xonsh parser using CPython's PEGen grammar

build codecov PyPI version


Documentation: https://jnoortheen.github.io/xonsh-parser/

Source Code: https://github.com/jnoortheen/xonsh-parser

Benchmarks: https://xonsh.github.io/peg-parser/dev/bench/


Development

Setup environment

  • You can use any PEP-621 supported tools like PDM, Hatch ... to manage the development environment and production build.
# install development deps
pip install -e ".[dev,test,docs]"
# setup linters,formatters etc.,
pre-commit install
  • We use Taskfile to manage development tasks.
task test

# to watch for changes and run tests
task test --watch -- -x --ff

# release a new version
task release

Workflow

  1. Explore the PEG grammar notations from the following pages
    a. https://we-like-parsers.github.io/pegen/
    b. https://devguide.python.org/internals/parser/
  2. Edit the xonsh.gram while adding any new actions to subheader.py
  3. Test the new changes with task test as the parser.py will get autogenerated
  4. You can force regeneration with task generate -f

License

This project is licensed under the terms of the MIT license.

Credits

peg-parser's People

Contributors

jnoortheen avatar

Stargazers

Jorge Gomez avatar Andy Kipp avatar

Watchers

Andy Kipp avatar  avatar  avatar

Forkers

jnoortheen

peg-parser's Issues

repo access

@gforsyth I want to configure some CI services for this repo. I currently don't have settings access to this repo. Could you enable it ?

  • Discussions
  • cod-coverage
  • cod-speed - or pytest-benchmark results with github pages

Add `@` as alternative to `__xonsh__`

It will be cool to have this:

@
# <xonsh.built_ins.XonshSession at 0x1064fd9a0>

@?
# XonshSession doc string with description @.env, @.imp, @.last, @.history, etc.

@.env                                    # instead of `__xonsh__.env` and forget about `${...}`
@.history                                # instead of `__xonsh__.history`
@.imp.json.loads('{}')                   # https://github.com/xonsh/xonsh/pull/5595

with @.env.swap(SOMEVAR='foo'):
     echo $SOMEVAR

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.