Skip to main content

very powerful and optional parser framework for python

Project description

Build Status PyPI version Release Note MIT License


Parse Many, Any, Every Doc

LR ::= LR 'a' 'b' | LR 'c' | 'd';


  • Python

    • pip

    pip installl -U EBNFParser

    • setup
    git clone
    cd EBNFParser/Python
    python install


  • Command Line Tools

    • ruiko.
    ruiko ./<grammar File> ./<output filename>
            [--testTk] # print tokenized words or not
            [--test] # generate test script ""

    Use command ruiko to generate parser and token files, and then you can use to test your parser.

    python ./ Stmt " (+ 1 2) " -o test.json --testTk
  • Integrated into your own project

    from Ruikowa.ObjectRegex.ASTDef import Ast
    from Ruikowa.ErrorHandler import ErrorHandler
    from Ruikowa.ObjectRegex.MetaInfo import MetaInfo
    from Ruikowa.ObjectRegex.Tokenizer import Tokenizer
    from <your own generated parser module> import <top parser>, token_table
    import typing as t
    def token_func(src_code: str) -> t.Iterable[Tokenizer]:
        return Tokenizer.from_raw_strings(src_code, token_table, ({<the names of tokenizers you would ignore>}, {<the string contents of tokenizers you would ignore>}))
    parser = ErrorHandler(<top parser>.match, token_func)
    def parse(filename: str) -> Ast:
        return parser.from_file(filename)
    print(parse(<filename of your dsl source code>))

Need more? See the documents.


Here are some examples to refer:

EBNFParser 2.0

  • Rem The Rem programming language.

Old version(Before EBNFParser 1.1).

  • A DSL for SQL development in Python areas.
  • A full featured modern language to enhance program readability based on CPython.
  • An attempt to making ASDL in CPython(unfinished yet)

Will support F# and Rem.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for EBNFParser, version 2.1.3
Filename, size File type Python version Upload date Hashes
Filename, size EBNFParser-2.1.3-py3-none-any.whl (26.0 kB) File type Wheel Python version 3.6 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page