Created
February 1, 2019 10:14
-
-
Save PatrickKalkman/220b6c99aae73084493a15bb6f4531dc to your computer and use it in GitHub Desktop.
First part of the parser to parse a Playlist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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