summaryrefslogtreecommitdiff
path: root/admin
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-12-10 16:56:50 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2011-12-10 16:56:50 -0800
commit8f50130c565eaf0ad7c49e4ad044c3291ecdfa71 (patch)
treec8129448cbbf387fe82667ccac02983592c688f1 /admin
parent85a83e2e2585a1906dec5168ed96ad521b5849ed (diff)
parent7b9d523a07395ecea505be88f45c33d73aea7038 (diff)
downloademacs-8f50130c565eaf0ad7c49e4ad044c3291ecdfa71.tar.gz
Merge from trunk.
Diffstat (limited to 'admin')
-rw-r--r--admin/CPP-DEFINES5
-rw-r--r--admin/ChangeLog23
-rw-r--r--admin/FOR-RELEASE7
-rw-r--r--admin/MAINTAINERS4
-rw-r--r--admin/charsets/cp51932.awk2
-rw-r--r--admin/grammars/README13
-rw-r--r--admin/grammars/bovine-grammar.el66
-rw-r--r--admin/grammars/c.by2
-rw-r--r--admin/grammars/grammar.wy434
-rw-r--r--admin/grammars/java-tags.wy2
-rw-r--r--admin/grammars/srecode-template.wy235
-rw-r--r--admin/grammars/wisent-grammar.el178
-rw-r--r--admin/notes/multi-tty6
-rw-r--r--admin/notes/nextstep2
-rw-r--r--admin/nt/README-ftp-server2
-rw-r--r--admin/unidata/unidata-gen.el2
16 files changed, 948 insertions, 35 deletions
diff --git a/admin/CPP-DEFINES b/admin/CPP-DEFINES
index 6e0f736a06f..c5f8c7ab31f 100644
--- a/admin/CPP-DEFINES
+++ b/admin/CPP-DEFINES
@@ -48,7 +48,7 @@ SYSTEM_MALLOC Use the system library's malloc.
subprocesses System can use subprocesses (for M-x shell for example). Defined by default, only MSDOS undefines it.
USE_LISP_UNION_TYPE Define it in lisp.h to make Lisp_Object be a union type instead of the default int.
-** System specific macros, decribed in detail in src/s/template.h
+** System specific macros, described in detail in src/s/template.h
CLASH_DETECTION
COFF
FIRST_PTY_LETTER
@@ -58,9 +58,6 @@ NARROWPROTO
SEPCHAR
SYSTEM_TYPE
-** Machine specific macros, decribed in detail in src/m/template.h
-VIRT_ADDR_VARIES
-
** Misc macros
USER_FULL_NAME If defined, overrides the default pw->pw_gecos for getting at the full user name. Only MSDOS overrides the default.
diff --git a/admin/ChangeLog b/admin/ChangeLog
index 6030dd8f6d3..4da85943b7f 100644
--- a/admin/ChangeLog
+++ b/admin/ChangeLog
@@ -1,3 +1,20 @@
+2011-11-26 Andreas Schwab <schwab@linux-m68k.org>
+
+ * grammars/bovine-grammar.el (bovine--grammar-newstyle-unquote):
+ Avoid warning about old-style backquote.
+
+ * grammars/wisent-grammar.el (auto-mode-alist): Change `$' to `\''
+ in regexp.
+ (wisent-make-parsers): Likewise. Quote `.'.
+
+ * grammars/bovine-grammar.el (auto-mode-alist): Change `$' to `\''
+ in regexp.
+ (bovine-make-parsers): Likewise. Quote `.'.
+
+2011-11-20 Andreas Schwab <schwab@linux-m68k.org>
+
+ * CPP-DEFINES (VIRT_ADDR_VARIES): Remove.
+
2011-11-16 Juanma Barranquero <lekktu@gmail.com>
* admin.el (manual-dvi): Fix typo.
@@ -398,7 +415,7 @@
2009-06-24 Kenichi Handa <handa@m17n.org>
- * charsets/mapconv: For the UNICODE format files, do reverse sort
+ * charsets/mapconv: For the Unicode format files, do reverse sort
and don't compact the map. This is to prefer the first one in the
duplicated mappings (e.g. 0x20->U+0020, 0x20->U+00A0).
@@ -893,11 +910,11 @@
* FOR-RELEASE (NEW FEATURES): Completed work on this item:
Rework how fringe bitmaps are defined and used.
- Currently, bitmap usage and bitmap appearence are "mixed-up" in a
+ Currently, bitmap usage and bitmap appearance are "mixed-up" in a
one-level representation. It would be cleaner to split the
representation into a two-level model where first level maps
bitmap usage to a bitmap name, and second level maps bitmap name to
- a bitmap appearence.
+ a bitmap appearance.
2006-01-27 Chong Yidong <cyd@stupidchicken.com>
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE
index 01d488c97e3..23d2bd2b16a 100644
--- a/admin/FOR-RELEASE
+++ b/admin/FOR-RELEASE
@@ -170,10 +170,10 @@ entering.texi cyd
files.texi cyd
fixit.texi
fortran-xtra.texi
-frames.texi
+frames.texi cyd
glossary.texi
help.texi cyd
-indent.texi
+indent.texi cyd
killing.texi cyd
kmacro.texi cyd
macos.texi
@@ -182,6 +182,7 @@ major.texi
mark.texi cyd
mini.texi
misc.texi
+modes.texi cyd
msdog.texi
msdog-xtra.texi
mule.texi
@@ -197,7 +198,7 @@ text.texi
trouble.texi
vc-xtra.texi
vc1-xtra.texi
-windows.texi
+windows.texi cyd
xresources.texi
** Check the Lisp manual.
diff --git a/admin/MAINTAINERS b/admin/MAINTAINERS
index e4a04763061..bfac347eb15 100644
--- a/admin/MAINTAINERS
+++ b/admin/MAINTAINERS
@@ -99,6 +99,7 @@ Eli Zaretskii
src/xfaces.c
src/xdisp.c
src/term.c
+ src/dispnew.c
src/frame.c
src/dired.c
@@ -108,6 +109,7 @@ Eli Zaretskii
lisp/info.el
lisp/ls-lisp.el
lisp/startup.el
+ lisp/w32*.el
Stefan Monnier
src/intervals.c
@@ -148,7 +150,6 @@ src/coding.c
src/composite.c
src/config.in
src/data.c
-src/dispnew.c
src/doc.c
src/doprnt.c
src/ecrt0.c
@@ -214,7 +215,6 @@ src/w32term.c
src/w32xfns.c
src/widget.c
src/window.c
-src/xdisp.c
src/xfns.c
src/xmenu.c
src/xrdb.c
diff --git a/admin/charsets/cp51932.awk b/admin/charsets/cp51932.awk
index b611def710d..c8879b30200 100644
--- a/admin/charsets/cp51932.awk
+++ b/admin/charsets/cp51932.awk
@@ -32,7 +32,7 @@
BEGIN {
print ";;; cp51932.el -- translation table for CP51932. -*- no-byte-compile: t -*-";
- print ";;; Automatically genrated from CP932-2BYTE.map";
+ print ";;; Automatically generated from CP932-2BYTE.map";
print "(let ((map";
printf " '(;JISEXT<->UNICODE";
}
diff --git a/admin/grammars/README b/admin/grammars/README
index c8328bbc885..419797e0dcb 100644
--- a/admin/grammars/README
+++ b/admin/grammars/README
@@ -3,17 +3,8 @@ generate the parser data in the lisp/semantic/bovine/ and
lisp/semantic/wisent/ directories. You can run the parser generators
with
-emacs -batch --no-site-file -l bovine-grammar.el -f semantic-mode \
- -f semantic-grammar-batch-build-packages *.by
-
-emacs -batch --no-site-file -l wisent-grammar.el -f semantic-mode \
- -f semantic-grammar-batch-build-packages *.wy
-
-The output files were subsequently edited by hand to fix copyright
-headers, variable names (to follow library name conventions), and
-feature names. These changes do not alter the code logic, and can be
-viewed by diffing to the files in lisp/semantic/bovine/ and
-lisp/semantic/wisent/.
+emacs -batch -Q -l bovine-grammar.el -f bovine-make-parsers
+emacs -batch -Q -l wisent-grammar.el -f wisent-make-parsers
Currently, the parser files in lisp/ are not generated directly from
these grammar files when making Emacs. This state of affairs, and the
diff --git a/admin/grammars/bovine-grammar.el b/admin/grammars/bovine-grammar.el
index 0e8756e1c5b..eda7b42adbd 100644
--- a/admin/grammars/bovine-grammar.el
+++ b/admin/grammars/bovine-grammar.el
@@ -115,7 +115,7 @@ NAME, ALIASCLASS, DEFINITION and ATTRIBUTES."
;; when it is released, but at the moment it might be possible that people
;; are using an older snapshot.
(defvar bovine--grammar-newstyle-unquote
- (equal '(, test) (read ",test")))
+ (equal '(\, test) (read ",test")))
(defun bovine-grammar-expand-form (form quotemode &optional inplace)
"Expand FORM into a new one suitable to the bovine parser.
@@ -434,7 +434,7 @@ Menu items are appended to the common grammar menu.")
(grammar-setupcode-builder . bovine-grammar-setupcode-builder)
)))
-(add-to-list 'auto-mode-alist '("\\.by$" . bovine-grammar-mode))
+(add-to-list 'auto-mode-alist '("\\.by\\'" . bovine-grammar-mode))
(defvar-mode-local bovine-grammar-mode semantic-grammar-macros
'(
@@ -454,4 +454,66 @@ Menu items are appended to the common grammar menu.")
(provide 'semantic/bovine/grammar)
+(defun bovine-make-parsers ()
+ "Generate Emacs' built-in Bovine-based parser files."
+ (semantic-mode 1)
+ ;; Loop through each .by file in current directory, and run
+ ;; `semantic-grammar-batch-build-one-package' to build the grammar.
+ (dolist (f (directory-files default-directory nil "\\.by\\'"))
+ (let ((packagename
+ (condition-case err
+ (with-current-buffer (find-file-noselect f)
+ (semantic-grammar-create-package))
+ (error (message "%s" (error-message-string err)) nil)))
+ lang)
+ (when (and packagename
+ (string-match "^semantic-\\(.*\\)-by\\.el\\'" packagename))
+ (setq lang (match-string 1 packagename))
+ (with-temp-buffer
+ (insert-file-contents packagename)
+ (setq buffer-file-name (expand-file-name packagename))
+ ;; Fix copyright header:
+ (goto-char (point-min))
+ (re-search-forward "^;; Author:")
+ (setq copyright-end (match-beginning 0))
+ (re-search-forward "^;;; Code:\n")
+ (delete-region copyright-end (match-end 0))
+ (goto-char copyright-end)
+ (insert ";; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+;;
+;; This file was generated from admin/grammars/"
+ lang ".by.
+
+;;; Code:
+
+\(require 'semantic/lex)
+\(eval-when-compile (require 'semantic/bovine))\n")
+ (goto-char (point-min))
+ (delete-region (point-min) (line-end-position))
+ (insert ";;; semantic/bovine/" lang
+ "-by.el --- Generated parser support file")
+ (delete-trailing-whitespace)
+ ;; Fix footer:
+ (goto-char (point-max))
+ (re-search-backward ".\n;;; Analyzers")
+ (delete-region (point) (point-max))
+ (insert "(provide 'semantic/bovine/" lang "-by)\n\n")
+ (insert ";;; semantic/bovine/" lang "-by.el ends here\n")
+ (save-buffer))))))
+
;;; bovine-grammar.el ends here
diff --git a/admin/grammars/c.by b/admin/grammars/c.by
index 004f0b5f30f..b49f8ce76c7 100644
--- a/admin/grammars/c.by
+++ b/admin/grammars/c.by
@@ -122,7 +122,7 @@
%put DELETE summary "delete <object>;"
;; Despite this, this parser can find templates by ignoring the TEMPLATE
-;; keyword, and finding the class/method being templateized.
+;; keyword, and finding the class/method being templatized.
%token TEMPLATE "template"
%put TEMPLATE summary "template <class TYPE ...> TYPE_OR_FUNCTION"
diff --git a/admin/grammars/grammar.wy b/admin/grammars/grammar.wy
new file mode 100644
index 00000000000..18e8b814303
--- /dev/null
+++ b/admin/grammars/grammar.wy
@@ -0,0 +1,434 @@
+;;; semantic-grammar.wy -- LALR grammar of Semantic input grammars
+;;
+;; Copyright (C) 2002-2011 Free Software Foundation, Inc.
+;;
+;; Author: David Ponce <david@dponce.com>
+;; Maintainer: David Ponce <david@dponce.com>
+;; Created: 26 Aug 2002
+;; Keywords: syntax
+;; X-RCS: $Id: semantic-grammar.wy,v 1.16 2005/09/30 20:20:27 zappo Exp $
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
+
+%{
+(defvar semantic-grammar-lex-c-char-re)
+
+;; Current parsed nonterminal name.
+(defvar semantic-grammar-wy--nterm nil)
+;; Index of rule in a nonterminal clause.
+(defvar semantic-grammar-wy--rindx nil)
+}
+
+%package semantic-grammar-wy
+
+%languagemode wy-mode
+
+;; Main
+%start grammar
+;; Reparse
+%start prologue epilogue declaration nonterminal rule
+;; EXPANDFULL
+%start put_names put_values use_names
+
+;; Keywords
+%type <keyword>
+%keyword DEFAULT-PREC "%default-prec"
+%keyword NO-DEFAULT-PREC "%no-default-prec"
+%keyword KEYWORD "%keyword"
+%keyword LANGUAGEMODE "%languagemode"
+%keyword LEFT "%left"
+%keyword NONASSOC "%nonassoc"
+%keyword PACKAGE "%package"
+%keyword PREC "%prec"
+%keyword PUT "%put"
+%keyword QUOTEMODE "%quotemode"
+%keyword RIGHT "%right"
+%keyword SCOPESTART "%scopestart"
+%keyword START "%start"
+%keyword TOKEN "%token"
+%keyword TYPE "%type"
+%keyword USE-MACROS "%use-macros"
+
+;; Literals
+%type <string>
+%token <string> STRING
+
+%type <symbol> syntax ":?\\(\\sw\\|\\s_\\)+"
+%token <symbol> SYMBOL
+%token <symbol> PERCENT_PERCENT "\\`%%\\'"
+
+%type <char> syntax semantic-grammar-lex-c-char-re
+%token <char> CHARACTER
+
+%type <qlist> matchdatatype sexp syntax "\\s'\\s-*("
+%token <qlist> PREFIXED_LIST
+
+%type <sexp> matchdatatype sexp syntax "\\="
+%token <sexp> SEXP
+
+;; Don't generate these analyzers which needs special handling code.
+%token <code> PROLOGUE "%{...%}"
+%token <code> EPILOGUE "%%...EOF"
+
+;; Blocks & Parenthesis
+%type <block>
+%token <block> PAREN_BLOCK "(LPAREN RPAREN)"
+%token <block> BRACE_BLOCK "(LBRACE RBRACE)"
+%token <open-paren> LPAREN "("
+%token <close-paren> RPAREN ")"
+%token <open-paren> LBRACE "{"
+%token <close-paren> RBRACE "}"
+
+;; Punctuations
+%type <punctuation>
+%token <punctuation> COLON ":"
+%token <punctuation> SEMI ";"
+%token <punctuation> OR "|"
+%token <punctuation> LT "<"
+%token <punctuation> GT ">"
+
+%%
+
+grammar:
+ prologue
+ | epilogue
+ | declaration
+ | nonterminal
+ | PERCENT_PERCENT
+ ;
+
+;;; Prologue/Epilogue
+;;
+prologue:
+ PROLOGUE
+ (CODE-TAG "prologue" nil)
+ ;
+
+epilogue:
+ EPILOGUE
+ (CODE-TAG "epilogue" nil)
+ ;
+
+;;; Declarations
+;;
+declaration:
+ decl
+ (eval $1)
+ ;
+
+decl:
+ default_prec_decl
+ | no_default_prec_decl
+ | languagemode_decl
+ | package_decl
+ | precedence_decl
+ | put_decl
+ | quotemode_decl
+ | scopestart_decl
+ | start_decl
+ | keyword_decl
+ | token_decl
+ | type_decl
+ | use_macros_decl
+ ;
+
+default_prec_decl:
+ DEFAULT-PREC
+ `(TAG "default-prec" 'assoc :value '("t"))
+ ;
+
+no_default_prec_decl:
+ NO-DEFAULT-PREC
+ `(TAG "default-prec" 'assoc :value '("nil"))
+ ;
+
+languagemode_decl:
+ LANGUAGEMODE symbols
+ `(TAG ',(car $2) 'languagemode :rest ',(cdr $2))
+ ;
+
+package_decl:
+ PACKAGE SYMBOL
+ `(PACKAGE-TAG ',$2 nil)
+ ;
+
+precedence_decl:
+ associativity token_type_opt items
+ `(TAG ',$1 'assoc :type ',$2 :value ',$3)
+ ;
+
+associativity:
+ LEFT
+ (progn "left")
+ | RIGHT
+ (progn "right")
+ | NONASSOC
+ (progn "nonassoc")
+ ;
+
+put_decl:
+ PUT put_name put_value
+ `(TAG ',$2 'put :value ',(list $3))
+ | PUT put_name put_value_list
+ `(TAG ',$2 'put :value ',$3)
+ | PUT put_name_list put_value
+ `(TAG ',(car $2) 'put :rest ',(cdr $2) :value ',(list $3))
+ | PUT put_name_list put_value_list
+ `(TAG ',(car $2) 'put :rest ',(cdr $2) :value ',$3)
+ ;
+
+put_name_list:
+ BRACE_BLOCK
+ (mapcar 'semantic-tag-name (EXPANDFULL $1 put_names))
+ ;
+
+put_names:
+ LBRACE
+ ()
+ | RBRACE
+ ()
+ | put_name
+ ;; Must return a list of Semantic tags to EXPANDFULL!
+ (TAG $1 'put-name)
+ ;
+
+put_name:
+ SYMBOL
+ | token_type
+ ;
+
+put_value_list:
+ BRACE_BLOCK
+ (mapcar 'semantic-tag-code-detail (EXPANDFULL $1 put_values))
+ ;
+
+put_values:
+ LBRACE
+ ()
+ | RBRACE
+ ()
+ | put_value
+ ;; Must return a list of Semantic tags to EXPANDFULL!
+ (CODE-TAG "put-value" $1)
+ ;
+
+put_value:
+ SYMBOL any_value
+ (cons $1 $2)
+ ;
+
+scopestart_decl:
+ SCOPESTART SYMBOL
+ `(TAG ',$2 'scopestart)
+ ;
+
+quotemode_decl:
+ QUOTEMODE SYMBOL
+ `(TAG ',$2 'quotemode)
+ ;
+
+start_decl:
+ START symbols
+ `(TAG ',(car $2) 'start :rest ',(cdr $2))
+ ;
+
+keyword_decl:
+ KEYWORD SYMBOL string_value
+ `(TAG ',$2 'keyword :value ',$3)
+ ;
+
+token_decl:
+ TOKEN token_type_opt SYMBOL string_value
+ `(TAG ',$3 ',(if $2 'token 'keyword) :type ',$2 :value ',$4)
+ | TOKEN token_type_opt symbols
+ `(TAG ',(car $3) 'token :type ',$2 :rest ',(cdr $3))
+ ;
+
+token_type_opt:
+ ;; EMPTY
+ | token_type
+ ;
+
+token_type:
+ LT SYMBOL GT
+ (progn $2)
+ ;
+
+type_decl:
+ TYPE token_type plist_opt
+ `(TAG ',$2 'type :value ',$3)
+ ;
+
+plist_opt:
+ ;;EMPTY
+ | plist
+ ;
+
+plist:
+ plist put_value
+ (append (list $2) $1)
+ | put_value
+ (list $1)
+ ;
+
+use_name_list:
+ BRACE_BLOCK
+ (mapcar 'semantic-tag-name (EXPANDFULL $1 use_names))
+ ;
+
+use_names:
+ LBRACE
+ ()
+ | RBRACE
+ ()
+ | SYMBOL
+ ;; Must return a list of Semantic tags to EXPANDFULL!
+ (TAG $1 'use-name)
+ ;
+
+use_macros_decl:
+ USE-MACROS SYMBOL use_name_list
+ `(TAG "macro" 'macro :type ',$2 :value ',$3)
+ ;
+
+string_value:
+ STRING
+ (read $1)
+ ;
+
+;; Return a Lisp readable form
+any_value:
+ SYMBOL
+ | STRING
+ | PAREN_BLOCK
+ | PREFIXED_LIST
+ | SEXP
+ ;
+
+symbols:
+ lifo_symbols
+ (nreverse $1)
+ ;
+
+lifo_symbols:
+ lifo_symbols SYMBOL
+ (cons $2 $1)
+ | SYMBOL
+ (list $1)
+ ;
+
+;;; Grammar rules
+;;
+nonterminal:
+ SYMBOL
+ (setq semantic-grammar-wy--nterm $1
+ semantic-grammar-wy--rindx 0)
+ COLON rules SEMI
+ (TAG $1 'nonterminal :children $4)
+ ;
+
+rules:
+ lifo_rules
+ (apply 'nconc (nreverse $1))
+ ;
+
+lifo_rules:
+ lifo_rules OR rule
+ (cons $3 $1)
+ | rule
+ (list $1)
+ ;
+
+rule:
+ rhs
+ (let* ((nterm semantic-grammar-wy--nterm)
+ (rindx semantic-grammar-wy--rindx)
+ (rhs $1)
+ comps prec action elt)
+ (setq semantic-grammar-wy--rindx (1+ semantic-grammar-wy--rindx))
+ (while rhs
+ (setq elt (car rhs)
+ rhs (cdr rhs))
+ (cond
+ ;; precedence level
+ ((vectorp elt)
+ (if prec
+ (error "Duplicate %%prec in `%s:%d' rule" nterm rindx))
+ (setq prec (aref elt 0)))
+ ;; action
+ ((consp elt)
+ ;; don't forget that rhs items are in reverse order, so
+ ;; the end-of-rule semantic action is the first item.
+ (if (or action comps)
+ ;; a mid-rule action
+ (setq comps (cons elt comps)
+ ;; keep rule and action index synchronized
+ semantic-grammar-wy--rindx
+ (1+ semantic-grammar-wy--rindx))
+ ;; the end-of-rule action
+ (setq action (car elt))))
+ ;; item
+ (t
+ (setq comps (cons elt comps)))))
+ (EXPANDTAG
+ (TAG (format "%s:%d" nterm rindx) 'rule
+ :type (if comps "group" "empty")
+ :value comps :prec prec :expr action)))
+ ;
+
+rhs:
+ ;; EMPTY
+ | rhs item
+ (cons $2 $1)
+ | rhs action
+ (cons (list $2) $1)
+ | rhs PREC item
+ (cons (vector $3) $1)
+ ;
+
+action:
+ PAREN_BLOCK
+ | PREFIXED_LIST
+ | BRACE_BLOCK
+ (format "(progn\n%s)"
+ (let ((s $1))
+ (if (string-match "^{[\r\n\t ]*" s)
+ (setq s (substring s (match-end 0))))
+ (if (string-match "[\r\n\t ]*}$" s)
+ (setq s (substring s 0 (match-beginning 0))))
+ s))
+ ;
+
+items:
+ lifo_items
+ (nreverse $1)
+ ;
+
+lifo_items:
+ lifo_items item
+ (cons $2 $1)
+ | item
+ (list $1)
+ ;
+
+item:
+ SYMBOL
+ | CHARACTER
+ ;
+
+%%
+
+;;; grammar.wy ends here
diff --git a/admin/grammars/java-tags.wy b/admin/grammars/java-tags.wy
index 99d2b9df81d..f4b2f1f1f49 100644
--- a/admin/grammars/java-tags.wy
+++ b/admin/grammars/java-tags.wy
@@ -740,7 +740,7 @@ It ignores whitespaces, newlines and comments."
wisent-java-tags-wy--<symbol>-regexp-analyzer
wisent-java-tags-wy--<punctuation>-string-analyzer
wisent-java-tags-wy--<block>-block-analyzer
- ;; In theory, unicode chars should be turned into normal chars
+ ;; In theory, Unicode chars should be turned into normal chars
;; and then combined into regular ascii keywords and text. This
;; analyzer just keeps these things from making the lexer go boom.
wisent-java-tags-wy--<unicode>-regexp-analyzer
diff --git a/admin/grammars/srecode-template.wy b/admin/grammars/srecode-template.wy
new file mode 100644
index 00000000000..4ff2d7e4e41
--- /dev/null
+++ b/admin/grammars/srecode-template.wy
@@ -0,0 +1,235 @@
+;;; srecode-template.wy --- Semantic Recoder Template parser
+
+;; Copyright (C) 2005-2011 Free Software Foundation, Inc.
+
+;; Author: Eric Ludlam <zappo@gnu.org>
+;; Keywords: syntax
+;; X-RCS: $Id: srecode-template.wy,v 1.10 2009-01-09 23:01:54 zappo Exp $
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+;;
+;; Parser for the Semantic Recoder template language
+;;
+;; Semantic Recoder templates are based on Google Templates
+;; and are at the bottom of the Semantic Recoder API.
+
+%languagemode srecode-mode
+
+%start template_file
+
+;;; KEYWORDS
+%type <keyword>
+%keyword SET "set"
+%put SET summary "set <name> <value>"
+%keyword SHOW "show"
+%put SHOW summary "show <name> ; to show a section"
+%keyword MACRO "macro"
+%put MACRO summary "... macro \"string\" ..."
+%keyword CONTEXT "context"
+%put CONTEXT summary "context <name>"
+%keyword TEMPLATE "template"
+%put TEMPLATE summary "template <name>\\n <template definition>"
+%keyword SECTIONDICTIONARY "sectiondictionary"
+%put SECTIONDICTIONARY summary "sectiondictionary <name>\\n <dictionary entries>"
+%keyword PROMPT "prompt"
+%keyword DEFAULT "default"
+%keyword DEFAULTMACRO "defaultmacro"
+%keyword READ "read"
+%put { PROMPT DEFAULT DEFAULTMACRO READ } summary "prompt <symbol> \"Describe Symbol: \" [default[macro] <lispsym>|\"valuetext\"] [read <lispsym>]"
+%keyword BIND "bind"
+%put BIND summary "bind \"<letter>\""
+
+;;; Punctuation Types
+%type <punctuation> syntax "\\s.+"
+%type <newline>
+%token <newline> newline
+
+%token <separator> TEMPLATE_BLOCK "^----"
+
+;;; Bland default types
+%type <property> ":\\(\\w\\|\\s_\\)*"
+%token <property> property
+
+%type <symbol>
+%token <symbol> symbol
+
+%type <string>
+%token <string> string
+
+%type <number>
+%token <number> number
+
+%%
+
+template_file
+ : newline ( )
+ | context
+ | prompt
+ | variable
+ | template
+ ;
+
+context
+ : CONTEXT symbol newline
+ (TAG $2 'context)
+ ;
+
+prompt
+ : PROMPT symbol string opt-default-fcn opt-read-fcn newline
+ (TAG $2 'prompt :text (read $3) :default $4 :read $5)
+ ;
+
+opt-default-fcn
+ : DEFAULT symbol
+ (progn (read $2))
+ | DEFAULT string
+ (progn (read $2))
+ | DEFAULTMACRO string
+ (progn (cons 'macro (read $2)))
+ | ()
+ ;
+
+opt-read-fcn
+ : READ symbol
+ (progn (read $2))
+ | ()
+ ;
+
+variable
+ : SET symbol insertable-string-list newline
+ (VARIABLE-TAG $2 nil $3)
+ | SHOW symbol newline
+ (VARIABLE-TAG $2 nil t)
+ ;
+
+insertable-string-list
+ : insertable-string
+ (list $1)
+ | insertable-string-list insertable-string
+ (append $1 (list $2))
+ ;
+
+insertable-string
+ : string
+ (read $1)
+ | MACRO string
+ (cons 'macro (read $2))
+ ;
+
+template
+ : TEMPLATE templatename opt-dynamic-arguments newline
+ opt-string
+ opt-section-dictionaries
+ TEMPLATE_BLOCK newline
+ opt-bind
+ (FUNCTION-TAG $2 nil $3 :documentation $5 :code $7
+ :dictionaries $6 :binding $9 )
+ ;
+
+templatename
+ : symbol
+ | PROMPT
+ | CONTEXT
+ | TEMPLATE
+ | DEFAULT
+ | MACRO
+ | DEFAULTMACRO
+ | READ
+ | SET
+ ;
+
+opt-dynamic-arguments
+ : property opt-dynamic-arguments
+ (cons $1 $2)
+ | ()
+ ;
+
+opt-string
+ : string newline
+ ( read $1 )
+ | ()
+ ;
+
+opt-section-dictionaries
+ : () ;; EMPTY
+ | section-dictionary-list
+ ;
+
+section-dictionary-list
+ : one-section-dictionary
+ (list $1)
+ | section-dictionary-list one-section-dictionary
+ (append $1 (list $2))
+ ;
+
+one-section-dictionary
+ : SECTIONDICTIONARY string newline
+ variable-list
+ (cons (read $2) $4)
+ ;
+
+variable-list
+ : variable
+ (EXPANDTAG $1)
+ | variable-list variable
+ (append $1 (EXPANDTAG $2))
+ ;
+
+opt-bind
+ : BIND string newline
+ ( read $2 )
+ | ()
+ ;
+
+%%
+(define-lex-simple-regex-analyzer srecode-template-property-analyzer
+ "Detect and create a dynamic argument properties."
+ ":\\(\\w\\|\\s_\\)*" 'property 0)
+
+(define-lex-regex-analyzer srecode-template-separator-block
+ "Detect and create a template quote block."
+ "^----\n"
+ (semantic-lex-push-token
+ (semantic-lex-token
+ 'TEMPLATE_BLOCK
+ (match-end 0)
+ (semantic-lex-unterminated-syntax-protection 'TEMPLATE_BLOCK
+ (goto-char (match-end 0))
+ (re-search-forward "^----$")
+ (match-beginning 0))))
+ (setq semantic-lex-end-point (point)))
+
+
+(define-lex wisent-srecode-template-lexer
+ "Lexical analyzer that handles SRecode Template buffers.
+It ignores whitespace, newlines and comments."
+ semantic-lex-newline
+ semantic-lex-ignore-whitespace
+ semantic-lex-ignore-newline
+ semantic-lex-ignore-comments
+ srecode-template-separator-block
+ srecode-template-wy--<keyword>-keyword-analyzer
+ srecode-template-property-analyzer
+ srecode-template-wy--<symbol>-regexp-analyzer
+ srecode-template-wy--<number>-regexp-analyzer
+ srecode-template-wy--<string>-sexp-analyzer
+ srecode-template-wy--<punctuation>-string-analyzer
+ semantic-lex-default-action
+ )
+
+;;; wisent-dot.wy ends here
diff --git a/admin/grammars/wisent-grammar.el b/admin/grammars/wisent-grammar.el
index d7de1ee6f7b..66045c2294d 100644
--- a/admin/grammars/wisent-grammar.el
+++ b/admin/grammars/wisent-grammar.el
@@ -331,7 +331,7 @@ Menu items are appended to the common grammar menu.")
(grammar-setupcode-builder . wisent-grammar-setupcode-builder)
)))
-(add-to-list 'auto-mode-alist '("\\.wy$" . wisent-grammar-mode))
+(add-to-list 'auto-mode-alist '("\\.wy\\'" . wisent-grammar-mode))
(defvar-mode-local wisent-grammar-mode semantic-grammar-macros
'(
@@ -358,4 +358,180 @@ Menu items are appended to the common grammar menu.")
)
"Semantic grammar macros used in wisent grammars.")
+(defvar wisent-make-parsers--emacs-license
+ ";; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.")
+
+(defvar wisent-make-parsers--python-license
+ ";; It is derived in part from the Python grammar, used under the
+;; following license:
+;;
+;; PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
+;; --------------------------------------------
+;; 1. This LICENSE AGREEMENT is between the Python Software Foundation
+;; (\"PSF\"), and the Individual or Organization (\"Licensee\") accessing
+;; and otherwise using this software (\"Python\") in source or binary
+;; form and its associated documentation.
+;;
+;; 2. Subject to the terms and conditions of this License Agreement,
+;; PSF hereby grants Licensee a nonexclusive, royalty-free, world-wide
+;; license to reproduce, analyze, test, perform and/or display
+;; publicly, prepare derivative works, distribute, and otherwise use
+;; Python alone or in any derivative version, provided, however, that
+;; PSF's License Agreement and PSF's notice of copyright, i.e.,
+;; \"Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+;; 2009, 2010 Python Software Foundation; All Rights Reserved\" are
+;; retained in Python alone or in any derivative version prepared by
+;; Licensee.
+;;
+;; 3. In the event Licensee prepares a derivative work that is based
+;; on or incorporates Python or any part thereof, and wants to make
+;; the derivative work available to others as provided herein, then
+;; Licensee hereby agrees to include in any such work a brief summary
+;; of the changes made to Python.
+;;
+;; 4. PSF is making Python available to Licensee on an \"AS IS\"
+;; basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
+;; IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
+;; DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
+;; FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
+;; INFRINGE ANY THIRD PARTY RIGHTS.
+;;
+;; 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
+;; FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A
+;; RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, OR
+;; ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
+;;
+;; 6. This License Agreement will automatically terminate upon a
+;; material breach of its terms and conditions.
+;;
+;; 7. Nothing in this License Agreement shall be deemed to create any
+;; relationship of agency, partnership, or joint venture between PSF
+;; and Licensee. This License Agreement does not grant permission to
+;; use PSF trademarks or trade name in a trademark sense to endorse or
+;; promote products or services of Licensee, or any third party.
+;;
+;; 8. By copying, installing or otherwise using Python, Licensee
+;; agrees to be bound by the terms and conditions of this License
+;; Agreement.")
+
+(defvar wisent-make-parsers--ecmascript-license
+ "\n;; It is derived from the grammar in the ECMAScript Language
+;; Specification published at
+;;
+;; http://www.ecma-international.org/publications/standards/Ecma-262.htm
+;;
+;; and redistributed under the following license:
+;;
+;; Redistribution and use in source and binary forms, with or without
+;; modification, are permitted provided that the following conditions
+;; are met:
+;;
+;; 1. Redistributions of source code must retain the above copyright
+;; notice, this list of conditions and the following disclaimer.
+;;
+;; 2. Redistributions in binary form must reproduce the above
+;; copyright notice, this list of conditions and the following
+;; disclaimer in the documentation and/or other materials provided
+;; with the distribution.
+;;
+;; 3. Neither the name of the authors nor Ecma International may be
+;; used to endorse or promote products derived from this software
+;; without specific prior written permission. THIS SOFTWARE IS
+;; PROVIDED BY THE ECMA INTERNATIONAL \"AS IS\" AND ANY EXPRESS OR
+;; IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;; ARE DISCLAIMED. IN NO EVENT SHALL ECMA INTERNATIONAL BE LIABLE FOR
+;; ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+;; OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+;; LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+;; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+;; USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+;; DAMAGE.")
+
+(defvar wisent-make-parsers--parser-file-name
+ `(("semantic-grammar-wy.el"
+ "semantic/grammar-wy")
+ ("srecode-template-wy.el"
+ "srecode/srt-wy")
+ ("wisent-javascript-jv-wy.el"
+ "semantic/wisent/js-wy"
+ "Copyright (C) 1998-2011 Ecma International"
+ ,wisent-make-parsers--ecmascript-license)
+ ("wisent-java-tags-wy.el"
+ "semantic/wisent/javat-wy")
+ ("wisent-python-wy.el"
+ "semantic/wisent/python-wy"
+ "Copyright (C) 2001-2010 Python Software Foundation"
+ ,wisent-make-parsers--python-license)))
+
+(defun wisent-make-parsers ()
+ "Generate Emacs' built-in Wisent-based parser files."
+ (semantic-mode 1)
+ ;; Loop through each .wy file in current directory, and run
+ ;; `semantic-grammar-batch-build-one-package' to build the grammar.
+ (dolist (f (directory-files default-directory nil "\\.wy\\'"))
+ (let ((packagename
+ (condition-case err
+ (with-current-buffer (find-file-noselect f)
+ (semantic-grammar-create-package))
+ (error (message "%s" (error-message-string err)) nil)))
+ output-data)
+ (when (setq output-data (assoc packagename wisent-make-parsers--parser-file-name))
+ (let ((require-name (nth 1 output-data))
+ (additional-copyright (nth 2 output-data))
+ (additional-license (nth 3 output-data))
+ copyright-end)
+ ;; Touch up the generated parsers for Emacs integration.
+ (with-temp-buffer
+ (insert-file-contents packagename)
+ ;; Fix copyright header:
+ (goto-char (point-min))
+ (when additional-copyright
+ (re-search-forward "Copyright (C).*$")
+ (insert "\n;; " additional-copyright))
+ (re-search-forward "^;; Author:")
+ (setq copyright-end (match-beginning 0))
+ (re-search-forward "^;;; Code:\n")
+ (delete-region copyright-end (match-end 0))
+ (goto-char copyright-end)
+ (insert wisent-make-parsers--emacs-license)
+ (insert "\n\n;;; Commentary:
+;;
+;; This file was generated from admin/grammars/"
+ f ".")
+ (when additional-license
+ (insert "\n" additional-license))
+ (insert "\n\n;;; Code:\n
+\(require 'semantic/lex)\n")
+ (goto-char (point-min))
+ (delete-region (point-min) (line-end-position))
+ (insert ";;; " require-name
+ ".el --- Generated parser support file")
+ (delete-trailing-whitespace)
+ (re-search-forward ";;\n(require 'semantic/lex)\n")
+ (delete-region (match-beginning 0) (match-end 0))
+ ;; Fix footer:
+ (goto-char (point-max))
+ (re-search-backward "^(provide")
+ (delete-region (match-beginning 0) (point-max))
+ (goto-char (point-max))
+ (insert "(provide '" require-name ")\n\n")
+ (insert ";;; " require-name ".el ends here\n")
+ (write-region nil nil (expand-file-name packagename))))))))
+
;;; wisent-grammar.el ends here
diff --git a/admin/notes/multi-tty b/admin/notes/multi-tty
index 410e3aa8614..8a10997eb8b 100644
--- a/admin/notes/multi-tty
+++ b/admin/notes/multi-tty
@@ -521,7 +521,7 @@ THINGS TO DO
** Very strange bug: visible-bell does not work on secondary
terminals in xterm and konsole. The screen does flicker a bit,
- but it's so quick it isn't noticable.
+ but it's so quick it isn't noticeable.
(Update: This is probably some problem with padding or whatnot on
the secondary terminals.)
@@ -585,7 +585,7 @@ DIARY OF CHANGES
-- other-frame should cycle through the frames on the `current'
terminal only.
- (Done, by trivially modifiying next_frame and prev_frame.)
+ (Done, by trivially modifying next_frame and prev_frame.)
-- Support different terminal sizes.
@@ -984,7 +984,7 @@ DIARY OF CHANGES
wrt foreground/background process groups.)
-- There is a flicker during the startup of `emacs -nw'; it's as if
- the terminal is initialized, reset and then initialialized again.
+ the terminal is initialized, reset and then initialized again.
Debug this. (Hint: narrow_foreground_group is called twice during
startup.)
diff --git a/admin/notes/nextstep b/admin/notes/nextstep
index cf0ebbc11aa..a2e5ce2c9b0 100644
--- a/admin/notes/nextstep
+++ b/admin/notes/nextstep
@@ -83,7 +83,7 @@ original NeXT Display PostScript (DPS) APIs are available and used. Under
Cocoa, these were removed and Quartz drawing functions replaced them.
In both cases, font glyphs are accessed through UTF8 character
-representations. It would be preferable to use unicode indices, but prior
+representations. It would be preferable to use Unicode indices, but prior
attempts at this have failed.
Multi-script fontsets are auto-created in nsfont_make_fontset_for_font() using
diff --git a/admin/nt/README-ftp-server b/admin/nt/README-ftp-server
index 82e33cc5418..c320bbe915d 100644
--- a/admin/nt/README-ftp-server
+++ b/admin/nt/README-ftp-server
@@ -254,7 +254,7 @@ See the end of the file for license conditions.
Another valuable source of information and help which should not be
overlooked is the various Usenet news groups dedicated to Emacs.
- These are particuarly good for help with general issues which aren't
+ These are particularly good for help with general issues which aren't
specific to the Windows port of Emacs. The main news groups to use
for seeking help are:
diff --git a/admin/unidata/unidata-gen.el b/admin/unidata/unidata-gen.el
index 1002bb003af..713b0512e09 100644
--- a/admin/unidata/unidata-gen.el
+++ b/admin/unidata/unidata-gen.el
@@ -158,7 +158,7 @@
;; DEFAULT: the default value of the property. It may have the form
;; (VAL0 (FROM1 TO1 VAL1) ...) which indicates that the default
;; value is VAL0 except for characters in the ranges specified by
-;; FROMn and TOn (incusive). The default value of characters
+;; FROMn and TOn (inclusive). The default value of characters
;; between FROMn and TOn is VALn.
;; VAL-LIST: list of specially ordered property values