#include "generator.ih"

Generator::Map Generator::s_insert =
{
    // $insert-key              function called
    {"DFAbases",                &Generator::DFAbases},
    {"DFAs",                    &Generator::dfas},
    {"actions",                 &Generator::actions},
    {"baseclass_h",             &Generator::baseClassH},
    {"baseIncludes",            &Generator::baseIncludes},
    {"caseCheck",               &Generator::caseCheck},
    {"classHead",               &Generator::classHead},
    {"class_h",                 &Generator::classH},
    {"class_ih",                &Generator::classIH},
    {"inputInline",             &Generator::inputInline},
    {"inputInterface",          &Generator::inputInterface},
    {"inputImplementation",     &Generator::inputImplementation},
    {"inputDeclaration",        &Generator::inputDeclaration},
    {"debug",                   &Generator::debug},
    {"debugDecl",               &Generator::debugDecl},
    {"debugFunctions",          &Generator::debugFunctions},
    {"declarations",            &Generator::declarations},
    {"inlineLexFunction",       &Generator::inlineLexFunction},
    {"interactiveDecl",         &Generator::interactiveDecl},
    {"interactiveInit",         &Generator::interactiveInit},
    {"interactiveLex",          &Generator::interactiveLex},
    {"lexFunctionDecl",         &Generator::lexFunctionDecl},
    {"lopImplementation",       &Generator::lopImplementation},
    {"namespace-close",         &Generator::namespaceClose},    
    {"namespace-open",          &Generator::namespaceOpen},
    {"namespace-use",           &Generator::namespaceUse},
    {"print",                   &Generator::print},
    {"ranges",                  &Generator::ranges},
    {"scannerConstructors",     &Generator::scannerConstructors},
    {"startconddecl",           &Generator::startCondDecl},
    {"startcondenum",           &Generator::startCondEnum},
    {"startcondimpl",           &Generator::startCondImpl},
    {"startcondinfo",           &Generator::startCondInfo},
    {"sstream",                 &Generator::insertSstream},
    {"token-path",              &Generator::tokenPath},
};

char const *Generator::s_baseFlag = "\\@";
size_t const Generator::s_baseFlagSize = 2; // backslash and @

char const *Generator::s_namespaceBaseFlag = "\\@$";
size_t const Generator::s_namespaceBaseFlagSize = 3; // backslash, $ and @

string Generator::s_matchedTextFunction = "d_scanner.YYText()";
string Generator::s_scannerTokenFunction = "d_scanner.yylex()";


