Variable: rst-re-alist-def

rst-re-alist-def is a variable defined in rst.el.gz.

Value

Large value
((hws-prt "[	 ]")
 (hws-tag hws-prt "*")
 (hws-sta hws-prt "+")
 (lin-beg "^" hws-tag)
 (lin-end hws-tag "$")
 (linemp-tag "^" hws-tag "$")
 (ell-tag "\\.\\.\\.")
 (bul-tag "[-*+•‣⁃]")
 (ltr-tag "[a-zA-Z]")
 (num-prt "[0-9]")
 (num-tag num-prt "+")
 (rom-prt "[IVXLCDMivxlcdm]")
 (rom-tag rom-prt "+")
 (aut-tag "#")
 (dcl-tag "::")
 (bli-sfx
  (:alt hws-sta "$"))
 (bul-sta bul-tag bli-sfx)
 (bul-beg lin-beg bul-sta)
 (exm-tag "\\.\\.")
 (exm-sta exm-tag hws-sta)
 (exm-beg lin-beg exm-sta)
 (cntany-tag
  (:alt ltr-tag num-tag rom-tag aut-tag))
 (cntexp-tag
  (:alt ltr-tag num-tag rom-tag))
 (enmany-tag
  (:alt
   (:seq cntany-tag "\\.")
   (:seq "(?" cntany-tag ")")))
 (enmexp-tag
  (:alt
   (:seq cntexp-tag "\\.")
   (:seq "(?" cntexp-tag ")")))
 (enmaut-tag
  (:alt
   (:seq aut-tag "\\.")
   (:seq "(?" aut-tag ")")))
 (enmany-sta enmany-tag bli-sfx)
 (enmexp-sta enmexp-tag bli-sfx)
 (enmexp-beg lin-beg enmexp-sta)
 (itmany-tag
  (:alt enmany-tag bul-tag))
 (itmany-sta-1
  (:grp itmany-tag)
  bli-sfx)
 (itmany-beg-1 lin-beg itmany-sta-1)
 (ilm-pfx
  (:alt "^" hws-prt "['\"([{<‘“«’/:-]"))
 (ilm-sfx
  (:alt "$" hws-prt "[]'\")}>’”»/:.,;!?\\-]"))
 (ilcsgl-tag "\\S ")
 (ilcast-prt
  (:alt "[^*\\]" "\\\\."))
 (ilcbkq-prt
  (:alt "[^`\\]" "\\\\."))
 (ilcbkqdef-prt
  (:alt "[^`\\\n]" "\\\\."))
 (ilcbar-prt
  (:alt "[^|\\]" "\\\\."))
 (ilcbardef-prt
  (:alt "[^|\\\n]" "\\\\."))
 (ilcast-sfx "[^	 *\\]")
 (ilcbkq-sfx "[^	 `\\]")
 (ilcbar-sfx "[^	 |\\]")
 (ilcrep-hlp "\\{0,1000\\}")
 (ilcast-tag
  (:alt ilcsgl-tag
	(:seq ilcsgl-tag ilcast-prt ilcrep-hlp ilcast-sfx)))
 (ilcbkq-tag
  (:alt ilcsgl-tag
	(:seq ilcsgl-tag ilcbkq-prt ilcrep-hlp ilcbkq-sfx)))
 (ilcbkqdef-tag
  (:alt ilcsgl-tag
	(:seq ilcsgl-tag ilcbkqdef-prt ilcrep-hlp ilcbkq-sfx)))
 (ilcbar-tag
  (:alt ilcsgl-tag
	(:seq ilcsgl-tag ilcbar-prt ilcrep-hlp ilcbar-sfx)))
 (ilcbardef-tag
  (:alt ilcsgl-tag
	(:seq ilcsgl-tag ilcbardef-prt ilcrep-hlp ilcbar-sfx)))
 (fldnam-prt
  (:alt "[^:\n]" "\\\\:"))
 (fldnam-tag fldnam-prt "+")
 (fld-tag ":" fldnam-tag ":")
 (optsta-tag
  (:alt "[+/-]" "--"))
 (optnam-tag "\\sw"
	     (:alt "-" "\\sw")
	     "*")
 (optarg-tag
  (:shy "[ =]\\S +"))
 (optsep-tag
  (:shy "," hws-prt))
 (opt-tag
  (:shy optsta-tag optnam-tag optarg-tag "?"))
 (fncnam-prt "[^]\n]")
 (fncnam-tag fncnam-prt "+")
 (fnc-tag "\\[" fncnam-tag "]")
 (fncdef-tag-2
  (:grp exm-sta)
  (:grp fnc-tag))
 (fnc-sta-2 fncdef-tag-2 bli-sfx)
 (sub-tag "|" ilcbar-tag "|")
 (subdef-tag "|" ilcbardef-tag "|")
 (sym-prt "[+.:_-]")
 (sym-tag
  (:shy "\\sw+"
	(:shy sym-prt "\\sw+")
	"*"))
 (uri-tag
  (:alt "acap" "cid" "data" "dav" "fax" "file" "ftp" "gopher" "http" "https" "imap" "ldap" "mailto" "mid" "modem" "news" "nfs" "nntp" "pop" "prospero" "rtsp" "service" "sip" "tel" "telnet" "tip" "urn" "vemmi" "wais"))
 (ado-prt "[" "]!\"#$%&'()*+,./:;<=>?@[\\^_`{|}~-" "]")
 (adorep3-hlp "\\{3,\\}")
 (adorep2-hlp "\\{2,\\}")
 (ado-tag-1-1
  (:grp ado-prt)
  "\\1" adorep2-hlp)
 (ado-tag-1-2
  (:grp ado-prt)
  "\\2" adorep2-hlp)
 (ado-beg-2-1 "^"
	      (:grp ado-tag-1-2)
	      lin-end)
 (ttl-tag "\\S *\\w.*\\S ")
 (ttl-beg-1 lin-beg
	    (:grp ttl-tag))
 (dir-tag-3
  (:grp exm-sta)
  (:grp
   (:shy subdef-tag hws-sta)
   "?")
  (:grp sym-tag dcl-tag))
 (dir-sta-3 dir-tag-3 bli-sfx)
 (lit-sta-2
  (:grp
   (:alt "[^.\n]" "\\.[^.\n]")
   ".*")
  "?"
  (:grp dcl-tag)
  "$")
 (cmt-sta-1
  (:grp exm-sta)
  "[^[|_\n]"
  (:alt "[^:\n]"
	(:seq ":"
	      (:alt "[^:\n]" "$")))
  "*$")
 (par-tag-
  (:alt itmany-tag fld-tag opt-tag fncdef-tag-2 dir-tag-3 exm-tag)))

Documentation

Definition alist of relevant regexes.

Each entry consists of the symbol naming the regex and an argument list for rst-re.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/rst.el.gz
(defconst rst-re-alist-def
  ;; `*-beg' matches * at the beginning of a line.
  ;; `*-end' matches * at the end of a line.
  ;; `*-prt' matches a part of *.
  ;; `*-tag' matches *.
  ;; `*-sta' matches the start of * which may be followed by respective content.
  ;; `*-pfx' matches the delimiter left of *.
  ;; `*-sfx' matches the delimiter right of *.
  ;; `*-hlp' helper for *.
  ;;
  ;; A trailing number says how many referenceable groups are contained.
  `(

    ;; Horizontal white space (`hws')
    (hws-prt "[\t ]")
    (hws-tag hws-prt "*") ; Optional sequence of horizontal white space.
    (hws-sta hws-prt "+") ; Mandatory sequence of horizontal white space.

    ;; Lines (`lin')
    (lin-beg "^" hws-tag) ; Beginning of a possibly indented line.
    (lin-end hws-tag "$") ; End of a line with optional trailing white space.
    (linemp-tag "^" hws-tag "$") ; Empty line with optional white space.

    ;; Various tags and parts
    (ell-tag "\\.\\.\\.") ; Ellipsis
    (bul-tag ,(concat "[" rst-bullets "]")) ; A bullet.
    (ltr-tag "[a-zA-Z]") ; A letter enumerator tag.
    (num-prt "[0-9]") ; A number enumerator part.
    (num-tag num-prt "+") ; A number enumerator tag.
    (rom-prt "[IVXLCDMivxlcdm]") ; A roman enumerator part.
    (rom-tag rom-prt "+") ; A roman enumerator tag.
    (aut-tag "#") ; An automatic enumerator tag.
    (dcl-tag "::") ; Double colon.

    ;; Block lead in (`bli')
    (bli-sfx (:alt hws-sta "$")) ; Suffix of a block lead-in with *optional*
				 ; immediate content.

    ;; Various starts
    (bul-sta bul-tag bli-sfx) ; Start of a bulleted item.
    (bul-beg lin-beg bul-sta) ; A bullet item at the beginning of a line.

    ;; Explicit markup tag (`exm')
    (exm-tag "\\.\\.")
    (exm-sta exm-tag hws-sta)
    (exm-beg lin-beg exm-sta)

    ;; Counters in enumerations (`cnt')
    (cntany-tag (:alt ltr-tag num-tag rom-tag aut-tag)) ; An arbitrary counter.
    (cntexp-tag (:alt ltr-tag num-tag rom-tag)) ; An arbitrary explicit counter.

    ;; Enumerator (`enm')
    (enmany-tag (:alt
		 (:seq cntany-tag "\\.")
		 (:seq "(?" cntany-tag ")"))) ; An arbitrary enumerator.
    (enmexp-tag (:alt
		 (:seq cntexp-tag "\\.")
		 (:seq "(?" cntexp-tag ")"))) ; An arbitrary explicit
					      ; enumerator.
    (enmaut-tag (:alt
		 (:seq aut-tag "\\.")
		 (:seq "(?" aut-tag ")"))) ; An automatic enumerator.
    (enmany-sta enmany-tag bli-sfx) ; An arbitrary enumerator start.
    (enmexp-sta enmexp-tag bli-sfx) ; An arbitrary explicit enumerator start.
    (enmexp-beg lin-beg enmexp-sta) ; An arbitrary explicit enumerator start
				    ; at the beginning of a line.

    ;; Items may be enumerated or bulleted (`itm')
    (itmany-tag (:alt enmany-tag bul-tag)) ; An arbitrary item tag.
    (itmany-sta-1 (:grp itmany-tag) bli-sfx) ; An arbitrary item start, group
					     ; is the item tag.
    (itmany-beg-1 lin-beg itmany-sta-1) ; An arbitrary item start at the
                                        ; beginning of a line, group is the
                                        ; item tag.

    ;; Inline markup (`ilm')
    (ilm-pfx (:alt "^" hws-prt "['\"([{<‘“«’/:-]"))
    (ilm-sfx (:alt "$" hws-prt "[]'\")}>’”»/:.,;!?\\-]"))

    ;; Inline markup content (`ilc')
    (ilcsgl-tag "\\S ") ; A single non-white character.
    (ilcast-prt (:alt "[^*\\]" "\\\\.")) ; Part of non-asterisk content.
    (ilcbkq-prt (:alt "[^`\\]" "\\\\.")) ; Part of non-backquote content.
    (ilcbkqdef-prt (:alt "[^`\\\n]" "\\\\.")) ; Part of non-backquote
					      ; definition.
    (ilcbar-prt (:alt "[^|\\]" "\\\\.")) ; Part of non-vertical-bar content.
    (ilcbardef-prt (:alt "[^|\\\n]" "\\\\.")) ; Part of non-vertical-bar
					      ; definition.
    (ilcast-sfx "[^\t *\\]") ; Suffix of non-asterisk content.
    (ilcbkq-sfx "[^\t `\\]") ; Suffix of non-backquote content.
    (ilcbar-sfx "[^\t |\\]") ; Suffix of non-vertical-bar content.
    (ilcrep-hlp ,(format "\\{0,%d\\}" rst-max-inline-length)) ; Repeat count.
    (ilcast-tag (:alt ilcsgl-tag
		      (:seq ilcsgl-tag
			    ilcast-prt ilcrep-hlp
			    ilcast-sfx))) ; Non-asterisk content.
    (ilcbkq-tag (:alt ilcsgl-tag
		      (:seq ilcsgl-tag
			    ilcbkq-prt ilcrep-hlp
			    ilcbkq-sfx))) ; Non-backquote content.
    (ilcbkqdef-tag (:alt ilcsgl-tag
			 (:seq ilcsgl-tag
			       ilcbkqdef-prt ilcrep-hlp
			       ilcbkq-sfx))) ; Non-backquote definition.
    (ilcbar-tag (:alt ilcsgl-tag
		      (:seq ilcsgl-tag
			    ilcbar-prt ilcrep-hlp
			    ilcbar-sfx))) ; Non-vertical-bar content.
    (ilcbardef-tag (:alt ilcsgl-tag
			 (:seq ilcsgl-tag
			       ilcbardef-prt ilcrep-hlp
			       ilcbar-sfx))) ; Non-vertical-bar definition.

    ;; Fields (`fld')
    (fldnam-prt (:alt "[^:\n]" "\\\\:")) ; Part of a field name.
    (fldnam-tag fldnam-prt "+") ; A field name.
    (fld-tag ":" fldnam-tag ":") ; A field marker.

    ;; Options (`opt')
    (optsta-tag (:alt "[+/-]" "--")) ; Start of an option.
    (optnam-tag "\\sw" (:alt "-" "\\sw") "*") ; Name of an option.
    (optarg-tag (:shy "[ =]\\S +")) ; Option argument.
    (optsep-tag (:shy "," hws-prt)) ; Separator between options.
    (opt-tag (:shy optsta-tag optnam-tag optarg-tag "?")) ; A complete option.

    ;; Footnotes and citations (`fnc')
    (fncnam-prt "[^]\n]") ; Part of a footnote or citation name.
    (fncnam-tag fncnam-prt "+") ; A footnote or citation name.
    (fnc-tag "\\[" fncnam-tag "]") ; A complete footnote or citation tag.
    (fncdef-tag-2 (:grp exm-sta)
		  (:grp fnc-tag)) ; A complete footnote or citation definition
				  ; tag.  First group is the explicit markup
				  ; start, second group is the footnote /
				  ; citation tag.
    (fnc-sta-2 fncdef-tag-2 bli-sfx) ; Start of a footnote or citation
				     ; definition.  First group is the explicit
				     ; markup start, second group is the
				     ; footnote / citation tag.

    ;; Substitutions (`sub')
    (sub-tag "|" ilcbar-tag "|") ; A complete substitution tag.
    (subdef-tag "|" ilcbardef-tag "|") ; A complete substitution definition
				       ; tag.

    ;; Symbol (`sym')
    (sym-prt "[+.:_-]") ; Non-word part of a symbol.
    (sym-tag (:shy "\\sw+" (:shy sym-prt "\\sw+") "*"))

    ;; URIs (`uri')
    (uri-tag (:alt ,@rst-uri-schemes))

    ;; Adornment (`ado')
    (ado-prt "[" ,(concat rst-adornment-chars) "]")
    (adorep3-hlp "\\{3,\\}") ; There must be at least 3 characters because
			     ; otherwise explicit markup start would be
			     ; recognized.
    (adorep2-hlp "\\{2,\\}") ; As `adorep3-hlp' but when the first of three
			     ; characters is matched differently.
    (ado-tag-1-1 (:grp ado-prt)
		 "\\1" adorep2-hlp) ; A complete adornment, group is the first
				    ; adornment character and MUST be the FIRST
				    ; group in the whole expression.
    (ado-tag-1-2 (:grp ado-prt)
		 "\\2" adorep2-hlp) ; A complete adornment, group is the first
				    ; adornment character and MUST be the
				    ; SECOND group in the whole expression.
    (ado-beg-2-1 "^" (:grp ado-tag-1-2)
		 lin-end) ; A complete adornment line; first group is the whole
			  ; adornment and MUST be the FIRST group in the whole
			  ; expression; second group is the first adornment
			  ; character.

    ;; Titles (`ttl')
    (ttl-tag "\\S *\\w.*\\S ") ; A title text.
    (ttl-beg-1 lin-beg (:grp ttl-tag)) ; A title text at the beginning of a
				       ; line.  First group is the complete,
				       ; trimmed title text.

    ;; Directives and substitution definitions (`dir')
    (dir-tag-3 (:grp exm-sta)
	       (:grp (:shy subdef-tag hws-sta) "?")
	       (:grp sym-tag dcl-tag)) ; A directive or substitution definition
				       ; tag.  First group is explicit markup
				       ; start, second group is a possibly
				       ; empty substitution tag, third group is
				       ; the directive tag including the double
				       ; colon.
    (dir-sta-3 dir-tag-3 bli-sfx) ; Start of a directive or substitution
				  ; definition.  Groups are as in dir-tag-3.

    ;; Literal block (`lit')
    (lit-sta-2 (:grp (:alt "[^.\n]" "\\.[^.\n]") ".*") "?"
	       (:grp dcl-tag) "$") ; Start of a literal block.  First group is
				   ; any text before the double colon tag which
				   ; may not exist, second group is the double
				   ; colon tag.

    ;; Comments (`cmt')
    (cmt-sta-1 (:grp exm-sta) "[^[|_\n]"
	       (:alt "[^:\n]" (:seq ":" (:alt "[^:\n]" "$")))
	       "*$") ; Start of a comment block; first group is explicit markup
		     ; start.

    ;; Paragraphs (`par')
    (par-tag- (:alt itmany-tag fld-tag opt-tag fncdef-tag-2 dir-tag-3 exm-tag)
	      ) ; Tag at the beginning of a paragraph; there may be groups in
		; certain cases.
    )
  "Definition alist of relevant regexes.
Each entry consists of the symbol naming the regex and an
argument list for `rst-re'.")