gpt4 book ai didi

javascript - "Javascript, The Good Parts": Railroad Diagrams

转载 作者:可可西里 更新时间:2023-11-01 01:24:43 26 4
gpt4 key购买 nike

我正在阅读道格拉斯·克罗克福德 (Douglas Crockford) 的“Javascript, The Good Parts”,但很难理解所有铁路图的用法。他也没有详细说明这一点。他只是说了以下内容(第 21 页):

The rules for interpreting these diagrams are simple:

  • You start on the left edge and follow the tracks to the right edge.
  • As you go, you will encounter literals in ovals, and rules or descriptions in rectangles.
  • Any sequence that can be made by following the tracks is legal.
  • Any sequence that cannot be made by following the tracks is not legal.
  • Railroad diagrams with one bar at each end allow whitespace to be inserted between any pair of tokens. Railroad diagrams with two bars at each end do not.

我知道这本书被认为是任何真正认真对待 Javascript 的人的基础读物,我非常想了解他所阐述的概念。但是关于整个铁路图的东西并没有点击。

谁能解释一下他对铁路图的使用?例子会很棒。

最佳答案

IBM page可能有最简单的解释。

Wikipedia page提供有关如何构建它们的更多信息。

关于javascript - "Javascript, The Good Parts": Railroad Diagrams,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19369944/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com