What does this Shunting-Yard algorithm statement mean?

161 views Asked by At

I am trying to develop a Shunting-Yard Algorithm based on pseudocode from the Wikipedia page.

One of the operations states:

If the token is a function argument separator (e.g., a comma) [...]

Could someone please clarify what this means?

2

There are 2 answers

1
Ben Siver On

It's simply referring to however the language specifies separations between the arguments of a function.

For example, in Java:

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

The function arguments a and b are separated using a comma.

2
takendarkk On

Lets say you have a function that takes 3 parameters or arguments:

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.

Hope it helps :)