http://www.cnblogs.com/deerchao/archive/2006/08/24/zhengzhe30fengzhongjiaocheng.html
基本rules:


例子:


不是所有语言都可以用regular expr表示的:
比如这种可能无限多的括号because of nested structure

what can regular do?
比如说判断是不是odd number of 1:

但是没办法记住一个state 之前来过几次了
所有如果要recognize balanced paranthesis: () 你必须得count 括号
Parse用来解决这种nested 问题, output parse tree

