Gli.Tsuo

2013年4月10日 #

PLY (Python Lex-Yacc)基于Python的LEX和YACC

摘要: 转载自:http://eatsalt.blog.163.com/blog/static/879402662009376956615/PLY 是一个Python 的Lex/YACC 实现. 官方网站在这里http://www.dabeaz.com/ply/作者:David BeazleySWIG的发明人PLY是很Pythonic的语言工具,使用起来也非常简明,学习周期短就可以实现一个简单的语法规则和翻译规则程序,对研究编译器原理很有价值。官方网站给出的特性信息:It's implemented entirely in Python.It uses LR-parsing which is 阅读全文

posted @ 2013-04-10 22:51 Gli.Tsuo 阅读(1369) 评论(0) 推荐(0)

2013年4月5日 #

C BNF grammar

摘要: 转载自:http://lists.canonical.org/pipermail/kragen-hacks/1999-October/000201.htmlThe C grammar in K&R 2nd Ed is fairly simple, only about 5 pages.Here it is, translated to BNF. Here ( ) groups, ? means optional, |is alternation, + means one or more, * means zero or more, space meanssequence, and &q 阅读全文

posted @ 2013-04-05 10:37 Gli.Tsuo 阅读(304) 评论(0) 推荐(0)

导航