  enum yytokentype
  {
    Indent = 258,
    Dedent = 259,
    Newline = 260,
    Pass = 261,
    Break = 262,
    Continue = 263,
    Return = 264,
    Ident = 265,
    If = 266,
    Else = 267,
    Elif = 268,
    For = 269,
    While = 270,
    Def = 271,
    Arrow = 272,
    Class = 273,
    Or = 274,
    And = 275,
    Not = 276,
    In = 277,
    Is = 278,
    True = 279,
    False = 280,
    None = 281,
    Number = 282,
    String = 283,
    GT = 284,
    LT = 285,
    GE = 286,
    LE = 287,
    EQ = 288,
    NE = 289,
    NOTUSED = 290,
    Except = 291,
    Lambda = 292,
    With = 293,
    As = 294,
    Finally = 295,
    Nonlocal = 296,
    Assert = 297,
    Yield = 298,
    From = 299,
    Global = 300,
    Raise = 301,
    Del = 302,
    Import = 303,
    Try = 304
  };

static const char *const yytname[] =
{
  "$end", "error", "$undefined", "Indent", "Dedent", "Newline", "Pass",
  "Break", "Continue", "Return", "Ident", "If", "Else", "Elif", "For",
  "While", "Def", "Arrow", "Class", "Or", "And", "Not", "In", "Is", "True",
  "False", "None", "Number", "String", "GT", "LT", "GE", "LE", "EQ", "NE",
  "NOTUSED", "Except", "Lambda", "With", "As", "Finally", "Nonlocal",
  "Assert", "Yield", "From", "Global", "Raise", "Del", "Import", "Try",
  "':'", "'='", "'('", "')'", "','", "'<'", "'>'", "'+'", "'-'", "'*'",
  "'/'", "'%'", "'.'", "'['", "']'", "$accept", "program", "stmts", "stmt",
  "simple_stmt", "compound_stmt", "type", "assign", "if_stmt",
  "elif_stmts", "while_stmt", "for_stmt", "func_def", "ret_type_option",
  "params_option", "params", "param", "class_def", "base_classes", "block",
  "expr", "disjunction", "conjunction", "inversion", "relation", "sum",
  "term", "factor", "primary", "name", "atom", "strings", "exprs",
  "exprs_option", "Idents", "EMPTY", 0
};

#define YYUNDEFTOK  2
#define YYMAXUTOK   304

#define YYTRANSLATE(YYX)                                                \
  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)

/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
   as returned by yylex, without out-of-bounds checking.  */
static const char yytranslate[] =
{
       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,    61,     2,     2,
      52,    53,    59,    57,    54,    58,    62,    60,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,    50,     2,
      55,    51,    56,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,    63,     2,    64,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
      45,    46,    47,    48,    49
};

string token_image(int token)
{
    return string(yytname[YYTRANSLATE(token)]);
}


void scan_main()
{
    while (int token = yylex())
        if (token != Newline)
            cout << "Token = " << token_image(token) << "\t\t" << "Lexeme = \"" << yytext << "\"" << endl;
}

