【发布时间】:2013-09-25 06:38:41
【问题描述】:
短版:
在其他解释语言(Python、Ruby 等)和编译语言(C 家族、Java 等)中是否有类似于 PHP parser tokens 的内容?
加长版:
在the CPP Rocks website 上有an article showing a visual comparison of language complexity,通过图表将语言的各种构建块分解为类别。 Coffeescript 的图表如下所示:
我想以the parser tokens 为起点为 PHP 制作这样一个图表(以确保我不会错过任何东西,因为我很懒惰)。我想知道在其他解释语言(Python、Ruby 等)和编译语言(C 系列、Java 等)中是否存在与这些标记类似的东西。
目前的调查结果:
- Java:描述 Syntax 和 Lexical Structure 的语言规范章节似乎是一个不错的起点。
- Python:手册的第 2 章确实描述了Python's lexical structure。
- 鲁比:the token list for Ruby。
【问题讨论】: