lex 31 : So essentially, it’s the Shunting Yard algorithm that applies here. How...

claudio daffra Answered 1 answer
Question by claudio daffra 2 years ago

Question

lex 31 : So essentially, it’s the Shunting Yard algorithm that applies here. However, at this point, how can this algorithm understand:

Functions: fn(arg ...) or arrays [][][] with argument passing inside
And Cast ? And what about invalid expressions? 1 + …" will it be extended later in the compiler?”

Answers

Answered by Daniel McCarthy

Instructor

Hi,
I can't speak for Yard algorithms only the way we have parsed the input. Yes arrays are supported as you go through the course, as well as infinite arguments, casts are implemented too. We do handle syntax errors within the parser, and some basic validation of statements and expressions as we go towards the end of the course

Hope it helps