DiddiParser 2: The DiddiScript parser.

Overview

DiddiParser 2

Documentation Status Code style: black

The DiddiScript parser, written in Python.

Installation

DiddiParser2 can be installed via pip:

pip install diddiparser2

Usage

DiddiParser2 is mostly used as a command-line tool. To run a DiddiScript file, just run

diddiparser2 [filename]

Also, you can use python -m diddiparser2 instead of diddiparser2.

Comments
  • Improvements to the editor

    Improvements to the editor

    TODO:

    • [x] Use new tools for ordering the widgets (first of all, stop using grid)
    • [x] Provide "themes" and the option to customize it. Fixes #80
    • [x] Update the docs to give a useful guide to users
    opened by DiddiLeija 6
  • Treating the current CI failure with tests

    Treating the current CI failure with tests

    Describe the bug

    Since #144, the CI has been failing. Not sure why (because I didn't make any breaking change), but that failure is a serious blocker.

    To Reproduce

    Check out the affected PRs (see below). Please check the tests CI (e.g. Tests (ubuntu-latest, 3.10))

    Expected behavior

    The CI (to be precise, the tests) should not fail like that.

    Additional context

    Current list of affected PRs:

    • #144
    • #145
    • #146
    • #147
    • #148
    • #149
    • #150
    • #152
    type: bug 
    opened by DiddiLeija 5
  • The CI is broken, due to a dependency update

    The CI is broken, due to a dependency update

    Describe the bug

    Something went wrong after the last Sphinx update. This is mostly the tracker to fix this issue.

    To Reproduce

    Steps to reproduce the behavior:

    1. Just check the CI (try out https://github.com/DiddiLeija/diddiparser2/runs/5725796950?check_suite_focus=true)
    2. See the issue with black

    Expected behavior

    Nothing should happen after upgrading Sphinx, the CI must go well.

    Additional context

    This is the error message:

    nox > black --check .
    Traceback (most recent call last):
      File "/home/runner/work/diddiparser2/diddiparser2/.nox/lint/bin/black", line 8, in <module>
        sys.exit(patched_main())
      File "src/black/__init__.py", line 1423, in patched_main
      File "src/black/__init__.py", line 1409, in patch_click
    ImportError: cannot import name '_unicodefun' from 'click' (/home/runner/work/diddiparser2/diddiparser2/.nox/lint/lib/python3.9/site-packages/click/__init__.py)
    nox > Command black --check . failed with exit code 1
    nox > Session lint failed.
    
    type: bug 
    opened by DiddiLeija 5
  • Bump setuptools from 60.9.3 to 60.10.0

    Bump setuptools from 60.9.3 to 60.10.0

    Bumps setuptools from 60.9.3 to 60.10.0.

    Changelog

    Sourced from setuptools's changelog.

    v60.10.0

    Changes ^^^^^^^

    • #2971: Deprecated upload_docs command, to be removed in the future.
    • #3137: Use samefile from stdlib, supported on Windows since Python 3.2.
    • #3170: Adopt nspektr (vendored) to implement Distribution._install_dependencies.

    Documentation changes ^^^^^^^^^^^^^^^^^^^^^

    • #3144: Added documentation on using console_scripts from setup.py, which was previously only shown in setup.cfg -- by :user:xhlulu
    • #3148: Added clarifications about MANIFEST.in, that include links to PyPUG docs and more prominent mentions to using a revision control system plugin as an alternative.
    • #3148: Removed mention to pkg_resources as the recommended way of accessing data files, in favour of :doc:importlib.resources. Additionally more emphasis was put on the fact that package data files reside inside the package directory (and therefore should be read-only).

    Misc ^^^^

    • #3120: Added workaround for intermittent failures of backend tests on PyPy. These tests now are marked with XFAIL <https://docs.pytest.org/en/stable/how-to/skipping.html>_, instead of erroring out directly.
    • #3124: Improved configuration for :pypi:rst-linker (extension used to build the changelog).
    • #3133: Enhanced isolation of tests using virtual environments - PYTHONPATH is not leaking to spawned subprocesses -- by :user:befeleme
    • #3147: Added options to provide a pre-built setuptools wheel or sdist for being used during tests with virtual environments. Paths for these pre-built distribution files can now be set via the environment variables: PRE_BUILT_SETUPTOOLS_SDIST and PRE_BUILT_SETUPTOOLS_WHEEL.
    Commits
    • 02f3821 Bump version: 60.9.3 → 60.10.0
    • 5a0fbfb Fix towncrier command in tools/finalize
    • 98728b1 Enable CI for windows-2019 (#3168)
    • 8afae7f Just skip the most problematic test for PyPy on Windows
    • fb258ed Exclude PyPy+Windows from test matrix
    • a2e8ef9 [Docs] Improve documentation about migration from distutils (#3171)
    • 19609c0 Link packaging
    • 82141a2 Fix PEP 632 link display
    • c522737 Fix version of setuptools for default local distutils
    • 722e1fd [Docs] Improve documentation about migration from distutils
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies python blocked 
    opened by dependabot[bot] 4
  • Release 1.2.0

    Release 1.2.0

    It's finally time to cut a new DiddiParser2 release! I made several enhancements, I reworked the docs, and fixed several issues. By the way, this could be the last 1.x release, because I'm looking for a big change in the syntax!

    TODO:

    • [x] Update the changelog
    • [x] Cut the GitHub tag
    • [x] Publish the release to PyPI
    type: release tracker 
    opened by DiddiLeija 4
  • Removal of CodeQL?

    Removal of CodeQL?

    Is your feature request related to a problem? Please describe.

    CodeQL is the slowest step in our CI. And, thinking a bit further, it seems to be unecessary at the moment. So maybe it's just wasting time and space?

    Describe the solution you'd like

    Consider the removal of CodeQL setup.

    Describe alternatives you've considered

    Keep CodeQL, in case we'll need it soon.

    Additional context

    N/A

    type: enhancement 
    opened by DiddiLeija 3
  • Bump sphinx from 4.5.0 to 5.0.0

    Bump sphinx from 4.5.0 to 5.0.0

    Bumps sphinx from 4.5.0 to 5.0.0.

    Release notes

    Sourced from sphinx's releases.

    v5.0.0b1

    Changelog: https://www.sphinx-doc.org/en/master/changes.html

    Changelog

    Sourced from sphinx's changelog.

    Release 5.0.0 (released May 30, 2022)

    Dependencies

    5.0.0 b1

    • #10164: Support Docutils 0.18_. Patch by Adam Turner.

    .. _Docutils 0.18: https://docutils.sourceforge.io/RELEASE-NOTES.html#release-0-18-2021-10-26

    Incompatible changes

    5.0.0 b1

    • #10031: autosummary: sphinx.ext.autosummary.import_by_name() now raises ImportExceptionGroup instead of ImportError when it failed to import target object. Please handle the exception if your extension uses the function to import Python object. As a workaround, you can disable the behavior via grouped_exception=False keyword argument until v7.0.
    • #9962: texinfo: Customizing styles of emphasized text via @definfoenclose command was not supported because the command was deprecated since texinfo 6.8
    • #2068: :confval:intersphinx_disabled_reftypes has changed default value from an empty list to ['std:doc'] as avoid too surprising silent intersphinx resolutions. To migrate: either add an explicit inventory name to the references intersphinx should resolve, or explicitly set the value of this configuration variable to an empty list.
    • #10197: html theme: Reduce body_min_width setting in basic theme to 360px
    • #9999: LaTeX: separate terms from their definitions by a CR (refs: #9985)
    • #10062: Change the default language to 'en' if any language is not set in conf.py

    5.0.0 final

    • #10474: :confval:language does not accept None as it value. The default value of language becomes to 'en' now.

    Deprecated

    5.0.0 b1

    • #10028: jQuery and underscore.js will no longer be automatically injected into themes from Sphinx 6.0. If you develop a theme or extension that uses the jQuery, $, or $u global objects, you need to update your JavaScript or use the mitigation below.

    ... (truncated)

    Commits
    • 953002e Bump to 5.0.0 final
    • 3d3e932 Merge pull request #10463 from AA-Turner/fix-css-docutils-0-18
    • 9298b3e Update message catalogs
    • bdeb627 Merge pull request #10486 from tk0miya/fix_babel_extract_message
    • 16ca323 Fix imgconverter: Failed to extract translation messages
    • dc30920 Merge pull request #10481 from AA-Turner/lang-none-en
    • 2004149 Update test
    • 78c478a Merge remote-tracking branch 'upstream/5.0.x' into lang-none-en
    • 479e482 Update warning, revert my original warning patch
    • fb6db30 Update comment
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies python 
    opened by dependabot[bot] 3
  • Write more DSGPs

    Write more DSGPs

    We're currently working on a 2.0.0 release, so here I have some DSGPs to start.

    Desired DSGPs for this PR:

    • [x] DSGP 4: DiddiScript parser rules, version 2
    • [x] DSGP 5: First statements
    diddiscript: DSGP 
    opened by DiddiLeija 3
  • The DSGP 2 application is causing unexpected side-effects

    The DSGP 2 application is causing unexpected side-effects

    Hi there!

    If you are here because this kind of errors:

    C:> diddiscript-console
    
    Welcome to the interactive DiddiParser console.
    Parser version: 1.0.0
    ============================================================
    
    > load_module("simpleio");
    > store_input("Some text: ");
    Some text: foo
    Error while compiling: Could not identify value: foo
    

    or something else related to "values" or "variables", don't worry.


    Why this happened

    This is due to the application of DSGP 2 (something we made at #42) combined with the adaptations to DSGP 1. On every input (and probably other interactions), the parser is trying to identify DiddiScript "values", so it fails.

    Similar strange issues happened during the DSGP 2 adoption. So we had to move a lot of things on the parser's main operations. But we didn't expect that our moves could lead to a regression.

    What to do now

    If you find a new error, before this issue gets closed, feel free to report it here. That will help us to identify the side effects faster. Then, just wait. We'll be working hard to fix these issues.

    type: bug diddiscript: DSGP application 
    opened by DiddiLeija 3
  • Apply the DSGP 1 specs

    Apply the DSGP 1 specs

    Closes #24. Variables are now possible.

    TODO:

    • [x] Make definitions possible.
    • [x] Enable variable indexing inside functions.
    • [x] Update the libraries to make this idea possible. Now they should return something.
    • [x] Update documentation.
    • [x] ~~Update the DSGP status.~~
    diddiscript: DSGP application 
    opened by DiddiLeija 3
  • Bump isort from 5.10.1 to 5.11.2

    Bump isort from 5.10.1 to 5.11.2

    Bumps isort from 5.10.1 to 5.11.2.

    Release notes

    Sourced from isort's releases.

    5.11.2

    Changes

    5.11.1

    Changes December 12 2022

    :beetle: Fixes

    5.11.0

    Changes December 12 2022

    :construction_worker: Continuous Integration

    :package: Dependencies

    Changelog

    Sourced from isort's changelog.

    5.11.2 December 12 2022

    5.11.1 December 12 2022

    5.11.0 December 12 2022

    Commits
    • 7eaab8c Merge pull request #2036 from PyCQA/feature/5.11.2-version-bump
    • 112eb30 Update version to 5.11.2
    • e64306d Merge pull request #2035 from felixxm/version-bump
    • b418718 Bump version to 5.11.1.
    • f8146c5 Merge pull request #2033 from PyCQA/hotfix/5.11.1
    • dd01cfe Hotfix 5.11.1
    • 68f0a25 Merge pull request #2032 from tomaarsen/hotfix/colorama_nameerror
    • c752a6c Only call colorama.init if colorama is available
    • 6525008 Merge pull request #2030 from PyCQA/example/update-formatting-pluging-isort-5...
    • 6c5a36c Bump formatting plugin to 0.1.1
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies python 
    opened by dependabot[bot] 2
  • Bump sphinx from 5.3.0 to 6.0.0

    Bump sphinx from 5.3.0 to 6.0.0

    Bumps sphinx from 5.3.0 to 6.0.0.

    Release notes

    Sourced from sphinx's releases.

    v6.0.0

    Changelog: https://www.sphinx-doc.org/en/master/changes.html

    v6.0.0b2

    Changelog: https://www.sphinx-doc.org/en/master/changes.html

    v6.0.0b1

    Changelog: https://www.sphinx-doc.org/en/master/changes.html

    Changelog

    Sourced from sphinx's changelog.

    Release 6.0.0 (released Dec 29, 2022)

    Dependencies

    • #10468: Drop Python 3.6 support
    • #10470: Drop Python 3.7, Docutils 0.14, Docutils 0.15, Docutils 0.16, and Docutils 0.17 support. Patch by Adam Turner

    Incompatible changes

    • #7405: Removed the jQuery and underscore.js JavaScript frameworks.

      These frameworks are no longer be automatically injected into themes from Sphinx 6.0. If you develop a theme or extension that uses the jQuery, $, or $u global objects, you need to update your JavaScript to modern standards, or use the mitigation below.

      The first option is to use the sphinxcontrib.jquery_ extension, which has been developed by the Sphinx team and contributors. To use this, add sphinxcontrib.jquery to the extensions list in conf.py, or call app.setup_extension("sphinxcontrib.jquery") if you develop a Sphinx theme or extension.

      The second option is to manually ensure that the frameworks are present. To re-add jQuery and underscore.js, you will need to copy jquery.js and underscore.js from the Sphinx repository_ to your static directory, and add the following to your layout.html:

      .. code-block:: html+jinja

      {%- block scripts %} {{ super() }} {%- endblock %}

      .. _sphinxcontrib.jquery: https://github.com/sphinx-contrib/jquery/

      Patch by Adam Turner.

    • #10471, #10565: Removed deprecated APIs scheduled for removal in Sphinx 6.0. See :ref:dev-deprecated-apis for details. Patch by Adam Turner.

    • #10901: C Domain: Remove support for parsing pre-v3 style type directives and roles. Also remove associated configuration variables c_allow_pre_v3 and c_warn_on_allowed_pre_v3. Patch by Adam Turner.

    Features added

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies python 
    opened by dependabot[bot] 2
Releases(1.2.0)
  • 1.2.0(Feb 28, 2022)

    Version 1.2.0

    This version is focused in refining the current docs/libraries/parsing. We added and fixed the docs. Also, we added new features, including the editor's themes!

    Source code(tar.gz)
    Source code(zip)
  • 1.1.0.post1(Jan 27, 2022)

    This is just a post-release that fixes a packaging issue, see https://github.com/DiddiLeija/diddiparser2/issues/74 for details. The changelog that applied to 1.1.0 also applies here.

    Source code(tar.gz)
    Source code(zip)
  • 1.1.0(Jan 27, 2022)

    Version 1.1.0

    This version focused on cleaning up some parser errors and fixing/modifying libraries. Also, it is the first release that will use build for packaging. See the changelog for full details.

    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Jan 9, 2022)

    Version 1.0.0

    Hey! This is our first release! We are glad that this project can be now used without trouble using pip install diddiparser2.


    Note about the docs

    The note is that... the docs doesn't work! See #62 for more details.

    Source code(tar.gz)
    Source code(zip)
Owner
Diego Ramirez
Hi, I'm @DiddiLeija, I'm interested on the @python projects, and I want to collaborate with them. Also a @pypa member.
Diego Ramirez
async parser for JET

This project is mainly aims to provide an async parsing option for NTDS.dit database file for obtaining user secrets.

null 15 Mar 8, 2022
iOS Snapchat parser for chats and cached files

ParseSnapchat iOS Snapchat parser for chats and cached files Tested on Windows and Linux install required libraries: pip install -r requirements.txt c

null 11 Dec 5, 2022
HeadHunter parser

HHparser Description Program for finding work at HeadHunter service Features Find job Parse vacancies Dependencies python pip geckodriver firefox Inst

memphisboy 1 Oct 30, 2021
Python USD rate in RUB parser

Python EUR and USD rate parser. Python USD and EUR rate in RUB parser. Parsing i

Andrew 2 Feb 17, 2022
Python bindings to the dutch NLP tool Frog (pos tagger, lemmatiser, NER tagger, morphological analysis, shallow parser, dependency parser)

Frog for Python This is a Python binding to the Natural Language Processing suite Frog. Frog is intended for Dutch and performs part-of-speech tagging

Maarten van Gompel 46 Dec 14, 2022
Py-Parser est un parser de code python en python encore en plien dévlopement.

PY - PARSER Py-Parser est un parser de code python en python encore en plien dévlopement. Une fois achevé, il servira a de nombreux projets comme glad

pf4 3 Feb 21, 2022
Lua-parser-lark - An out-of-box Lua parser written in Lark

An out-of-box Lua parser written in Lark Such parser handles a relaxed version o

Taine Zhao 2 Jul 19, 2022
Lol qq parser - A League of Legends parser for QQ data

lol_qq_parser A League of Legends parser for QQ data Sources This package relies

Tolki 3 Jul 13, 2022
Discord bot-CTFD-Thread-Parser - Discord bot CTFD-Thread-Parser

Discord bot CTFD-Thread-Parser Description: This tools is used to create automat

null 15 Mar 22, 2022
A python wrapper around the ZPar parser for English.

NOTE This project is no longer under active development since there are now really nice pure Python parsers such as Stanza and Spacy. The repository w

ETS 49 Sep 12, 2022
A fast yet powerful Python Markdown parser with renderers and plugins.

Mistune v2 A fast yet powerful Python Markdown parser with renderers and plugins. NOTE: This is the re-designed v2 of mistune. Check v1 branch for ear

Hsiaoming Yang 2.2k Jan 4, 2023
A non-validating SQL parser module for Python

python-sqlparse - Parse SQL statements sqlparse is a non-validating SQL parser for Python. It provides support for parsing, splitting and formatting S

Andi Albrecht 3.1k Jan 4, 2023
Fast HTTP parser

httptools is a Python binding for the nodejs HTTP parser. The package is available on PyPI: pip install httptools. APIs httptools contains two classes

magicstack 1.1k Jan 7, 2023
HTTP request/response parser for python in C

http-parser HTTP request/response parser for Python compatible with Python 2.x (>=2.7), Python 3 and Pypy. If possible a C parser based on http-parser

Benoit Chesneau 334 Dec 24, 2022
Python binding to Modest engine (fast HTML5 parser with CSS selectors).

A fast HTML5 parser with CSS selectors using Modest engine. Installation From PyPI using pip: pip install selectolax Development version from github:

Artem Golubin 710 Jan 4, 2023
Markdown parser, done right. 100% CommonMark support, extensions, syntax plugins & high speed. Now in Python!

markdown-it-py Markdown parser done right. Follows the CommonMark spec for baseline parsing Configurable syntax: you can add new rules and even replac

Executable Books 398 Dec 24, 2022
A fast, extensible and spec-compliant Markdown parser in pure Python.

mistletoe mistletoe is a Markdown parser in pure Python, designed to be fast, spec-compliant and fully customizable. Apart from being the fastest Comm

Mi Yu 546 Jan 1, 2023
Type-safe YAML parser and validator.

StrictYAML StrictYAML is a type-safe YAML parser that parses and validates a restricted subset of the YAML specification. Priorities: Beautiful API Re

Colm O'Connor 1.2k Jan 4, 2023
python parser for human readable dates

Python parser for human readable dates Key Features • How To Use • Installation • Common use cases • You may also like... • License Key Features Suppo

Scrapinghub 2.2k Jan 8, 2023
ISO 8601 date/time parser

ISO 8601 date/time parser This module implements ISO 8601 date, time and duration parsing. The implementation follows ISO8601:2004 standard, and imple

null 118 Dec 20, 2022