Vcsn
2.0
Be Rational
|
#include <context-parser.hh>
Public Member Functions | |
context_parser (std::istringstream &is) | |
std::shared_ptr< ast_node > | parse () |
Accept anything. More... | |
std::shared_ptr< ast_node > | parse_context () |
Accept only a valid context. More... | |
Private Member Functions | |
std::shared_ptr< ast_node > | any_ () |
Accept anything. More... | |
std::string | word_ () |
Return the next word in the stream. More... | |
std::shared_ptr< const genset > | genset_ () |
A generator set (e.g., "char(abc)" or "char"). More... | |
std::shared_ptr< const genset > | genset_ (const std::string &letter_type) |
std::shared_ptr< context > | context_ () |
<LabelSet>, <WeightSet> . More... | |
std::shared_ptr< context > | context_ (const std::string &word) |
std::shared_ptr< context > | context_ (const std::shared_ptr< ast_node > &ls) |
When the labelset was already parsed. More... | |
std::shared_ptr< ast_node > | labelset_ () |
<LabelSet> . More... | |
std::shared_ptr< ast_node > | labelset_ (const std::string &kind) |
std::shared_ptr< ast_node > | weightset_ () |
<WeightSet> . More... | |
std::shared_ptr< ast_node > | weightset_ (const std::string &ws) |
std::shared_ptr< automaton > | automaton_ (std::string prefix) |
<Automaton> "\<" <Context> "\>" . More... | |
std::shared_ptr< tupleset > | tupleset_ () |
std::shared_ptr< ratexpset > | ratexpset_ () |
"ratexpset" "\<" <Context> "\>" . More... | |
std::shared_ptr< ratexpset > | ratexpset_series_ () |
std::shared_ptr< polynomialset > | polynomialset_ () |
"polynomialset" "\<" <Context> "\>" . More... | |
std::shared_ptr< ast_node > | labelset_or_weightset_ () |
<LabelSet> | <WeightSet> More... | |
std::shared_ptr< ast_node > | labelset_or_weightset_ (const std::string &kind) |
Private Attributes | |
std::istringstream & | is_ |
The stream we are parsing. More... | |
std::set< std::string > | weightsets_ |
The set of terminal weightset names. More... | |
std::set< std::string > | labelsets_ |
The set of weightset names. More... | |
Definition at line 16 of file context-parser.hh.
|
inline |
Definition at line 19 of file context-parser.hh.
|
private |
Accept anything.
Definition at line 42 of file context-parser.cc.
References automaton_(), context_(), vcsn::eat(), vcsn::has(), is_, labelset_(), labelsets_, tupleset_(), weightset_(), weightsets_, and word_().
Referenced by parse().
|
private |
<Automaton> "\<" <Context> "\>"
.
Definition at line 260 of file context-parser.cc.
References context_(), vcsn::eat(), is_, vcsn::prefix(), vcsn::str_escape(), and word_().
Referenced by any_().
|
private |
<LabelSet>, <WeightSet>
.
Definition at line 168 of file context-parser.cc.
References word_().
Referenced by any_(), automaton_(), context_(), parse_context(), polynomialset_(), ratexpset_(), and ratexpset_series_().
|
private |
Definition at line 183 of file context-parser.cc.
References context_(), and labelset_().
|
private |
When the labelset was already parsed.
Definition at line 174 of file context-parser.cc.
References vcsn::eat(), is_, and weightset_().
|
private |
A generator set (e.g., "char(abc)" or "char").
Definition at line 163 of file context-parser.cc.
References word_().
Referenced by labelset_().
|
private |
Definition at line 146 of file context-parser.cc.
References is_.
|
private |
<LabelSet>
.
Definition at line 188 of file context-parser.cc.
References word_().
Referenced by any_(), context_(), labelset_(), and labelset_or_weightset_().
|
private |
Definition at line 194 of file context-parser.cc.
References vcsn::eat(), genset_(), is_, labelset_(), ratexpset_(), ratexpset_series_(), vcsn::str_escape(), and tupleset_().
|
private |
<LabelSet> | <WeightSet>
Definition at line 106 of file context-parser.cc.
References word_().
Referenced by tupleset_().
|
private |
Definition at line 112 of file context-parser.cc.
References vcsn::has(), labelset_(), labelsets_, ratexpset_(), ratexpset_series_(), tupleset_(), weightset_(), and weightsets_.
std::shared_ptr< ast_node > vcsn::ast::context_parser::parse | ( | ) |
Accept anything.
Definition at line 28 of file context-parser.cc.
References any_(), vcsn::ast::check_eof(), and is_.
Referenced by vcsn::ast::normalize().
std::shared_ptr< ast_node > vcsn::ast::context_parser::parse_context | ( | ) |
Accept only a valid context.
Definition at line 35 of file context-parser.cc.
References vcsn::ast::check_eof(), context_(), and is_.
|
private |
"polynomialset" "\<" <Context> "\>"
.
Definition at line 355 of file context-parser.cc.
References context_(), vcsn::eat(), and is_.
Referenced by weightset_().
|
private |
"ratexpset" "\<" <Context> "\>"
.
Definition at line 331 of file context-parser.cc.
References context_(), vcsn::eat(), is_, and vcsn::rat::trivial.
Referenced by labelset_(), labelset_or_weightset_(), and weightset_().
|
private |
Definition at line 347 of file context-parser.cc.
References context_(), vcsn::eat(), is_, and vcsn::rat::series.
Referenced by labelset_(), labelset_or_weightset_(), and weightset_().
|
private |
Definition at line 316 of file context-parser.cc.
References vcsn::eat(), is_, and labelset_or_weightset_().
Referenced by any_(), labelset_(), labelset_or_weightset_(), and weightset_().
|
private |
<WeightSet>
.
Definition at line 237 of file context-parser.cc.
References word_().
Referenced by any_(), context_(), and labelset_or_weightset_().
|
private |
Definition at line 243 of file context-parser.cc.
References vcsn::has(), polynomialset_(), ratexpset_(), ratexpset_series_(), vcsn::str_escape(), tupleset_(), and weightsets_.
|
private |
Return the next word in the stream.
Does not consider that underscore is word-constituent.
Definition at line 128 of file context-parser.cc.
References is_.
Referenced by any_(), automaton_(), context_(), genset_(), labelset_(), labelset_or_weightset_(), and weightset_().
|
private |
The stream we are parsing.
Definition at line 70 of file context-parser.hh.
Referenced by any_(), automaton_(), context_(), genset_(), labelset_(), parse(), parse_context(), polynomialset_(), ratexpset_(), ratexpset_series_(), tupleset_(), and word_().
|
private |
The set of weightset names.
Definition at line 88 of file context-parser.hh.
Referenced by any_(), and labelset_or_weightset_().
|
private |
The set of terminal weightset names.
Definition at line 74 of file context-parser.hh.
Referenced by any_(), labelset_or_weightset_(), and weightset_().