source: tol/tolsh/tolsh.vfs/lib/tcllib1.10/page/analysis_peg_minimize.tcl @ 8597867d

1941-docker-image-to-testdevel
Last change on this file since 8597867d was 8597867d, checked in by Jorge Pérez <josp.jorge@…>, 16 years ago

closes #976, se incluye tcllib1.10, base64 debe eliminarse del raiz de lib ya que esta incluido en tcllib

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@2556 be4846ae-f051-483a-831f-b64e7d08527f

  • Property mode set to 100644
File size: 1.5 KB
Line 
1# -*- tcl -*-
2# Transform - Minimize the grammar, through the removal of the
3# unreachable and not useful nonterminals (and expressions).
4
5# This package assumes to be used from within a PAGE plugin. It uses
6# the API commands listed below. These are identical across the major
7# types of PAGE plugins, allowing this package to be used in reader,
8# transform, and writer plugins. It cannot be used in a configuration
9# plugin, and this makes no sense either.
10#
11# To ensure that our assumption is ok we require the relevant pseudo
12# package setup by the PAGE plugin management code.
13#
14# -----------------+--
15# page_info        | Reporting to the user.
16# page_warning     |
17# page_error       |
18# -----------------+--
19# page_log_error   | Reporting of internals.
20# page_log_warning |
21# page_log_info    |
22# -----------------+--
23
24# ### ### ### ######### ######### #########
25## Requisites
26
27# @mdgen NODEP: page::plugin
28
29package require page::plugin ; # S.a. pseudo-package.
30package require page::analysis::peg::reachable
31package require page::analysis::peg::realizable
32
33namespace eval ::page::analysis::peg {}
34
35# ### ### ### ######### ######### #########
36## API
37
38proc ::page::analysis::peg::minimize {t} {
39    page_info {[PEG Minimization]}
40    page_log_info ..Reachability  ; ::page::analysis::peg::reachable::remove!
41    page_log_info ..Realizability ; ::page::analysis::peg::realizable::remove!
42
43    page_log_info Ok
44    return
45}
46
47# ### ### ### ######### ######### #########
48## Ready
49
50package provide page::analysis::peg::minimize 0.1
51
Note: See TracBrowser for help on using the repository browser.