[不指定 2005/09/18 08:58 | by turbozv ]
Q: What is PIG?
A: PIG is the short form of Parser Interface Generator. It turns the grammar and token scripts to a Parser.C file which can interpret the just language.


Q: Why made another YACC/LEX?
A: Because I find YACC/LEX is too difficult to learn (maybe only for me), and I also want to practice in such field. By the way, my recent work is related to it.


Q: What language do you want to use to implement PIG?
A: I want to use Delphi (Pascal) first, because it's my favorite language. Then, I'd like to port it to Python, and then C/C++ for wilder support.


Q: What’s the plan, when can the first version be released?
A: As I said, I am now using Delphi7.0. Well, the first version may be released in a week or less, because my work needs a common CSS2-parser very soon. In the following week, I will do PIG full-time. lol


Q:How can I contact with you?
A:Many ways, but I think email is best. Email me at: turbozv_AT_uestc_DOT_edu_DOT_cn
[不指定 2005/09/17 08:59 | by turbozv ]
掌心万年历 1.2 QVGA:http://www.onlinedown.net/soft/38528.htm


掌心万年历 1.2 VGA:http://www.onlinedown.net/soft/42306.htm
[不指定 2005/09/15 21:10 | by turbozv ]
手上有OMA的全部测试XHTML+CSS文件若干,分布在分类目录下面。


第一步:做一个脚本文件将其取出来(*.css和*.xhtml中的css段),这个不难,2分钟搞定。


第二步:读取css内容生成标准测试集。第一个想法是修改一个标准的CSS_Parser,可是几乎全是JAVA的,谁叫我不会JAVA呢…… 于是我想到第二个办法,用Python做了一个简单的替换规则:
# 1. 删除无用字符
data = data.replace(\" \", \"\", 9999)
data = data.replace(\"\t\", \"\", 9999)
data = data.replace(\"\r\", \"\", 9999)
data = data.replace(\"\n\", \"\", 9999)
# 2. 优化显示
data = data.replace(\";}\", \"}\", 9999)
data = data.replace(\"{\", \"\n{\n\", 9999)
data = data.replace(\"}\", \";\n}\n\", 9999)
data = data.replace(\";;\", \";\", 9999)
data = data.replace(\";\", \";\n\", 9999)
data = data.replace(\"\n\n\", \"\n\", 9999)

就搞定了coolsmile
[不指定 2005/09/12 22:47 | by turbozv ]
比较有趣,大家有兴趣可以试试smile

点击在新窗口中浏览此图片

【问题描述】
有这样一个蜂房(如图),从中心点0一层一层向外扩展,每一个蜂巢都被编上一个唯一的整数编号。蜜蜂可以在相邻的两个蜂巢之间移动,比如在0点的蜜蜂可以移动到相邻的1,2,3,4,5,6号蜂巢。现在有一只蜜蜂在蜂巢A,它要移动到蜂巢B,问最短经过几个蜂巢


【样例输入】
10
6


【样例输出】
3


参考程序: http://down.turbozv.com/ex/bee.c
分页: 63/67 第一页 上页 58 59 60 61 62 63 64 65 66 67 下页 最后页 [ 显示模式: 摘要 | 列表 ]