Exemple #1
0
 public virtual void OnParsed(Interpreter interpreter, ref string whole, ref int i)
 {
     if (whole != string.Empty)
     {
         if (Grammar.IsValid(whole))
         {
             object e = Grammar.From(whole);
             if (e is Keyword) //element is a keyword
                 interpreter.Keywords.Push((Keyword)e);
             else if (e is Type) //element is a type
                 interpreter.Types.Push((Type)e);
         }
         else
         {
             interpreter.NonGrammarStrings.Push(whole);
         }
         whole = string.Empty;
     }
 }
Exemple #2
0
 public virtual void DoParse(Interpreter i)
 {
 }