#define MAX_GRAMMAR 2235
#define PHRASE_BASE 514
int gram[MAX_GRAMMAR] = {
    2,     1,   515,     1,   539,     1,     2,   517,   516,     2,     2,   517,   516,     0,     1,     3, 
  256,   518,   519,     2,     2,   257,   258,     0,     2,     1,   520,     1,   523,     1,     8,   259, 
  527,   521,   529,   522,   260,   526,   812,     2,     1,   261,     1,   262,     2,     2,   529,   522, 
    0,     1,    11,   259,   525,   527,   521,   539,   524,   263,   605,   260,   526,   812,     2,     2, 
  539,   524,     0,     2,     1,   264,     0,     2,     1,   527,     0,     1,     2,   528,   808,     2, 
    2,   710,   823,     0,     9,     1,   530,     1,   535,     1,   536,     1,   578,     1,   583,     1, 
  589,     1,   594,     1,   579,     1,   582,     1,     6,   628,   531,   572,   532,   534,   812,     2, 
    1,   265,     0,     2,     2,   266,   267,     0,     2,     1,   826,     1,   268,     2,     2,   533, 
  658,     0,     1,     5,   269,   573,   261,   572,   812,     1,     6,   270,   654,   537,   261,   688, 
  812,     2,     4,   816,   575,   538,   817,     0,     2,     3,   813,   575,   538,     0,     8,     1, 
  530,     1,   535,     1,   536,     1,   583,     1,   589,     1,   594,     1,   601,     1,   611,     1, 
    3,   542,   812,   541,     2,     3,   542,   812,   541,     0,    11,     1,   554,     1,   565,     1, 
  563,     1,   680,     1,   634,     1,   629,     1,   630,     1,   632,     1,   683,     1,   607,     1, 
  626,     1,     6,   552,   544,   263,   540,   550,   548,     2,     2,   545,   546,     0,     2,     1, 
  271,     0,     1,     2,   553,   547,     2,     2,   553,   547,     0,     1,     3,   260,   549,   812, 
    2,     1,   564,     0,     2,     3,   272,   608,   551,     0,     2,     2,   608,   551,     0,     2, 
    3,   824,   564,   825,     0,     9,     1,   530,     1,   535,     1,   536,     1,   583,     1,   587, 
    1,   589,     1,   594,     1,   600,     1,   625,     2,     3,   556,   826,   555,     1,   626,     2, 
    1,   626,     1,   658,     4,     4,   558,   823,   557,   560,     1,   559,     1,   628,     2,   827, 
  562,     2,     3,   558,   823,   557,     0,     2,     1,   657,     1,   559,     1,     4,   599,   816, 
  561,   817,     1,     1,   808,     1,     1,   658,     1,     1,   808,     1,     2,   273,   564,     1, 
    1,   808,     1,     3,   274,   549,   566,     2,     2,   275,   637,     0,    22,     1,   276,     1, 
  277,     1,   278,     2,   279,   570,     2,   280,   569,     2,   281,   568,     1,   282,     1,   283, 
    1,   284,     1,   285,     1,   286,     1,   287,     1,   288,     1,   289,     1,   290,     2,   291, 
  292,     1,   293,     1,   294,     2,   295,   569,     2,   296,   569,     2,   297,   569,     1,   298, 
    2,     1,   282,     0,     2,     3,   816,   835,   817,     0,     2,     4,   816,   835,   571,   817, 
    0,     2,     3,   813,   835,   571,     0,     5,     1,   567,     3,   628,   821,   299,     5,   711, 
  823,   735,   821,   299,     3,   711,   821,   300,     1,   573,     1,     2,   808,   574,     2,     3, 
  823,   808,   574,     0,     1,     2,   577,   576,     2,     1,   572,     0,     1,     1,   808,     1, 
    6,   270,   654,   537,   301,   624,   812,     1,     4,   302,   615,   580,   812,     2,     4,   816, 
  616,   581,   817,     0,     2,     3,   813,   616,   581,     0,     1,     9,   303,   613,   816,   616, 
  581,   817,   301,   624,   812,     1,     3,   584,   272,   812,     1,     2,   585,   808,     2,     2, 
  586,   823,     0,     1,     1,   808,     1,     8,   304,   305,   816,   584,   813,   588,   817,   812, 
    1,     1,   835,     2,     1,   590,     1,   592,     1,     9,   299,   573,   261,   306,   816,   593, 
  591,   817,   812,     2,     3,   813,   593,   591,     0,     1,     5,   657,   573,   821,   300,   812, 
    1,     1,   731,     2,     1,   595,     1,   598,     1,     9,   299,   573,   261,   307,   308,   597, 
  596,   567,   812,     2,     2,   309,   310,     2,   311,   310,     2,     1,   593,     1,   567,     1, 
    3,   599,   573,   812,     1,     1,   808,     1,     1,   601,     1,    13,   604,   302,   615,   580, 
  603,   521,   544,   263,   605,   606,   260,   602,   812,     2,     1,   615,     0,     2,     2,   301, 
  624,     0,     2,     1,   610,     0,     2,     1,   540,     0,     2,     2,   272,   551,     0,     1, 
    4,   263,   605,   606,   260,     1,     5,   275,   584,   609,   312,   540,     2,     3,   257,   584, 
  609,     0,     1,     2,   256,   518,     1,    14,   604,   303,   613,   580,   301,   624,   521,   544, 
  263,   605,   606,   260,   614,   812,     2,     2,   271,   547,     0,     1,     2,   528,   808,     2, 
    1,   613,     0,     1,     2,   528,   808,     1,     5,   620,   619,   619,   618,   617,     2,     2, 
  533,   622,     0,     2,     1,   621,     0,     5,     1,   313,     2,   314,   315,     1,   314,     1, 
  315,     0,     1,     1,   808,     1,     1,   572,     3,     2,   623,   835,     1,   809,     1,   267, 
    3,     1,   818,     1,   819,     0,     1,     1,   572,     1,     1,   611,     1,     5,   733,   816, 
  713,   627,   817,     2,     3,   813,   713,   627,     0,     1,     1,   808,     1,     1,   267,     1, 
    2,   316,   631,     2,     1,   584,     0,     1,     2,   301,   633,     2,     1,   658,     0,     1, 
    7,   549,   635,   317,   540,   260,   317,   549,     3,     2,   318,   637,     2,   319,   636,     0, 
    2,     1,   655,     1,   650,     1,     1,   638,     1,     3,   639,   641,   640,     2,     1,   266, 
    0,     2,     3,   257,   641,   640,     0,     1,     2,   643,   642,     2,     3,   320,   643,   642, 
    0,     6,     6,   556,   823,   321,   816,   658,   817,     2,   658,   646,     2,   736,   644,     1, 
  649,     1,   628,     3,   816,   638,   817,     2,     3,   816,   671,   817,     0,     4,     2,   821, 
  322,     2,   821,   323,     2,   821,   324,     0,     6,     2,   760,   658,     3,   261,   639,   267, 
    3,   639,   325,   810,     5,   639,   326,   658,   320,   658,     5,   639,   314,   816,   671,   817, 
    2,   647,   648,     2,     1,   654,     1,   762,     3,     2,   821,   322,     2,   821,   323,     2, 
  821,   324,     3,     1,   327,     1,   328,     1,   267,     1,     6,   652,   314,   651,   653,   822, 
  653,     2,     1,   329,     0,     1,     1,   808,     2,     1,   659,     1,   572,     1,     1,   808, 
    1,     3,   657,   314,   656,     2,     2,   654,   644,     3,   816,   690,   817,     1,     1,   808, 
    5,     0,     1,   670,     1,   659,     1,   673,     1,   677,     1,     3,   623,   662,   661,     2, 
    1,   818,     1,   819,     2,     3,   660,   662,   661,     0,     1,     2,   665,   664,     2,     1, 
  814,     1,   820,     2,     3,   663,   665,   664,     0,     1,     2,   666,   668,     8,     1,   669, 
    1,   628,     1,   562,     2,   736,   644,     3,   736,   644,   667,     3,   816,   659,   817,     1, 
  267,     3,   647,   821,   330,     2,     2,   644,   667,     0,     2,     3,    42,    42,   653,     0, 
    1,     1,   835,     3,     1,   808,     1,   731,     1,   649,     1,     2,   658,   672,     2,     3, 
  813,   658,   672,     0,     1,     2,   675,   674,     2,     4,   828,   828,   675,   674,     0,     6, 
    1,   676,     1,   628,     1,   562,     2,   736,   644,     3,   816,   673,   817,     1,   267,     1, 
    1,   512,     6,     1,   678,     1,   628,     1,   562,     2,   736,   644,     3,   816,   677,   817, 
    1,   267,     1,     1,   512,     1,     1,   331,     1,     8,   332,   637,   312,   540,   681,   682, 
  260,   332,     2,     5,   333,   637,   312,   540,   681,     0,     2,     2,   334,   540,     0,     1, 
    1,   684,     2,     1,   685,     1,   686,     5,     1,   688,     1,   782,     1,   787,     1,   687, 
    1,   793,     7,     1,   794,     1,   679,     1,   795,     1,   798,     1,   800,     1,   801,     1, 
  806,     1,     5,   335,   336,   747,   337,   749,     1,     2,   690,   689,     2,     3,   338,   690, 
  689,     0,     2,     3,   816,   688,   817,     1,   691,     1,    11,   339,   692,   700,   693,   702, 
  694,   695,   696,   697,   698,   699,     3,     1,   340,     1,   341,     0,     2,     2,   342,   735, 
    0,     2,     1,   705,     0,     2,     1,   763,     0,     2,     1,   768,     0,     2,     1,   770, 
    0,     2,     1,   773,     0,     2,     1,   778,     0,     2,     2,   707,   701,     1,   814,     2, 
    3,   813,   707,   701,     0,     1,     3,   336,   743,   703,     2,     3,   813,   743,   703,     0, 
    1,     2,   743,   703,     1,     2,   337,   749,     1,     1,   749,     2,     5,   528,   709,   711, 
  823,   814,     2,   712,   708,     2,     1,   715,     0,     2,     1,   729,     0,     1,     1,   808, 
    1,     1,   808,     1,     1,   713,     2,     2,   717,   714,     1,   649,     2,     3,   660,   717, 
  714,     0,     1,     2,   716,   808,     2,     1,   262,     0,     1,     2,   721,   719,     2,     1, 
  720,     1,   820,     2,     3,   718,   721,   719,     0,     1,     1,   814,     1,     2,   723,   722, 
    2,     4,   828,   828,   723,   722,     0,     8,     1,   728,     2,   660,   713,     5,   736,   816, 
  713,   725,   817,     5,   739,   816,   724,   726,   817,     5,   733,   816,   713,   725,   817,     3, 
  816,   713,   817,     1,   729,     1,   727,     4,     1,   814,     1,   340,     1,   341,     0,     2, 
    3,   813,   713,   725,     0,     2,     1,   713,     0,     1,     6,   816,   713,   813,   713,   725, 
  817,     3,     1,   835,     1,   512,     1,   267,     1,     2,   731,   730,     2,     3,   816,   818, 
  817,     0,     1,     2,   732,   735,     2,     3,   528,   711,   823,     0,     1,     2,   734,   808, 
    2,     3,   528,   527,   823,     0,     1,     1,   808,     5,     1,   737,     1,   738,     1,   739, 
    1,   740,     1,   741,     9,     1,   343,     1,   344,     1,   345,     1,   346,     1,   347,     1, 
  348,     1,   349,     1,   350,     1,   351,    16,     1,   352,     1,   353,     1,   354,     1,   355, 
    1,   356,     1,   258,     1,   357,     1,   358,     1,   359,     1,   360,     1,   361,     1,   362, 
    1,   363,     1,   364,     1,   365,     1,   366,     7,     1,   367,     1,   368,     1,   369,     1, 
  370,     1,   371,     1,   372,     1,   373,     8,     1,   374,     1,   375,     1,   376,     1,   377, 
    1,   378,     1,   379,     1,   380,     1,   381,     8,     1,   382,     1,   383,     1,   384,     1, 
  385,     1,   386,     1,   387,     1,   388,     1,   389,     2,     1,   390,     1,   391,     1,     2, 
  744,   708,     2,     1,   745,     1,   762,     1,     3,   528,   711,   746,     2,     2,   815,   748, 
    0,     1,     4,   528,   711,   746,   708,     1,     1,   808,     1,     2,   751,   750,     2,     3, 
  257,   751,   750,     0,     1,     2,   753,   752,     2,     3,   320,   753,   752,     0,     5,     5, 
  755,   712,   760,   755,   712,     2,   712,   754,     1,   758,     2,   266,   749,     3,   816,   749, 
  817,     2,     2,   639,   756,     3,   261,   639,   267,     2,     1,   392,     0,     3,     2,   314, 
  761,     3,   325,   713,   757,     4,   326,   712,   320,   712,     2,     2,   393,   512,     0,     3, 
    4,   712,   760,   759,   762,     3,   639,   321,   762,     1,   762,     3,     1,   340,     1,   394, 
    0,     6,     1,   834,     1,   831,     1,   833,     1,   829,     1,   830,     1,   832,     2,     1, 
  712,     1,   762,     1,     3,   816,   688,   817,     1,     7,   764,   395,   310,   765,   766,   749, 
  764,     2,     3,   396,   397,   749,     0,     2,     4,   392,   712,   760,   712,     4,   712,   760, 
  712,   392,     2,     2,   755,   749,     5,   712,   760,   755,   712,   767,     2,     2,   320,   749, 
    0,     1,     5,   398,   310,   713,   725,   769,     2,     2,   399,   749,     0,     1,     2,   771, 
  688,     3,     1,   772,     1,   400,     1,   401,     1,     2,   338,   340,     1,     4,   402,   310, 
  775,   774,     2,     3,   813,   775,   774,     0,     1,     2,   776,   777,     2,     1,   713,     1, 
  835,     3,     1,   403,     1,   404,     0,     1,     4,   319,   405,   780,   779,     2,     1,   406, 
    0,     2,     3,   308,   735,   781,     0,     2,     3,   813,   735,   781,     0,     1,     5,   407, 
  342,   704,   785,   784,     2,     3,   813,   628,   783,     0,     2,     5,   408,   816,   628,   783, 
  817,     1,   690,     2,     4,   816,   731,   786,   817,     0,     2,     3,    44,   731,   786,     0, 
    2,     1,   791,     1,   788,     1,    10,   405,   747,   409,   731,   834,   789,   790,   790,   337, 
  749,     2,     1,   713,     1,   762,     2,     5,   813,   731,   834,   789,   790,     0,     1,    11, 
  405,   747,   409,   816,   731,   792,   817,   834,   762,   337,   749,     2,     3,   813,   731,   792, 
    0,     1,     4,   409,   410,   411,   412,     1,     2,   413,   654,     1,     4,   414,   654,   342, 
  796,     2,     2,   628,   797,     1,   657,     2,     3,   813,   628,   797,     0,     1,     7,   415, 
  307,   704,   314,   799,   416,   779,     6,     2,   417,   418,     2,   417,   419,     2,   418,   405, 
    3,   418,   417,   419,     1,   418,     1,   419,     1,     3,   420,   654,   644,     1,     4,   421, 
  803,   804,   802,     2,     3,   422,   809,   802,     0,     2,     1,   423,     0,     2,     3,   424, 
  805,   807,     0,     2,     1,   425,     0,     1,     2,   425,   807,     1,     1,   808,     1,     1, 
  513,     1,     1,   512,     1,     1,   512,    43,     1,   343,     1,   363,     1,   344,     1,   374, 
    1,   352,     1,   366,     1,   375,     1,   368,     1,   382,     1,   383,     1,   345,     1,   384, 
    1,   376,     1,   353,     1,   364,     1,   400,     1,   385,     1,   365,     1,   354,     1,   355, 
    1,   356,     1,   386,     1,   347,     1,   377,     1,   258,     1,   348,     1,   378,     1,   357, 
    1,   358,     1,   349,     1,   359,     1,   350,     1,   360,     1,   391,     1,   379,     1,   380, 
    1,   381,     1,   361,     1,   351,     1,   362,     1,   390,     1,   388,     1,   389,     1,     1, 
   59,     1,     1,    44,     1,     1,    42,     1,     1,    64,     1,     1,    40,     1,     1,    41, 
    1,     1,    43,     1,     1,    45,     1,     1,    47,     1,     1,    37,     1,     2,    46,    46, 
    1,     1,    46,     1,     2,    60,    60,     1,     2,    62,    62,     1,     2,    58,    61,     1, 
    1,    58,     1,     1,   124,     3,     2,    60,    62,     2,    33,    61,     2,    94,    61,     1, 
    2,    60,    61,     1,     1,    60,     1,     2,    62,    61,     1,     1,    62,     1,     1,    61, 
    1,     3,   839,   837,   836,     2,     3,   426,   839,   840,     0,     2,     2,   840,   838,     2, 
  823,   840,     2,     2,   823,   840,     0,     3,     1,   818,     1,   819,     0,     1,     2,   842, 
  841,     2,     2,   842,   841,     0,    10,     1,    48,     1,    49,     1,    50,     1,    51,     1, 
   52,     1,    53,     1,    54,     1,    55,     1,    56,     1,    57, 
};

