1 / 7

Compiler – Report Ver.3 Mini-C ( 주간 ) 조원 : 조성대 (0491187), 조규철 (0291070), 이지용 (0291060)

nauten. Compiler – Report Ver.3 Mini-C ( 주간 ) 조원 : 조성대 (0491187), 조규철 (0291070), 이지용 (0291060). 1. Mini-C Data Flow. Ex) prime.mc File Input :mini-c 문법에 맞는 표준 샘플코드. Line Read. keyworkd Check. Step1. char Check. ident Check. Token Check. Symbol Table { int lineNum; char value;

jerod
Télécharger la présentation

Compiler – Report Ver.3 Mini-C ( 주간 ) 조원 : 조성대 (0491187), 조규철 (0291070), 이지용 (0291060)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. nauten Compiler – Report Ver.3 Mini-C (주간) 조원: 조성대(0491187), 조규철(0291070), 이지용(0291060)

  2. 1 Mini-C Data Flow Ex) prime.mc File Input :mini-c문법에 맞는 표준 샘플코드 Line Read keyworkd Check Step1. char Check ident Check Token Check Symbol Table { int lineNum; char value; } scanning Step2. number Check Step3. special char Check Print End.

  3. 2 중요 알고리즘 TokenCheck LOG fgetaline 입력 파일로부터 토큰을인식한 1Line을 읽어와Return fgetaline( char *s, int size, FILE *stream) 입력된 라인에 대한 모든 문자를 읽어와 Mini-C문법 에 맞는 토큰을 생성해 준다. int TokenCheck( char * TokenStr, int lineNum, struct symbolNode *symbolTable) 화면과 동일한 출력을 해주 기위한 파일 로그함수 Bubble.date로 출력. LOG( const char *szLogFile, char *szMsg ) SymTable struct symbolNode{ int lineNum; char value[MAX_SYM_VALUE]; //symbolNode *ptr; };

  4. 2-1 교재의 scanner() 함수를 기본으로 출력과 입력을 위한 형식을 추가. TokenCheck

  5. 2-1 Symbol Table Symbol ident를 찾아서 처리하는 루틴. Symbol Table을 출력하는 루틴.

  6. 3 실행화면

  7. 4 실행화면

More Related