Yacc를 이용한 C언어 구문 분석기
- 최초 등록일
- 2009.08.22
- 최종 저작일
- 2005.06
- 12페이지/ 압축파일
- 가격 1,000원
소개글
C soure를 구문 분석해주는 프로그램입니다.
컴파일 실행환경
1. 프로그램 소스
본문내용
1. 프로그램 소스
(1) Lex file : t.l
%{
#include "y.tab.h"
int line = 1;
void Line();
%}
%%
"const" {Line(); return(tconst);}
"else" {Line(); return(telse);}
"if" {Line(); return(tif);}
"int" {Line(); return(tint);}
"return" {Line(); return(treturn);}
"void" {Line(); return(tvoid);}
"while" {Line(); return(twhile);}
"!" {Line(); return(tnot);}
"(" {Line(); return(tlparen);}
")" {Line(); return(trparen);}
"*" {Line(); return(tmul);}
"," {Line(); return(tcomma);}
"-" {Line(); return(tminus);}
";" {Line(); return(tsemicolon);}
"<" {Line(); return(tless);}
"=" {Line(); return(tassign);}
">" {Line(); return(tgreat);}
"[" {Line(); return(tlbracket);}
"]" {Line(); return(trbracket);}
"{" {Line(); return(tlbrace);}
"}" {Line(); return(trbrace);}
"+" {Line(); return(tplus);}
"-" {Line(); return(tminus);}
압축파일 내 파일목록
1-1.bmp
1-2.bmp
1-3.bmp
1.bmp
2.bmp
3.bmp
4.bmp
5.bmp
6.bmp
7.bmp
ex.zip
Thumbs.db
yacc.hwp
yacc.txt
참고 자료
없음