1 6 7 package org.netbeans.modules.piaget.analyze; 8 import java.io.File ; 9 10 14 public abstract class WMParser extends Parser { 15 16 17 public WMParser(File 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 s); 45 46 } 47 | Popular Tags |