1 19 package org.netbeans.tax.decl.parser; 20 21 import org.netbeans.tax.TreeElementDecl; 22 import org.netbeans.tax.decl.*; 23 24 public class ChoiceSeqParser implements ModelParser { 25 26 28 public TreeElementDecl.ContentType parseModel (ParserReader s) { 29 TreeElementDecl.ContentType first = new ContentParticleParser ().parseModel (s); 30 31 33 if (s.trim ().startsWith ("|")) { return new ChoiceParser (first).parseModel (s); 35 } else if (s.startsWith (",")) { return new SequenceParser (first).parseModel (s); 37 } else { 38 TreeElementDecl.ContentType tmp = new SequenceParser (first).parseModel (s); 40 return first; 42 } 43 } 44 45 } 46 | Popular Tags |