Esempio n. 1
0
 /// <summary>
 /// Initalize using default settings.
 /// </summary>
 /// <param name="settings"></param>
 public virtual void Init(LexSettings settings)
 {
     _reader    = new TokenReader();
     _errors    = new List <string>();
     _tokenList = new List <string>();
     _settings  = settings;
 }
Esempio n. 2
0
 public override void Init(LexSettings settings)
 {
     base.Init(settings);
     _separatorMap      = new Dictionary <string, string>();
     _separatorMap[","] = ",";
     if (settings is LexListSettings)
     {
         var listsettings = (LexListSettings)settings;
         _separatorMap.Clear();
         _separatorMap[listsettings.Delimeter] = listsettings.Delimeter;
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Parse supplied text using supplied settings.
 /// </summary>
 /// <param name="line"></param>
 /// <param name="settings"></param>
 /// <returns></returns>
 public static List<string> Parse(string line, LexSettings settings)
 {
     LexArgs lex = new LexArgs(settings);
     return lex.ParseText(line);
 }
Esempio n. 4
0
 /// <summary>
 /// Create with supplied settings.
 /// </summary>
 /// <param name="settings"></param>
 public LexArgs(LexSettings settings)
 {
     Init(settings);
 }
Esempio n. 5
0
 /// <summary>
 /// Create with supplied settings.
 /// </summary>
 /// <param name="settings"></param>
 public LexArgs(LexSettings settings)
 {
     Init(settings);
 }
Esempio n. 6
0
        /// <summary>
        /// Parse supplied text using supplied settings.
        /// </summary>
        /// <param name="line"></param>
        /// <param name="settings"></param>
        /// <returns></returns>
        public static List <string> Parse(string line, LexSettings settings)
        {
            LexArgs lex = new LexArgs(settings);

            return(lex.ParseText(line));
        }
Esempio n. 7
0
 public override void Init(LexSettings settings)
 {
     base.Init(settings);
     _separatorMap = new Dictionary<string, string>();
     _separatorMap[","] = ",";
     if (settings is LexListSettings)
     {
         var listsettings = (LexListSettings)settings;
         _separatorMap.Clear();
         _separatorMap[listsettings.Delimeter] = listsettings.Delimeter;
     }
 }