diff options
author | Thien-Thi Nguyen <ttn@gnuvola.org> | 2005-06-11 23:56:33 +0000 |
---|---|---|
committer | Thien-Thi Nguyen <ttn@gnuvola.org> | 2005-06-11 23:56:33 +0000 |
commit | 8b09abe105f3bc293f4f73b320d6a8c102a70ae1 (patch) | |
tree | 4935c2705d21e6d88ec638e2391d52dafaa0e63e | |
parent | 8e71c318da60b6bc1a02e0c14b859a3c0bb00b23 (diff) | |
download | emacs-8b09abe105f3bc293f4f73b320d6a8c102a70ae1.tar.gz |
Fix `repeat' BNF and `bits 2' example in Commentary.
-rw-r--r-- | lisp/emacs-lisp/bindat.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/bindat.el b/lisp/emacs-lisp/bindat.el index d8b4b4f6c19..7ed01e4bdea 100644 --- a/lisp/emacs-lisp/bindat.el +++ b/lisp/emacs-lisp/bindat.el @@ -85,7 +85,7 @@ ;; (items u8) ;; (fill 3) ;; (item repeat (items) -;; ((struct data-spec))))) +;; (struct data-spec)))) ;; ;; ;; A binary data representation may look like @@ -131,7 +131,7 @@ ;; | ( [FIELD] align LEN ) -- skip to next multiple of LEN bytes ;; | ( [FIELD] struct SPEC_NAME ) ;; | ( [FIELD] union TAG_VAL (TAG SPEC)... [(t SPEC)] ) -;; | ( [FIELD] repeat COUNT SPEC ) +;; | ( [FIELD] repeat COUNT ITEM... ) ;; -- In (eval EXPR), the value of the last field is available in ;; the dynamically bound variable `last'. @@ -151,7 +151,8 @@ ;; -- Note: 32 bit values may be limited by emacs' INTEGER ;; implementation limits. ;; -;; -- Example: bits 2 will map bytes 0x1c 0x28 to list (2 3 7 11 13) +;; -- Example: `bits 2' will unpack 0x28 0x1c to (2 3 4 11 13) +;; and 0x1c 0x28 to (3 5 10 11 12). ;; FIELD ::= ( eval EXPR ) -- use result as NAME ;; | NAME |