TXT파일안에 소스를 읽어서 컴파일러하고 출력해 주는 소스
- 최초 등록일
- 2009.03.16
- 최종 저작일
- 2009.03
- 압축파일
- 가격 2,000원
소개글
텍스트 파일 문서안에 소스를 읽고 컴파일러해서 Keyword, Identfire,Constants,Special symbol의 결과를 텍스트파일로 출력해주는 visual c를 이용한 소스입니다.
컴파일 실행환경
Microsoft Visual C++
본문내용
텍스트(txt)파일 안에 저장되어있는 소스를 읽어서 실행시키면 컴파일작업을 하고
결과 텍스트(txt)파일을 만들어 줍니다
예) program lex.analyzer ;
integer x;
real y;
char c;
boolean - not true means false;
begin
x = y = 10; x12.12 < 0; y2x > .21;
if x > 1x then boolean.true.false end
else
while true do 18 = 123.2164 or false ij = 10.2;
y = sqrt(xy) * x12.12; x = max(x,y);
compute x. + x.yy. * + 11.4.9 for z =1 to 10;
read nothing and write something ;
print x1..1; write complier.good
endprogram;
the end
이런 소스파일을 읽고
결과 TXT
Keyword : program
Identifire : lex.analyzer
Special_Symbol : ;
Keyword : integer
Identifire : x
Special_Symbol : ;
이런식으로 결과물을 출력해주는 소스입니다.(Microsoft visual프로그램으로 실행시켜서
컴파일하면 자동으로 결과물을 출력해줍니다)
압축파일 내 파일목록
Main.cpp
Main.dsp
Main.dsw
Main.ncb
Main.opt
Main.plg
READ.TXT
Scanner.dsp
Scanner.dsw
Scanner.ncb
Scanner.opt
Scanner.plg
UserStr.h
RESULT.txt
KWLst.txt
Debug/KWLst.txt
Debug/Main.exe
Debug/Main.ilk
Debug/Main.obj
Debug/Main.pch
Debug/Main.pdb
Debug/READ.TXT
Debug/RESULT.txt
Debug/Scanner.exe
Debug/Scanner.ilk
Debug/Scanner.pch
Debug/Scanner.pdb
Debug/vc60.idb
Debug/vc60.pdb
참고 자료
없음