From 42ca309c12239f4f66df37ce678c89a06fa80079 Mon Sep 17 00:00:00 2001 From: John Mettraux Date: Wed, 14 Sep 2022 09:43:07 +0900 Subject: [PATCH] Leverage the regex engine at max, gh-77 --- lib/fugit/cron.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/fugit/cron.rb b/lib/fugit/cron.rb index 85f6e96..d509d91 100644 --- a/lib/fugit/cron.rb +++ b/lib/fugit/cron.rb @@ -721,12 +721,12 @@ def list_dom(i); jseq(:dom, i, :dom_elt, :comma); end def list_mon(i); jseq(:mon, i, :mon_elt, :comma); end def list_dow(i); jseq(:dow, i, :dow_elt_, :comma); end - def lsec_(i); seq(nil, i, :comma, '?', :list_sec, :comma, '?', :s); end - def lmin_(i); seq(nil, i, :comma, '?', :list_min, :comma, '?', :s); end - def lhou_(i); seq(nil, i, :comma, '?', :list_hou, :comma, '?', :s); end - def ldom_(i); seq(nil, i, :comma, '?', :list_dom, :comma, '?', :s); end - def lmon_(i); seq(nil, i, :comma, '?', :list_mon, :comma, '?', :s); end - def ldow(i); seq(nil, i, :comma, '?', :list_dow, :comma, '?'); end + def lsec_(i); seq(nil, i, :comma?, :list_sec, :comma?, :s); end + def lmin_(i); seq(nil, i, :comma?, :list_min, :comma?, :s); end + def lhou_(i); seq(nil, i, :comma?, :list_hou, :comma?, :s); end + def ldom_(i); seq(nil, i, :comma?, :list_dom, :comma?, :s); end + def lmon_(i); seq(nil, i, :comma?, :list_mon, :comma?, :s); end + def ldow(i); seq(nil, i, :comma?, :list_dow, :comma?); end def _tz_name(i) rex(nil, i, / +[A-Z][a-zA-Z0-9+\-]+(\/[A-Z][a-zA-Z0-9+\-_]+){0,2}/)