#define MAX_KEYWORD 171
char *keyword[MAX_KEYWORD] = { // Keywords are based at 256
  "create", "or", "replace", "package", 
  "end", "is", "as", "begin", 
  "body", "constant", "not", "null", 
  "default", "subtype", "cursor", "declare", 
  "exception", "goto", "exit", "when", 
  "binary_integer", "natural", "positive", "number", 
  "char", "long", "raw", "boolean", 
  "date", "smallint", "real", "numeric", 
  "int", "integer", "pls_integer", "double", 
  "precision", "decimal", "dec", "varchar2", 
  "varchar", "character", "mlslabel", "type", 
  "rowtype", "return", "procedure", "function", 
  "pragma", "exception_init", "record", "table", 
  "of", "index", "by", "indexed", 
  "then", "inout", "in", "out", 
  "raise", "loop", "while", "for", 
  "and", "exists", "notfound", "found", 
  "isopen", "like", "between", "true", 
  "false", "reverse", "rowcount", "commit", 
  "if", "elsif", "else", "delete", 
  "from", "where", "union", "select", 
  "all", "distinct", "into", "abs", 
  "ceil", "floor", "mod", "power", 
  "round", "sign", "sqrt", "trunc", 
  "chr", "initcap", "lower", "lpad", 
  "ltrim", "rpad", "rtrim", "soundex", 
  "substr", "translate", "upper", "ascii", 
  "instr", "length", "concat", "avg", 
  "count", "max", "min", "stddev", 
  "sum", "variance", "chartorowid", "convert", 
  "hextoraw", "rawtohex", "rowidtochar", "to_char", 
  "to_date", "to_number", "decode", "dump", 
  "greatest", "least", "nvl", "uid", 
  "userenv", "vsize", "user", "sysdate", 
  "prior", "escape", "any", "connect", 
  "start", "with", "group", "having", 
  "intersect", "minus", "order", "asc", 
  "desc", "update", "nowait", "insert", 
  "values", "set", "transaction", "read", 
  "only", "close", "fetch", "lock", 
  "mode", "row", "share", "exclusive", 
  "open", "rollback", "comment", "work", 
  "to", "savepoint", "e", 
};

#define MAX_BIP 2
int BIP[MAX_BIP] = { // BIPs precede PHRASEs at 512 upwards
 1,  2, 
};

#define MAX_PHRASE 331
#ifdef DEBUG_PARSER
// FOR DEBUGGING ONLY
char *phrasename[MAX_PHRASE] = { // Based at 512 upwards
  "QUOTED_STRING", "IDENTIFIER", "SS", "ss_package", 
  "create_package_list", "create_package", "opt_or_replace", "package_spec_or_body", 
  "package_spec", "is_or_as", "package_obj_spec_list", "package_body", 
  "package_obj_body_list", "opt_body", "opt_package_name", "package_name", 
  "opt_schema_name_DOT", "package_obj_spec", "variable_declaration", "opt_constant", 
  "opt_not_null", "assign_or_default", "opt_assign_or_default_plsql_expression", "subtype_declaration", 
  "cursor_declaration", "opt_parameter_spec_list", "parameter_spec_list", "package_obj_body", 
  "seq_of_statements", "seq_of_statements_list", "statement", "plsql_block", 
  "opt_declare_specs", "opt_declare", "declare_spec_list", "opt_declare_spec_list", 
  "end_label", "opt_label_name", "opt_exception_section", "opt_exception_handler_list", 
  "opt_label", "declare_spec", "assignment_statement", "assignment_rhs", 
  "object", "opt_record_object_dot", "record_term", "record_table_item", 
  "field_name", "subscript", "host_variable", "goto_statement", 
  "label_name", "exit_statement", "opt_when", "datatype", 
  "optraw", "opt_bracketed_number", "opt_bracketed_number_list", "OPT_NUMBER_LIST", 
  "type_spec", "type_name", "opt_dot_identifier_list", "parameter_spec", 
  "opt_type_spec", "parameter_name", "cursor_spec", "procedure_spec", 
  "opt_argument", "opt_argument_list", "function_spec", "exception_declaration", 
  "exception_name", "opt_exception_package_name", "exception_package_name", "exception_pragma", 
  "oracle_err_number", "record_declaration", "record_type_dec", "opt_field_spec_list", 
  "record_var_dec", "field_spec", "plsql_table_declaration", "table_type_dec", 
  "index_by", "field_spec_or_datatype", "table_var_dec", "plsql_table_name", 
  "procedure_declaration", "procedure_body", "opt_procedure_name", "opt_return_type", 
  "opt_proc_fun_start", "opt_seq_of_statements", "opt_exception", "begin_block", 
  "exception_handler", "opt_or_exception_name_list", "proc_fun_start", "function_body", 
  "opt_declare_spec", "function_name", "opt_function_name", "procedure_name", 
  "argument", "ass_or_def_val", "opt_argument_type", "opt_in_out", 
  "argument_name", "argument_type", "value", "opt_PLUS_or_MINUS", 
  "return_type", "function_declaration", "function_call", "expression_list", 
  "variable_name", "null_statement", "raise_statement", "opt_exception_name", 
  "return_statement", "opt_plsql_expression", "loop_statement", "opt_loop_control", 
  "cursor_or_numeric_loop_param", "plsql_condition", "boolean_exp", "opt_not", 
  "opt_or_term_list", "boolean_term", "opt_and_factor_list", "boolean_factor", 
  "opt_bracketed_plsql_exp_list", "opt_percent", "plsql_expression_qualifier", "cursor_or_subquery", 
  "percent", "boolean_literal", "numeric_loop_param", "opt_reverse", 
  "index_name", "integer_expr", "cursor_name", "cursor_loop_param", 
  "cursor_or_select", "record_name", "plsql_expression", "num_expression", 
  "PLUS_or_MINUS", "opt_term_list", "num_term", "MUL_or_DIV", 
  "opt_factor_list", "num_factor", "basic_factor", "opt_bracketed_plsql_exp_list_list", 
  "opt_exp_int", "numeric_literal", "boolean_expression", "plsql_exp_list", 
  "opt_plsql_exp_list", "char_expression", "opt_concat_char_term_list", "char_term", 
  "char_literal", "date_expression", "date_literal", "commit_statement", 
  "if_statement", "opt_elsif_list", "opt_else", "sql_statement", 
  "sql_command", "to_modify_data", "to_control_data", "delete_command", 
  "select_command", "opt_union_list", "select_statement", "select_expression", 
  "opt_all_or_distinct", "opt_into_col", "opt_where_condition_whole", "opt_connect_clause", 
  "opt_group_clause", "opt_set_clause", "opt_order_clause", "opt_update_clause", 
  "select_list", "opt_displayed_column_list", "table_reference_list_from", "opt_selected_table_list", 
  "table_reference_list", "where_condition_whole", "where_condition", "displayed_column", 
  "opt_alias", "opt_variable", "schema_name", "table_name", 
  "exp_simple", "expression", "opt_PM_term_list", "alias", 
  "opt_as", "term", "mul_or_div", "opt_muldiv_factor_list", 
  "multiply", "factor", "opt_concat_factor2_list", "factor2", 
  "opt_AST_all_or_distinct", "opt_expression_list", "opt_expression", "bracketed_expression_list", 
  "sql_literal", "variable", "opt_bracketed_plus", "column_spec", 
  "opt_table_andor_schema_name_DOT", "user_defined_function", "opt_package_andor_schema_name_DOT", "column_name", 
  "function", "number_function", "char_function", "group_function", 
  "conversion_function", "other_function", "pseudo_column", "selected_table", 
  "table_spec_or_subquery", "table_spec", "opt_AT_link_name", "table_alias", 
  "link_name", "condition", "opt_or_logical_term_list", "logical_term", 
  "opt_and_logical_factor_list", "logical_factor", "is_what", "opt_prior", 
  "is_not_what", "opt_escape_string", "quantified_factor", "opt_all_or_any", 
  "relational_op", "exp_set", "subquery", "connect_clause", 
  "opt_start_with", "clause1", "clause2", "opt_and_condition", 
  "group_clause", "opt_having_condition", "set_clause", "set_qual", 
  "union_all", "order_clause", "opt_sorted_def_list", "sorted_def", 
  "exp_or_num", "opt_asc_or_desc", "update_clause", "opt_nowait", 
  "opt_of_col_name_list", "opt_col_name_list", "insert_command", "opt_var_name_list", 
  "values_or_select", "opt_col_spec", "column_spec_list", "update_command", 
  "simple_update", "expr_or_subq", "opt_colspec_eq_list", "subquery_update", 
  "opt_col_spec_list", "set_transaction_command", "close_statement", "fetch_statement", 
  "varlist_or_record", "opt_var_list", "lock_table_statement", "lock_mode", 
  "open_statement", "rollback_statement", "opt_comment_list", "opt_work", 
  "opt_to_savepoint", "opt_savepoint", "savepoint_statement", "savepoint_name", 
  "identifier", "quoted_string", "match_string", "keyword", 
  "SEMI", "COMMA", "ASTERISK", "AT_SIGN", 
  "OPEN_PAREN", "CLOSE_PAREN", "PLUS", "MINUS", 
  "DIVIDE", "PERCENTAGE", "DOUBLEDOT", "DOT", 
  "START_LABEL", "END_LABEL", "ASSIGNMENT_EQ", "COLON", 
  "VERTBAR", "NOT_EQ", "LE", "LT", 
  "GE", "GT", "EQ", "NUMBER", 
  "opt_exponent", "decimal", "opt_DOT_N", "opt_plus_or_minus", 
  "N", "opt_digit_list", "digit", 
};
#endif /* DEBUG_PARSER */

int phrase_start[MAX_PHRASE-MAX_BIP] = {
    0,     5,     9,    14,    19,    24,    29,    39,    44,    49,    62,    67,    71,    75, 
   79,    84,   103,   111,   115,   120,   125,   130,   137,   145,   152,   158,   175,   180,   186,   209, 
  217,   222,   226,   230,   235,   240,   244,   250,   255,   261,   280,   287,   292,   305,   311,   316, 
  322,   325,   328,   331,   335,   338,   343,   348,   400,   404,   410,   417,   423,   442,   446,   452, 
  456,   460,   463,   471,   477,   484,   490,   501,   506,   510,   515,   518,   528,   531,   536,   547, 
  553,   560,   563,   568,   579,   586,   591,   596,   599,   602,   617,   621,   626,   630,   634,   639, 
  645,   652,   658,   662,   678,   683,   687,   691,   695,   702,   707,   711,   722,   725,   728,   736, 
  742,   745,   748,   755,   761,   764,   767,   771,   775,   779,   783,   792,   800,   805,   808,   813, 
  817,   823,   827,   833,   855,   861,   872,   899,   904,   914,   921,   929,   933,   936,   941,   944, 
  949,   957,   960,   970,   975,   980,   986,   990,   995,  1001,  1005,  1029,  1034,  1040,  1043,  1050, 
 1054,  1060,  1064,  1071,  1087,  1090,  1106,  1109,  1112,  1122,  1130,  1135,  1138,  1143,  1154,  1169, 
 1176,  1180,  1186,  1193,  1206,  1212,  1217,  1221,  1225,  1229,  1233,  1237,  1241,  1247,  1253,  1258, 
 1264,  1268,  1272,  1275,  1285,  1289,  1293,  1296,  1299,  1302,  1308,  1314,  1318,  1322,  1326,  1331, 
 1337,  1340,  1344,  1351,  1383,  1391,  1397,  1401,  1409,  1416,  1420,  1426,  1430,  1436,  1440,  1446, 
 1449,  1460,  1479,  1512,  1527,  1544,  1561,  1566,  1570,  1575,  1580,  1585,  1591,  1594,  1598,  1604, 
 1608,  1614,  1633,  1641,  1645,  1658,  1663,  1675,  1681,  1694,  1699,  1704,  1713,  1719,  1730,  1740, 
 1745,  1752,  1757,  1761,  1768,  1772,  1778,  1784,  1788,  1793,  1799,  1805,  1809,  1815,  1821,  1828, 
 1834,  1843,  1850,  1856,  1861,  1873,  1878,  1886,  1899,  1905,  1911,  1915,  1921,  1927,  1933,  1942, 
 1960,  1965,  1971,  1977,  1981,  1987,  1991,  1995,  1998,  2001,  2004,  2007,  2094,  2097,  2100,  2103, 
 2106,  2109,  2112,  2115,  2118,  2121,  2124,  2128,  2131,  2135,  2139,  2143,  2146,  2149,  2159,  2163, 
 2166,  2170,  2173,  2176,  2181,  2187,  2194,  2199,  2205,  2209,  2214, 
};

#define P_QUOTED_STRING 512
#define P_IDENTIFIER 513
#define P_SS 514
#define P_ss_package 515
#define P_create_package_list 516
#define P_create_package 517
#define P_opt_or_replace 518
#define P_package_spec_or_body 519
#define P_package_spec 520
#define P_is_or_as 521
#define P_package_obj_spec_list 522
#define P_package_body 523
#define P_package_obj_body_list 524
#define P_opt_body 525
#define P_opt_package_name 526
#define P_package_name 527
#define P_opt_schema_name_DOT 528
#define P_package_obj_spec 529
#define P_variable_declaration 530
#define P_opt_constant 531
#define P_opt_not_null 532
#define P_assign_or_default 533
#define P_opt_assign_or_default_plsql_expression 534
#define P_subtype_declaration 535
#define P_cursor_declaration 536
#define P_opt_parameter_spec_list 537
#define P_parameter_spec_list 538
#define P_package_obj_body 539
#define P_seq_of_statements 540
#define P_seq_of_statements_list 541
#define P_statement 542
#define P_plsql_block 543
#define P_opt_declare_specs 544
#define P_opt_declare 545
#define P_declare_spec_list 546
#define P_opt_declare_spec_list 547
#define P_end_label 548
#define P_opt_label_name 549
#define P_opt_exception_section 550
#define P_opt_exception_handler_list 551
#define P_opt_label 552
#define P_declare_spec 553
#define P_assignment_statement 554
#define P_assignment_rhs 555
#define P_object 556
#define P_opt_record_object_dot 557
#define P_record_term 558
#define P_record_table_item 559
#define P_field_name 560
#define P_subscript 561
#define P_host_variable 562
#define P_goto_statement 563
#define P_label_name 564
#define P_exit_statement 565
#define P_opt_when 566
#define P_datatype 567
#define P_optraw 568
#define P_opt_bracketed_number 569
#define P_opt_bracketed_number_list 570
#define P_OPT_NUMBER_LIST 571
#define P_type_spec 572
#define P_type_name 573
#define P_opt_dot_identifier_list 574
#define P_parameter_spec 575
#define P_opt_type_spec 576
#define P_parameter_name 577
#define P_cursor_spec 578
#define P_procedure_spec 579
#define P_opt_argument 580
#define P_opt_argument_list 581
#define P_function_spec 582
#define P_exception_declaration 583
#define P_exception_name 584
#define P_opt_exception_package_name 585
#define P_exception_package_name 586
#define P_exception_pragma 587
#define P_oracle_err_number 588
#define P_record_declaration 589
#define P_record_type_dec 590
#define P_opt_field_spec_list 591
#define P_record_var_dec 592
#define P_field_spec 593
#define P_plsql_table_declaration 594
#define P_table_type_dec 595
#define P_index_by 596
#define P_field_spec_or_datatype 597
#define P_table_var_dec 598
#define P_plsql_table_name 599
#define P_procedure_declaration 600
#define P_procedure_body 601
#define P_opt_procedure_name 602
#define P_opt_return_type 603
#define P_opt_proc_fun_start 604
#define P_opt_seq_of_statements 605
#define P_opt_exception 606
#define P_begin_block 607
#define P_exception_handler 608
#define P_opt_or_exception_name_list 609
#define P_proc_fun_start 610
#define P_function_body 611
#define P_opt_declare_spec 612
#define P_function_name 613
#define P_opt_function_name 614
#define P_procedure_name 615
#define P_argument 616
#define P_ass_or_def_val 617
#define P_opt_argument_type 618
#define P_opt_in_out 619
#define P_argument_name 620
#define P_argument_type 621
#define P_value 622
#define P_opt_PLUS_or_MINUS 623
#define P_return_type 624
#define P_function_declaration 625
#define P_function_call 626
#define P_expression_list 627
#define P_variable_name 628
#define P_null_statement 629
#define P_raise_statement 630
#define P_opt_exception_name 631
#define P_return_statement 632
#define P_opt_plsql_expression 633
#define P_loop_statement 634
#define P_opt_loop_control 635
#define P_cursor_or_numeric_loop_param 636
#define P_plsql_condition 637
#define P_boolean_exp 638
#define P_opt_not 639
#define P_opt_or_term_list 640
#define P_boolean_term 641
#define P_opt_and_factor_list 642
#define P_boolean_factor 643
#define P_opt_bracketed_plsql_exp_list 644
#define P_opt_percent 645
#define P_plsql_expression_qualifier 646
#define P_cursor_or_subquery 647
#define P_percent 648
#define P_boolean_literal 649
#define P_numeric_loop_param 650
#define P_opt_reverse 651
#define P_index_name 652
#define P_integer_expr 653
#define P_cursor_name 654
#define P_cursor_loop_param 655
#define P_cursor_or_select 656
#define P_record_name 657
#define P_plsql_expression 658
#define P_num_expression 659
#define P_PLUS_or_MINUS 660
#define P_opt_term_list 661
#define P_num_term 662
#define P_MUL_or_DIV 663
#define P_opt_factor_list 664
#define P_num_factor 665
#define P_basic_factor 666
#define P_opt_bracketed_plsql_exp_list_list 667
#define P_opt_exp_int 668
#define P_numeric_literal 669
#define P_boolean_expression 670
#define P_plsql_exp_list 671
#define P_opt_plsql_exp_list 672
#define P_char_expression 673
#define P_opt_concat_char_term_list 674
#define P_char_term 675
#define P_char_literal 676
#define P_date_expression 677
#define P_date_literal 678
#define P_commit_statement 679
#define P_if_statement 680
#define P_opt_elsif_list 681
#define P_opt_else 682
#define P_sql_statement 683
#define P_sql_command 684
#define P_to_modify_data 685
#define P_to_control_data 686
#define P_delete_command 687
#define P_select_command 688
#define P_opt_union_list 689
#define P_select_statement 690
#define P_select_expression 691
#define P_opt_all_or_distinct 692
#define P_opt_into_col 693
#define P_opt_where_condition_whole 694
#define P_opt_connect_clause 695
#define P_opt_group_clause 696
#define P_opt_set_clause 697
#define P_opt_order_clause 698
#define P_opt_update_clause 699
#define P_select_list 700
#define P_opt_displayed_column_list 701
#define P_table_reference_list_from 702
#define P_opt_selected_table_list 703
#define P_table_reference_list 704
#define P_where_condition_whole 705
#define P_where_condition 706
#define P_displayed_column 707
#define P_opt_alias 708
#define P_opt_variable 709
#define P_schema_name 710
#define P_table_name 711
#define P_exp_simple 712
#define P_expression 713
#define P_opt_PM_term_list 714
#define P_alias 715
#define P_opt_as 716
#define P_term 717
#define P_mul_or_div 718
#define P_opt_muldiv_factor_list 719
#define P_multiply 720
#define P_factor 721
#define P_opt_concat_factor2_list 722
#define P_factor2 723
#define P_opt_AST_all_or_distinct 724
#define P_opt_expression_list 725
#define P_opt_expression 726
#define P_bracketed_expression_list 727
#define P_sql_literal 728
#define P_variable 729
#define P_opt_bracketed_plus 730
#define P_column_spec 731
#define P_opt_table_andor_schema_name_DOT 732
#define P_user_defined_function 733
#define P_opt_package_andor_schema_name_DOT 734
#define P_column_name 735
#define P_function 736
#define P_number_function 737
#define P_char_function 738
#define P_group_function 739
#define P_conversion_function 740
#define P_other_function 741
#define P_pseudo_column 742
#define P_selected_table 743
#define P_table_spec_or_subquery 744
#define P_table_spec 745
#define P_opt_AT_link_name 746
#define P_table_alias 747
#define P_link_name 748
#define P_condition 749
#define P_opt_or_logical_term_list 750
#define P_logical_term 751
#define P_opt_and_logical_factor_list 752
#define P_logical_factor 753
#define P_is_what 754
#define P_opt_prior 755
#define P_is_not_what 756
#define P_opt_escape_string 757
#define P_quantified_factor 758
#define P_opt_all_or_any 759
#define P_relational_op 760
#define P_exp_set 761
#define P_subquery 762
#define P_connect_clause 763
#define P_opt_start_with 764
#define P_clause1 765
#define P_clause2 766
#define P_opt_and_condition 767
#define P_group_clause 768
#define P_opt_having_condition 769
#define P_set_clause 770
#define P_set_qual 771
#define P_union_all 772
#define P_order_clause 773
#define P_opt_sorted_def_list 774
#define P_sorted_def 775
#define P_exp_or_num 776
#define P_opt_asc_or_desc 777
#define P_update_clause 778
#define P_opt_nowait 779
#define P_opt_of_col_name_list 780
#define P_opt_col_name_list 781
#define P_insert_command 782
#define P_opt_var_name_list 783
#define P_values_or_select 784
#define P_opt_col_spec 785
#define P_column_spec_list 786
#define P_update_command 787
#define P_simple_update 788
#define P_expr_or_subq 789
#define P_opt_colspec_eq_list 790
#define P_subquery_update 791
#define P_opt_col_spec_list 792
#define P_set_transaction_command 793
#define P_close_statement 794
#define P_fetch_statement 795
#define P_varlist_or_record 796
#define P_opt_var_list 797
#define P_lock_table_statement 798
#define P_lock_mode 799
#define P_open_statement 800
#define P_rollback_statement 801
#define P_opt_comment_list 802
#define P_opt_work 803
#define P_opt_to_savepoint 804
#define P_opt_savepoint 805
#define P_savepoint_statement 806
#define P_savepoint_name 807
#define P_identifier 808
#define P_quoted_string 809
#define P_match_string 810
#define P_keyword 811
#define P_SEMI 812
#define P_COMMA 813
#define P_ASTERISK 814
#define P_AT_SIGN 815
#define P_OPEN_PAREN 816
#define P_CLOSE_PAREN 817
#define P_PLUS 818
#define P_MINUS 819
#define P_DIVIDE 820
#define P_PERCENTAGE 821
#define P_DOUBLEDOT 822
#define P_DOT 823
#define P_START_LABEL 824
#define P_END_LABEL 825
#define P_ASSIGNMENT_EQ 826
#define P_COLON 827
#define P_VERTBAR 828
#define P_NOT_EQ 829
#define P_LE 830
#define P_LT 831
#define P_GE 832
#define P_GT 833
#define P_EQ 834
#define P_NUMBER 835
#define P_opt_exponent 836
#define P_decimal 837
#define P_opt_DOT_N 838
#define P_opt_plus_or_minus 839
#define P_N 840
#define P_opt_digit_list 841
#define P_digit 842