Skip to content

Instantly share code, notes, and snippets.

@PatrickKalkman
Created February 1, 2019 10:14
Show Gist options
  • Save PatrickKalkman/220b6c99aae73084493a15bb6f4531dc to your computer and use it in GitHub Desktop.
Save PatrickKalkman/220b6c99aae73084493a15bb6f4531dc to your computer and use it in GitHub Desktop.
First part of the parser to parse a Playlist
public class PlaylistGrammar
{
public static readonly Parser<string> TagIdStringParser =
from tagStartDelimiter in Parse.Char('#').Once()
from tagId in Parse.AnyChar.Until(Parse.Char(':')).Text()
.Or(Parse.AnyChar.Until(Parse.LineTerminator)).Text()
select tagId;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment