Example #1
0
        internal static void AddUsedSetName(string Name, int Line)
        {
            int num = UsedSetNames.ItemIndex(Name);

            if (!BuilderApp.IsPredefinedSet(Name) & (num == -1))
            {
                UsedSetNames.Add(new GrammarIdentifier(Name, Line));
            }
        }
Example #2
0
 internal static void AddUserSet(GrammarSet CharSet)
 {
     if (BuilderApp.IsPredefinedSet(CharSet.Name))
     {
         BuilderApp.Log.Add(SysLogSection.Grammar, SysLogAlert.Critical, "Predined Set", "The set {" + CharSet.Name + "} is a set built into GOLD.", Conversions.ToString(CharSet.Line));
     }
     else if (UserSets.ItemIndex(CharSet.Name) != -1)
     {
         BuilderApp.Log.Add(SysLogSection.Grammar, SysLogAlert.Warning, "Set redefined", "The set {" + CharSet.Name + "} was redefined", Conversions.ToString(CharSet.Line));
     }
     else if (BuilderApp.UserDefinedSets.ItemIndex(CharSet.Name) == -1)
     {
         UserSets.Add(CharSet);
     }
     else
     {
         BuilderApp.Log.Add(SysLogSection.Grammar, SysLogAlert.Critical, "Duplicate set definition", "The set '" + CharSet.Name + "' was previously defined.", Conversions.ToString(CharSet.Line));
     }
 }