Package picasso.parser
Class PerlinFunctionAnalyzer
- java.lang.Object
-
- picasso.parser.PerlinFunctionAnalyzer
-
- All Implemented Interfaces:
SemanticAnalyzerInterface
- Direct Known Subclasses:
PerlinBWAnalyzer,PerlinColorAnalyzer
public abstract class PerlinFunctionAnalyzer extends Object implements SemanticAnalyzerInterface
Abstract base class for parsing Perlin noise functions
-
-
Constructor Summary
Constructors Constructor Description PerlinFunctionAnalyzer()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract ExpressionTreeNodecreatePerlinFunction(ExpressionTreeNode firstExpression, ExpressionTreeNode secondExpression)Creates the specific Perlin function expression nodeExpressionTreeNodegenerateExpressionTree(Stack<Token> tokens)Parses tokens into a Perlin function expression
-
-
-
Method Detail
-
generateExpressionTree
public ExpressionTreeNode generateExpressionTree(Stack<Token> tokens)
Parses tokens into a Perlin function expression- Specified by:
generateExpressionTreein interfaceSemanticAnalyzerInterface- Parameters:
tokens- A stack of tokens in postfix order- Returns:
- An ExpressionTreeNode representing the parsed Perlin function
-
createPerlinFunction
protected abstract ExpressionTreeNode createPerlinFunction(ExpressionTreeNode firstExpression, ExpressionTreeNode secondExpression)
Creates the specific Perlin function expression node- Parameters:
firstExpression- the first expression parametersecondExpression- the second expression parameter- Returns:
- The ExpressionTreeNode for this Perlin function
-
-