/// <summary>
        /// Parses the specified input.
        /// </summary>
        /// <param name="input">The input.</param>
        public RDFDataset Parse(JToken input)
        {
            RDFDataset rdfDataset = new RDFDataset();

            var parser = new Parsing.NQuadsParser();
            parser.QuadParsed += (s, a) => AddQuadToDataset(a.Quad.Triple, GetValue(a.Quad.Graph), rdfDataset);
            parser.TripleParsed += (s, a) => AddQuadToDataset(a.Triple, "@default", rdfDataset);

            if (input.Type != JTokenType.String)
            {
                throw new ArgumentException(string.Format("Input must be a string, but got {0}", input.Type), "input");
            }

            parser.Parse((string)input);

            return rdfDataset;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="LineStartState"/> class.
 /// </summary>
 /// <param name="parser">The parser.</param>
 /// <param name="currentLine">The current line.</param>
 public LineStartState(NQuadsParser parser, int currentLine)
     : base(parser, currentLine)
 {
 }