Parsing fix
This commit is contained in:
parent
84972581be
commit
dd689e72ea
6
nowopen
6
nowopen
@ -81,8 +81,8 @@ local dsl = re.compile([=[
|
|||||||
|}
|
|}
|
||||||
comment <- "#" [^%nl]*
|
comment <- "#" [^%nl]*
|
||||||
days <-
|
days <-
|
||||||
({:from: {word} :} ws? "-" ws? {:to: {word} :} ws? ":")
|
({:from: {[a-zA-Z]+} :} ws? "-" ws? {:to: {[a-zA-Z]+} :} ws? ":")
|
||||||
/({:from: {word} :} ws? ":")
|
/({:from: {[a-zA-Z]+} :} ws? ":")
|
||||||
/({:from:''->'sun':} {:to:''->'sat':})
|
/({:from:''->'sun':} {:to:''->'sat':})
|
||||||
time_range <- {| {:open: time :} ws? "-" ws? {:close: time :} |}
|
time_range <- {| {:open: time :} ws? "-" ws? {:close: time :} |}
|
||||||
time <- {|
|
time <- {|
|
||||||
@ -91,7 +91,7 @@ local dsl = re.compile([=[
|
|||||||
/ ("midnight" {:hour: {~''->'12'~} :} {:ampm: {~''->'am'~} :})
|
/ ("midnight" {:hour: {~''->'12'~} :} {:ampm: {~''->'am'~} :})
|
||||||
|}
|
|}
|
||||||
tag <- word (ws word)*
|
tag <- word (ws word)*
|
||||||
word <- [^%nl%tab (),:#0-9-]+
|
word <- [^%nl%tab (),:#&0-9-]+
|
||||||
ws <- [ %tab]+
|
ws <- [ %tab]+
|
||||||
]=], {tab="\t"})
|
]=], {tab="\t"})
|
||||||
local places,err = dsl:match(place_text)
|
local places,err = dsl:match(place_text)
|
||||||
|
Loading…
Reference in New Issue
Block a user