Skip to main content

Moeglichkeit eine kleine API mit Lexer zu erstellen

Project description

YAPI-heureka-code

Tokens angeben

Beispiel MuNa

group = YAPIGroup(
    keywords=[
        Token("SET"),
        Token("TO"),
        Token("COUNTER"),
        Token("ITERATOR")
    ],
    operators=[
        Token("SLASH", "/"),
        Token("PIPE", "|"),
        Token("DOPPELPUNKT", ":"),
        Token("KLEINER", "<"),
        Token("GROESSER", ">")
    ],
    other=[
        TokenGroup("CharsetDefinition", [
            Token("DIGITS"),
            Token("LETTERS"),
            Token("UPPER"),
            Token("LOWER")
        ])
    ]
)

Hierdurch werden die Keywords, die Operatoren und andere Tokens der Sprache festgelegt. Hier muss dann allerdings auf Groß- und Kleinschreibung geachtet werden. Hier wird alles großgeschrieben.

YAPI definieren

yapi = YAPI(group)
print(yapi.execute("SET <?DIGITS|2|gross?> TO <?gross?>"))

Über das Instanziieren der Klasse YAPI können Statements ausgeführt werden.

Project details


Download files

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

Source Distribution

YAPI-heureka-code-1.0.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

YAPI_heureka_code-1.0.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file YAPI-heureka-code-1.0.0.tar.gz.

File metadata

  • Download URL: YAPI-heureka-code-1.0.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.2 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.1

File hashes

Hashes for YAPI-heureka-code-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3b61ed03223e27ac79844ea205567fbdc0b2ace18d6b4f6b03291bed0e186492
MD5 800d0069b97a33d3cde45bf99a4d75a5
BLAKE2b-256 fd87721818ee92fbfb2e08e71778cad3521827d1b4db21b0f3aea31f8b83a7fc

See more details on using hashes here.

File details

Details for the file YAPI_heureka_code-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: YAPI_heureka_code-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.2 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.1

File hashes

Hashes for YAPI_heureka_code-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2a5f2002d81a853a272b8bf00cc07541c7701757a9f55336bb6505f6fc025833
MD5 149395cfae14a31498607ef96dec0a3b
BLAKE2b-256 6e509b64f471832270480e7e5d026e18252aec77693b854c8059d1afcadf7a0d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page