今天在找一个 c 的语法解释器,想拿来改改用,结果就发现了下面这个好东西 :
----------------------------------------
In 1985, Jeff Lee published this Lex specification together with
a
for the April 30, 1985
ANSI C draft.
Tom Stockfisch reposted
both to net.sources in 1987; that original, as mentioned in
the answer to
of the comp.lang.c FAQ, can be ftp'ed from ftp.uu.net, file
.
I intend to keep this version as close to the current C Standard grammar
as possible; please let me know if you discover
discrepancies.
, 1995
------------------------------------------
和下面这个
---------------------------------------
In 1985, Jeff Lee published his Yacc grammar (which is
accompanied by a matching )
for the April 30, 1985 draft version of the
ANSI C standard.
Tom Stockfisch reposted
it to net.sources in 1987; that original, as mentioned in
the answer to
of the comp.lang.c FAQ, can be ftp'ed from ftp.uu.net, file
.
, 1995
---------------------------------------
再看看那个 ansi.c.grammar.Z
更惊讶:
这是一个邮件列表中的文章,可是,……它太厉害了。其中包含了:一个生成各种文件的shell 脚本,可以生成的文件有,一个 c 的 lexer, 一个 c 的 parser, 一个调用语法的 c 程序,一个说明文件,一个 makefile(这个好像有点小问题: 把 $(BIN)去掉,把 $(OBJ)/ansi_c 改成 $(OBJ) -o ansi_c, 但是瑕不掩玉)
哇, 我再一次被震撼了。一定要把这么好的东西放上来。
系统不接受特殊文件名,就传个 txt 的吧。
|
文件: | ansi.c.grammar.txt.gz |
大小: | 4KB |
下载: | 下载 |
|
阅读(814) | 评论(0) | 转发(0) |