Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
ToAutomatonThompson.h
Go to the documentation of this file.
1
6#pragma once
7
13
14namespace regexp {
15
16namespace convert {
17
27public:
38
43
44 class Unbounded {
45 public:
46 static void visit(const regexp::UnboundedRegExpAlternation < DefaultSymbolType > & alternation, automaton::EpsilonNFA < > & automaton , int & nextState, const DefaultStateType * & headArg, const DefaultStateType * & tailArg);
47 static void visit(const regexp::UnboundedRegExpConcatenation < DefaultSymbolType > & concatenation, automaton::EpsilonNFA < > & automaton , int & nextState, const DefaultStateType * & headArg, const DefaultStateType * & tailArg);
48 static void visit(const regexp::UnboundedRegExpIteration < DefaultSymbolType > & iteration, automaton::EpsilonNFA < > & automaton , int & nextState, const DefaultStateType * & headArg, const DefaultStateType * & tailArg);
49 static void visit(const regexp::UnboundedRegExpSymbol < DefaultSymbolType > & symbol, automaton::EpsilonNFA < > & automaton , int & nextState, const DefaultStateType * & headArg, const DefaultStateType * & tailArg);
50 static void visit(const regexp::UnboundedRegExpEpsilon < DefaultSymbolType > & epsilon, automaton::EpsilonNFA < > & automaton , int & nextState, const DefaultStateType * & headArg, const DefaultStateType * & tailArg);
51 static void visit(const regexp::UnboundedRegExpEmpty < DefaultSymbolType > & empty, automaton::EpsilonNFA < > & automaton , int & nextState, const DefaultStateType * & headArg, const DefaultStateType * & tailArg);
52 };
53
54 class Formal {
55 public:
56 static void visit(const regexp::FormalRegExpAlternation < DefaultSymbolType > & alternation, automaton::EpsilonNFA < > & automaton , int & nextState, const DefaultStateType * & headArg, const DefaultStateType * & tailArg);
57 static void visit(const regexp::FormalRegExpConcatenation < DefaultSymbolType > & concatenation, automaton::EpsilonNFA < > & automaton , int & nextState, const DefaultStateType * & headArg, const DefaultStateType * & tailArg);
58 static void visit(const regexp::FormalRegExpIteration < DefaultSymbolType > & iteration, automaton::EpsilonNFA < > & automaton , int & nextState, const DefaultStateType * & headArg, const DefaultStateType * & tailArg);
59 static void visit(const regexp::FormalRegExpSymbol < DefaultSymbolType > & symbol, automaton::EpsilonNFA < > & automaton , int & nextState, const DefaultStateType * & headArg, const DefaultStateType * & tailArg);
60 static void visit(const regexp::FormalRegExpEpsilon < DefaultSymbolType > & epsilon, automaton::EpsilonNFA < > & automaton , int & nextState, const DefaultStateType * & headArg, const DefaultStateType * & tailArg);
61 static void visit(const regexp::FormalRegExpEmpty < DefaultSymbolType > & empty, automaton::EpsilonNFA < > & automaton , int & nextState, const DefaultStateType * & headArg, const DefaultStateType * & tailArg);
62 };
63
64};
65
66} /* namespace convert */
67
68} /* namespace regexp */
69
Epsilon nondeterministic finite automaton. Accepts regular languages.
Definition: EpsilonNFA.h:74
Definition: Object.h:16
Represents the alternation operator in the regular expression. The node must have exactly two childre...
Definition: FormalRegExpAlternation.h:44
Represents the concatenation operator in the regular expression. The node must have exactly two child...
Definition: FormalRegExpConcatenation.h:44
Represents the empty expression in the regular expression. The node can't have any children.
Definition: FormalRegExpEmpty.h:41
Represents the epsilon expression in the regular expression. The node can't have any children.
Definition: FormalRegExpEpsilon.h:41
Represents the iteration operator in the regular expression. The node has exactly one child.
Definition: FormalRegExpIteration.h:44
Represents the symbol in the regular expression. The can't have any children.
Definition: FormalRegExpSymbol.h:42
Formal regular expression represents regular expression. It describes regular languages....
Definition: FormalRegExp.h:78
Represents the alternation operator in the regular expression. The node can have 0 to n children in l...
Definition: UnboundedRegExpAlternation.h:44
Represents the concatenation operator in the regular expression. The node can have 0 to n children in...
Definition: UnboundedRegExpConcatenation.h:44
Represents the empty expression in the regular expression. The node can't have any children.
Definition: UnboundedRegExpEmpty.h:41
Represents the epsilon expression in the regular expression. The node can't have any children.
Definition: UnboundedRegExpEpsilon.h:41
Represents the iteration operator in the regular expression. The node has exactly one child.
Definition: UnboundedRegExpIteration.h:43
Represents the symbol in the regular expression. The can't have any children.
Definition: UnboundedRegExpSymbol.h:42
Unbounded regular expression represents regular expression. It describes regular languages....
Definition: UnboundedRegExp.h:80
Definition: ToAutomatonThompson.h:54
static void visit(const regexp::FormalRegExpAlternation< DefaultSymbolType > &alternation, automaton::EpsilonNFA< > &automaton, int &nextState, const DefaultStateType *&headArg, const DefaultStateType *&tailArg)
Definition: ToAutomatonThompson.cpp:53
Definition: ToAutomatonThompson.h:44
static void visit(const regexp::UnboundedRegExpAlternation< DefaultSymbolType > &alternation, automaton::EpsilonNFA< > &automaton, int &nextState, const DefaultStateType *&headArg, const DefaultStateType *&tailArg)
Definition: ToAutomatonThompson.cpp:133
Definition: ToAutomatonThompson.h:26
static automaton::EpsilonNFA< > convert(const regexp::FormalRegExp< > &regexp)
Definition: ToAutomatonThompson.cpp:13
Definition: ToGrammar.h:31
Definition: converterCommon.hpp:8
Definition: ToAutomaton.h:15