code: def parse(input_string):
      
  
      global  exprStack
      global targetvar
  
      # Start with a blank exprStack and a blank targetvar
      exprStack = []
      targetvar=None
  
      if input_string != '':
        # try parsing the input string
        try:
          L=equation.parseString( input_string )
        except ParseException as err:
          print('Parse Failure', file=sys.stderr)
          print(err.line, file=sys.stderr)
          print(" "*(err.column-1) + "^", file=sys.stderr)
          print(err, file=sys.stderr)
          raise
  
        # show result of parsing the input string
        if debug_flag:
          print(input_string, "->", L)
          print("exprStack=", exprStack)
  
        # Evaluate the stack of parsed operands, emitting C code.
        try:
          result=_evaluateStack(exprStack)
        except TypeError:
          print("Unsupported operation on right side of '%s'.\nCheck for missing or incorrect tags on non-scalar operands."%input_string, file=sys.stderr)
          raise
        except UnaryUnsupportedError:
          print("Unary negation is not supported for vectors and matrices: '%s'"%input_string, file=sys.stderr)
          raise
  
        # Create final assignment and print it.
        if debug_flag: print("var=",targetvar)
        if targetvar != None:
            try:
              result = _assignfunc(targetvar,result)
            except TypeError:
              print("Left side tag does not match right side of '%s'"%input_string, file=sys.stderr)
              raise
            except UnaryUnsupportedError:
              print("Unary negation is not supported for vectors and matrices: '%s'"%input_string, file=sys.stderr)
              raise
  
            return  result
        else:
          print("Empty left side in '%s'"%input_string, file=sys.stderr)
          raise TypeError
docs: Accepts an input string containing an LA equation, e.g.,
      "M3_mymatrix = M3_anothermatrix^-1" returns C code function
      calls that implement the expression.