Skip to content

Commit

Permalink
Merge pull request #243 from xiaocang/patch-1
Browse files Browse the repository at this point in the history
Update p19_writing_recursive_descent_parser.rst
  • Loading branch information
yidao620c committed Sep 5, 2018
2 parents 1c23af9 + e695dea commit 2269d18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/c02/p19_writing_recursive_descent_parser.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
问题
----------
你想根据一组语法规则解析文本并执行命令,或者构造一个代表输入的抽象语法树。
如果语法非常简单,你可以自己写这个解析器,而不是使用一些框架
如果语法非常简单,你可以不去使用一些框架,而是自己写这个解析器

----------
解决方案
Expand Down Expand Up @@ -272,7 +272,7 @@
如果你对此感兴趣,你可以通过查看Python源码文件Grammar/Grammar来研究下底层语法机制。
看完你会发现,通过手动方式去实现一个解析器其实会有很多的局限和不足之处。

其中一个局限就是它们不能被用于包含任何左递归的语法规则中。比如,加入你需要翻译下面这样一个规则
其中一个局限就是它们不能被用于包含任何左递归的语法规则中。比如,假如你需要翻译下面这样一个规则

.. code-block:: python
Expand Down

0 comments on commit 2269d18

Please sign in to comment.