/[emacs]/emacs/lisp/progmodes/ebnf-otz.el
ViewVC logotype

Diff of /emacs/lisp/progmodes/ebnf-otz.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by gerd, Wed Sep 19 08:55:33 2001 UTC revision 1.5.8.1 by miles, Fri Apr 4 06:20:32 2003 UTC
# Line 1  Line 1 
1  ;;; ebnf-otz.el --- syntatic chart OpTimiZer  ;;; ebnf-otz.el --- syntactic chart OpTimiZer
2    
3  ;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.  ;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
4    
5  ;; Author: Vinicius Jose Latorre <vinicius@cpqd.com.br>  ;; Author: Vinicius Jose Latorre <vinicius@cpqd.com.br>
6  ;; Maintainer: Vinicius Jose Latorre <vinicius@cpqd.com.br>  ;; Maintainer: Vinicius Jose Latorre <vinicius@cpqd.com.br>
7  ;; Keywords: wp, ebnf, PostScript  ;; Keywords: wp, ebnf, PostScript
8  ;; Time-stamp: <2001/08/15 17:13:25 vinicius>  ;; Time-stamp: <2003-02-10 10:46:51 jbarranquero>
9  ;; Version: 1.0  ;; Version: 1.0
10    
11  ;; This file is part of GNU Emacs.  ;; This file is part of GNU Emacs.
# Line 196  Line 196 
196  ;;    A = B | C A D.           ==>   A = B | C A D.  ;;    A = B | C A D.           ==>   A = B | C A D.
197    
198  (defun ebnf-optimize (syntax-list)  (defun ebnf-optimize (syntax-list)
199    "Syntatic chart optimizer."    "Syntactic chart optimizer."
200    (if (not ebnf-optimize)    (if (not ebnf-optimize)
201        syntax-list        syntax-list
202      (let ((ebnf-total (length syntax-list))      (let ((ebnf-total (length syntax-list))
# Line 225  Line 225 
225  ;; 10. A = B C E | B D E.       ==>   A = B (C | D) E.  ;; 10. A = B C E | B D E.       ==>   A = B (C | D) E.
226    
227  (defun ebnf-optimize1 (prod)  (defun ebnf-optimize1 (prod)
228    (ebnf-message-info "Optimizing syntatic chart")    (ebnf-message-info "Optimizing syntactic chart")
229    (let ((production (ebnf-node-production prod)))    (let ((production (ebnf-node-production prod)))
230      (and (eq (ebnf-node-kind production) 'ebnf-generate-alternative)      (and (eq (ebnf-node-kind production) 'ebnf-generate-alternative)
231           (let* ((hlist (ebnf-split-header-prefix           (let* ((hlist (ebnf-split-header-prefix

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.5.8.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26