It's under your control.

lex 컴파일을 위한 flex 설치 및 컴파일 본문

Works/Linux

lex 컴파일을 위한 flex 설치 및 컴파일

H4ru 2013. 4. 21. 22:52

렉스 파일 : test.l

데이터 파일 : test.dat

 

yum install -y flex

yum install -y bison

 

 

 

[root@localhost ~]$ lex-bash: lex: command not found

[root@localhost ~]# yum install -y flex

......

[root@localhost ~]# lex test.l

[root@localhost ~]$ ll

total 8

-rw-rw-r--. 1 root root   43 Jan 18 12:52 test.da

t-rw-rw-r--. 1 root root 1084 Jan 18 12:58 test.l

[root@localhost ~]$ lex test.l

[root@localhost ~]$ ll

total 56

-rw-rw-r--. 1 root root 45954 Jan 18 13:02 lex.yy.c

-rw-rw-r--. 1 root root    43  Jan 18 12:52 test.dat

-rw-rw-r--. 1 root root  1084 Jan 18 12:58 test.l

[root@localhost ~]$ cc lex.yy.c -o test -ll

[root@localhost ~]$ ll

total 76

-rw-rw-r--. 1 root root 45954 Jan 18 13:02 lex.yy.c

-rwxrwxr-x. 1 root root 16526 Jan 18 13:02 test

-rw-rw-r--. 1 root root    43 Jan 18 12:52 test.dat

-rw-rw-r--. 1 root root  1084 Jan 18 12:58 test.l

[root@localhost ~]$

 

 

 

 

'Works > Linux' 카테고리의 다른 글

리눅스 vim 자동정렬 하기  (0) 2013.04.24
리눅스 시간 설정하기 rdate 명령  (0) 2013.04.22
리눅스 환경변수 확인하기  (0) 2013.04.19
X-Window 추가 설치(CentOS)  (0) 2013.04.18
php configure/config error solution  (0) 2013.04.18