AbstractSyntaxPattern.java
Go to the documentation of this file.
00001 package instruction.patterns;
00002 
00003 import java.util.ArrayList;
00004 
00005 import instruction.semanticObjects.SemanticObject;
00006 import instruction.syntaxparser.Parser;
00007 import instruction.syntaxparser.SyntaxTree;
00008 
00014 public abstract class AbstractSyntaxPattern {
00015         
00016         SyntaxTree tree;
00017         String pattern;
00018         
00023         public AbstractSyntaxPattern(String p)  {
00024                 pattern = p;
00025         }
00026         
00032         public final void init(Parser p) {
00033                 ArrayList<String> tokens = p.tokenize(pattern);
00034                 tree = p.generateTree(null, tokens);
00035         }
00036         
00041         public final SyntaxTree getPattern() {
00042                 return tree;
00043         }
00044         
00045         public final String getPatternString() {
00046                 return pattern;
00047         }
00048         
00054         public abstract ArrayList<SemanticObject> doModelTransformation(ArrayList<SemanticObject> obj);
00055 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


comp_ehow
Author(s): Moritz Tenorth, Daniel Nyga
autogenerated on Tue Apr 16 2013 00:18:02