Presentation is loading. Please wait.

Presentation is loading. Please wait.

nauten Compiler – Report Ver.3 Mini-C (주간)

Similar presentations


Presentation on theme: "nauten Compiler – Report Ver.3 Mini-C (주간)"— Presentation transcript:

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

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

3 2 중요 알고리즘 fgetaline TokenCheck LOG SymTable
입력 파일로부터 토큰을 인식한 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


Download ppt "nauten Compiler – Report Ver.3 Mini-C (주간)"

Similar presentations


Ads by Google