Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

언어 명세 #20

Open
baehyunsol opened this issue Jan 5, 2024 · 1 comment
Open

언어 명세 #20

baehyunsol opened this issue Jan 5, 2024 · 1 comment

Comments

@baehyunsol
Copy link

알파희 언어 명세를 자세히 보려면 어떻게 해야 하나요? 아희 공식 언어 명세에 정확히 명시되지 않은 부분들을 알파희가 어떻게 구현했는지 확인하고 싶습니다.

예를 들어서 아희 공식 명세에서는 정수형을 이진법 숫자 32개 이상의 부호 있는 정수형을 사용할 것을 권고하고 있는데, 알파희의 구현이 궁금합니다. 또한, 아희 공식 명세에서는 명령어가 잘못된 입력을 받았거나, 명령어가 표준 입력의 끝을 만났을 때 어떻게 행동하는지 정해져있지 않습니다. (백준 문제 풀다보니 필요합니다.)

아희 공식 명세에 없는 부분들은 이 글제안-보완을 참고하려고 했는데, 그것도 아닌 것 같더라고요...

@youknowone
Copy link
Member

구현체 명세를 따로 갖고 있지는 않지만, 언어 명세와 일치하지 않는 부분은 버그입니다.
bigint 지원은 이 부분을 smallint에서 bigint로 교체하시면 됩니다. https://github.com/aheui/rpaheui/blob/master/aheui/aheui.py#L12
smallint는 아키텍처 기본 정수 크기를 따를것 같네요.

해당 제안에서 원래 스펙에 반영할 수 있는 부분은 이 변경에서 반영을 하였습니다 https://github.com/aheui/aheui.github.io/pull/11/files
남은 부분은 기존 구현체들과 상이한 동작을 추가하는 부분이어서 남은 것이고, 구현되어 있지 않습니다.

숫자와 문자 읽기 코드는 여기입니다. https://github.com/aheui/rpaheui/blob/master/aheui/aheui.py#L215-L278
문자는 읽기에 실패하면 -1을 받고 숫자는 올바르지 않은 입력부터는 무시하나보네요.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants