shunting yard:①(铁路)调车场/编组场,用于把车厢分解、编组、改线与调度的场地。②(计算机)“调度场”算法(shunting-yard algorithm),一种将中缀表达式转换为后缀表达式(逆波兰式)的解析方法。(该词组常见含义以上两种最常用。)
/ˈʃʌntɪŋ jɑːrd/
The freight cars are waiting in the shunting yard.
货运车厢正在调车场里等待。
To evaluate the expression safely, the program uses a shunting yard algorithm to turn infix notation into postfix before computing the result.
为了安全地计算该表达式,程序使用“调度场”算法先把中缀记法转换为后缀记法,再进行运算。
shunt 原指“使(火车、车辆)转到岔线/旁线、改道”,在铁路语境中特别常见;yard 指“场地、作业场”。合起来的 shunting yard 就是“用于调车改线的作业场地”。后来借用“把元素按规则移入/移出不同结构”的意象,成为计算机领域中解析表达式的 shunting-yard algorithm 的名称。