全部书籍

专业

应用 关于 Coach 登录 开始阅读

书籍暂未推出简体中文版——当前显示英文版。

Computer Science · 术语表

什么是 Parse tree, leftmost and rightmost derivation?

又称: parse tree · leftmost derivation · rightmost derivation

Definition 23.5 University Computer Science — Year 2 · 第 23 章 — Context-Free Grammars and Pushdown Automata

A parse tree for GG is an ordered tree whose root is SS, whose inner nodes are nonterminals, whose leaves are terminals or ε\varepsilon, and where the children of each inner node AA, read from left to right, are the right side of a production A→αA \to \alpha. Its yield is its leaves read from left to right. A derivation is leftmost if each step replaces the leftmost nonterminal, and rightmost if each replaces the rightmost one.

在原文中阅读 →