aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-10-09 20:10:37 -0700
committerBruce Hill <bruce@bruce-hill.com>2021-10-09 20:10:37 -0700
commitdd689e72ea392883dd7844d3da00099ce6cd76a4 (patch)
tree114beb66770f383ac32e264992abba73e4049133
parent84972581becdca49c017d0ba04dadc1500bcfd65 (diff)
Parsing fix
-rwxr-xr-xnowopen6
1 files changed, 3 insertions, 3 deletions
diff --git a/nowopen b/nowopen
index 502703e..7c6adee 100755
--- a/nowopen
+++ b/nowopen
@@ -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)