Abstract syntax tree using the shunting yard algorithm
-
02-10-2022 - |
문제
I have an infix expression that I have tokenised and would like to proceed to create an abstract syntax tree. I understand the shunting-yard algorithm used in these cases. I have only found ways to convert the infix expression to RPN format, not into an AST. I could create the RPN version first and then AST from it, but it seems unnecessary.
My language of choice is JavaScript, though I only need to see an example in any language and/or a description of the algorithm. I have skimmed through the Dragon Book and Terence Parr's book, but neither gave the answer I was looking for.
올바른 솔루션이 없습니다
제휴하지 않습니다 StackOverflow