5
나는 해피 파서를 구축하고 이것이 online documentation 눈치 해요 :해피에서 %%는 무엇입니까?
는 yacc를 같이, 우리는 포함 %% 여기 진짜 이유.
%%
는 사소한 경우에도, 비록 이유가 있어야합니다. 누구는 그것이 무엇인지 압니까?
나는 해피 파서를 구축하고 이것이 online documentation 눈치 해요 :해피에서 %%는 무엇입니까?
는 yacc를 같이, 우리는 포함 %% 여기 진짜 이유.
%%
는 사소한 경우에도, 비록 이유가 있어야합니다. 누구는 그것이 무엇인지 압니까?
Yacc 소스 파일에서 섹션을 구분합니다. 예 : http://dinosaur.compilertools.net/yacc/
Names refer to either tokens or nonterminal symbols. Yacc requires token names
to be declared as such. In addition, for reasons discussed in Section 3, it is
often desirable to include the lexical analyzer as part of the specification
file; it may be useful to include other programs as well. Thus, every
specification file consists of three sections: the declarations, (grammar)
rules, and programs. The sections are separated by double percent ``%%'' marks.
(The percent ``%'' is generally used in Yacc specifications as an escape
character.)
In other words, a full specification file looks like
declarations
%%
rules
%%
programs
The declaration section may be empty. Moreover, if the programs section is
omitted, the second %% mark may be omitted also; thus, the smallest legal Yacc
specification is
%%
rules