// reads a STON reference entity address private IStonAddress ReadAddress(StonTokenReader reader) { IStonInitialContext initialContext = ReadInitialContext(reader); var path = new List <IStonPathSegment>(); while (reader.Peek().HasChartype(StonChartype.PathSegmentBegin)) { path.Add(ReadPathSegment(reader)); } return(ElementFactory.CreateAddress(initialContext, path)); }