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.1.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

YAPI_heureka_code-1.1.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: YAPI-heureka-code-1.1.0.tar.gz
  • Upload date:
  • Size: 4.6 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.1.0.tar.gz
Algorithm Hash digest
SHA256 349a609d44500800d656c46b5df5e12d72f9951dc036b626c03f0467cf352097
MD5 dea9e8a419171e2ed039a02c752f8ac9
BLAKE2b-256 2a96ff4a70d4987b46a099b99aff03d3ea8febb1d135443ae5f0637aec4b2901

See more details on using hashes here.

File details

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

File metadata

  • Download URL: YAPI_heureka_code-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 309f0d6fd37e926cb51ae783498ed4bef5e44b8e4a5bab5c217cf819ba432f67
MD5 4f1264e283199ef7ac9576606a2ac9fe
BLAKE2b-256 36cb642f7a4e04cf82cdebfe2bdab1d66f9f96f1d5268479dc0a2da9489a6a5c

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