Ejemplo n.º 1
0
 public TermInterpreter(PlanningParser.NumericSettingContext numericSettingContext, PlanningParser.TypeDefineContext typeDefineContext,
                        PlanningParser.ObjectDeclarationContext objDecContext)
 {
     BuildNumericConst(numericSettingContext);
     BuildTypeDict(typeDefineContext);
     BuildConstTypeMap(objDecContext);
 }
Ejemplo n.º 2
0
        //static TermInterpreter()
        //{
        //    EmtpyAssignment = new Dictionary<string, string>();
        //}

        #endregion

        #region Methods

        private void BuildNumericConst(PlanningParser.NumericSettingContext context)
        {
            int count = context.INTEGER().Count;

            _numericConstValueDict = new Dictionary <string, int>(count);
            for (int i = 0; i < count; i++)
            {
                string constName = context.numericSymbol(i).GetText();
                int    value     = int.Parse(context.INTEGER(i).GetText());
                _numericConstValueDict.Add(constName, value);
            }
        }