diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-08-14 22:26:50 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-08-14 22:26:50 -0400 |
| commit | 6b63cb402144af4838577cb4b227939d0d49a830 (patch) | |
| tree | 40512e79adbe252e4891e9000e141f7a81c7aba7 | |
| parent | 1eb57393bbc14506c5d2f50acd16d070675ab56c (diff) | |
| -rwxr-xr-x | nowopen | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -76,7 +76,7 @@ end local re = require('re') local dsl = re.compile([=[ - file <- {| (place / ws? comment? %nl)* |} {.+}? + file <- {| (place / ws? comment? %nl)* |} {[^%nl]+ (!(%nl %nl) .)*}? .* place <- {| {:name: {word (ws word)*} :} ws? ("(" ws? {:tags: {| {tag} (ws? "," ws? {tag})* ws? |} :} ")")? ws? ":" @@ -97,14 +97,14 @@ local dsl = re.compile([=[ / ({:hour: {~"midnight"->'12'~} :} {:ampm: {~''->'am'~} :}) |} tag <- word (ws word)* - word <- [^%nl%tab (),:#-]+ + word <- [^%nl%tab (),:#]+ ws <- [ %tab]+ ]=], {tab="\t"}) local places,err = dsl:match(place_text) if err then print("Failed to parse config file:") - print(place_text:sub(1,#place_text-#err).."\x1b[31;7m"..err.."\x1b[0m") + print("\x1b[31;7m"..err.."\x1b[0m") os.exit(1) end |
