简体   繁体   English

这个Shunting-Yard算法陈述是什么意思?

[英]What does this Shunting-Yard algorithm statement mean?

I am trying to develop a Shunting-Yard Algorithm based on pseudocode from the Wikipedia page . 我正在尝试根据Wikipedia页面上的伪代码开发分流场算法。

One of the operations states: 操作状态之一:

If the token is a function argument separator (eg, a comma) [...] 如果标记是函数参数分隔符(例如,逗号),则[...]

Could someone please clarify what this means? 有人可以澄清一下这是什么意思吗?

It's simply referring to however the language specifies separations between the arguments of a function. 它只是在指代语言指定函数参数之间的分隔。

For example, in Java: 例如,在Java中:

public void foo(int a, int b) { ... }

The function arguments a and b are separated using a comma. 函数参数ab使用逗号分隔。

Lets say you have a function that takes 3 parameters or arguments: 假设您有一个包含3个参数或参数的函数:

someFunction(int i, String s, boolean b) {}

Each one of those parameters is separated by a comma. 这些参数中的每个参数都用逗号分隔。 This is how it is done in java and many other languages but perhaps there are other separators used in some languages as well. 这是用Java和许多其他语言完成的方式,但也许在某些语言中也使用了其他分隔符。

Hope it helps :) 希望能帮助到你 :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM