10 #ifndef TEUCHOS_BUILD_PARSER_HPP 
   11 #define TEUCHOS_BUILD_PARSER_HPP 
   17 #include <Teuchos_Graph.hpp> 
   28 typedef std::vector<Config> Configs;
 
   30 typedef std::set<int> Context;
 
   34 struct ActionInProgress {
 
   39 struct StateInProgress {
 
   40   std::vector<int> configs;
 
   41   typedef std::vector<ActionInProgress> Actions;
 
   45 void swap(StateInProgress& a, StateInProgress& b);
 
   47 typedef RCP<StateInProgress> StateInProgressPtr;
 
   49 typedef std::vector<StateInProgressPtr> StatesInProgress;
 
   54   StateConfig(
int s, 
int cis);
 
   57 typedef std::vector<StateConfig> StateConfigs;
 
   59 struct ParserInProgress {
 
   60   StatesInProgress states;
 
   62   StateConfigs state_configs;
 
   63   Graph states2state_configs;
 
   67 StateConfigs form_state_configs(StatesInProgress 
const& states);
 
   68 Graph form_states_to_state_configs(StateConfigs 
const& scs,
 
   69     StatesInProgress 
const& states);
 
   72     std::string 
const& filepath,
 
   73     ParserInProgress 
const& pip,
 
   78 ParserInProgress draft_lalr1_parser(GrammarPtr grammar, 
bool verbose = 
false);
 
   80 Parser accept_parser(ParserInProgress 
const& pip);
 
   82 class ParserBuildFail: 
public std::invalid_argument {
 
   84   ParserBuildFail(
const std::string& msg);
 
Declares Teuchos::Parser, ParserFail and make_lalr1_parser. 
Reference-counted pointer class and non-member templated function implementations.