10 #ifndef TEUCHOS_LANGUAGE_HPP
11 #define TEUCHOS_LANGUAGE_HPP
21 #include <Teuchos_Grammar.hpp>
22 #include <Teuchos_FiniteAutomaton.hpp>
124 void operator()(std::string
const& name_in, std::string
const& regex_in);
126 typedef std::vector<Token> Tokens;
129 typedef std::vector<std::string> RHS;
133 RHSBuilder(Production& prod_in);
134 RHSBuilder& operator,(std::string
const& rhs_item);
135 RHSBuilder& operator>>(std::string
const& rhs_item);
140 RHSBuilder operator()(std::string
const& lhs_in);
142 typedef std::vector<Production> Productions;
171 std::ostream& operator<<(std::ostream& os,
Language const& lang);
Productions productions
vector of productions
The main class for users to define a language using TeuchosParser.
void make_lexer(FiniteAutomaton &result, Language const &language)
construct a lexer for the Language tokens.
Declares Teuchos::ReaderTables.
Tokens tokens
vector of tokens
ReaderTablesPtr make_reader_tables(Language const &language)
constructs ReaderTables for the given Language.
RCP< const Language > LanguagePtr
an RCP to a const Language
Smart reference counting pointer class for automatic garbage collection.
Reference-counted pointer class and non-member templated function implementations.