10 #ifndef TEUCHOS_PARSER_HPP
11 #define TEUCHOS_PARSER_HPP
17 #include <Teuchos_TableDecl.hpp>
18 #include <Teuchos_Grammar.hpp>
36 #ifdef HAVE_TEUCHOSCORE_CXX11
37 extern template struct Table<Action>;
43 Table<Action> terminal_table;
45 Table<int> nonterminal_table;
47 Parser(GrammarPtr g,
int nstates_reserve);
50 int add_state(Parser& p);
51 int get_nstates(Parser
const& p);
52 void add_terminal_action(Parser& p,
int state,
int terminal, Action action);
53 void add_nonterminal_action(Parser& p,
int state,
int nonterminal,
int next_state);
54 Action
const& get_action(Parser
const& p,
int state,
int terminal);
55 int execute_action(Parser
const& p, std::vector<int>& stack, Action
const& action);
56 GrammarPtr
const& get_grammar(Parser
const& p);
Parser make_lalr1_parser(GrammarPtr grammar, bool verbose)
Tries to create LALR(1) parser tables for a given grammar.
Tries to create LALR(1) parser tables for a given grammar.
Smart reference counting pointer class for automatic garbage collection.