diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-10-09 20:10:37 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-10-09 20:10:37 -0700 |
| commit | dd689e72ea392883dd7844d3da00099ce6cd76a4 (patch) | |
| tree | 114beb66770f383ac32e264992abba73e4049133 | |
| parent | 84972581becdca49c017d0ba04dadc1500bcfd65 (diff) | |
Parsing fix
| -rwxr-xr-x | nowopen | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -81,8 +81,8 @@ local dsl = re.compile([=[ |} comment <- "#" [^%nl]* days <- - ({:from: {word} :} ws? "-" ws? {:to: {word} :} ws? ":") - /({:from: {word} :} ws? ":") + ({:from: {[a-zA-Z]+} :} ws? "-" ws? {:to: {[a-zA-Z]+} :} ws? ":") + /({:from: {[a-zA-Z]+} :} ws? ":") /({:from:''->'sun':} {:to:''->'sat':}) time_range <- {| {:open: time :} ws? "-" ws? {:close: time :} |} time <- {| @@ -91,7 +91,7 @@ local dsl = re.compile([=[ / ("midnight" {:hour: {~''->'12'~} :} {:ampm: {~''->'am'~} :}) |} tag <- word (ws word)* - word <- [^%nl%tab (),:#0-9-]+ + word <- [^%nl%tab (),:#&0-9-]+ ws <- [ %tab]+ ]=], {tab="\t"}) local places,err = dsl:match(place_text) |
