vadi


Namevadi JSON
Version 0.0.7 PyPI version JSON
download
home_pagehttps://github.com/vyogami/Vadi
SummaryREPL of a simple, interpreted and statically-typed programming language.
upload_time2024-04-26 13:39:48
maintainerNone
docs_urlNone
authorShivam Shandilya
requires_python<4.0,>=3.10
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![Banner](https://raw.githubusercontent.com/Vyogami/Vadi/main/assets/banner.png)

---

Vadi is a simple, interpreted and dynamically-typed programming language. It comes with its own tool called a REPL, which lets you try out code quickly.

The interpreter which is the part of Vadi that runs your code, uses a technique named "Recursive Descent Parsing." This technique helps the interpreter understand your high-level code by creating a data-structure called a `parse tree`. Then, the interpreter uses this parse tree to figure out what your code is asking it to do.You can check out the Vadi's [Syntax Grammar](#grammar) in BNF for more information.

## Installation

Use [pip](https://pip.pypa.io/en/stable/) or [pipx](https://github.com/pypa/pipx) to install vadi's REPL.

> [!TIP]
> The [pipx](https://github.com/pypa/pipx) package installer is strongly recommend for installing vadi on a global level to avoid conflicts.

```bash
pipx install vadi
```

OR

```bash
pip install vadi
```

Now, run the REPL.

```bash
vadi
```

## Grammar

The grammar is written in BNF(Backus Naur Form) notation.

```python

<Interpreter> ::= <binary_expression>
                | <unary_expression>
                | <statement>
                | <expression>
                | <VAR>
                | <FLT>
                | <INT>

<binary_expression> ::= <expression> "+" <expression>
                      | <expression> "-" <expression>
                      | <expression> "*" <expression>
                      | <expression> "/" <expression>
                      | <expression> "=" <expression>

<unary_expression> ::= "+" <expression>
                     | "-" <expression>

<statement> ::= "DECL" <variable> "=" <expression>

<expression> ::= <term> "+" <term>
               | <term> "-" <term>

<term> ::= <factor> "*" <factor>
         | <factor> "/" <factor>

<factor> ::= "INT"
           | "FLT"
           | "(" <expression> ")"
           | <VAR>

```

## Syntax

- Unary operations

  ```python
  +1
  -5
  ```

- Binary operations

  ```python
  56+23
  ```

- Complex arithmetic operations

  ```python
  1*2(4+5(5/6))
  ```

- Variable declarations

  ```javascript
  var int = 89;
  var float = 3.1415;
  var difference = int - 20;
  ```

- Conditionals: if-else

  > TODO: [issue#2](https://github.com/Vyogami/Vadi/issues/2)

- Conditionals: loops

  > TODO: [issue#2](https://github.com/Vyogami/Vadi/issues/2)

### Supported datatypes

- Integer
- Float

## Contributing

Issues and Pull Requests are definitely welcome! Check out [Contributing guidelines](./CONTRIBUTING.md) to get started.
Everyone who interacts with the vadi project via codebase, issue tracker, chat rooms, or otherwise is expected to follow the [Code of Conduct](https://github.com/Vyogami/.github/blob/main/CODE_OF_CONDUCT.md).

## License

This project is licensed under the MIT License. See the [LICENSE](./LICENSE).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/vyogami/Vadi",
    "name": "vadi",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": null,
    "author": "Shivam Shandilya",
    "author_email": "fvyogami@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/0b/ce/18c4e5c22863f6d3d30290bdc834ae84b8c1d3dd636cffe95687068cda70/vadi-0.0.7.tar.gz",
    "platform": null,
    "description": "![Banner](https://raw.githubusercontent.com/Vyogami/Vadi/main/assets/banner.png)\n\n---\n\nVadi is a simple, interpreted and dynamically-typed programming language. It comes with its own tool called a REPL, which lets you try out code quickly.\n\nThe interpreter which is the part of Vadi that runs your code, uses a technique named \"Recursive Descent Parsing.\" This technique helps the interpreter understand your high-level code by creating a data-structure called a `parse tree`. Then, the interpreter uses this parse tree to figure out what your code is asking it to do.You can check out the Vadi's [Syntax Grammar](#grammar) in BNF for more information.\n\n## Installation\n\nUse [pip](https://pip.pypa.io/en/stable/) or [pipx](https://github.com/pypa/pipx) to install vadi's REPL.\n\n> [!TIP]\n> The [pipx](https://github.com/pypa/pipx) package installer is strongly recommend for installing vadi on a global level to avoid conflicts.\n\n```bash\npipx install vadi\n```\n\nOR\n\n```bash\npip install vadi\n```\n\nNow, run the REPL.\n\n```bash\nvadi\n```\n\n## Grammar\n\nThe grammar is written in BNF(Backus Naur Form) notation.\n\n```python\n\n<Interpreter> ::= <binary_expression>\n                | <unary_expression>\n                | <statement>\n                | <expression>\n                | <VAR>\n                | <FLT>\n                | <INT>\n\n<binary_expression> ::= <expression> \"+\" <expression>\n                      | <expression> \"-\" <expression>\n                      | <expression> \"*\" <expression>\n                      | <expression> \"/\" <expression>\n                      | <expression> \"=\" <expression>\n\n<unary_expression> ::= \"+\" <expression>\n                     | \"-\" <expression>\n\n<statement> ::= \"DECL\" <variable> \"=\" <expression>\n\n<expression> ::= <term> \"+\" <term>\n               | <term> \"-\" <term>\n\n<term> ::= <factor> \"*\" <factor>\n         | <factor> \"/\" <factor>\n\n<factor> ::= \"INT\"\n           | \"FLT\"\n           | \"(\" <expression> \")\"\n           | <VAR>\n\n```\n\n## Syntax\n\n- Unary operations\n\n  ```python\n  +1\n  -5\n  ```\n\n- Binary operations\n\n  ```python\n  56+23\n  ```\n\n- Complex arithmetic operations\n\n  ```python\n  1*2(4+5(5/6))\n  ```\n\n- Variable declarations\n\n  ```javascript\n  var int = 89;\n  var float = 3.1415;\n  var difference = int - 20;\n  ```\n\n- Conditionals: if-else\n\n  > TODO: [issue#2](https://github.com/Vyogami/Vadi/issues/2)\n\n- Conditionals: loops\n\n  > TODO: [issue#2](https://github.com/Vyogami/Vadi/issues/2)\n\n### Supported datatypes\n\n- Integer\n- Float\n\n## Contributing\n\nIssues and Pull Requests are definitely welcome! Check out [Contributing guidelines](./CONTRIBUTING.md) to get started.\nEveryone who interacts with the vadi project via codebase, issue tracker, chat rooms, or otherwise is expected to follow the [Code of Conduct](https://github.com/Vyogami/.github/blob/main/CODE_OF_CONDUCT.md).\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](./LICENSE).\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "REPL of a simple, interpreted and statically-typed programming language.",
    "version": "0.0.7",
    "project_urls": {
        "Documentation": "https://github.com/vyogami/Vadi/blob/main/CONTRIBUTING.md",
        "Homepage": "https://github.com/vyogami/Vadi",
        "Repository": "https://github.com/vyogami/Vadi"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "244520f1445b8221849509405c17d53a5a72e3ed6a3376a1a496dfa22251aa90",
                "md5": "5a2275e63e689d495cdc4cf9262e0284",
                "sha256": "f2ba453a06cdbb95ed64a5b5e6eaa3c275f3cc9a2fc1feb7a07dc877b8b5ee9b"
            },
            "downloads": -1,
            "filename": "vadi-0.0.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5a2275e63e689d495cdc4cf9262e0284",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 9420,
            "upload_time": "2024-04-26T13:39:47",
            "upload_time_iso_8601": "2024-04-26T13:39:47.781543Z",
            "url": "https://files.pythonhosted.org/packages/24/45/20f1445b8221849509405c17d53a5a72e3ed6a3376a1a496dfa22251aa90/vadi-0.0.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0bce18c4e5c22863f6d3d30290bdc834ae84b8c1d3dd636cffe95687068cda70",
                "md5": "e30d89355714cf164d7acd40d8a5771a",
                "sha256": "221a3b0cb69f6583c1f07d9902be824eefd35fa3ff0f68a318c18320371ee26f"
            },
            "downloads": -1,
            "filename": "vadi-0.0.7.tar.gz",
            "has_sig": false,
            "md5_digest": "e30d89355714cf164d7acd40d8a5771a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 8133,
            "upload_time": "2024-04-26T13:39:48",
            "upload_time_iso_8601": "2024-04-26T13:39:48.802529Z",
            "url": "https://files.pythonhosted.org/packages/0b/ce/18c4e5c22863f6d3d30290bdc834ae84b8c1d3dd636cffe95687068cda70/vadi-0.0.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-26 13:39:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "vyogami",
    "github_project": "Vadi",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "vadi"
}
        
Elapsed time: 0.72674s