❔ Lexer and parser, cannot get expressions to formulate as they should, have a look at the output...
The lexer works fine, however when i want to make an expression out of the tokens it just wont work out...
5 Replies
Yes... Your dictionary only has two KVP in it.
You're not going to be able to rebuild an expression if you put the tokens into a normal dictionary
Have you heard of an (abstract) syntax tree?
Yes
Should I use a Stack<>
make a function that outputs tokens lazily with yield return, that would be the most flexible way
I'll see
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.