Hi David,
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!
Index: semantic-grammar.el
===================================================================
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 'wisent-bovine)
(eval-when-compile
+ (require 'pp) ;; for pp-to-string
(require 'font-lock)
(require 'semantic-edit))
>>>>> "DP" == David PONCE <David.Ponce@...> writes:
DP>
DP> Hi All,
DP> I am about to check-in a big change to Wisent!
DP>
DP> Here is a summary:
DP>
DP> - The internal data structure of LALR automatons is improved.
DP>
DP> * The goto table is filled with nonterminal symbols instead of item
DP> numbers.
DP>
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>
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>
DP> input:
DP> line [input:0]
DP> | input line
DP> (format "%s %s" $1 $2) [input:1]
DP> ;
DP>
DP> will produce two semantic actions, and associated symbols:
DP>
DP> `input:0', a default action that returns $1.
DP> `input:1', that returns `(format "%s %s" $1 $2)'.
DP>
DP> * The action table is filled with semantic action symbols instead of
DP> negative item numbers.
DP>
DP> * An automaton is now a vector:
DP> [action-table goto-table start-alist semantic-actions-obarray].
DP>
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>
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>
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> debugger.
DP>
DP> Mainly three commands are available:
DP>
DP> `wisent-debug-on-entry'/`wisent-cancel-debug-on-entry', that mimic
DP> `debug-on-entry'/`cancel-debug-on-entry' for semantic actions.
DP>
DP> `wisent-debug-show-entry' that shows the code of a semantic action.
DP>
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>
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> file.
DP>
DP> Finally a change log is at end.
DP>
DP> Thoughts?
DP> Enjoy!
DP>
DP> David
DP>
DP> ------- Change Log
DP>
DP> * semantic-grammar.el
DP>
DP> (semantic-grammar-automaton)
DP> (semantic-grammar-keywords, semantic-grammar-tokens)
DP> (emantic-grammar-setup-semantic): Re-generated.
DP>
DP> * wisent/wisent-awk.el
DP>
DP> (wisent-awk-automaton)
DP> (wisent-awk-keywords, wisent-awk-tokens)
DP> (wisent-awk-setup-parser): Re-generated.
DP>
DP> * wisent/wisent-calc.el
DP>
DP> (wisent-calc-automaton, wisent-calc-tokens)
DP> (wisent-calc-setup-parser): Re-generated.
DP>
DP> * wisent/wisent-cim.el
DP>
DP> (wisent-cim-automaton)
DP> (wisent-cim-keywords, wisent-cim-tokens)
DP> (wisent-cim-default-setup): Re-generated.
DP>
DP> * wisent/wisent-comp.el
DP>
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> actions.
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-grammar)
DP> (wisent-byte-compile-automaton): New functions.
DP>
DP> * wisent/wisent-grammar.el
DP>
DP> (wisent-grammar-parsetable-builder): Ensure that the grammar
DP> [byte-]compiler is available to handle byte-compilation of the
DP> grammar.
DP>
DP> * wisent/wisent-java-tags.el
DP> * wisent/wisent-java.el
DP>
DP> (wisent-java-parser-tables)
DP> (wisent-java-keywords, wisent-java-tokens)
DP> (wisent-java-default-setup): Re-generated.
DP>
DP> * wisent/wisent-python.el
DP>
DP> (wisent-python-parser-tables)
DP> (wisent-python-keywords, wisent-python-tokens)
DP> (wisent-python-default-setup): Re-generated.
DP>
DP> * wisent/wisent.el
DP>
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>
DP> * wisent/wisent-debug.el
DP>
DP> New file.
DP>
DP> * wisent/Project.ede
DP> (ede-proj-target-elisp "wisent"): Added wisent-debug.el.
DP>
DP> * wisent/Makefile
DP>
DP> Re-generated.
DP>
DP>
|