1 #ifndef TEUCHOS_BUILD_PARSER_HPP 
    2 #define TEUCHOS_BUILD_PARSER_HPP 
    8 #include <Teuchos_Graph.hpp> 
   19 typedef std::vector<Config> Configs;
 
   21 typedef std::set<int> Context;
 
   25 struct ActionInProgress {
 
   30 struct StateInProgress {
 
   31   std::vector<int> configs;
 
   32   typedef std::vector<ActionInProgress> Actions;
 
   36 void swap(StateInProgress& a, StateInProgress& b);
 
   38 typedef RCP<StateInProgress> StateInProgressPtr;
 
   40 typedef std::vector<StateInProgressPtr> StatesInProgress;
 
   45   StateConfig(
int s, 
int cis);
 
   48 typedef std::vector<StateConfig> StateConfigs;
 
   50 struct ParserInProgress {
 
   51   StatesInProgress states;
 
   53   StateConfigs state_configs;
 
   54   Graph states2state_configs;
 
   58 StateConfigs form_state_configs(StatesInProgress 
const& states);
 
   59 Graph form_states_to_state_configs(StateConfigs 
const& scs,
 
   60     StatesInProgress 
const& states);
 
   63     std::string 
const& filepath,
 
   64     ParserInProgress 
const& pip,
 
   69 ParserInProgress draft_lalr1_parser(GrammarPtr grammar, 
bool verbose = 
false);
 
   71 Parser accept_parser(ParserInProgress 
const& pip);
 
   73 class ParserBuildFail: 
public std::invalid_argument {
 
   75   ParserBuildFail(
const std::string& msg);
 
Declares Teuchos::Parser, ParserFail and make_lalr1_parser. 
 
Reference-counted pointer class and non-member templated function implementations.