Skip to main content

Lua programming language written in Python

Project description

mehtap

Lua 5.4 programming language implementation in Pure Python

Codacy Grade Badge Codacy Coverage Badge checks/master docs

Status

mehtap is in an early alpha stage. Since there is active development, API changes may happen without any special notice. Please pin your dependencies using a specific commit hash.

What does mehtap have?

  • Everything in the Lua 5.4 grammar is supported.

  • There are utility functions to convert values from Python to Lua and from Lua to Python.

  • Most of the standard library is supported. (100% support is planned.)

    Basic Functions (22/25)
    • assert()
    • collectgarbage() — Does nothing.
    • dofile()
    • error()
    • _G
    • getmetatable()
    • ipairs()
    • load()
    • loadfile()
    • next()
    • pairs()
    • pcall()
    • print()
    • rawequal()
    • rawget()
    • rawlen()
    • rawset()
    • select()
    • setmetatable()
    • tonumber()
    • tostring()
    • type()
    • _VERSION
    • warn()
    • xpcall()
    Input and Output Facilities (17/18)
    • io.close()
    • io.flush()
    • io.input()
    • io.lines()
    • io.open()
    • io.output()
    • io.popen()
    • io.read()
    • io.tmpfile()
    • io.type()
    • io.write()
    • file:close()
    • file:flush()
    • file:lines()
    • file:read()
    • file:seek()
    • file:setvbuf() — Does nothing.
    • file:write()
    Operating System Facilities (8/11)
    • os.clock()
    • os.date()
    • os.difftime()
    • os.execute()
    • os.exit()
    • os.getenv()
    • os.remove()
    • os.rename()
    • os.setlocale()
    • os.time()
    • os.tmpname()

What's the catch?

There are some differences with the specification of the reference manual. They are:

  • garbage collection,
  • frame scope.

For the most part, behaviour differences with the reference implementation are only allowed if the reference manual does not specify the behaviour. For example, the exact formatting of error messages is not specified in the reference manual, so it is allowed to be different.

There are some things that are not implemented yet. They are, only listing language features, excluding the standard library:

  • Taking metavalues and metamethods into consideration when doing operations.

Also, since this is a Python implementation, it is SLOW.


Copyright (c) 2024 Emre Özcan

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

mehtap-0.0.1.tar.gz (45.1 kB view details)

Uploaded Source

Built Distribution

mehtap-0.0.1-py3-none-any.whl (50.6 kB view details)

Uploaded Python 3

File details

Details for the file mehtap-0.0.1.tar.gz.

File metadata

  • Download URL: mehtap-0.0.1.tar.gz
  • Upload date:
  • Size: 45.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.0 Windows/10

File hashes

Hashes for mehtap-0.0.1.tar.gz
Algorithm Hash digest
SHA256 6b306c0172e3e321dfdd351d6b96d6ea8cd06c5b7df5776256a92b3dc6d65139
MD5 c00d31c2b3229de04ec733922545b62b
BLAKE2b-256 211eae3e67b61c1f2b369bc73a7706ed3865533ee5b90fcc4183c2ee3305514c

See more details on using hashes here.

File details

Details for the file mehtap-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: mehtap-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 50.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.0 Windows/10

File hashes

Hashes for mehtap-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8f4277cf5cdd033c26243e455aaa22f493bf171d7563ae012ea5b5fb923a2cd2
MD5 50ee1d2ce1bc16e136953299f0c36e79
BLAKE2b-256 f4f1cf26ce7a9faa92f306b8b7ded865e2e059cd1bf4ea6519a468b59de40425

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