KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > piaget > analyze > WMParser


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

6
7 package org.netbeans.modules.piaget.analyze;
8 import java.io.File JavaDoc;
9
10 /**
11  *
12  * @author loicsegapelli
13  */

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