예제 #1
0
파일: Grammar.cs 프로젝트: JiepengTan/ECL
 public void Init(LexInfos lexInfos, Action funcSyntaxIndent)
 {
     this.LexInfos          = lexInfos;
     this.filePath          = lexInfos.filePath;
     this._funcSyntaxIndent = funcSyntaxIndent;
     _domains = new Stack <SymDomain>();
     _optop   = new Operand();
     _gDomain = new SymDomain();
     PushDomain(_gDomain);
     TypeContainer = new TypeRegister(_gDomain);
 }
예제 #2
0
파일: Lex.cs 프로젝트: JiepengTan/ECL
 public void Reset()
 {
     str2Token         = new Dictionary <string, Token>();
     allTokens         = new List <Token>();
     sourcestr         = new DynString();
     tkstr             = new DynString();
     LexInfos          = new LexInfos(allTokens);
     LexInfos.filePath = filePath;
     allTokens.AddRange(keywords);
     for (int i = 0; i < keywords.Length; i++)
     {
         str2Token.Add(keywords[i].name, keywords[i]);
     }
 }