 ;; * list   -- "and" relationship, each pattern must match in order
 ;; * vector -- "or" relationship, one of the patterns must match
 ;; * symbol -- recursive reference to another pattern in the alist
+
+;; The global variable `rdp-best' indicates the furthest point reached
+;; in the buffer by the parser. Is parsing failed (i.e. `rdp-best' is
+;; not at the end of the buffer), this is likely to be the position of
+;; the syntax error.
 
 ;; For example, this grammar parses simple arithmetic with operator
 ;; precedence and grouping.

;;   (rdp-parse-string string arith-tokens arith-funcs))
;;
;; (arith "(1 + 2 + 3 + 4 + 5) * -3/4.0")

;;; Code:


;; This library provides a recursive descent parser for parsing
;; languages in buffers. Some support is provided for implementing
;; automatic indentation based on the parser.

;; In general, the only two functions you need to worry about are:

;; * `rpd-parse'        -- parse the current buffer
;; * `rpd-parse-string' -- parse a string (in a temp buffer)

;; A grammar is provided to the parser as an alist of patterns.
;; Patterns are named by symbols, which can reference other
