Function: c-awk-syntax-tablify-/
c-awk-syntax-tablify-/ is a byte-compiled function defined in
cc-awk.el.gz.
Signature
(c-awk-syntax-tablify-/ ANCHOR ANCHOR-STATE-/DIV)
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/cc-awk.el.gz
(t nil))) ; Unterminated string at EOB
(defun c-awk-syntax-tablify-/ (anchor anchor-state-/div)
;; Point is at a /. Determine whether this is a division sign or a regexp
;; opener, and if the latter, apply syntax-table properties to the entire
;; regexp. Point is left immediately after the division sign or regexp, as
;; the case may be.
;;
;; ANCHOR-STATE-/DIV identifies whether a / at ANCHOR would have been a
;; division sign (value t) or a regexp opener (value nil). The idea is that
;; we analyze the line from ANCHOR up till point to determine what the / at
;; point is.
;;
;; The result is what ANCHOR-STATE-/DIV (see above) is where point is left.
;;
;; This function does hidden buffer changes.
(let ((/point (point)))
(goto-char anchor)
;; Analyze the line to find out what the / is.
(if (if anchor-state-/div
(not (search-forward-regexp c-awk-regexp-sign-re (1+ /point) t))
(and (not (search-forward-regexp c-awk-kwd-regexp-sign-re (1+ /point) t))
(search-forward-regexp c-awk-div-sign-re (1+ /point) t)))
;; A division sign.
(progn (goto-char (1+ /point)) nil)
;; A regexp opener
;; Jump over the regexp innards, setting the match data.
(goto-char /point)
(search-forward-regexp c-awk-regexp-without-end-re)
(c-awk-set-string-regexp-syntax-table-properties
(match-beginning 0) (match-end 0))
(cond ((looking-at "/") ; Terminating /
(forward-char)
t)
((looking-at "[\n\r]") ; Incomplete regexp terminated by EOL
(forward-char)
nil) ; / on next line would start another regexp
(t nil))))) ; Unterminated regexp at EOB