![]() |
Vcsn
2.0
Be Rational
|
Classes | |
| class | atom |
| struct | braced_ratexp |
| class | const_visitor |
| class | constant |
| class | constant_term_visitor |
| class | copier |
| class | derivation_visitor |
| class | driver |
| State and public interface for rational expression parsing. More... | |
| class | exp |
| The abstract, non-parameterized, root for all rational expression node types. More... | |
| class | expand_visitor |
| struct | expansionset |
| class | hash |
| class | info |
| class | inner |
| An inner node. More... | |
| class | leaf |
| The root from which to derive the final node types. More... | |
| class | less_than |
| class | location |
| Abstract a location. More... | |
| class | node |
| The abstract parameterized, root for all rational expression types. More... | |
| class | parser |
| A Bison parser. More... | |
| class | position |
| Abstract a position. More... | |
| class | printer |
| class | ratexpset_impl |
| A typed ratexp set. More... | |
| class | size |
| class | slice |
| Present a slice of the top of a stack. More... | |
| class | split_visitor |
| Break a rational expression into a polynomial. More... | |
| class | stack |
| class | standard_visitor |
| Build a standard automaton from a ratexp. More... | |
| class | star_normal_form_visitor |
| class | thompson_visitor |
| Build a Thompson automaton from a ratexp. More... | |
| class | to_expansion_visitor |
| class | unary |
| class | variadic |
| An inner node with multiple children. More... | |
| struct | variant |
| A char[S] buffer to store and retrieve objects. More... | |
| class | weight_node |
| An inner node implementing a weight. More... | |
Typedefs | |
| template<typename RatExpSet > | |
| using | ratexp_polynomialset_t = polynomialset< context< RatExpSet, weightset_t_of< RatExpSet >>> |
| Type of PolynomialSet of RatExps from the RatExpSet type. More... | |
| template<typename RatExpSet > | |
| using | ratexp_polynomial_t = typename ratexp_polynomialset_t< RatExpSet >::value_t |
| Type of polynomials of ratexps from the RatExpSet type. More... | |
| using | exp_t = std::shared_ptr< const exp > |
| template<typename Context > | |
| using | zero = constant< type_t::zero, Context > |
| template<typename Context > | |
| using | one = constant< type_t::one, Context > |
| template<typename Context > | |
| using | complement = unary< type_t::complement, Context > |
| template<typename Context > | |
| using | star = unary< type_t::star, Context > |
| template<typename Context > | |
| using | transposition = unary< type_t::transposition, Context > |
| template<typename Context > | |
| using | prod = variadic< type_t::prod, Context > |
| template<typename Context > | |
| using | conjunction = variadic< type_t::conjunction, Context > |
| template<typename Context > | |
| using | ldiv = variadic< type_t::ldiv, Context > |
| template<typename Context > | |
| using | shuffle = variadic< type_t::shuffle, Context > |
| template<typename Context > | |
| using | sum = variadic< type_t::sum, Context > |
| template<typename Context > | |
| using | lweight = weight_node< type_t::lweight, Context > |
| template<typename Context > | |
| using | rweight = weight_node< type_t::rweight, Context > |
| template<typename Context > | |
| using | ratexp = std::shared_ptr< const node< Context >> |
| using | irange_type = std::tuple< int, int > |
Enumerations | |
| enum | type_t { type_t::zero, type_t::one, type_t::atom, type_t::sum, type_t::prod, type_t::ldiv, type_t::conjunction, type_t::shuffle, type_t::star, type_t::transposition, type_t::lweight, type_t::rweight, type_t::complement } |
| The possible types of ratexps. More... | |
| enum | identities { identities::trivial, identities::series } |
| A ratexpset can implement several different sets of identities on expressions. More... | |
Functions | |
| template<typename RatExpSet > | |
| ratexp_polynomialset_t< RatExpSet > | make_ratexp_polynomialset (const RatExpSet &rs) |
| From a RatExpSet to its polynomialset. More... | |
| template<typename InRatExpSet , typename OutRatExpSet = InRatExpSet> | |
| OutRatExpSet::value_t | copy (const InRatExpSet &in_rs, const OutRatExpSet &out_rs, const typename InRatExpSet::value_t &v) |
| constexpr bool | is_constant (type_t t) |
Whether is a constant (\z or \e). More... | |
| constexpr bool | is_unary (type_t t) |
| Whether star, complement. More... | |
| constexpr bool | is_variadic (type_t t) |
| Whether one of the variadic types. More... | |
| std::ostream & | operator<< (std::ostream &o, type_t t) |
| std::string | to_string (identities i) |
| std::istream & | operator>> (std::istream &is, identities &i) |
| std::ostream & | operator<< (std::ostream &os, identities i) |
| identities | meet (identities i1, identities i2) |
| static int | debug_level_ () |
| The nesting limit for parser traces, as specified per $YYDEBUG. More... | |
| location | operator+ (location res, const location &end) |
| Join two location objects to create a location. More... | |
| location & | operator+= (location &res, int width) |
| Change end position in place. More... | |
| location | operator+ (location res, int width) |
| Change end position. More... | |
| location & | operator-= (location &res, int width) |
| Change end position in place. More... | |
| location | operator- (const location &begin, int width) |
| Change end position. More... | |
| bool | operator== (const location &loc1, const location &loc2) |
| Compare two location objects. More... | |
| bool | operator!= (const location &loc1, const location &loc2) |
| Compare two location objects. More... | |
| template<typename YYChar > | |
| std::basic_ostream< YYChar > & | operator<< (std::basic_ostream< YYChar > &ostr, const location &loc) |
| Intercept output stream redirection. More... | |
| static exp_t | power (const dyn::ratexpset &rs, exp_t e, std::tuple< int, int > range) |
| Generate a ratexp for "e{range.first, range.second}". More... | |
| static exp_t | prefer (const dyn::ratexpset &rs, exp_t e, exp_t f) |
| Generate a ratexp for "e <+ f = e % f + f". More... | |
| static parser::symbol_type | yylex (driver &driver_) |
| Use our local scanner object. More... | |
| static exp_t | power (const dyn::ratexpset &es, exp_t e, int min, int max) |
| position & | operator+= (position &res, int width) |
| Add and assign a position. More... | |
| position | operator+ (position res, int width) |
| Add two position objects. More... | |
| position & | operator-= (position &res, int width) |
| Add and assign a position. More... | |
| position | operator- (position res, int width) |
| Add two position objects. More... | |
| bool | operator== (const position &pos1, const position &pos2) |
| Compare two position objects. More... | |
| bool | operator!= (const position &pos1, const position &pos2) |
| Compare two position objects. More... | |
| template<typename YYChar > | |
| std::basic_ostream< YYChar > & | operator<< (std::basic_ostream< YYChar > &ostr, const position &pos) |
| Intercept output stream redirection. More... | |
| dyn::ratexp | read (std::istream &is, const dyn::ratexpset &rs, const location &l=location{}) |
| The ratexp in stream is, with rs as default ratexpset. More... | |
| using vcsn::rat::complement = typedef unary<type_t::complement, Context> |
| using vcsn::rat::conjunction = typedef variadic<type_t::conjunction, Context> |
| using vcsn::rat::exp_t = typedef std::shared_ptr<const exp> |
| using vcsn::rat::irange_type = typedef std::tuple<int, int> |
| using vcsn::rat::ldiv = typedef variadic<type_t::ldiv, Context> |
| using vcsn::rat::lweight = typedef weight_node<type_t::lweight, Context> |
| using vcsn::rat::one = typedef constant<type_t::one, Context> |
| using vcsn::rat::prod = typedef variadic<type_t::prod, Context> |
| using vcsn::rat::ratexp = typedef std::shared_ptr<const node<Context>> |
| using vcsn::rat::ratexp_polynomial_t = typedef typename ratexp_polynomialset_t<RatExpSet>::value_t |
| using vcsn::rat::ratexp_polynomialset_t = typedef polynomialset<context<RatExpSet, weightset_t_of<RatExpSet>>> |
| using vcsn::rat::rweight = typedef weight_node<type_t::rweight, Context> |
| using vcsn::rat::shuffle = typedef variadic<type_t::shuffle, Context> |
| using vcsn::rat::star = typedef unary<type_t::star, Context> |
| using vcsn::rat::sum = typedef variadic<type_t::sum, Context> |
| using vcsn::rat::transposition = typedef unary<type_t::transposition, Context> |
| using vcsn::rat::zero = typedef constant<type_t::zero, Context> |
|
strong |
A ratexpset can implement several different sets of identities on expressions.
This type represents one of those sets.
| Enumerator | |
|---|---|
| trivial |
Trivial identities only. |
| series |
Trivial identities plus series identities. |
Definition at line 17 of file identities.hh.
|
strong |
The possible types of ratexps.
They also code the order in which they are sorted by less_than, so that, for instance, polynomials always display \e + a, and never a + \e.
| Enumerator | |
|---|---|
| zero | |
| one | |
| atom | |
| sum | |
| prod | |
| ldiv | |
| conjunction | |
| shuffle | |
| star | |
| transposition | |
| lweight | |
| rweight | |
| complement | |
| OutRatExpSet::value_t vcsn::rat::copy | ( | const InRatExpSet & | in_rs, |
| const OutRatExpSet & | out_rs, | ||
| const typename InRatExpSet::value_t & | v | ||
| ) |
Definition at line 131 of file copy.hh.
Referenced by vcsn::rat::ratexpset_impl< Context >::conv(), vcsn::dyn::detail::copy_ratexp(), and vcsn::rat::ratexpset_impl< Context >::insert_in_sum_series_().
|
static |
The nesting limit for parser traces, as specified per $YYDEBUG.
Definition at line 54 of file driver.cc.
Referenced by vcsn::rat::driver::parse().
|
inline |
Whether is a constant (\z or \e).
Definition at line 49 of file fwd.hh.
Referenced by vcsn::rat::exp::is_leaf().
|
inline |
Whether star, complement.
Definition at line 56 of file fwd.hh.
References complement, star, and transposition.
Referenced by vcsn::rat::exp::is_unary().
|
inline |
|
inline |
From a RatExpSet to its polynomialset.
Definition at line 34 of file split.hh.
References vcsn::context< LabelSet, WeightSet >::weightset().
Referenced by vcsn::derivation(), vcsn::dyn::detail::derivation(), vcsn::dyn::detail::split(), and vcsn::split().
| identities vcsn::rat::meet | ( | identities | i1, |
| identities | i2 | ||
| ) |
Definition at line 48 of file identities.cc.
|
inline |
Compare two location objects.
Definition at line 155 of file location.hh.
|
inline |
Compare two position objects.
Definition at line 159 of file position.hh.
|
inline |
Join two location objects to create a location.
Definition at line 115 of file location.hh.
|
inline |
Add two position objects.
Definition at line 127 of file position.hh.
|
inline |
Change end position.
Definition at line 129 of file location.hh.
|
inline |
Add and assign a position.
Definition at line 119 of file position.hh.
|
inline |
Change end position in place.
Definition at line 122 of file location.hh.
|
inline |
Change end position.
Definition at line 141 of file location.hh.
|
inline |
Add two position objects.
Definition at line 141 of file position.hh.
|
inline |
Add and assign a position.
Definition at line 134 of file position.hh.
|
inline |
Change end position in place.
Definition at line 135 of file location.hh.
| std::ostream & vcsn::rat::operator<< | ( | std::ostream & | os, |
| identities | i | ||
| ) |
Definition at line 25 of file identities.cc.
References to_string().
|
inline |
Definition at line 16 of file printer.hxx.
References CASE.
|
inline |
Intercept output stream redirection.
| ostr | the destination output stream |
| loc | a reference to the location to redirect |
Avoid duplicate information.
Definition at line 168 of file location.hh.
References vcsn::rat::position::column, and vcsn::rat::location::end.
|
inline |
Intercept output stream redirection.
| ostr | the destination output stream |
| pos | a reference to the position to redirect |
Definition at line 170 of file position.hh.
References vcsn::rat::position::filename.
|
inline |
Compare two location objects.
Definition at line 148 of file location.hh.
|
inline |
Compare two position objects.
Definition at line 148 of file position.hh.
| std::istream & vcsn::rat::operator>> | ( | std::istream & | is, |
| identities & | i | ||
| ) |
Definition at line 30 of file identities.cc.
References vcsn::eat(), vcsn::fail_reading(), is, series, and trivial.
|
static |
Generate a ratexp for "e{range.first, range.second}".
Definition at line 1348 of file parse.cc.
Referenced by vcsn::rat::parser::parse(), and power().
|
static |
|
static |
Generate a ratexp for "e <+ f = e % f + f".
Definition at line 1355 of file parse.cc.
Referenced by vcsn::rat::parser::parse().
| dyn::ratexp vcsn::rat::read | ( | std::istream & | is, |
| const dyn::ratexpset & | rs, | ||
| const location & | l | ||
| ) |
The ratexp in stream is, with rs as default ratexpset.
Definition at line 12 of file read.cc.
References vcsn::rat::driver::errors, and vcsn::rat::driver::parse().
Referenced by vcsn::dyn::read_ratexp().
| std::string vcsn::rat::to_string | ( | identities | i | ) |
Definition at line 13 of file identities.cc.
References BUILTIN_UNREACHABLE, series, and trivial.
Referenced by vcsn::dyn::blind(), vcsn::detail::b_impl::conv(), vcsn::divkbaseb(), vcsn::rat::ratexpset_impl< Context >::letter_class_(), vcsn::snamer< std::integral_constant< T, Value > >::operator()(), operator<<(), vcsn::detail::blind_automaton_impl< Tape, Aut >::sname(), and vcsn::detail::blind_automaton_impl< Tape, Aut >::vname().
|
inlinestatic |
Use our local scanner object.
Definition at line 96 of file parse.cc.
References vcsn::rat::driver::scanner_.
Referenced by vcsn::rat::parser::parse().