Created
June 23, 2017 00:01
-
-
Save mbutsko/22e9da456cae52649569de55d6c259a6 to your computer and use it in GitHub Desktop.
Basic PEG for Workouts
This file contains 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
workout = exercise+ | |
exercise = exercise:word ": " sets:integer "x" reps:integer "\n"? { return { exercise: exercise.join(''), sets: sets, reps: reps } } | |
word = [A-Za-z]+ | |
integer = [0-9] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment