Class SemanticAnalyzer

java.lang.Object
math.differentialcalculus.SemanticAnalyzer

public class SemanticAnalyzer extends Object
  • Field Details

    • brackets

      private Bracket[] brackets
    • scanner

      private ArrayList<String> scanner
    • utility

      private StringBuilder utility
      Utility attribute used throughout the class for string appending operations.
  • Constructor Details

  • Method Details

    • getBrackets

      public Bracket[] getBrackets()
    • checkBracketStructure

      boolean checkBracketStructure()
      Scans the bracket structure of the input expression and determines if it is semantically correct
      Returns:
    • checkOperatorSemantics

      private boolean checkOperatorSemantics()
    • functionComponentsAssociation

      private void functionComponentsAssociation()
      This method does final adjustments to the scanner function e.g it will check for errors in operator combination in the scanner function and so on.
    • codeModifier

      private void codeModifier()
      The method establishes meaning to some shorthand techniques in math that the average mathematician might expect to see in a math device. :e.g(3+4)(1+2) will become (3+4)*(1+2).It is essentially a stage that generates code.
    • getScanner

      public ArrayList<String> getScanner()
    • main

      public static void main(String[] args)