KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > analyzer > listeners > WMParser


1 /*
2  * WMParser.java
3  *
4  * Created on May 6, 2005, 4:41 PM
5  */

6
7 package analyzer.listeners;
8
9 /**
10  *
11  * @author loicsegapelli
12  */

13 public abstract class WMParser extends Parser {
14     
15     /** Creates a new instance of WMParser */
16     public WMParser(String JavaDoc pathAndTS) {
17         super(pathAndTS+".WM.log");
18     }
19     
20     protected void analyzeTokenInput() throws SyntaxException{
21         nextNUMBER();
22         timestamp = new Double JavaDoc(st.nval).longValue();
23         caseProperty();
24     }
25     
26     private void caseProperty() throws SyntaxException{
27         nextWORD();
28         if(svalIs("maximizedMode")) caseMax();
29         else if(svalIs("modes")) ;
30         else if(svalIs("activeMode")) ;
31         else throw new SyntaxException("unexpected property:"+st.sval);
32     }
33     
34     private void caseMax() throws SyntaxException{
35         nextWORD();
36         analyzeMax(st.sval);
37     }
38     
39     abstract protected void eof();
40     
41     abstract protected void init();
42     
43     abstract protected void analyzeMax(String JavaDoc s);
44     
45 }
46
Popular Tags