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

Uploaded Source

Built Distribution

YAPI_heureka_code-1.1.2-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: YAPI-heureka-code-1.1.2.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.10

File hashes

Hashes for YAPI-heureka-code-1.1.2.tar.gz
Algorithm Hash digest
SHA256 264979bf7b3353a23d202d7c6016ab71021276d15fb1e8eec45b58cb4d1de1cc
MD5 30b6f7dc5b9d91731f0d05ba13e293f4
BLAKE2b-256 b3cd41d8682d273ed0e01d5b18ebc24b5a7062b2125e58939524419d905fe041

See more details on using hashes here.

File details

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

File metadata

  • Download URL: YAPI_heureka_code-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.10

File hashes

Hashes for YAPI_heureka_code-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f773e4b75c69a7b2abf722e37cfd64e7139c88977ece09d422b4c1e61d71b4bc
MD5 9cac08be63a6d3351559c7f64d846611
BLAKE2b-256 23ce0f594752cd5fdd5b067492bc59e02b4439fbc0b552d5008a460face0312a

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