home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / bc-1.03-base.tgz / bc-1.03-base.tar / fsf / bc / bc.c.dist < prev    next >
Text File  |  1994-11-03  |  52KB  |  1,732 lines

  1.  
  2. /*  A Bison parser, made from bc.y with Bison version GNU Bison version 1.22
  3.   */
  4.  
  5. #define YYBISON 1  /* Identify Bison output.  */
  6.  
  7. #define    NEWLINE    258
  8. #define    AND    259
  9. #define    OR    260
  10. #define    NOT    261
  11. #define    STRING    262
  12. #define    NAME    263
  13. #define    NUMBER    264
  14. #define    MUL_OP    265
  15. #define    ASSIGN_OP    266
  16. #define    REL_OP    267
  17. #define    INCR_DECR    268
  18. #define    Define    269
  19. #define    Break    270
  20. #define    Quit    271
  21. #define    Length    272
  22. #define    Return    273
  23. #define    For    274
  24. #define    If    275
  25. #define    While    276
  26. #define    Sqrt    277
  27. #define    Else    278
  28. #define    Scale    279
  29. #define    Ibase    280
  30. #define    Obase    281
  31. #define    Auto    282
  32. #define    Read    283
  33. #define    Warranty    284
  34. #define    Halt    285
  35. #define    Last    286
  36. #define    Continue    287
  37. #define    Print    288
  38. #define    Limits    289
  39. #define    UNARY_MINUS    290
  40.  
  41. #line 1 "bc.y"
  42.  
  43. /* bc.y: The grammar for a POSIX compatable bc processor with some
  44.          extensions to the language. */
  45.  
  46. /*  This file is part of bc written for MINIX.
  47.     Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
  48.  
  49.     This program is free software; you can redistribute it and/or modify
  50.     it under the terms of the GNU General Public License as published by
  51.     the Free Software Foundation; either version 2 of the License , or
  52.     (at your option) any later version.
  53.  
  54.     This program is distributed in the hope that it will be useful,
  55.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  56.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  57.     GNU General Public License for more details.
  58.  
  59.     You should have received a copy of the GNU General Public License
  60.     along with this program; see the file COPYING.  If not, write to
  61.     the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  62.  
  63.     You may contact the author by:
  64.        e-mail:  phil@cs.wwu.edu
  65.       us-mail:  Philip A. Nelson
  66.                 Computer Science Department, 9062
  67.                 Western Washington University
  68.                 Bellingham, WA 98226-9062
  69.        
  70. *************************************************************************/
  71.  
  72. #include "bcdefs.h"
  73. #include "global.h"
  74. #include "proto.h"
  75.  
  76. #line 38 "bc.y"
  77. typedef union {
  78.     char     *s_value;
  79.     char      c_value;
  80.     int      i_value;
  81.     arg_list *a_value;
  82.        } YYSTYPE;
  83.  
  84. #ifndef YYLTYPE
  85. typedef
  86.   struct yyltype
  87.     {
  88.       int timestamp;
  89.       int first_line;
  90.       int first_column;
  91.       int last_line;
  92.       int last_column;
  93.       char *text;
  94.    }
  95.   yyltype;
  96.  
  97. #define YYLTYPE yyltype
  98. #endif
  99.  
  100. #include <stdio.h>
  101.  
  102. #ifndef __cplusplus
  103. #ifndef __STDC__
  104. #define const
  105. #endif
  106. #endif
  107.  
  108.  
  109.  
  110. #define    YYFINAL        166
  111. #define    YYFLAG        -32768
  112. #define    YYNTBASE    47
  113.  
  114. #define YYTRANSLATE(x) ((unsigned)(x) <= 290 ? yytranslate[x] : 79)
  115.  
  116. static const char yytranslate[] = {     0,
  117.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  118.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  119.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  120.      2,     2,     2,     2,     2,     2,     2,     2,     2,    40,
  121.     41,     2,    35,    44,    36,     2,     2,     2,     2,     2,
  122.      2,     2,     2,     2,     2,     2,     2,     2,    39,     2,
  123.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  124.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  125.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  126.     45,     2,    46,    37,     2,     2,     2,     2,     2,     2,
  127.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  128.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  129.      2,     2,    42,     2,    43,     2,     2,     2,     2,     2,
  130.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  131.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  132.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  133.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  134.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  135.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  136.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  137.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  138.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  139.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  140.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  141.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  142.      2,     2,     2,     2,     2,     1,     2,     3,     4,     5,
  143.      6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
  144.     16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
  145.     26,    27,    28,    29,    30,    31,    32,    33,    34,    38
  146. };
  147.  
  148. #if YYDEBUG != 0
  149. static const short yyprhs[] = {     0,
  150.      0,     1,     4,     7,     9,    12,    13,    15,    19,    22,
  151.     23,    25,    28,    32,    35,    39,    41,    44,    46,    48,
  152.     50,    52,    54,    56,    58,    60,    62,    67,    68,    69,
  153.     70,    71,    85,    86,    94,    95,    96,   104,   108,   109,
  154.    113,   115,   119,   121,   123,   124,   125,   129,   130,   142,
  155.    143,   145,   146,   150,   154,   156,   160,   164,   170,   171,
  156.    173,   175,   179,   183,   189,   190,   192,   193,   195,   196,
  157.    201,   202,   207,   208,   213,   216,   220,   224,   228,   232,
  158.    236,   239,   241,   243,   247,   252,   255,   258,   263,   268,
  159.    273,   277,   279,   284,   286,   288,   290
  160. };
  161.  
  162. static const short yyrhs[] = {    -1,
  163.     47,    48,     0,    49,     3,     0,    65,     0,     1,     3,
  164.      0,     0,    51,     0,    49,    39,    51,     0,    49,    39,
  165.      0,     0,    51,     0,    50,     3,     0,    50,     3,    51,
  166.      0,    50,    39,     0,    50,    39,    52,     0,    52,     0,
  167.      1,    52,     0,    29,     0,    34,     0,    74,     0,     7,
  168.      0,    15,     0,    32,     0,    16,     0,    30,     0,    18,
  169.      0,    18,    40,    73,    41,     0,     0,     0,     0,     0,
  170.     19,    53,    40,    72,    39,    54,    72,    39,    55,    72,
  171.     41,    56,    52,     0,     0,    20,    40,    74,    41,    57,
  172.     52,    63,     0,     0,     0,    21,    58,    40,    74,    59,
  173.     41,    52,     0,    42,    50,    43,     0,     0,    33,    60,
  174.     61,     0,    62,     0,    62,    44,    61,     0,     7,     0,
  175.     74,     0,     0,     0,    23,    64,    52,     0,     0,    14,
  176.      8,    40,    67,    41,    42,     3,    68,    66,    50,    43,
  177.      0,     0,    69,     0,     0,    27,    69,     3,     0,    27,
  178.     69,    39,     0,     8,     0,     8,    45,    46,     0,    69,
  179.     44,     8,     0,    69,    44,     8,    45,    46,     0,     0,
  180.     71,     0,    74,     0,     8,    45,    46,     0,    71,    44,
  181.     74,     0,    71,    44,     8,    45,    46,     0,     0,    74,
  182.      0,     0,    74,     0,     0,    78,    11,    75,    74,     0,
  183.      0,    74,     4,    76,    74,     0,     0,    74,     5,    77,
  184.     74,     0,     6,    74,     0,    74,    12,    74,     0,    74,
  185.     35,    74,     0,    74,    36,    74,     0,    74,    10,    74,
  186.      0,    74,    37,    74,     0,    36,    74,     0,    78,     0,
  187.      9,     0,    40,    74,    41,     0,     8,    40,    70,    41,
  188.      0,    13,    78,     0,    78,    13,     0,    17,    40,    74,
  189.     41,     0,    22,    40,    74,    41,     0,    24,    40,    74,
  190.     41,     0,    28,    40,    41,     0,     8,     0,     8,    45,
  191.     74,    46,     0,    25,     0,    26,     0,    24,     0,    31,
  192.      0
  193. };
  194.  
  195. #endif
  196.  
  197. #if YYDEBUG != 0
  198. static const short yyrline[] = { 0,
  199.    105,   114,   116,   118,   120,   126,   128,   129,   130,   132,
  200.    134,   135,   136,   137,   138,   140,   141,   144,   146,   148,
  201.    157,   164,   174,   185,   187,   189,   191,   193,   198,   209,
  202.    220,   231,   238,   245,   251,   257,   264,   270,   272,   275,
  203.    276,   277,   279,   285,   288,   289,   298,   298,   312,   318,
  204.    320,   322,   324,   326,   329,   331,   333,   335,   338,   340,
  205.    342,   347,   353,   358,   365,   370,   372,   377,   383,   395,
  206.    410,   418,   423,   431,   439,   445,   473,   478,   483,   490,
  207.    495,   500,   509,   525,   527,   543,   562,   585,   587,   589,
  208.    591,   597,   599,   604,   606,   608,   610
  209. };
  210.  
  211. static const char * const yytname[] = {   "$","error","$illegal.","NEWLINE",
  212. "AND","OR","NOT","STRING","NAME","NUMBER","MUL_OP","ASSIGN_OP","REL_OP","INCR_DECR",
  213. "Define","Break","Quit","Length","Return","For","If","While","Sqrt","Else","Scale",
  214. "Ibase","Obase","Auto","Read","Warranty","Halt","Last","Continue","Print","Limits",
  215. "'+'","'-'","'^'","UNARY_MINUS","';'","'('","')'","'{'","'}'","','","'['","']'",
  216. "program","input_item","semicolon_list","statement_list","statement_or_error",
  217. "statement","@1","@2","@3","@4","@5","@6","@7","@8","print_list","print_element",
  218. "opt_else","@9","function","@10","opt_parameter_list","opt_auto_define_list",
  219. "define_list","opt_argument_list","argument_list","opt_expression","return_expression",
  220. "expression","@11","@12","@13","named_expression",""
  221. };
  222. #endif
  223.  
  224. static const short yyr1[] = {     0,
  225.     47,    47,    48,    48,    48,    49,    49,    49,    49,    50,
  226.     50,    50,    50,    50,    50,    51,    51,    52,    52,    52,
  227.     52,    52,    52,    52,    52,    52,    52,    53,    54,    55,
  228.     56,    52,    57,    52,    58,    59,    52,    52,    60,    52,
  229.     61,    61,    62,    62,    63,    64,    63,    66,    65,    67,
  230.     67,    68,    68,    68,    69,    69,    69,    69,    70,    70,
  231.     71,    71,    71,    71,    72,    72,    73,    73,    75,    74,
  232.     76,    74,    77,    74,    74,    74,    74,    74,    74,    74,
  233.     74,    74,    74,    74,    74,    74,    74,    74,    74,    74,
  234.     74,    78,    78,    78,    78,    78,    78
  235. };
  236.  
  237. static const short yyr2[] = {     0,
  238.      0,     2,     2,     1,     2,     0,     1,     3,     2,     0,
  239.      1,     2,     3,     2,     3,     1,     2,     1,     1,     1,
  240.      1,     1,     1,     1,     1,     1,     4,     0,     0,     0,
  241.      0,    13,     0,     7,     0,     0,     7,     3,     0,     3,
  242.      1,     3,     1,     1,     0,     0,     3,     0,    11,     0,
  243.      1,     0,     3,     3,     1,     3,     3,     5,     0,     1,
  244.      1,     3,     3,     5,     0,     1,     0,     1,     0,     4,
  245.      0,     4,     0,     4,     2,     3,     3,     3,     3,     3,
  246.      2,     1,     1,     3,     4,     2,     2,     4,     4,     4,
  247.      3,     1,     4,     1,     1,     1,     1
  248. };
  249.  
  250. static const short yydefact[] = {     1,
  251.      0,     0,     0,    21,    92,    83,     0,     0,    22,    24,
  252.      0,    26,    28,     0,    35,     0,    96,    94,    95,     0,
  253.     18,    25,    97,    23,    39,    19,     0,     0,     0,     2,
  254.      0,     7,    16,     4,    20,    82,     5,    17,    75,    59,
  255.      0,    92,    96,    86,     0,     0,    67,     0,     0,     0,
  256.      0,     0,     0,     0,    81,     0,     0,     0,    11,     3,
  257.      0,    71,    73,     0,     0,     0,     0,     0,    69,    87,
  258.     92,     0,    60,    61,     0,    50,     0,     0,    68,    65,
  259.      0,     0,     0,     0,    91,    43,    40,    41,    44,    84,
  260.      0,    14,    38,     8,     0,     0,    79,    76,    77,    78,
  261.     80,     0,     0,    85,     0,    93,    55,     0,    51,    88,
  262.     27,     0,    66,    33,    36,    89,    90,     0,    13,    15,
  263.     72,    74,    70,    62,    92,    63,     0,     0,     0,    29,
  264.      0,     0,    42,     0,    56,     0,    57,    65,    45,     0,
  265.     64,    52,     0,     0,    46,    34,    37,     0,    48,    58,
  266.     30,     0,     0,     0,    65,    47,    53,    54,     0,     0,
  267.     49,    31,     0,    32,     0,     0
  268. };
  269.  
  270. static const short yydefgoto[] = {     1,
  271.     30,    31,    58,    59,    33,    48,   138,   155,   163,   131,
  272.     50,   132,    54,    87,    88,   146,   152,    34,   154,   108,
  273.    149,   109,    72,    73,   112,    78,    35,   102,    95,    96,
  274.     36
  275. };
  276.  
  277. static const short yypact[] = {-32768,
  278.    156,   352,   534,-32768,   -31,-32768,    49,     2,-32768,-32768,
  279.    -19,   -17,-32768,   -15,-32768,    -5,    19,-32768,-32768,    20,
  280. -32768,-32768,-32768,-32768,-32768,-32768,   534,   534,   196,-32768,
  281.      4,-32768,-32768,-32768,    73,     9,-32768,-32768,   110,   555,
  282.    534,   -12,-32768,-32768,    22,   534,   534,    28,   534,    29,
  283.    534,   534,    30,   513,-32768,   385,   476,    13,-32768,-32768,
  284.    282,-32768,-32768,   534,   534,   534,   534,   534,-32768,-32768,
  285.    -28,    31,   -10,    73,     1,    33,   394,    35,    73,   534,
  286.    397,   534,   406,   440,-32768,-32768,-32768,    26,    73,-32768,
  287.    239,   476,-32768,-32768,   534,   534,    45,    -7,    -6,    -6,
  288.     45,   534,    90,-32768,   576,-32768,    -3,    43,    42,-32768,
  289. -32768,    48,    73,-32768,    73,-32768,-32768,   513,-32768,-32768,
  290.    110,   131,    -7,-32768,   -21,    73,    46,    47,    80,-32768,
  291.    476,    52,-32768,   317,-32768,    94,    55,   534,    82,   476,
  292. -32768,    79,    65,    74,-32768,-32768,-32768,    33,-32768,-32768,
  293. -32768,   476,     5,   196,   534,-32768,-32768,-32768,    15,    78,
  294. -32768,-32768,   476,-32768,   123,-32768
  295. };
  296.  
  297. static const short yypgoto[] = {-32768,
  298. -32768,-32768,   -30,     0,    -2,-32768,-32768,-32768,-32768,-32768,
  299. -32768,-32768,-32768,     7,-32768,-32768,-32768,-32768,-32768,-32768,
  300. -32768,   -20,-32768,-32768,  -123,-32768,    -1,-32768,-32768,-32768,
  301.    120
  302. };
  303.  
  304.  
  305. #define    YYLAST        616
  306.  
  307.  
  308. static const short yytable[] = {    38,
  309.     32,    39,    64,    64,    62,    63,    60,   157,    40,    45,
  310.     64,    40,    65,    41,   144,    91,   103,    91,    40,    69,
  311.     46,    70,    47,   134,    49,    55,    56,    66,    67,    68,
  312.     68,   160,    41,   105,    51,    66,    67,    68,    74,    75,
  313.    107,   127,    61,   158,    77,    79,   106,    81,   129,    83,
  314.     84,    92,    89,    92,    38,    93,    42,   161,    52,    53,
  315.     94,    76,    97,    98,    99,   100,   101,    80,    82,   118,
  316.     85,   104,    43,    18,    19,   111,    62,    63,   113,    23,
  317.    115,    68,    64,   128,    65,   129,   130,   137,   136,   120,
  318.    119,   135,   140,   121,   122,     3,   142,     5,     6,   143,
  319.    123,    75,     7,   126,   145,   148,    11,    66,    67,    68,
  320.    150,    16,   151,    17,    18,    19,    89,    20,   162,    64,
  321.     23,    65,   166,   159,   133,    27,    44,   153,   139,    28,
  322.      0,     0,    75,     0,    62,   124,   113,   147,     0,     0,
  323.     64,     0,    65,     0,    66,    67,    68,     0,     0,   156,
  324.      0,     0,     0,   113,     0,   165,     2,     0,    -6,     0,
  325.    164,     3,     4,     5,     6,    66,    67,    68,     7,     8,
  326.      9,    10,    11,    12,    13,    14,    15,    16,     0,    17,
  327.     18,    19,     0,    20,    21,    22,    23,    24,    25,    26,
  328.      0,    27,     0,     0,    -6,    28,    57,    29,   -10,     0,
  329.      0,     3,     4,     5,     6,     0,     0,     0,     7,     0,
  330.      9,    10,    11,    12,    13,    14,    15,    16,     0,    17,
  331.     18,    19,     0,    20,    21,    22,    23,    24,    25,    26,
  332.      0,    27,     0,     0,   -10,    28,     0,    29,   -10,    57,
  333.      0,   -12,     0,     0,     3,     4,     5,     6,     0,     0,
  334.      0,     7,     0,     9,    10,    11,    12,    13,    14,    15,
  335.     16,     0,    17,    18,    19,     0,    20,    21,    22,    23,
  336.     24,    25,    26,     0,    27,     0,     0,   -12,    28,     0,
  337.     29,   -12,    57,     0,    -9,     0,     0,     3,     4,     5,
  338.      6,     0,     0,     0,     7,     0,     9,    10,    11,    12,
  339.     13,    14,    15,    16,     0,    17,    18,    19,     0,    20,
  340.     21,    22,    23,    24,    25,    26,     0,    27,     0,     0,
  341.     -9,    28,     3,    29,     5,     6,     0,     0,     0,     7,
  342.      0,     0,     0,    11,     0,     0,     0,     0,    16,     0,
  343.     17,    18,    19,     0,    20,     0,     0,    23,     0,     0,
  344.      0,     0,    27,     0,    37,     0,    28,     3,     4,     5,
  345.      6,     0,   141,     0,     7,     0,     9,    10,    11,    12,
  346.     13,    14,    15,    16,     0,    17,    18,    19,     0,    20,
  347.     21,    22,    23,    24,    25,    26,     0,    27,    62,    63,
  348.      0,    28,     0,    29,    64,     0,    65,    62,    63,     0,
  349.     62,    63,     0,    64,     0,    65,    64,     0,    65,    62,
  350.     63,     0,     0,     0,     0,    64,     0,    65,     0,    66,
  351.     67,    68,     0,     0,     0,    90,     0,     0,    66,    67,
  352.     68,    66,    67,    68,   110,     0,     0,   114,     0,     0,
  353.     66,    67,    68,    62,    63,     0,   116,     0,     0,    64,
  354.      0,    65,     0,     0,     0,     0,     0,     0,     0,     0,
  355.      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
  356.      0,     0,     0,     0,    66,    67,    68,     0,     0,     0,
  357.    117,     3,     4,     5,     6,     0,     0,     0,     7,     0,
  358.      9,    10,    11,    12,    13,    14,    15,    16,     0,    17,
  359.     18,    19,     0,    20,    21,    22,    23,    24,    25,    26,
  360.      0,    27,     0,     0,     0,    28,     0,    29,     3,    86,
  361.      5,     6,     0,     0,     0,     7,     0,     0,     0,    11,
  362.      0,     0,     0,     0,    16,     0,    17,    18,    19,     3,
  363.     20,     5,     6,    23,     0,     0,     7,     0,    27,     0,
  364.     11,     0,    28,     0,     0,    16,     0,    17,    18,    19,
  365.      3,    20,    71,     6,    23,     0,     0,     7,     0,    27,
  366.      0,    11,     0,    28,     0,     0,    16,     0,    17,    18,
  367.     19,     3,    20,   125,     6,    23,     0,     0,     7,     0,
  368.     27,     0,    11,     0,    28,     0,     0,    16,     0,    17,
  369.     18,    19,     0,    20,     0,     0,    23,     0,     0,     0,
  370.      0,    27,     0,     0,     0,    28
  371. };
  372.  
  373. static const short yycheck[] = {     2,
  374.      1,     3,    10,    10,     4,     5,     3,     3,    40,     8,
  375.     10,    40,    12,    45,   138,     3,    45,     3,    40,    11,
  376.     40,    13,    40,    45,    40,    27,    28,    35,    36,    37,
  377.     37,   155,    45,    44,    40,    35,    36,    37,    40,    41,
  378.      8,    45,    39,    39,    46,    47,    46,    49,    44,    51,
  379.     52,    39,    54,    39,    57,    43,     8,    43,    40,    40,
  380.     61,    40,    64,    65,    66,    67,    68,    40,    40,    44,
  381.     41,    41,    24,    25,    26,    41,     4,     5,    80,    31,
  382.     82,    37,    10,    41,    12,    44,    39,     8,    42,    92,
  383.     91,    46,    41,    95,    96,     6,     3,     8,     9,    45,
  384.    102,   103,    13,   105,    23,    27,    17,    35,    36,    37,
  385.     46,    22,    39,    24,    25,    26,   118,    28,    41,    10,
  386.     31,    12,     0,   154,   118,    36,     7,   148,   131,    40,
  387.     -1,    -1,   134,    -1,     4,    46,   138,   140,    -1,    -1,
  388.     10,    -1,    12,    -1,    35,    36,    37,    -1,    -1,   152,
  389.     -1,    -1,    -1,   155,    -1,     0,     1,    -1,     3,    -1,
  390.    163,     6,     7,     8,     9,    35,    36,    37,    13,    14,
  391.     15,    16,    17,    18,    19,    20,    21,    22,    -1,    24,
  392.     25,    26,    -1,    28,    29,    30,    31,    32,    33,    34,
  393.     -1,    36,    -1,    -1,    39,    40,     1,    42,     3,    -1,
  394.     -1,     6,     7,     8,     9,    -1,    -1,    -1,    13,    -1,
  395.     15,    16,    17,    18,    19,    20,    21,    22,    -1,    24,
  396.     25,    26,    -1,    28,    29,    30,    31,    32,    33,    34,
  397.     -1,    36,    -1,    -1,    39,    40,    -1,    42,    43,     1,
  398.     -1,     3,    -1,    -1,     6,     7,     8,     9,    -1,    -1,
  399.     -1,    13,    -1,    15,    16,    17,    18,    19,    20,    21,
  400.     22,    -1,    24,    25,    26,    -1,    28,    29,    30,    31,
  401.     32,    33,    34,    -1,    36,    -1,    -1,    39,    40,    -1,
  402.     42,    43,     1,    -1,     3,    -1,    -1,     6,     7,     8,
  403.      9,    -1,    -1,    -1,    13,    -1,    15,    16,    17,    18,
  404.     19,    20,    21,    22,    -1,    24,    25,    26,    -1,    28,
  405.     29,    30,    31,    32,    33,    34,    -1,    36,    -1,    -1,
  406.     39,    40,     6,    42,     8,     9,    -1,    -1,    -1,    13,
  407.     -1,    -1,    -1,    17,    -1,    -1,    -1,    -1,    22,    -1,
  408.     24,    25,    26,    -1,    28,    -1,    -1,    31,    -1,    -1,
  409.     -1,    -1,    36,    -1,     3,    -1,    40,     6,     7,     8,
  410.      9,    -1,    46,    -1,    13,    -1,    15,    16,    17,    18,
  411.     19,    20,    21,    22,    -1,    24,    25,    26,    -1,    28,
  412.     29,    30,    31,    32,    33,    34,    -1,    36,     4,     5,
  413.     -1,    40,    -1,    42,    10,    -1,    12,     4,     5,    -1,
  414.      4,     5,    -1,    10,    -1,    12,    10,    -1,    12,     4,
  415.      5,    -1,    -1,    -1,    -1,    10,    -1,    12,    -1,    35,
  416.     36,    37,    -1,    -1,    -1,    41,    -1,    -1,    35,    36,
  417.     37,    35,    36,    37,    41,    -1,    -1,    41,    -1,    -1,
  418.     35,    36,    37,     4,     5,    -1,    41,    -1,    -1,    10,
  419.     -1,    12,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
  420.     -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
  421.     -1,    -1,    -1,    -1,    35,    36,    37,    -1,    -1,    -1,
  422.     41,     6,     7,     8,     9,    -1,    -1,    -1,    13,    -1,
  423.     15,    16,    17,    18,    19,    20,    21,    22,    -1,    24,
  424.     25,    26,    -1,    28,    29,    30,    31,    32,    33,    34,
  425.     -1,    36,    -1,    -1,    -1,    40,    -1,    42,     6,     7,
  426.      8,     9,    -1,    -1,    -1,    13,    -1,    -1,    -1,    17,
  427.     -1,    -1,    -1,    -1,    22,    -1,    24,    25,    26,     6,
  428.     28,     8,     9,    31,    -1,    -1,    13,    -1,    36,    -1,
  429.     17,    -1,    40,    -1,    -1,    22,    -1,    24,    25,    26,
  430.      6,    28,     8,     9,    31,    -1,    -1,    13,    -1,    36,
  431.     -1,    17,    -1,    40,    -1,    -1,    22,    -1,    24,    25,
  432.     26,     6,    28,     8,     9,    31,    -1,    -1,    13,    -1,
  433.     36,    -1,    17,    -1,    40,    -1,    -1,    22,    -1,    24,
  434.     25,    26,    -1,    28,    -1,    -1,    31,    -1,    -1,    -1,
  435.     -1,    36,    -1,    -1,    -1,    40
  436. };
  437. /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
  438. #line 3 "/usr/gnu/lib/bison.simple"
  439.  
  440. /* Skeleton output parser for bison,
  441.    Copyright (C) 1984, 1989, 1990 Bob Corbett and Richard Stallman
  442.  
  443.    This program is free software; you can redistribute it and/or modify
  444.    it under the terms of the GNU General Public License as published by
  445.    the Free Software Foundation; either version 1, or (at your option)
  446.    any later version.
  447.  
  448.    This program is distributed in the hope that it will be useful,
  449.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  450.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  451.    GNU General Public License for more details.
  452.  
  453.    You should have received a copy of the GNU General Public License
  454.    along with this program; if not, write to the Free Software
  455.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  456.  
  457.  
  458. #ifndef alloca
  459. #ifdef __GNUC__
  460. #define alloca __builtin_alloca
  461. #else /* not GNU C.  */
  462. #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
  463. #include <alloca.h>
  464. #else /* not sparc */
  465. #if defined (MSDOS) && !defined (__TURBOC__)
  466. #include <malloc.h>
  467. #else /* not MSDOS, or __TURBOC__ */
  468. #if defined(_AIX)
  469. #include <malloc.h>
  470.  #pragma alloca
  471. #else /* not MSDOS, __TURBOC__, or _AIX */
  472. #ifdef __hpux
  473. #ifdef __cplusplus
  474. extern "C" {
  475. void *alloca (unsigned int);
  476. };
  477. #else /* not __cplusplus */
  478. void *alloca ();
  479. #endif /* not __cplusplus */
  480. #endif /* __hpux */
  481. #endif /* not _AIX */
  482. #endif /* not MSDOS, or __TURBOC__ */
  483. #endif /* not sparc.  */
  484. #endif /* not GNU C.  */
  485. #endif /* alloca not defined.  */
  486.  
  487. /* This is the parser code that is written into each bison parser
  488.   when the %semantic_parser declaration is not specified in the grammar.
  489.   It was written by Richard Stallman by simplifying the hairy parser
  490.   used when %semantic_parser is specified.  */
  491.  
  492. /* Note: there must be only one dollar sign in this file.
  493.    It is replaced by the list of actions, each action
  494.    as one case of the switch.  */
  495.  
  496. #define yyerrok        (yyerrstatus = 0)
  497. #define yyclearin    (yychar = YYEMPTY)
  498. #define YYEMPTY        -2
  499. #define YYEOF        0
  500. #define YYACCEPT    return(0)
  501. #define YYABORT     return(1)
  502. #define YYERROR        goto yyerrlab1
  503. /* Like YYERROR except do call yyerror.
  504.    This remains here temporarily to ease the
  505.    transition to the new meaning of YYERROR, for GCC.
  506.    Once GCC version 2 has supplanted version 1, this can go.  */
  507. #define YYFAIL        goto yyerrlab
  508. #define YYRECOVERING()  (!!yyerrstatus)
  509. #define YYBACKUP(token, value) \
  510. do                                \
  511.   if (yychar == YYEMPTY && yylen == 1)                \
  512.     { yychar = (token), yylval = (value);            \
  513.       yychar1 = YYTRANSLATE (yychar);                \
  514.       YYPOPSTACK;                        \
  515.       goto yybackup;                        \
  516.     }                                \
  517.   else                                \
  518.     { yyerror ("syntax error: cannot back up"); YYERROR; }    \
  519. while (0)
  520.  
  521. #define YYTERROR    1
  522. #define YYERRCODE    256
  523.  
  524. #ifndef YYPURE
  525. #define YYLEX        yylex()
  526. #endif
  527.  
  528. #ifdef YYPURE
  529. #ifdef YYLSP_NEEDED
  530. #define YYLEX        yylex(&yylval, &yylloc)
  531. #else
  532. #define YYLEX        yylex(&yylval)
  533. #endif
  534. #endif
  535.  
  536. /* If nonreentrant, generate the variables here */
  537.  
  538. #ifndef YYPURE
  539.  
  540. int    yychar;            /*  the lookahead symbol        */
  541. YYSTYPE    yylval;            /*  the semantic value of the        */
  542.                 /*  lookahead symbol            */
  543.  
  544. #ifdef YYLSP_NEEDED
  545. YYLTYPE yylloc;            /*  location data for the lookahead    */
  546.                 /*  symbol                */
  547. #endif
  548.  
  549. int yynerrs;            /*  number of parse errors so far       */
  550. #endif  /* not YYPURE */
  551.  
  552. #if YYDEBUG != 0
  553. int yydebug;            /*  nonzero means print parse trace    */
  554. /* Since this is uninitialized, it does not stop multiple parsers
  555.    from coexisting.  */
  556. #endif
  557.  
  558. /*  YYINITDEPTH indicates the initial size of the parser's stacks    */
  559.  
  560. #ifndef    YYINITDEPTH
  561. #define YYINITDEPTH 200
  562. #endif
  563.  
  564. /*  YYMAXDEPTH is the maximum size the stacks can grow to
  565.     (effective only if the built-in stack extension method is used).  */
  566.  
  567. #if YYMAXDEPTH == 0
  568. #undef YYMAXDEPTH
  569. #endif
  570.  
  571. #ifndef YYMAXDEPTH
  572. #define YYMAXDEPTH 10000
  573. #endif
  574.  
  575. /* Prevent warning if -Wstrict-prototypes.  */
  576. #ifdef __GNUC__
  577. int yyparse (void);
  578. #endif
  579.  
  580. #if __GNUC__ > 1        /* GNU C and GNU C++ define this.  */
  581. #define __yy_bcopy(FROM,TO,COUNT)    __builtin_memcpy(TO,FROM,COUNT)
  582. #else                /* not GNU C or C++ */
  583. #ifndef __cplusplus
  584.  
  585. /* This is the most reliable way to avoid incompatibilities
  586.    in available built-in functions on various systems.  */
  587. static void
  588. __yy_bcopy (from, to, count)
  589.      char *from;
  590.      char *to;
  591.      int count;
  592. {
  593.   register char *f = from;
  594.   register char *t = to;
  595.   register int i = count;
  596.  
  597.   while (i-- > 0)
  598.     *t++ = *f++;
  599. }
  600.  
  601. #else /* __cplusplus */
  602.  
  603. /* This is the most reliable way to avoid incompatibilities
  604.    in available built-in functions on various systems.  */
  605. static void
  606. __yy_bcopy (char *from, char *to, int count)
  607. {
  608.   register char *f = from;
  609.   register char *t = to;
  610.   register int i = count;
  611.  
  612.   while (i-- > 0)
  613.     *t++ = *f++;
  614. }
  615.  
  616. #endif
  617. #endif
  618.  
  619. #line 184 "/usr/gnu/lib/bison.simple"
  620. int
  621. yyparse()
  622. {
  623.   register int yystate;
  624.   register int yyn;
  625.   register short *yyssp;
  626.   register YYSTYPE *yyvsp;
  627.   int yyerrstatus;    /*  number of tokens to shift before error messages enabled */
  628.   int yychar1 = 0;        /*  lookahead token as an internal (translated) token number */
  629.  
  630.   short    yyssa[YYINITDEPTH];    /*  the state stack            */
  631.   YYSTYPE yyvsa[YYINITDEPTH];    /*  the semantic value stack        */
  632.  
  633.   short *yyss = yyssa;        /*  refer to the stacks thru separate pointers */
  634.   YYSTYPE *yyvs = yyvsa;    /*  to allow yyoverflow to reallocate them elsewhere */
  635.  
  636. #ifdef YYLSP_NEEDED
  637.   YYLTYPE yylsa[YYINITDEPTH];    /*  the location stack            */
  638.   YYLTYPE *yyls = yylsa;
  639.   YYLTYPE *yylsp;
  640.  
  641. #define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
  642. #else
  643. #define YYPOPSTACK   (yyvsp--, yyssp--)
  644. #endif
  645.  
  646.   int yystacksize = YYINITDEPTH;
  647.  
  648. #ifdef YYPURE
  649.   int yychar;
  650.   YYSTYPE yylval;
  651.   int yynerrs;
  652. #ifdef YYLSP_NEEDED
  653.   YYLTYPE yylloc;
  654. #endif
  655. #endif
  656.  
  657.   YYSTYPE yyval;        /*  the variable used to return        */
  658.                 /*  semantic values from the action    */
  659.                 /*  routines                */
  660.  
  661.   int yylen;
  662.  
  663. #if YYDEBUG != 0
  664.   if (yydebug)
  665.     fprintf(stderr, "Starting parse\n");
  666. #endif
  667.  
  668.   yystate = 0;
  669.   yyerrstatus = 0;
  670.   yynerrs = 0;
  671.   yychar = YYEMPTY;        /* Cause a token to be read.  */
  672.  
  673.   /* Initialize stack pointers.
  674.      Waste one element of value and location stack
  675.      so that they stay on the same level as the state stack.
  676.      The wasted elements are never initialized.  */
  677.  
  678.   yyssp = yyss - 1;
  679.   yyvsp = yyvs;
  680. #ifdef YYLSP_NEEDED
  681.   yylsp = yyls;
  682. #endif
  683.  
  684. /* Push a new state, which is found in  yystate  .  */
  685. /* In all cases, when you get here, the value and location stacks
  686.    have just been pushed. so pushing a state here evens the stacks.  */
  687. yynewstate:
  688.  
  689.   *++yyssp = yystate;
  690.  
  691.   if (yyssp >= yyss + yystacksize - 1)
  692.     {
  693.       /* Give user a chance to reallocate the stack */
  694.       /* Use copies of these so that the &'s don't force the real ones into memory. */
  695.       YYSTYPE *yyvs1 = yyvs;
  696.       short *yyss1 = yyss;
  697. #ifdef YYLSP_NEEDED
  698.       YYLTYPE *yyls1 = yyls;
  699. #endif
  700.  
  701.       /* Get the current used size of the three stacks, in elements.  */
  702.       int size = yyssp - yyss + 1;
  703.  
  704. #ifdef yyoverflow
  705.       /* Each stack pointer address is followed by the size of
  706.      the data in use in that stack, in bytes.  */
  707. #ifdef YYLSP_NEEDED
  708.       /* This used to be a conditional around just the two extra args,
  709.      but that might be undefined if yyoverflow is a macro.  */
  710.       yyoverflow("parser stack overflow",
  711.          &yyss1, size * sizeof (*yyssp),
  712.          &yyvs1, size * sizeof (*yyvsp),
  713.          &yyls1, size * sizeof (*yylsp),
  714.          &yystacksize);
  715. #else
  716.       yyoverflow("parser stack overflow",
  717.          &yyss1, size * sizeof (*yyssp),
  718.          &yyvs1, size * sizeof (*yyvsp),
  719.          &yystacksize);
  720. #endif
  721.  
  722.       yyss = yyss1; yyvs = yyvs1;
  723. #ifdef YYLSP_NEEDED
  724.       yyls = yyls1;
  725. #endif
  726. #else /* no yyoverflow */
  727.       /* Extend the stack our own way.  */
  728.       if (yystacksize >= YYMAXDEPTH)
  729.     {
  730.       yyerror("parser stack overflow");
  731.       return 2;
  732.     }
  733.       yystacksize *= 2;
  734.       if (yystacksize > YYMAXDEPTH)
  735.     yystacksize = YYMAXDEPTH;
  736.       yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
  737.       __yy_bcopy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp));
  738.       yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
  739.       __yy_bcopy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp));
  740. #ifdef YYLSP_NEEDED
  741.       yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
  742.       __yy_bcopy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp));
  743. #endif
  744. #endif /* no yyoverflow */
  745.  
  746.       yyssp = yyss + size - 1;
  747.       yyvsp = yyvs + size - 1;
  748. #ifdef YYLSP_NEEDED
  749.       yylsp = yyls + size - 1;
  750. #endif
  751.  
  752. #if YYDEBUG != 0
  753.       if (yydebug)
  754.     fprintf(stderr, "Stack size increased to %d\n", yystacksize);
  755. #endif
  756.  
  757.       if (yyssp >= yyss + yystacksize - 1)
  758.     YYABORT;
  759.     }
  760.  
  761. #if YYDEBUG != 0
  762.   if (yydebug)
  763.     fprintf(stderr, "Entering state %d\n", yystate);
  764. #endif
  765.  
  766.   goto yybackup;
  767.  yybackup:
  768.  
  769. /* Do appropriate processing given the current state.  */
  770. /* Read a lookahead token if we need one and don't already have one.  */
  771. /* yyresume: */
  772.  
  773.   /* First try to decide what to do without reference to lookahead token.  */
  774.  
  775.   yyn = yypact[yystate];
  776.   if (yyn == YYFLAG)
  777.     goto yydefault;
  778.  
  779.   /* Not known => get a lookahead token if don't already have one.  */
  780.  
  781.   /* yychar is either YYEMPTY or YYEOF
  782.      or a valid token in external form.  */
  783.  
  784.   if (yychar == YYEMPTY)
  785.     {
  786. #if YYDEBUG != 0
  787.       if (yydebug)
  788.     fprintf(stderr, "Reading a token: ");
  789. #endif
  790.       yychar = YYLEX;
  791.     }
  792.  
  793.   /* Convert token to internal form (in yychar1) for indexing tables with */
  794.  
  795.   if (yychar <= 0)        /* This means end of input. */
  796.     {
  797.       yychar1 = 0;
  798.       yychar = YYEOF;        /* Don't call YYLEX any more */
  799.  
  800. #if YYDEBUG != 0
  801.       if (yydebug)
  802.     fprintf(stderr, "Now at end of input.\n");
  803. #endif
  804.     }
  805.   else
  806.     {
  807.       yychar1 = YYTRANSLATE(yychar);
  808.  
  809. #if YYDEBUG != 0
  810.       if (yydebug)
  811.     {
  812.       fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
  813.       /* Give the individual parser a way to print the precise meaning
  814.          of a token, for further debugging info.  */
  815. #ifdef YYPRINT
  816.       YYPRINT (stderr, yychar, yylval);
  817. #endif
  818.       fprintf (stderr, ")\n");
  819.     }
  820. #endif
  821.     }
  822.  
  823.   yyn += yychar1;
  824.   if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
  825.     goto yydefault;
  826.  
  827.   yyn = yytable[yyn];
  828.  
  829.   /* yyn is what to do for this token type in this state.
  830.      Negative => reduce, -yyn is rule number.
  831.      Positive => shift, yyn is new state.
  832.        New state is final state => don't bother to shift,
  833.        just return success.
  834.      0, or most negative number => error.  */
  835.  
  836.   if (yyn < 0)
  837.     {
  838.       if (yyn == YYFLAG)
  839.     goto yyerrlab;
  840.       yyn = -yyn;
  841.       goto yyreduce;
  842.     }
  843.   else if (yyn == 0)
  844.     goto yyerrlab;
  845.  
  846.   if (yyn == YYFINAL)
  847.     YYACCEPT;
  848.  
  849.   /* Shift the lookahead token.  */
  850.  
  851. #if YYDEBUG != 0
  852.   if (yydebug)
  853.     fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
  854. #endif
  855.  
  856.   /* Discard the token being shifted unless it is eof.  */
  857.   if (yychar != YYEOF)
  858.     yychar = YYEMPTY;
  859.  
  860.   *++yyvsp = yylval;
  861. #ifdef YYLSP_NEEDED
  862.   *++yylsp = yylloc;
  863. #endif
  864.  
  865.   /* count tokens shifted since error; after three, turn off error status.  */
  866.   if (yyerrstatus) yyerrstatus--;
  867.  
  868.   yystate = yyn;
  869.   goto yynewstate;
  870.  
  871. /* Do the default action for the current state.  */
  872. yydefault:
  873.  
  874.   yyn = yydefact[yystate];
  875.   if (yyn == 0)
  876.     goto yyerrlab;
  877.  
  878. /* Do a reduction.  yyn is the number of a rule to reduce with.  */
  879. yyreduce:
  880.   yylen = yyr2[yyn];
  881.   if (yylen > 0)
  882.     yyval = yyvsp[1-yylen]; /* implement default value of the action */
  883.  
  884. #if YYDEBUG != 0
  885.   if (yydebug)
  886.     {
  887.       int i;
  888.  
  889.       fprintf (stderr, "Reducing via rule %d (line %d), ",
  890.            yyn, yyrline[yyn]);
  891.  
  892.       /* Print the symbols being reduced, and their result.  */
  893.       for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
  894.     fprintf (stderr, "%s ", yytname[yyrhs[i]]);
  895.       fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
  896.     }
  897. #endif
  898.  
  899.  
  900.   switch (yyn) {
  901.  
  902. case 1:
  903. #line 106 "bc.y"
  904. {
  905.                   yyval.i_value = 0;
  906.                   if (interactive)
  907.                 {
  908.                   printf ("%s\n", BC_VERSION);
  909.                   welcome ();
  910.                 }
  911.                 ;
  912.     break;}
  913. case 3:
  914. #line 117 "bc.y"
  915. { run_code (); ;
  916.     break;}
  917. case 4:
  918. #line 119 "bc.y"
  919. { run_code (); ;
  920.     break;}
  921. case 5:
  922. #line 121 "bc.y"
  923. {
  924.                   yyerrok;
  925.                   init_gen ();
  926.                 ;
  927.     break;}
  928. case 6:
  929. #line 127 "bc.y"
  930. { yyval.i_value = 0; ;
  931.     break;}
  932. case 10:
  933. #line 133 "bc.y"
  934. { yyval.i_value = 0; ;
  935.     break;}
  936. case 17:
  937. #line 142 "bc.y"
  938. { yyval.i_value = yyvsp[0].i_value; ;
  939.     break;}
  940. case 18:
  941. #line 145 "bc.y"
  942. { warranty (""); ;
  943.     break;}
  944. case 19:
  945. #line 147 "bc.y"
  946. { limits (); ;
  947.     break;}
  948. case 20:
  949. #line 149 "bc.y"
  950. {
  951.                   if (yyvsp[0].i_value & 2)
  952.                 warn ("comparison in expression");
  953.                   if (yyvsp[0].i_value & 1)
  954.                 generate ("W");
  955.                   else 
  956.                 generate ("p");
  957.                 ;
  958.     break;}
  959. case 21:
  960. #line 158 "bc.y"
  961. {
  962.                   yyval.i_value = 0;
  963.                   generate ("w");
  964.                   generate (yyvsp[0].s_value);
  965.                   free (yyvsp[0].s_value);
  966.                 ;
  967.     break;}
  968. case 22:
  969. #line 165 "bc.y"
  970. {
  971.                   if (break_label == 0)
  972.                 yyerror ("Break outside a for/while");
  973.                   else
  974.                 {
  975.                   sprintf (genstr, "J%1d:", break_label);
  976.                   generate (genstr);
  977.                 }
  978.                 ;
  979.     break;}
  980. case 23:
  981. #line 175 "bc.y"
  982. {
  983.                   warn ("Continue statement");
  984.                   if (continue_label == 0)
  985.                 yyerror ("Continue outside a for");
  986.                   else
  987.                 {
  988.                   sprintf (genstr, "J%1d:", continue_label);
  989.                   generate (genstr);
  990.                 }
  991.                 ;
  992.     break;}
  993. case 24:
  994. #line 186 "bc.y"
  995. { exit (0); ;
  996.     break;}
  997. case 25:
  998. #line 188 "bc.y"
  999. { generate ("h"); ;
  1000.     break;}
  1001. case 26:
  1002. #line 190 "bc.y"
  1003. { generate ("0R"); ;
  1004.     break;}
  1005. case 27:
  1006. #line 192 "bc.y"
  1007. { generate ("R"); ;
  1008.     break;}
  1009. case 28:
  1010. #line 194 "bc.y"
  1011. {
  1012.                   yyvsp[0].i_value = break_label; 
  1013.                   break_label = next_label++;
  1014.                 ;
  1015.     break;}
  1016. case 29:
  1017. #line 199 "bc.y"
  1018. {
  1019.                   if (yyvsp[-1].i_value > 1)
  1020.                 warn ("Comparison in first for expression");
  1021.                   yyvsp[-1].i_value = next_label++;
  1022.                   if (yyvsp[-1].i_value < 0)
  1023.                 sprintf (genstr, "N%1d:", yyvsp[-1].i_value);
  1024.                   else
  1025.                 sprintf (genstr, "pN%1d:", yyvsp[-1].i_value);
  1026.                   generate (genstr);
  1027.                 ;
  1028.     break;}
  1029. case 30:
  1030. #line 210 "bc.y"
  1031. {
  1032.                   if (yyvsp[-1].i_value < 0) generate ("1");
  1033.                   yyvsp[-1].i_value = next_label++;
  1034.                   sprintf (genstr, "B%1d:J%1d:", yyvsp[-1].i_value, break_label);
  1035.                   generate (genstr);
  1036.                   yyval.i_value = continue_label;
  1037.                   continue_label = next_label++;
  1038.                   sprintf (genstr, "N%1d:", continue_label);
  1039.                   generate (genstr);
  1040.                 ;
  1041.     break;}
  1042. case 31:
  1043. #line 221 "bc.y"
  1044. {
  1045.                   if (yyvsp[-1].i_value > 1)
  1046.                 warn ("Comparison in third for expression");
  1047.                   if (yyvsp[-1].i_value < 0)
  1048.                 sprintf (genstr, "J%1d:N%1d:", yyvsp[-7].i_value, yyvsp[-4].i_value);
  1049.                   else
  1050.                 sprintf (genstr, "pJ%1d:N%1d:", yyvsp[-7].i_value, yyvsp[-4].i_value);
  1051.                   generate (genstr);
  1052.                 ;
  1053.     break;}
  1054. case 32:
  1055. #line 231 "bc.y"
  1056. {
  1057.                   sprintf (genstr, "J%1d:N%1d:",
  1058.                        continue_label, break_label);
  1059.                   generate (genstr);
  1060.                   break_label = yyvsp[-12].i_value;
  1061.                   continue_label = yyvsp[-4].i_value;
  1062.                 ;
  1063.     break;}
  1064. case 33:
  1065. #line 239 "bc.y"
  1066. {
  1067.                   yyvsp[-1].i_value = if_label;
  1068.                   if_label = next_label++;
  1069.                   sprintf (genstr, "Z%1d:", if_label);
  1070.                   generate (genstr);
  1071.                 ;
  1072.     break;}
  1073. case 34:
  1074. #line 246 "bc.y"
  1075. {
  1076.                   sprintf (genstr, "N%1d:", if_label); 
  1077.                   generate (genstr);
  1078.                   if_label = yyvsp[-4].i_value;
  1079.                 ;
  1080.     break;}
  1081. case 35:
  1082. #line 252 "bc.y"
  1083. {
  1084.                   yyvsp[0].i_value = next_label++;
  1085.                   sprintf (genstr, "N%1d:", yyvsp[0].i_value);
  1086.                   generate (genstr);
  1087.                 ;
  1088.     break;}
  1089. case 36:
  1090. #line 258 "bc.y"
  1091. {
  1092.                   yyvsp[0].i_value = break_label; 
  1093.                   break_label = next_label++;
  1094.                   sprintf (genstr, "Z%1d:", break_label);
  1095.                   generate (genstr);
  1096.                 ;
  1097.     break;}
  1098. case 37:
  1099. #line 265 "bc.y"
  1100. {
  1101.                   sprintf (genstr, "J%1d:N%1d:", yyvsp[-6].i_value, break_label);
  1102.                   generate (genstr);
  1103.                   break_label = yyvsp[-3].i_value;
  1104.                 ;
  1105.     break;}
  1106. case 38:
  1107. #line 271 "bc.y"
  1108. { yyval.i_value = 0; ;
  1109.     break;}
  1110. case 39:
  1111. #line 273 "bc.y"
  1112. {  warn ("print statement"); ;
  1113.     break;}
  1114. case 43:
  1115. #line 280 "bc.y"
  1116. {
  1117.                   generate ("O");
  1118.                   generate (yyvsp[0].s_value);
  1119.                   free (yyvsp[0].s_value);
  1120.                 ;
  1121.     break;}
  1122. case 44:
  1123. #line 286 "bc.y"
  1124. { generate ("P"); ;
  1125.     break;}
  1126. case 46:
  1127. #line 290 "bc.y"
  1128. {
  1129.                   warn ("else clause in if statement");
  1130.                   yyvsp[0].i_value = next_label++;
  1131.                   sprintf (genstr, "J%d:N%1d:", yyvsp[0].i_value, if_label); 
  1132.                   generate (genstr);
  1133.                   if_label = yyvsp[0].i_value;
  1134.                 ;
  1135.     break;}
  1136. case 48:
  1137. #line 300 "bc.y"
  1138. {
  1139.                   /* Check auto list against parameter list? */
  1140.                   check_params (yyvsp[-4].a_value,yyvsp[0].a_value);
  1141.                   sprintf (genstr, "F%d,%s.%s[",
  1142.                        lookup(yyvsp[-6].s_value,FUNCTDEF), 
  1143.                        arg_str (yyvsp[-4].a_value), arg_str (yyvsp[0].a_value));
  1144.                   generate (genstr);
  1145.                   free_args (yyvsp[-4].a_value);
  1146.                   free_args (yyvsp[0].a_value);
  1147.                   yyvsp[-7].i_value = next_label;
  1148.                   next_label = 1;
  1149.                 ;
  1150.     break;}
  1151. case 49:
  1152. #line 313 "bc.y"
  1153. {
  1154.                   generate ("0R]");
  1155.                   next_label = yyvsp[-10].i_value;
  1156.                 ;
  1157.     break;}
  1158. case 50:
  1159. #line 319 "bc.y"
  1160. { yyval.a_value = NULL; ;
  1161.     break;}
  1162. case 52:
  1163. #line 323 "bc.y"
  1164. { yyval.a_value = NULL; ;
  1165.     break;}
  1166. case 53:
  1167. #line 325 "bc.y"
  1168. { yyval.a_value = yyvsp[-1].a_value; ;
  1169.     break;}
  1170. case 54:
  1171. #line 327 "bc.y"
  1172. { yyval.a_value = yyvsp[-1].a_value; ;
  1173.     break;}
  1174. case 55:
  1175. #line 330 "bc.y"
  1176. { yyval.a_value = nextarg (NULL, lookup (yyvsp[0].s_value,SIMPLE)); ;
  1177.     break;}
  1178. case 56:
  1179. #line 332 "bc.y"
  1180. { yyval.a_value = nextarg (NULL, lookup (yyvsp[-2].s_value,ARRAY)); ;
  1181.     break;}
  1182. case 57:
  1183. #line 334 "bc.y"
  1184. { yyval.a_value = nextarg (yyvsp[-2].a_value, lookup (yyvsp[0].s_value,SIMPLE)); ;
  1185.     break;}
  1186. case 58:
  1187. #line 336 "bc.y"
  1188. { yyval.a_value = nextarg (yyvsp[-4].a_value, lookup (yyvsp[-2].s_value,ARRAY)); ;
  1189.     break;}
  1190. case 59:
  1191. #line 339 "bc.y"
  1192. { yyval.a_value = NULL; ;
  1193.     break;}
  1194. case 61:
  1195. #line 343 "bc.y"
  1196. {
  1197.                   if (yyvsp[0].i_value > 1) warn ("comparison in argument");
  1198.                   yyval.a_value = nextarg (NULL,0);
  1199.                 ;
  1200.     break;}
  1201. case 62:
  1202. #line 348 "bc.y"
  1203. {
  1204.                   sprintf (genstr, "K%d:", -lookup (yyvsp[-2].s_value,ARRAY));
  1205.                   generate (genstr);
  1206.                   yyval.a_value = nextarg (NULL,1);
  1207.                 ;
  1208.     break;}
  1209. case 63:
  1210. #line 354 "bc.y"
  1211. {
  1212.                   if (yyvsp[0].i_value > 1) warn ("comparison in argument");
  1213.                   yyval.a_value = nextarg (yyvsp[-2].a_value,0);
  1214.                 ;
  1215.     break;}
  1216. case 64:
  1217. #line 359 "bc.y"
  1218. {
  1219.                   sprintf (genstr, "K%d:", -lookup (yyvsp[-2].s_value,ARRAY));
  1220.                   generate (genstr);
  1221.                   yyval.a_value = nextarg (yyvsp[-4].a_value,1);
  1222.                 ;
  1223.     break;}
  1224. case 65:
  1225. #line 366 "bc.y"
  1226. {
  1227.                   yyval.i_value = -1;
  1228.                   warn ("Missing expression in for statement");
  1229.                 ;
  1230.     break;}
  1231. case 67:
  1232. #line 373 "bc.y"
  1233. {
  1234.                   yyval.i_value = 0;
  1235.                   generate ("0");
  1236.                 ;
  1237.     break;}
  1238. case 68:
  1239. #line 378 "bc.y"
  1240. {
  1241.                   if (yyvsp[0].i_value > 1)
  1242.                 warn ("comparison in return expresion");
  1243.                 ;
  1244.     break;}
  1245. case 69:
  1246. #line 384 "bc.y"
  1247. {
  1248.                   if (yyvsp[0].c_value != '=')
  1249.                 {
  1250.                   if (yyvsp[-1].i_value < 0)
  1251.                     sprintf (genstr, "DL%d:", -yyvsp[-1].i_value);
  1252.                   else
  1253.                     sprintf (genstr, "l%d:", yyvsp[-1].i_value);
  1254.                   generate (genstr);
  1255.                 }
  1256.                 ;
  1257.     break;}
  1258. case 70:
  1259. #line 395 "bc.y"
  1260. {
  1261.                   if (yyvsp[0].i_value > 1) warn("comparison in assignment");
  1262.                   if (yyvsp[-2].c_value != '=')
  1263.                 {
  1264.                   sprintf (genstr, "%c", yyvsp[-2].c_value);
  1265.                   generate (genstr);
  1266.                 }
  1267.                   if (yyvsp[-3].i_value < 0)
  1268.                 sprintf (genstr, "S%d:", -yyvsp[-3].i_value);
  1269.                   else
  1270.                 sprintf (genstr, "s%d:", yyvsp[-3].i_value);
  1271.                   generate (genstr);
  1272.                   yyval.i_value = 0;
  1273.                 ;
  1274.     break;}
  1275. case 71:
  1276. #line 411 "bc.y"
  1277. {
  1278.                   warn("&& operator");
  1279.                   yyvsp[0].i_value = next_label++;
  1280.                   sprintf (genstr, "DZ%d:p", yyvsp[0].i_value);
  1281.                   generate (genstr);
  1282.                 ;
  1283.     break;}
  1284. case 72:
  1285. #line 418 "bc.y"
  1286. {
  1287.                   sprintf (genstr, "DZ%d:p1N%d:", yyvsp[-2].i_value, yyvsp[-2].i_value);
  1288.                   generate (genstr);
  1289.                   yyval.i_value = yyvsp[-3].i_value | yyvsp[0].i_value;
  1290.                 ;
  1291.     break;}
  1292. case 73:
  1293. #line 424 "bc.y"
  1294. {
  1295.                   warn("|| operator");
  1296.                   yyvsp[0].i_value = next_label++;
  1297.                   sprintf (genstr, "B%d:", yyvsp[0].i_value);
  1298.                   generate (genstr);
  1299.                 ;
  1300.     break;}
  1301. case 74:
  1302. #line 431 "bc.y"
  1303. {
  1304.                   int tmplab;
  1305.                   tmplab = next_label++;
  1306.                   sprintf (genstr, "B%d:0J%d:N%d:1N%d:",
  1307.                        yyvsp[-2].i_value, tmplab, yyvsp[-2].i_value, tmplab);
  1308.                   generate (genstr);
  1309.                   yyval.i_value = yyvsp[-3].i_value | yyvsp[0].i_value;
  1310.                 ;
  1311.     break;}
  1312. case 75:
  1313. #line 440 "bc.y"
  1314. {
  1315.                   yyval.i_value = yyvsp[0].i_value;
  1316.                   warn("! operator");
  1317.                   generate ("!");
  1318.                 ;
  1319.     break;}
  1320. case 76:
  1321. #line 446 "bc.y"
  1322. {
  1323.                   yyval.i_value = 3;
  1324.                   switch (*(yyvsp[-1].s_value))
  1325.                 {
  1326.                 case '=':
  1327.                   generate ("=");
  1328.                   break;
  1329.  
  1330.                 case '!':
  1331.                   generate ("#");
  1332.                   break;
  1333.  
  1334.                 case '<':
  1335.                   if (yyvsp[-1].s_value[1] == '=')
  1336.                     generate ("{");
  1337.                   else
  1338.                     generate ("<");
  1339.                   break;
  1340.  
  1341.                 case '>':
  1342.                   if (yyvsp[-1].s_value[1] == '=')
  1343.                     generate ("}");
  1344.                   else
  1345.                     generate (">");
  1346.                   break;
  1347.                 }
  1348.                 ;
  1349.     break;}
  1350. case 77:
  1351. #line 474 "bc.y"
  1352. {
  1353.                   generate ("+");
  1354.                   yyval.i_value = yyvsp[-2].i_value | yyvsp[0].i_value;
  1355.                 ;
  1356.     break;}
  1357. case 78:
  1358. #line 479 "bc.y"
  1359. {
  1360.                   generate ("-");
  1361.                   yyval.i_value = yyvsp[-2].i_value | yyvsp[0].i_value;
  1362.                 ;
  1363.     break;}
  1364. case 79:
  1365. #line 484 "bc.y"
  1366. {
  1367.                   genstr[0] = yyvsp[-1].c_value;
  1368.                   genstr[1] = 0;
  1369.                   generate (genstr);
  1370.                   yyval.i_value = yyvsp[-2].i_value | yyvsp[0].i_value;
  1371.                 ;
  1372.     break;}
  1373. case 80:
  1374. #line 491 "bc.y"
  1375. {
  1376.                   generate ("^");
  1377.                   yyval.i_value = yyvsp[-2].i_value | yyvsp[0].i_value;
  1378.                 ;
  1379.     break;}
  1380. case 81:
  1381. #line 496 "bc.y"
  1382. {
  1383.                   generate ("n");
  1384.                   yyval.i_value = yyvsp[0].i_value;
  1385.                 ;
  1386.     break;}
  1387. case 82:
  1388. #line 501 "bc.y"
  1389. {
  1390.                   yyval.i_value = 1;
  1391.                   if (yyvsp[0].i_value < 0)
  1392.                 sprintf (genstr, "L%d:", -yyvsp[0].i_value);
  1393.                   else
  1394.                 sprintf (genstr, "l%d:", yyvsp[0].i_value);
  1395.                   generate (genstr);
  1396.                 ;
  1397.     break;}
  1398. case 83:
  1399. #line 510 "bc.y"
  1400. {
  1401.                   int len = strlen(yyvsp[0].s_value);
  1402.                   yyval.i_value = 1;
  1403.                   if (len == 1 && *yyvsp[0].s_value == '0')
  1404.                 generate ("0");
  1405.                   else if (len == 1 && *yyvsp[0].s_value == '1')
  1406.                 generate ("1");
  1407.                   else
  1408.                 {
  1409.                   generate ("K");
  1410.                   generate (yyvsp[0].s_value);
  1411.                   generate (":");
  1412.                 }
  1413.                   free (yyvsp[0].s_value);
  1414.                 ;
  1415.     break;}
  1416. case 84:
  1417. #line 526 "bc.y"
  1418. { yyval.i_value = yyvsp[-1].i_value | 1; ;
  1419.     break;}
  1420. case 85:
  1421. #line 528 "bc.y"
  1422. {
  1423.                   yyval.i_value = 1;
  1424.                   if (yyvsp[-1].a_value != NULL)
  1425.                 { 
  1426.                   sprintf (genstr, "C%d,%s:",
  1427.                        lookup (yyvsp[-3].s_value,FUNCT),
  1428.                        call_str (yyvsp[-1].a_value));
  1429.                   free_args (yyvsp[-1].a_value);
  1430.                 }
  1431.                   else
  1432.                 {
  1433.                   sprintf (genstr, "C%d:", lookup (yyvsp[-3].s_value,FUNCT));
  1434.                 }
  1435.                   generate (genstr);
  1436.                 ;
  1437.     break;}
  1438. case 86:
  1439. #line 544 "bc.y"
  1440. {
  1441.                   yyval.i_value = 1;
  1442.                   if (yyvsp[0].i_value < 0)
  1443.                 {
  1444.                   if (yyvsp[-1].c_value == '+')
  1445.                     sprintf (genstr, "DA%d:L%d:", -yyvsp[0].i_value, -yyvsp[0].i_value);
  1446.                   else
  1447.                     sprintf (genstr, "DM%d:L%d:", -yyvsp[0].i_value, -yyvsp[0].i_value);
  1448.                 }
  1449.                   else
  1450.                 {
  1451.                   if (yyvsp[-1].c_value == '+')
  1452.                     sprintf (genstr, "i%d:l%d:", yyvsp[0].i_value, yyvsp[0].i_value);
  1453.                   else
  1454.                     sprintf (genstr, "d%d:l%d:", yyvsp[0].i_value, yyvsp[0].i_value);
  1455.                 }
  1456.                   generate (genstr);
  1457.                 ;
  1458.     break;}
  1459. case 87:
  1460. #line 563 "bc.y"
  1461. {
  1462.                   yyval.i_value = 1;
  1463.                   if (yyvsp[-1].i_value < 0)
  1464.                 {
  1465.                   sprintf (genstr, "DL%d:x", -yyvsp[-1].i_value);
  1466.                   generate (genstr); 
  1467.                   if (yyvsp[0].c_value == '+')
  1468.                     sprintf (genstr, "A%d:", -yyvsp[-1].i_value);
  1469.                   else
  1470.                       sprintf (genstr, "M%d:", -yyvsp[-1].i_value);
  1471.                 }
  1472.                   else
  1473.                 {
  1474.                   sprintf (genstr, "l%d:", yyvsp[-1].i_value);
  1475.                   generate (genstr);
  1476.                   if (yyvsp[0].c_value == '+')
  1477.                     sprintf (genstr, "i%d:", yyvsp[-1].i_value);
  1478.                   else
  1479.                     sprintf (genstr, "d%d:", yyvsp[-1].i_value);
  1480.                 }
  1481.                   generate (genstr);
  1482.                 ;
  1483.     break;}
  1484. case 88:
  1485. #line 586 "bc.y"
  1486. { generate ("cL"); yyval.i_value = 1;;
  1487.     break;}
  1488. case 89:
  1489. #line 588 "bc.y"
  1490. { generate ("cR"); yyval.i_value = 1;;
  1491.     break;}
  1492. case 90:
  1493. #line 590 "bc.y"
  1494. { generate ("cS"); yyval.i_value = 1;;
  1495.     break;}
  1496. case 91:
  1497. #line 592 "bc.y"
  1498. {
  1499.                   warn ("read function");
  1500.                   generate ("cI"); yyval.i_value = 1;
  1501.                 ;
  1502.     break;}
  1503. case 92:
  1504. #line 598 "bc.y"
  1505. { yyval.i_value = lookup(yyvsp[0].s_value,SIMPLE); ;
  1506.     break;}
  1507. case 93:
  1508. #line 600 "bc.y"
  1509. {
  1510.                   if (yyvsp[-1].i_value > 1) warn("comparison in subscript");
  1511.                   yyval.i_value = lookup(yyvsp[-3].s_value,ARRAY);
  1512.                 ;
  1513.     break;}
  1514. case 94:
  1515. #line 605 "bc.y"
  1516. { yyval.i_value = 0; ;
  1517.     break;}
  1518. case 95:
  1519. #line 607 "bc.y"
  1520. { yyval.i_value = 1; ;
  1521.     break;}
  1522. case 96:
  1523. #line 609 "bc.y"
  1524. { yyval.i_value = 2; ;
  1525.     break;}
  1526. case 97:
  1527. #line 611 "bc.y"
  1528. { yyval.i_value = 3;
  1529.                   warn ("Last variable");
  1530.                 ;
  1531.     break;}
  1532. }
  1533.    /* the action file gets copied in in place of this dollarsign */
  1534. #line 465 "/usr/gnu/lib/bison.simple"
  1535.  
  1536.   yyvsp -= yylen;
  1537.   yyssp -= yylen;
  1538. #ifdef YYLSP_NEEDED
  1539.   yylsp -= yylen;
  1540. #endif
  1541.  
  1542. #if YYDEBUG != 0
  1543.   if (yydebug)
  1544.     {
  1545.       short *ssp1 = yyss - 1;
  1546.       fprintf (stderr, "state stack now");
  1547.       while (ssp1 != yyssp)
  1548.     fprintf (stderr, " %d", *++ssp1);
  1549.       fprintf (stderr, "\n");
  1550.     }
  1551. #endif
  1552.  
  1553.   *++yyvsp = yyval;
  1554.  
  1555. #ifdef YYLSP_NEEDED
  1556.   yylsp++;
  1557.   if (yylen == 0)
  1558.     {
  1559.       yylsp->first_line = yylloc.first_line;
  1560.       yylsp->first_column = yylloc.first_column;
  1561.       yylsp->last_line = (yylsp-1)->last_line;
  1562.       yylsp->last_column = (yylsp-1)->last_column;
  1563.       yylsp->text = 0;
  1564.     }
  1565.   else
  1566.     {
  1567.       yylsp->last_line = (yylsp+yylen-1)->last_line;
  1568.       yylsp->last_column = (yylsp+yylen-1)->last_column;
  1569.     }
  1570. #endif
  1571.  
  1572.   /* Now "shift" the result of the reduction.
  1573.      Determine what state that goes to,
  1574.      based on the state we popped back to
  1575.      and the rule number reduced by.  */
  1576.  
  1577.   yyn = yyr1[yyn];
  1578.  
  1579.   yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
  1580.   if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
  1581.     yystate = yytable[yystate];
  1582.   else
  1583.     yystate = yydefgoto[yyn - YYNTBASE];
  1584.  
  1585.   goto yynewstate;
  1586.  
  1587. yyerrlab:   /* here on detecting error */
  1588.  
  1589.   if (! yyerrstatus)
  1590.     /* If not already recovering from an error, report this error.  */
  1591.     {
  1592.       ++yynerrs;
  1593.  
  1594. #ifdef YYERROR_VERBOSE
  1595.       yyn = yypact[yystate];
  1596.  
  1597.       if (yyn > YYFLAG && yyn < YYLAST)
  1598.     {
  1599.       int size = 0;
  1600.       char *msg;
  1601.       int x, count;
  1602.  
  1603.       count = 0;
  1604.       /* Start X at -yyn if nec to avoid negative indexes in yycheck.  */
  1605.       for (x = (yyn < 0 ? -yyn : 0);
  1606.            x < (sizeof(yytname) / sizeof(char *)); x++)
  1607.         if (yycheck[x + yyn] == x)
  1608.           size += strlen(yytname[x]) + 15, count++;
  1609.       msg = (char *) malloc(size + 15);
  1610.       if (msg != 0)
  1611.         {
  1612.           strcpy(msg, "parse error");
  1613.  
  1614.           if (count < 5)
  1615.         {
  1616.           count = 0;
  1617.           for (x = (yyn < 0 ? -yyn : 0);
  1618.                x < (sizeof(yytname) / sizeof(char *)); x++)
  1619.             if (yycheck[x + yyn] == x)
  1620.               {
  1621.             strcat(msg, count == 0 ? ", expecting `" : " or `");
  1622.             strcat(msg, yytname[x]);
  1623.             strcat(msg, "'");
  1624.             count++;
  1625.               }
  1626.         }
  1627.           yyerror(msg);
  1628.           free(msg);
  1629.         }
  1630.       else
  1631.         yyerror ("parse error; also virtual memory exceeded");
  1632.     }
  1633.       else
  1634. #endif /* YYERROR_VERBOSE */
  1635.     yyerror("parse error");
  1636.     }
  1637.  
  1638.   goto yyerrlab1;
  1639. yyerrlab1:   /* here on error raised explicitly by an action */
  1640.  
  1641.   if (yyerrstatus == 3)
  1642.     {
  1643.       /* if just tried and failed to reuse lookahead token after an error, discard it.  */
  1644.  
  1645.       /* return failure if at end of input */
  1646.       if (yychar == YYEOF)
  1647.     YYABORT;
  1648.  
  1649. #if YYDEBUG != 0
  1650.       if (yydebug)
  1651.     fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
  1652. #endif
  1653.  
  1654.       yychar = YYEMPTY;
  1655.     }
  1656.  
  1657.   /* Else will try to reuse lookahead token
  1658.      after shifting the error token.  */
  1659.  
  1660.   yyerrstatus = 3;        /* Each real token shifted decrements this */
  1661.  
  1662.   goto yyerrhandle;
  1663.  
  1664. yyerrdefault:  /* current state does not do anything special for the error token. */
  1665.  
  1666. #if 0
  1667.   /* This is wrong; only states that explicitly want error tokens
  1668.      should shift them.  */
  1669.   yyn = yydefact[yystate];  /* If its default is to accept any token, ok.  Otherwise pop it.*/
  1670.   if (yyn) goto yydefault;
  1671. #endif
  1672.  
  1673. yyerrpop:   /* pop the current state because it cannot handle the error token */
  1674.  
  1675.   if (yyssp == yyss) YYABORT;
  1676.   yyvsp--;
  1677.   yystate = *--yyssp;
  1678. #ifdef YYLSP_NEEDED
  1679.   yylsp--;
  1680. #endif
  1681.  
  1682. #if YYDEBUG != 0
  1683.   if (yydebug)
  1684.     {
  1685.       short *ssp1 = yyss - 1;
  1686.       fprintf (stderr, "Error: state stack now");
  1687.       while (ssp1 != yyssp)
  1688.     fprintf (stderr, " %d", *++ssp1);
  1689.       fprintf (stderr, "\n");
  1690.     }
  1691. #endif
  1692.  
  1693. yyerrhandle:
  1694.  
  1695.   yyn = yypact[yystate];
  1696.   if (yyn == YYFLAG)
  1697.     goto yyerrdefault;
  1698.  
  1699.   yyn += YYTERROR;
  1700.   if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
  1701.     goto yyerrdefault;
  1702.  
  1703.   yyn = yytable[yyn];
  1704.   if (yyn < 0)
  1705.     {
  1706.       if (yyn == YYFLAG)
  1707.     goto yyerrpop;
  1708.       yyn = -yyn;
  1709.       goto yyreduce;
  1710.     }
  1711.   else if (yyn == 0)
  1712.     goto yyerrpop;
  1713.  
  1714.   if (yyn == YYFINAL)
  1715.     YYACCEPT;
  1716.  
  1717. #if YYDEBUG != 0
  1718.   if (yydebug)
  1719.     fprintf(stderr, "Shifting error token, ");
  1720. #endif
  1721.  
  1722.   *++yyvsp = yylval;
  1723. #ifdef YYLSP_NEEDED
  1724.   *++yylsp = yylloc;
  1725. #endif
  1726.  
  1727.   yystate = yyn;
  1728.   goto yynewstate;
  1729. }
  1730. #line 615 "bc.y"
  1731.  
  1732.