parseArithmetic

Parses a ParseTree as a arithmetic expression @param T arithmetic type. By default is float. @param grammarName Name of the arithmetic grammar. Must be "ArithmeticNoVar" or "Arithmetic". By default is "ArithmeticNoVar" @param ParseTree p ParseTree generated by ArithmeticNoVar @return The result of the arithmetic expresion. If the ParseTree is invalid or contains unexpected nodes, then will return NaN if T is a float or 0 if T is a integral

  1. T parseArithmetic(ParseTree p, T[string] variables)
  2. T parseArithmetic(ParseTree p)
    T
    parseArithmetic
    (
    T = float
    string grammarName = "ArithmeticNoVar"
    )

Meta