Esempio n. 1
0
        public override IDerivation Visit(Seqence aSeqence, DerivationContext aContext)
        {
            ExtractNotTerminalsContext lContext = aContext as ExtractNotTerminalsContext;

            lContext.Seqences.Add(aSeqence);
            return(base.Visit(aSeqence, aContext));
        }
Esempio n. 2
0
 // Seqs   := ",", Seq, Seqs
 //           | ""
 private void Seqs(ref IPhrase aPhr)
 {
     if (lex != null)
     {
         if (lex.Type == LexemType.Operation)
         {
             if (lex.Text == "," || lex.Text == ";")
             {
                 bool lIsComma = lex.Text == ",";
                 lex = lex.Next();
                 Seqence lSeq = aPhr as Seqence;
                 if (lSeq == null)
                 {
                     lSeq             = new Seqence(mGrammar, aPhr);
                     lSeq.InsertSpace = lIsComma;
                     aPhr             = lSeq;
                 }
                 IPhrase lSeqPhr = Seq();
                 lSeq.Add(lSeqPhr);
                 AsAlias(ref lSeqPhr);
                 Seqs(ref aPhr);
             }
         }
         //else
         //{
         //  throw new GrammarSynaxException(string.Format("'{0}' not expected here (,) operation expected", lex.Text));
         //}
     }
 }