1 19 package org.netbeans.tax.decl.parser; 20 21 import org.netbeans.tax.*; 22 import org.netbeans.tax.decl.*; 23 24 public class SequenceParser extends ListParser { 25 26 27 TreeElementDecl.ContentType first; 28 29 30 SequenceType seqType; 31 32 36 37 public SequenceParser (TreeElementDecl.ContentType first) { 38 this.first = first; 39 } 40 41 42 46 48 public TreeElementDecl.ContentType parseModel (ParserReader s) { 49 50 if (first != null) getSequenceType ().addType (first); 52 53 return super.parseModel (s); 54 } 55 56 58 protected ChildrenType createType (ParserReader s) { 59 return getSequenceType (); 60 } 61 62 64 private synchronized SequenceType getSequenceType () { 65 if (seqType == null) 66 seqType = new SequenceType (); 67 68 return seqType; 69 } 70 71 73 public String getSeparator () { 74 return ","; } 76 77 } 78 | Popular Tags |