https://kotlinlang.org logo
g

George Pandian

06/04/2021, 10:09 AM
I came here from Amanda’s talk about AST which led me to Ale’s post both very interesting having said that NGL  - I have not finished both till the end. Need more learning or refresher on former.  In Ale’s post I am struggling to understand the below two assumptions that I took or understood it that way: 1. Operand = Expression      The above stands true  if the LHS is equated to RHS       However RHS is not a constant as is evaluated by applying principles of BODMAS to LHS. 2. I am struggling to understand the necessity of 2 languages (apologies if it sounds otherwise intended) as I feel Kotlin allows us to do it perhaps?      I am not an expert but my understanding is the parser (say designed for Kotlin language)   a. From the intermediate class identify the patterns or classify regex and do recursive process of elimination   b. If the patterns matches the keyword and operands [stored in appropriate Data Structure] of the language (then removed them / push).   - Pass 1   c. Read the file LTR, get the constants away (i.e. remove them / push) - Pass 2   d. Read the file LTR, get the variables (i.e. remove them / push) - Pass 3 Then pop and using S-expression apply BODMAS = Voila ? If I have missed something or misunderstood please guide me.
r

raulraja

06/04/2021, 10:17 AM
Hi George, Alejandro the author is not in this slack, if you don’t get any responses here you may want to try him over DM on twitter https://twitter.com/trupill or in the 47 academy slack https://47degreesacademy.slack.com/join/shared_invite/zt-eb0cf2r6-LqpdSH2OX6jB8UnRrZwKsQ#/
🙏 1
3 Views