33 #ifndef CORE_CP_COMMANDSCANNER_H_
34 #define CORE_CP_COMMANDSCANNER_H_
37 #ifndef pfp_cpCommandScannerBase_h_included
38 #include "NAMESPACE_HACK_BEGIN"
40 #include "CommandScannerbase.h"
41 #include "NAMESPACE_HACK_END"
44 #ifndef pfp_cpCommandParserBase_h_included
45 #include "NAMESPACE_HACK_BEGIN"
46 #include "CommandParserbase.h"
47 #include "NAMESPACE_HACK_END"
52 #include "NAMESPACE_HACK_BEGIN"
57 class CommandScanner:
public CommandScannerBase {
59 explicit CommandScanner(std::istream &in = std::cin,
60 std::ostream &out = std::cout);
62 CommandScanner(std::string
const &infile, std::string
const &outfile);
67 void setSval(Meta__::SType *);
77 int executeAction__(
size_t ruleNr);
83 void postCode(PostEnum__ type);
89 #define returnToken(symbol) do { \
90 std::cout << #symbol << std::endl; \
91 return Parser::symbol;\
94 #define returnToken(symbol) return CommandParser::symbol
98 void CommandScanner::returnValue(T t) {
99 val->get< Meta__::TagOf<T>::tag >() = t;
102 inline void CommandScanner::setSval(Meta__::SType * sval) {
107 inline CommandScanner::CommandScanner(std::istream &in, std::ostream &out)
109 CommandScannerBase(in, out)
112 inline CommandScanner::CommandScanner(std::string
const &infile,
113 std::string
const &outfile): CommandScannerBase(infile, outfile) {}
116 inline int CommandScanner::lex() {
120 inline void CommandScanner::preCode() {
124 inline void CommandScanner::postCode(PostEnum__ type) {
128 inline void CommandScanner::print() {
134 #include "NAMESPACE_HACK_END"
136 #endif // CORE_CP_COMMANDSCANNER_H_
Definition: CommandParser.h:50