1 19 package org.netbeans.tax.decl.parser; 20 21 import org.netbeans.tax.TreeElementDecl; 22 import org.netbeans.tax.decl.*; 23 24 25 public class ContentSpecParser extends MultiplicityParser implements ModelParser { 26 27 29 public TreeElementDecl.ContentType parseModel (ParserReader model) { 30 ParserReader s = model.trim (); 31 if (s.startsWith ("EMPTY")) { return new EMPTYType (); 33 } else if (s.startsWith ("ANY")) { return new ANYType (); 35 } else if (s.startsWith ("(")) { if (s.trim ().startsWith ("#PCDATA")) { return new MixedParser ().parseModel (s); 38 } else { 39 return new ChildrenParser ().parseModel (s); 40 } 41 } else { 42 return null; 45 } 46 } 47 48 } 49 | Popular Tags |