mowkow
머꼬: 한글 LISP
실행 방법
Python 3.10 이상을 설치한 후 다음 명령을 수행합니다.
python main.py
Windows 운영체제에서는 dist의 mk.exe를 다운로드하셔서 명령 프롬프트에서 다음과 같이 수행합니다.
mk.exe
종료하려면 그냥 엔터를 입력하면 됩니다.
테스트 입력
다음 입력을 수행해 보세요.
> (+ 10 20)
30
> (그대로 10)
10
> (그대로 (+ 10 20))
30
> (그대로 '(+ 10 20))
(+ 10 20)
> (절댓값 (- 20))
오류: <내장함수 '-'>: 인수 개수 오류입니다.
> (절댓값 (- 0 20))
20
> (머 '(1 2 3))
1
> (꼬 '(1 2 3))
(2 3)
> (잠시 ((이 2) (삼 3)) (+ 이 삼))
5
> (정의 (합 수) (만약 (= 수 0) 0 (+ 수 (합 (- 수 1)))))
> (합 4)
10
> (정의 합 (람다 (수) (만약 (= 수 0) 0 (+ 수 (합 (- 수 1))))))
> (합 5)
15
> (잠시 ((인수 5) (합 (람다 (수) (만약 (= 수 0) 0 (+ 수 (합 (- 수 1))))))) (합 인수))
15
테스트 프로그램
두 양수를 입력받아 최대공약수와 최소공배수를 구하는 프로그램(gcd_lcm.mk)의 예를 보면 다음과 같습니다.
(정의 (나머지 가 나)
(- 가 (* (/ 가 나) 나)))
(정의 (최대공약수 가 나)
(만약 (= 나 0)
가
(최대공약수 나 (나머지 가 나))))
(정의 (최소공배수 가 나)
(/ (* 가 나) (최대공약수 가 나)))
(정의 가 (읽기))
(정의 나 (읽기))
(쓰기 (최대공약수 가 나))
(쓰기 (최소공배수 가 나))
위 프로그램은 다음과 같이 수행할 수 있습니다.
> python main.py gcd_lcm.mk
테스트 코드
테스트 코드 폴더의 테스트 파일 source.mk를 수행하려면 다음과 같이 수행하시면 됩니다.
python main.py test_code/source.mk
윈도우 실행 파일 mk.exe로 수행하시려면 다음과 같이 수행하시면 됩니다.
mk.exe test_code/source.mk
Windows용 배치 파일
머꼬 프로그램 파일은 UTF-8 인코딩으로 작성해야 합니다.
test_code의 예제 프로그램도 그렇게 작성된 것입니다.
이를 Windows의 명령 프롬프트(cmd) 창에서 보려면 문자 인코딩을 UTF-8 인코딩으로 바꾸어야 합니다.
이때 다음 명령어를 사용하실 수 있습니다.
gomk
다시 원래 인코딩(code page 949, EUC-KR 호환)으로 명령 프롬프트를 회복하시려면 다음 명령어를 사용하시기 바랍니다.
kmog
Authors
- 우균(Gyun Woo) - 최초 작업 - Gyun Woo
Metadata
Release files for Mowkow 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mowkow-0.1.0.tar.gz | 17.9 kB | Without provenance | Details for mowkow-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mowkow-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for mowkow-0.1.0-py3-none-any.whl |
Total release size: 38.4 kB
Release files / mowkow-0.1.0.tar.gz
| Download URL | mowkow-0.1.0.tar.gz |
|---|---|
| Size | 17.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c57eba00ea035f326a8e230de733cdd1bf95b508c91ec5577981db8642fc4cf9
|
|
BLAKE2b-256 checksum How to use checksums |
f9c18bba0bb2b23770c7eb58806a454fcff22d8f407c3efb9075ecc4d1dcb332
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / mowkow-0.1.0-py3-none-any.whl
| Download URL | mowkow-0.1.0-py3-none-any.whl |
|---|---|
| Size | 20.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4cd7bb7955adbdf7a97be77ee2a7e8f757cb3fcf7502e80ff70cfd82fa747048
|
|
BLAKE2b-256 checksum How to use checksums |
1fd99e7c6ca6db9bf492e6378b657ac7a444ef024c93c1d7b90e28358274ff64
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Security for Mowkow 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.