1#ifndef TEUCHOS_BUILD_PARSER_HPP
2#define TEUCHOS_BUILD_PARSER_HPP
8#include <Teuchos_Graph.hpp>
19typedef std::vector<Config> Configs;
21typedef std::set<int> Context;
25struct ActionInProgress {
30struct StateInProgress {
31 std::vector<int> configs;
32 typedef std::vector<ActionInProgress> Actions;
36void swap(StateInProgress& a, StateInProgress& b);
38typedef RCP<StateInProgress> StateInProgressPtr;
40typedef std::vector<StateInProgressPtr> StatesInProgress;
45 StateConfig(
int s,
int cis);
48typedef std::vector<StateConfig> StateConfigs;
50struct ParserInProgress {
51 StatesInProgress states;
53 StateConfigs state_configs;
54 Graph states2state_configs;
58StateConfigs form_state_configs(StatesInProgress
const& states);
59Graph form_states_to_state_configs(StateConfigs
const& scs,
60 StatesInProgress
const& states);
63 std::string
const& filepath,
64 ParserInProgress
const& pip,
69ParserInProgress draft_lalr1_parser(GrammarPtr grammar,
bool verbose =
false);
71Parser accept_parser(ParserInProgress
const& pip);
73class 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.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...