1 6 7 package analyzer.listeners; 8 9 13 public abstract class WMParser extends Parser { 14 15 16 public WMParser(String pathAndTS) { 17 super(pathAndTS+".WM.log"); 18 } 19 20 protected void analyzeTokenInput() throws SyntaxException{ 21 nextNUMBER(); 22 timestamp = new Double (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 s); 44 45 } 46 | Popular Tags |