[regexp] ignore )?, for now

This commit is contained in:
ben 2016-03-14 11:46:38 -04:00
parent aa200c3747
commit 2b1a0b939c
2 changed files with 13 additions and 1 deletions

View File

@ -82,8 +82,11 @@
[(#\))
(cond
[(and (< i last-index)
(eq? #\* (string-ref str (+ i 1))))
(or
(eq? #\? (string-ref str (+ i 1)))
(eq? #\* (string-ref str (+ i 1)))))
;; Group is starred, can't predict num. matches statically
;; or ?'d
#f]
[(null? in-paren)
(group-error str (format "')' at index ~a" i))]

View File

@ -250,4 +250,13 @@
(U #f (Listof (U #f String))))
'("that" #f))
(let-regexp: ([NODE_REGEXP
#rx"^\\\\node *\\(([0-9]+)\\) *(\\[.*\\])? *\\{\\\\rkt\\{([0-9]+)\\}\\{(.+)\\}\\};$"])
(regexp-match: NODE_REGEXP "hai")
(void))
(let-regexp: ([EDGE_REGEXP
#rx"^\\\\draw\\[.*\\]? *\\(([0-9]+)\\)[^(]*\\(([0-9]+)\\);$"])
(regexp-match: EDGE_REGEXP "bye")
(void))
)