     (pairs     pair [("," pairs) ""])
     (pair      id ":" expr)
     (object    "{" [pairs ""] "}")
-    (index     [("(" expr ")") id] "\\." field)
+    (index     [("(" expr ")") id] [by-id index-str])
     (message   [("(" expr ")") id] "@" [index-str field] "(" aexprs ")")
+    (by-id     "\\." field)
     (field   . id)
     (index-str "\\[" expr "\\]"))
   "The ParselTongue grammar.")

                      (let ((o (if (listp obj) (nth 1 obj) obj)))
                        `(funcall (cdr (assq ,f ,o)) ,o ,@args)))))
    (field     . ,(lambda (token field) `(quote ,field)))
    (index-str . ,(lambda (token index) `(intern ,(nth 1 index)))))
  "Syntax tree manipulation functions.")

(defun psl--tuck (token names)

    (print     . ,(lambda (token op) (cons 'psl-print (nth 2 op))))
    (index     . ,(lambda (token index)
                    (let ((obj (nth 0 index)))
                      `(cdr (assq ,(nth 1 index)
                                  ,(if (listp obj)
                                       (nth 1 obj)
                                     obj))))))
