Teach

[알림판목록 I] [알림판목록 II] [글목록][이 전][다 음]
[ Teach ] in KIDS
글 쓴 이(By): austin (austin)
날 짜 (Date): 1998년03월22일(일) 18시29분47초 ROK
제 목(Title): Re: Unix에서 Lex쓰기 질문..

yylex() 때문에 그러시나요?

#define YY_DECL .... 로 그건 해결할 수 있습니다.

%{
#define YY_DECL int first_lex YY_PROTO(( void ))
int num_lines = 0, num_chars = 0;
%}

%%
\n      ++num_lines; ++num_chars;
.       ++num_chars;
%%
main()
{
    first_lex();
    printf( "# of lines = %d, # of chars = %d\n",
    num_lines, num_chars );
}

---Austin
[알림판목록 I] [알림판목록 II] [글 목록][이 전][다 음]
키 즈 는 열 린 사 람 들 의 모 임 입 니 다.