Package math.differentialcalculus
Class SemanticAnalyzer
java.lang.Object
math.differentialcalculus.SemanticAnalyzer
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) boolean
Scans the bracket structure of the input expression and determines if it is semantically correctprivate boolean
private void
The method establishes meaning to some shorthand techniques in math that the average mathematician might expect to see in a math device.private void
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.Bracket[]
static void
-
Field Details
-
brackets
-
scanner
-
utility
Utility attribute used throughout the class for string appending operations.
-
-
Constructor Details
-
SemanticAnalyzer
- Throws:
Exception
-
-
Method Details
-
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
-
main
-