I just updated my local copies to latest CVS versions.
Nothing seems to be broken with wisent-python.el.
The only minor thing is that pp-to-string is not autoloaded
in GNU/Emacs 21.2, so I added (require 'pp) to get things to
work. Other than that, no problems. Very smooth upgrade
for such a large change. Good work!
RCS file: /cvsroot/cedet/cedet/semantic/semantic-grammar.el,v
retrieving revision 1.11
diff -u -r1.11 semantic-grammar.el
--- semantic-grammar.el 19 Feb 2003 16:25:29 -0000 1.11
+++ semantic-grammar.el 20 Feb 2003 05:35:26 -0000
@@ -36,6 +36,7 @@
+ (require 'pp) ;; for pp-to-string
>>>>> "DP" == David PONCE <David.Ponce@...> writes:
DP> Hi All,
DP> I am about to check-in a big change to Wisent!
DP> Here is a summary:
DP> - The internal data structure of LALR automatons is improved.
DP> * The goto table is filled with nonterminal symbols instead of item
DP> * The vector of semantic action lambda expressions is replaced by an
DP> obarray. Each semantic action is now represented by a symbol
DP> interned in that obarray. `symbol-function' on a semantic action
DP> symbol return the semantic action lambda expression.
DP> A semantic action symbol name has the form NONTERMINAL:INDEX, where
DP> NONTERMINAL is the name of the nonterminal symbol the action
DP> belongs to, and INDEX is an action sequence number within the scope
DP> of NONTERMINAL. For example, this nonterminal definition:
DP> line [input:0]
DP> | input line
DP> (format "%s %s" $1 $2) [input:1]
DP> will produce two semantic actions, and associated symbols:
DP> `input:0', a default action that returns $1.
DP> `input:1', that returns `(format "%s %s" $1 $2)'.
DP> * The action table is filled with semantic action symbols instead of
DP> negative item numbers.
DP> * An automaton is now a vector:
DP> [action-table goto-table start-alist semantic-actions-obarray].
DP> - The LR parser engine benefits of the above changes. It no more
DP> needs to handle translation of item numbers, and it can directly
DP> call semantic actions. Consequently it should be faster!
DP> - Grammar compilation follows normal Emacs Lisp byte-compilation
DP> strategy. That is, when a `wisent-compile-grammar' form is
DP> evaluated it produces a LALR automaton without semantic actions
DP> byte-compiled. When byte-compiled it produces byte-code for the
DP> whole automaton, including semantic actions.
DP> - I introduced a new library: wisent-debug.el, that takes advantage of
DP> new automaton data structure and byte-compilation strategy, to
DP> provide some debugging features for wisent. For now, I implemented
DP> low level debugging of semantic actions, using the standard Emacs
DP> Mainly three commands are available:
DP> `wisent-debug-on-entry'/`wisent-cancel-debug-on-entry', that mimic
DP> `debug-on-entry'/`cancel-debug-on-entry' for semantic actions.
DP> `wisent-debug-show-entry' that shows the code of a semantic action.
DP> Unfortunately, the new automaton format is incompatible with the
DP> current one. It will be necessary to update .el files from .wy
DP> grammars, and to recompile them :-(
DP> If you want to try it, I attached a tarball that includes a big patch
DP> to semantic (from today CVS version), and the new wisent-debug.el
DP> Finally a change log is at end.
DP> ------- Change Log
DP> * semantic-grammar.el
DP> (semantic-grammar-keywords, semantic-grammar-tokens)
DP> (emantic-grammar-setup-semantic): Re-generated.
DP> * wisent/wisent-awk.el
DP> (wisent-awk-keywords, wisent-awk-tokens)
DP> (wisent-awk-setup-parser): Re-generated.
DP> * wisent/wisent-calc.el
DP> (wisent-calc-automaton, wisent-calc-tokens)
DP> (wisent-calc-setup-parser): Re-generated.
DP> * wisent/wisent-cim.el
DP> (wisent-cim-keywords, wisent-cim-tokens)
DP> (wisent-cim-default-setup): Re-generated.
DP> * wisent/wisent-comp.el
DP> (wisent-defcontext semantic-actions): Moved before first use.
DP> (wisent-token-actions): Create new semantic actions obarray. Fill
DP> the action table with semantic action symbols instead of negative
DP> item numbers.
DP> (wisent-goto-actions): Fill the goto table with nonterminal
DP> symbols instead of item numbers.
DP> (wisent-semantic-action): Store code of action in the function
DP> cell of a symbol interned in the semantic actions obarray. Return
DP> that symbol. The new semantic action variable `$action' is bound
DP> to the name of that symbol.
DP> (wisent-semantic-actions, wisent-token-translations): Removed.
DP> (wisent-parser-automaton): Return a vector of 4 elements: the
DP> action table, the goto table, the alist of start symbols, and the
DP> semantic actions obarray.
DP> (wisent-parse-nonterminals): Produce symbolic location of semantic
DP> (wisent-parse-grammar): Intern generated symbols.
DP> (wisent-compiled-grammar-p): Removed.
DP> (wisent-compile-grammar): Doc fix. Use `wisent-automaton-p'.
DP> (wisent-byte-compile-automaton): New functions.
DP> * wisent/wisent-grammar.el
DP> (wisent-grammar-parsetable-builder): Ensure that the grammar
DP> [byte-]compiler is available to handle byte-compilation of the
DP> * wisent/wisent-java-tags.el
DP> * wisent/wisent-java.el
DP> (wisent-java-keywords, wisent-java-tokens)
DP> (wisent-java-default-setup): Re-generated.
DP> * wisent/wisent-python.el
DP> (wisent-python-keywords, wisent-python-tokens)
DP> (wisent-python-default-setup): Re-generated.
DP> * wisent/wisent.el
DP> (autoload 'wisent-compile-grammar): Removed.
DP> (wisent-automaton-p): New.
DP> (wisent-translate, wisent-untranslate): Removed.
DP> (wisent-parse): Use new automaton format.
DP> * wisent/wisent-debug.el
DP> New file.
DP> * wisent/Project.ede
DP> (ede-proj-target-elisp "wisent"): Added wisent-debug.el.
DP> * wisent/Makefile