[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r105369: Tweak grammar files to match
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r105369: Tweak grammar files to match up with variable names used in parser files. |
Date: |
Sun, 31 Jul 2011 20:11:37 -0400 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 105369
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sun 2011-07-31 20:11:37 -0400
message:
Tweak grammar files to match up with variable names used in parser files.
renamed:
etc/grammars/javascript-jv.wy => etc/grammars/js.wy
modified:
etc/grammars/README
etc/grammars/bovine-grammar.el
etc/grammars/c.by
etc/grammars/java-tags.wy
etc/grammars/make.by
etc/grammars/python.wy
etc/grammars/scheme.by
etc/grammars/wisent-grammar.el
etc/grammars/js.wy
=== modified file 'etc/grammars/README'
--- a/etc/grammars/README 2011-07-30 02:06:43 +0000
+++ b/etc/grammars/README 2011-08-01 00:11:37 +0000
@@ -3,15 +3,17 @@
lisp/semantic/wisent/ directories. You can run the parser generators
with
-emacs -batch --no-site-file \
- -l semantic/bovine -l semantic/wisent -l semantic/grammar \
- -l semantic/lex -l bovine-grammar.el \
- -f semantic-mode -f semantic-grammar-batch-build-packages *.by
-
-emacs -batch --no-site-file \
- -l semantic/bovine -l semantic/wisent -l semantic/grammar \
- -l semantic/lex -l wisent-grammar.el \
- -f semantic-mode -f semantic-grammar-batch-build-packages *.wy
+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/.
Currently, the parser files in lisp/ are not generated directly from
these grammar files when making Emacs. This state of affairs, and the
=== modified file 'etc/grammars/bovine-grammar.el'
--- a/etc/grammars/bovine-grammar.el 2011-07-30 21:18:40 +0000
+++ b/etc/grammars/bovine-grammar.el 2011-08-01 00:11:37 +0000
@@ -32,6 +32,9 @@
(require 'semantic)
(require 'semantic/grammar)
(require 'semantic/find)
+(require 'semantic/lex)
+(require 'semantic/wisent)
+(require 'semantic/bovine)
(defun bovine-grammar-EXPAND (bounds nonterm)
"Expand call to EXPAND grammar macro.
@@ -112,7 +115,6 @@
Argument QUOTEMODE is non-nil if we are in backquote mode.
When non-nil, optional argument INPLACE indicates that FORM is being
expanded from elsewhere."
- (when (listp form)
(when (eq (car form) 'quote)
(setq form (cdr form))
(cond
@@ -218,7 +220,7 @@
))
(if inlist (insert ")"))
(if inplace (insert ")")))
- )))
+ ))
(defun bovine-grammar-expand-action (textform quotemode)
"Expand semantic action string TEXTFORM into Lisp code.
@@ -226,7 +228,6 @@
(if (string= "" textform)
nil
(let ((sexp (read textform)))
-
;; We converted the lambda string into a list. Now write it
;; out as the bovine lambda expression, and do macro-like
;; conversion upon it.
@@ -339,7 +340,6 @@
(when (member nterm '("bovine-toplevel" "bovine-inner-scope"))
(error "`%s' is a reserved internal name" nterm))
(insert "\n(" nterm)
-
;; Process each rule
(while rules
(setq items (semantic-tag-get-attribute (car rules) :value)
@@ -375,7 +375,6 @@
(t
(insert (semantic-grammar-item-text item)))
))))
-
(if prec
(message "%%prec %S ignored" prec))
(if actn
=== modified file 'etc/grammars/c.by'
--- a/etc/grammars/c.by 2011-07-30 21:18:40 +0000
+++ b/etc/grammars/c.by 2011-08-01 00:11:37 +0000
@@ -38,7 +38,7 @@
;; > * Can't parse signature element: "const RmcCmdMCDetailedStatus& status"
;; > * Can't parse signature element: "RmcBucStatus* rftBucStatus"
-%package c-by
+%package semantic-c-by
%languagemode c-mode c++-mode
%start declaration
=== modified file 'etc/grammars/java-tags.wy'
--- a/etc/grammars/java-tags.wy 2011-07-30 21:18:40 +0000
+++ b/etc/grammars/java-tags.wy 2011-08-01 00:11:37 +0000
@@ -22,7 +22,7 @@
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
-%package java-tags-wy
+%package wisent-java-tags-wy
%languagemode java-mode
@@ -733,17 +733,17 @@
semantic-lex-ignore-newline
semantic-lex-ignore-comments
;;;; Auto-generated analyzers.
- semantic/wisent/java-tags-wy--<number>-regexp-analyzer
- semantic/wisent/java-tags-wy--<string>-sexp-analyzer
+ wisent-java-tags-wy--<number>-regexp-analyzer
+ wisent-java-tags-wy--<string>-sexp-analyzer
;; Must detect keywords before other symbols
- semantic/wisent/java-tags-wy--<keyword>-keyword-analyzer
- semantic/wisent/java-tags-wy--<symbol>-regexp-analyzer
- semantic/wisent/java-tags-wy--<punctuation>-string-analyzer
- semantic/wisent/java-tags-wy--<block>-block-analyzer
+ wisent-java-tags-wy--<keyword>-keyword-analyzer
+ 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
;; and then combined into regular ascii keywords and text. This
;; analyzer just keeps these things from making the lexer go boom.
- semantic/wisent/java-tags-wy--<unicode>-regexp-analyzer
+ wisent-java-tags-wy--<unicode>-regexp-analyzer
;;;;
semantic-lex-default-action)
=== renamed file 'etc/grammars/javascript-jv.wy' => 'etc/grammars/js.wy'
--- a/etc/grammars/javascript-jv.wy 2011-07-31 00:11:05 +0000
+++ b/etc/grammars/js.wy 2011-08-01 00:11:37 +0000
@@ -1,7 +1,7 @@
;;; javascript-jv.wy -- LALR grammar for Javascript
;; Copyright (C) 2005-2011 Free Software Foundation, Inc.
-;; Copyright (C) Ecma International.
+;; Copyright (C) 1998-2011 Ecma International.
;; Author: Joakim Verona
@@ -57,7 +57,7 @@
;; USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
;; DAMAGE.
-%package javascript-jv-wy
+%package wisent-javascript-jv-wy
;; JAVE I prefere ecmascript-mode
%languagemode ecmascript-mode javascript-mode
@@ -509,14 +509,14 @@
semantic-lex-ignore-comments
;;stuff generated from the wy file(one for each "type" declaration)
- semantic/wisent/javascript-jv-wy--<number>-regexp-analyzer
- semantic/wisent/javascript-jv-wy--<string>-sexp-analyzer
-
- semantic/wisent/javascript-jv-wy--<keyword>-keyword-analyzer
-
- semantic/wisent/javascript-jv-wy--<symbol>-regexp-analyzer
- semantic/wisent/javascript-jv-wy--<punctuation>-string-analyzer
- semantic/wisent/javascript-jv-wy--<block>-block-analyzer
+ wisent-javascript-jv-wy--<number>-regexp-analyzer
+ wisent-javascript-jv-wy--<string>-sexp-analyzer
+
+ wisent-javascript-jv-wy--<keyword>-keyword-analyzer
+
+ wisent-javascript-jv-wy--<symbol>-regexp-analyzer
+ wisent-javascript-jv-wy--<punctuation>-string-analyzer
+ wisent-javascript-jv-wy--<block>-block-analyzer
;;;;more std stuff
=== modified file 'etc/grammars/make.by'
--- a/etc/grammars/make.by 2011-07-30 21:18:40 +0000
+++ b/etc/grammars/make.by 2011-08-01 00:11:37 +0000
@@ -21,7 +21,7 @@
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
-%package make-by
+%package semantic-make-by
%languagemode makefile-mode
%start Makefile
=== modified file 'etc/grammars/python.wy'
--- a/etc/grammars/python.wy 2011-07-31 00:11:05 +0000
+++ b/etc/grammars/python.wy 2011-08-01 00:11:37 +0000
@@ -86,7 +86,7 @@
;; Settings
;; --------
-%package python-wy
+%package wisent-python-wy
%languagemode python-mode
=== modified file 'etc/grammars/scheme.by'
--- a/etc/grammars/scheme.by 2011-07-30 21:18:40 +0000
+++ b/etc/grammars/scheme.by 2011-08-01 00:11:37 +0000
@@ -17,7 +17,7 @@
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
-%package scm-by
+%package semantic-scm-by
%languagemode scheme-mode
%start scheme
=== modified file 'etc/grammars/wisent-grammar.el'
--- a/etc/grammars/wisent-grammar.el 2011-07-30 02:06:43 +0000
+++ b/etc/grammars/wisent-grammar.el 2011-08-01 00:11:37 +0000
@@ -26,8 +26,12 @@
;; Major mode for editing Wisent's input grammar (.wy) files.
;;; Code:
+(require 'semantic)
(require 'semantic/grammar)
(require 'semantic/find)
+(require 'semantic/lex)
+(require 'semantic/wisent)
+(require 'semantic/bovine)
(defsubst wisent-grammar-region-placeholder (symb)
"Given a $N placeholder symbol in SYMB, return a $regionN symbol.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r105369: Tweak grammar files to match up with variable names used in parser files.,
Chong Yidong <=