Topics In Parsing Programming Language Constructs:

Current Status Variable

Type Coercion

  • When a binary operator is reduced, it is necessary to check the types of the arguments, possibly to coerce an argument to the correct type, and to infer the result type.
  • char < int < float < double
  • For most operators, right-most type takes precedence
  • For assignment, left-most type takes precedence

Conversion of Names With Constant Compile-Time Values To Constants

Intermediate Code for Non-Arithmetic Statements

Citation:

  • Aho, Lam, Sethi, & Ullman, Compilers: Principles, Techniques, and Tools

  • UT Austin CS375: Compilers by G.Novak.