yus1108 / mcf

This is a toy compiler project named as mcf (making compiler is fun) aiming to make a compiler specialized for game development.
MIT License
1 stars 0 forks source link

[파서] 기본적인 파서 개발 #11

Closed yus1108 closed 3 months ago

yus1108 commented 3 months ago

개발 목표 : Expression \ : integer_32bit

\ : identifier

\ : keyword("int32")

\ <literal> <identifier> <prefix_expression> <infix_expression>

: `plus|minus` `` `plus|minus` `identifier` : `` `plus|minus|asterisk|slash` `` **Statement** [variable_declaration] `` `` [optional: `assign` ``] semicolon -> `int32 foo` `int32 boo = 5;` `int32 jar = 3 + 2;` [variable_assignment] `` `assign` `` semicolon -> `bar = 5;` `var = 3 + 2;` 위 명령문을 파싱 하는 것이 1차 적인 목표입니다. 추후에 더 많은 토큰이 개발되고 더 많은 expression 타입이나 statement 가 필요하게 된다면 새로운 이슈로 처리 예정입니다.//////