jordannakamoto / ProgrammingLanguageInterpreter

Development of a simple Programming Language to illustrate the stages of processing required to interpret and run program files. Written in c++.
0 stars 2 forks source link

Test1 Theoretically Passing #5

Closed jordannakamoto closed 3 months ago

jordannakamoto commented 3 months ago
  1. Draft of PRINTF Statement processing
  2. Added a way to pass parameters to function calls
  3. Basically the functions and parameters get initialized in memory at the same time
    • but the parameters have an additional vector that stores them by index
    • so when we call something like func (x, n) we can set the variables for param[1] and param[2].
  4. Completed the postfix stuff processing for numerical expressions so the cumulative calculation gets assigned to the right variable
    • this is done by grabbing the first element in the expression like: foo 1 + 2 - 3 4 * = where we know the variable that is being assigned in the end is always the first item so that gets parsed first and then the stack just accumulates the calculation until the '=' at the end is reached.