Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
alib2algo
src
grammar
simplify
Trim.h
Go to the documentation of this file.
1
6
#pragma once
7
8
#include <
grammar/ContextFree/CFG.h
>
9
#include <
grammar/ContextFree/EpsilonFreeCFG.h
>
10
#include <
grammar/ContextFree/GNF.h
>
11
#include <
grammar/ContextFree/CNF.h
>
12
#include <
grammar/ContextFree/LG.h
>
13
#include <
grammar/Regular/LeftLG.h
>
14
#include <
grammar/Regular/LeftRG.h
>
15
#include <
grammar/Regular/RightLG.h
>
16
#include <
grammar/Regular/RightRG.h
>
17
18
#include "
UnreachableSymbolsRemover.h
"
19
#include "
UnproductiveSymbolsRemover.h
"
20
21
namespace
grammar
{
22
23
namespace
simplify {
24
32
class
Trim
{
33
public
:
43
template
<
class
T>
44
static
T
trim
(
const
T &
grammar
);
45
};
46
47
template
<
class
T>
48
T
Trim::trim
(
const
T &
grammar
) {
49
return
grammar::simplify::UnreachableSymbolsRemover::remove
(
grammar::simplify::UnproductiveSymbolsRemover::remove
(
grammar
) );
50
}
51
52
}
/* namespace simplify */
53
54
}
/* namespace grammar */
55
UnproductiveSymbolsRemover.h
UnreachableSymbolsRemover.h
CFG.h
CNF.h
EpsilonFreeCFG.h
GNF.h
LG.h
LeftLG.h
LeftRG.h
RightLG.h
RightRG.h
grammar::simplify::Trim
Definition:
Trim.h:32
grammar::simplify::Trim::trim
static T trim(const T &grammar)
Definition:
Trim.h:48
grammar::simplify::UnproductiveSymbolsRemover::remove
static T remove(const T &grammar)
Definition:
UnproductiveSymbolsRemover.h:57
grammar::simplify::UnreachableSymbolsRemover::remove
static T remove(const T &grammar)
Definition:
UnreachableSymbolsRemover.h:56
grammar
Definition:
ToAutomaton.h:24
Generated on Mon Dec 27 2021 10:21:51 for Algorithms Library Toolkit by
1.9.2