using System; using System.Collections.Generic; namespace sharp.parser { public abstract class ParserPath { public ParserPath[] Followers { get { return followers.ToArray(); } } private List followers = new List(); public ParserPath(){ } public ParserPath(ParserPath[] followers) { this.followers.AddRange(followers); } public void AddFollower(ParserPath path,params ParserPath[] paths){ AddFollower(path); foreach (ParserPath p in paths){ AddFollower(p); } } public void AddFollower(ParserPath path) { followers.Add(path); } public void RemoveFollower(ParserPath path) { followers.Remove(path); } } }