quirax / devguru-lang Goto Github PK
View Code? Open in Web Editor NEW디자인 패턴 및 TDD 스터디에 따른 실험작
디자인 패턴 및 TDD 스터디에 따른 실험작
예제 코드를 입력 후 의도된 대로 Machine의 상태가 결정되는지 확인하는 jest 스크립트 템플릿 작성
eru...
에 해당하는 egu...
가 뒤에 있는 경우 해당 명령어를 찾을 때까지 만나는 모든 egu...
를 실행합니다.
이 때 도중에 만나는 CKPT들이 오염되는 문제가 발생합니다.
이로 인해 두 수를 비교하는 코드가 b == 0일 때 무한루프에 빠집니다.
이 문제를 해결하기 위해, SetCheckpoint에 undo 메소드를 추가하고, JN0에서 CKPT가 변하지 않은 경우 해당 메소드를 불러오도록 수정합니다.
수정 결과는 issues/12 브랜치에 반영합니다.
reuuu
)rguuu
)eru...
뒤에 egu...
가 올 경우, jump한 이후 egu...
가 가리키는 Checkpoint의 값을 무효화(0
으로 초기화)eru {1} egu {2} eru
하여 {2}
를 반복하고자 하는 경우, eru {1} egu egu {2} eru
함으로써 해결할 수 있음명령어 | 문법 | 기능 | 예시 |
---|---|---|---|
egu... |
egu[u[u[...]]] |
u 의 갯수에 해당하는 Checkpoint 를 현재 PC 로 지정한다 |
eguuu -> CKPT #3 = PC |
eru... |
eru[u[u[...]]] |
Acc != 0 일 때, u 의 갯수에 해당하는 Checkpoint 의 값으로 Jump한다 |
eruuu -> PC = CKPT #3 |
v...
명령어 (Acc++
)d...
명령어 (Acc--
)gru...
geu...
대상 문서: https://github.com/quirax-lee/devguru-lang/wiki/Language-definition.md
-v
또는 --verbose
옵션을 지정한 경우에만 info/debug output이 나오도록 변경합니다.
명령어 | 문법 | 기능 | 예시 |
---|---|---|---|
reu |
reu |
Ptr 의 값을 Acc 에 로드한다 |
reu -> Acc = Ptr |
reuu |
reuu |
Ptr 의 값에 해당하는 Memory 의 값을 Acc 에 로드한다 |
reuu -> Acc = M[Ptr] |
rgu |
rgu |
Acc 의 값을 Ptr 에 저장한다 |
rgu -> Ptr = Acc |
rguu |
rguu |
Ptr 의 값에 해당하는 Memory 에 Acc 의 값을 저장한다 |
rguu -> M[Ptr] = Acc |
Ptr
의 값이 메모리 범위 내에서 변경
Acc
< 1일 때, Ptr
= 1Acc
<= 255일 때, Ptr
= Acc
Acc
> 255일 때, Ptr
= 255Ptr
로 선택된 메모리에 값을 저장Ptr
로 선택된 메모리로부터 값을 로드A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.