juice500ml / cminus

C- Compiler Project for Sogang Univ. (17' Spring)
5 stars 1 forks source link

[Project 2] 광희가 짠 project 2부분에 버그가 있는 듯. #8

Closed taeguk closed 7 years ago

taeguk commented 7 years ago

내가 테스트케이스 나중에 올려줄테니 고쳐주길 바람. @juice500ml

일단, syntatic analyzer가 잘 도는 testcase들로 project 3를 테스트하고 있겠음.

taeguk commented 7 years ago

흠... 내가 착각한거 같다 ㅠㅜ 미안

taeguk commented 7 years ago

https://github.com/juice500ml/compiler-sogang/blob/master/testcases/project_2/not_labeled.c

근데 위 파일을 input으로 해서 돌렸을 때, project 2부분(syntatic analysis)에서 에러가 나는데.. 원래 return -1 같은거는 허용안하나?? @juice500ml @taeseunglee

juice500ml commented 7 years ago

허용 안함. return_stmt --> return expression ; --> return simple_expression ; --> return additive_expression ; --> return term ; --> return factor ; --> return NUM ; --> return digit digit* ; 인데 digit = 0 | ... | 9 임. syntactic analysis에서 걸리는게 맞음!