diff options
Diffstat (limited to 'places.peg')
| -rw-r--r-- | places.peg | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/places.peg b/places.peg deleted file mode 100644 index dbde5e7..0000000 --- a/places.peg +++ /dev/null @@ -1,24 +0,0 @@ -file <- {| (place / ws? comment? %nl)* |} {.+}? -place <- {| - {:name: {word (ws word)*} :} - ws? ("(" ws? {:tags: {| {tag} (ws? "," ws? {tag})* ws? |} :} ")")? ws? ":" - ({:times: {| - ((ws? comment? %nl)+ (%tab / " "^+2) ws? {| days ws? ("closed" / {:open: time :} "-" {:close: time :}) |})+ - |} :}) -|} - -comment <- "#" [^%nl]* - -days <- - ({:from: {word} :} "-" {:to: {word} :} ":") - /({:from: {word} :} ":") - /({:from:''->'sun':} {:to:''->'sat':}) - -time <- {| - {:hour: {[0-9]+} :} (":" {:minute: {[0-9]+} :})? {:ampm: { "am" / "pm"} :} - / ("noon" {:hour: {~''->'12'~} :} {:ampm: {~''->'pm'~} :}) - / ("midnight" {:hour: {~''->'12'~} :} {:ampm: {~''->'am'~} :}) -|} -tag <- word (" "+ word)* -word <- [^%nl%tab (),:#0-9-]+ -ws <- [ %tab]+ |
