public MItem(parseCtx ctx) { var lex = ctx.symbols.Peek(); ctx.symbols.Dequeue(); if (!(this is MDictionaryEntry)) processContent(lex); others = lex.others.Length == 0 ? null : lex.others; }
public MDictionaryEntry(IEnumerable<XElement> els) { var ctx = new parseCtx(els); others = ctx.symbols.Peek().others; if (others.Length == 0) others = null; ctx.symbols.Dequeue(); //prvni symbol obsahuje prefix while (ctx.symbols.Count > 0) { var actData = ctx.symbols.Peek().cls; switch (actData) { case "MHeadword": headwords.Add(new MHeadword(ctx)); break; default: throw new Exception(); } } }
public MDefinition(parseCtx ctx) : base(ctx) { while (ctx.symbols.Count > 0) { var actData = ctx.symbols.Peek(); switch (actData.cls) { case "MExample": if (translations.Count > 0) throw new Exception(); examples.Add(new MExample(ctx)); break; case "MTranslation": translations.Add(new MTranslation(ctx)); break; default: return; } } }
public MSenseNumber(parseCtx ctx) : base(ctx) { while (ctx.symbols.Count > 0) { var actData = ctx.symbols.Peek(); switch (actData.cls) { case "MDefinition": items.Add(new MDefinition(ctx)); break; default: return; } } }
public MPronunciation(parseCtx ctx) : base(ctx) { }
public MTranslation(parseCtx ctx) : base(ctx) { }
public MExample(parseCtx ctx) : base(ctx) { }
public MCompare(parseCtx ctx) : base(ctx) { }
public MHeadword(parseCtx ctx) : base(ctx) { while (ctx.symbols.Count > 0) { var actData = ctx.symbols.Peek(); switch (actData.cls) { case "MPronunciation": items.Add(new MPronunciation(ctx)); break; case "MCompare": items.Add(new MCompare(ctx)); break; case "MDefinition": items.Add(new MDefinition(ctx)); break; case "MSenseNumber": items.Add(new MSenseNumber(ctx)); break; case "MPartOfSpeech": items.Add(new MPartOfSpeech(ctx)); break; default: return; } } }