home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / indent-1.9.1-base.tgz / indent-1.9.1-base.tar / fsf / indent / parse.c < prev    next >
C/C++ Source or Header  |  1994-01-29  |  18KB  |  564 lines

  1. /* Copyright (c) 1994, Joseph Arceneaux.  All rights reserved
  2.  
  3.    Copyright (c) 1985 Sun Microsystems, Inc. Copyright (c) 1980 The Regents
  4.    of the University of California. Copyright (c) 1976 Board of Trustees of
  5.    the University of Illinois. All rights reserved.
  6.  
  7.    Redistribution and use in source and binary forms are permitted provided
  8.    that the above copyright notice and this paragraph are duplicated in all
  9.    such forms and that any documentation, advertising materials, and other
  10.    materials related to such distribution and use acknowledge that the
  11.    software was developed by the University of California, Berkeley, the
  12.    University of Illinois, Urbana, and Sun Microsystems, Inc.  The name of
  13.    either University or Sun Microsystems may not be used to endorse or
  14.    promote products derived from this software without specific prior written
  15.    permission. THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  16.    IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES
  17.    OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */
  18.  
  19. #include "sys.h"
  20. #include "indent.h"
  21.  
  22. struct parser_state *parser_state_tos;
  23.  
  24. #define INITIAL_BUFFER_SIZE 1000
  25. #define INITIAL_STACK_SIZE 2
  26.  
  27. void
  28. init_parser ()
  29. {
  30.   parser_state_tos
  31.   = (struct parser_state *) xmalloc (sizeof (struct parser_state));
  32.  
  33.   parser_state_tos->p_stack_size = INITIAL_STACK_SIZE;
  34.   parser_state_tos->p_stack
  35.     = (enum codes *) xmalloc (INITIAL_STACK_SIZE * sizeof (enum codes));
  36.   parser_state_tos->il
  37.     = (int *) xmalloc (INITIAL_STACK_SIZE * sizeof (int));
  38.   parser_state_tos->cstk
  39.     = (int *) xmalloc (INITIAL_STACK_SIZE * sizeof (int));
  40.   parser_state_tos->paren_indents = (short *) xmalloc (sizeof (short));
  41.  
  42.   /* Although these are supposed to grow if we reach the end,
  43.      I can find no place in the code which does this. */
  44.   combuf = (char *) xmalloc (INITIAL_BUFFER_SIZE);
  45.   labbuf = (char *) xmalloc (INITIAL_BUFFER_SIZE);
  46.   codebuf = (char *) xmalloc (INITIAL_BUFFER_SIZE);
  47.  
  48.   save_com.size = INITIAL_BUFFER_SIZE;
  49.   save_com.end = save_com.ptr = xmalloc (save_com.size);
  50.  
  51.   di_stack_alloc = 2;
  52.   di_stack = (int *) xmalloc (di_stack_alloc * sizeof (*di_stack));
  53.  
  54. }
  55.  
  56. void
  57. reset_parser ()
  58. {
  59.   parser_state_tos->next = 0;
  60.   parser_state_tos->tos = 0;
  61.   parser_state_tos->paren_indents_size = 1;
  62.   parser_state_tos->p_stack[0] = stmt;    /* this is the parser's stack */
  63.   parser_state_tos->last_nl = true;    /* this is true if the last thing
  64.                        scanned was a newline */
  65.   parser_state_tos->last_token = semicolon;
  66.   parser_state_tos->box_com = false;
  67.   parser_state_tos->cast_mask = 0;
  68.   parser_state_tos->noncast_mask = 0;
  69.   parser_state_tos->sizeof_mask = 0;
  70.   parser_state_tos->block_init = false;
  71.   parser_state_tos->block_init_level = 0;
  72.   parser_state_tos->col_1 = false;
  73.   parser_state_tos->com_col = 0;
  74.   parser_state_tos->dec_nest = 0;
  75.   parser_state_tos->i_l_follow = 0;
  76.   parser_state_tos->ind_level = 0;
  77.   parser_state_tos->last_u_d = false;
  78.   parser_state_tos->p_l_follow = 0;
  79.   parser_state_tos->paren_level = 0;
  80.   parser_state_tos->paren_depth = 0;
  81.   parser_state_tos->search_brace = false;
  82.   parser_state_tos->use_ff = false;
  83.   parser_state_tos->its_a_keyword = false;
  84.   parser_state_tos->sizeof_keyword = false;
  85.   parser_state_tos->dumped_decl_indent = false;
  86.   parser_state_tos->in_parameter_declaration = false;
  87.   parser_state_tos->just_saw_decl = false;
  88.   parser_state_tos->in_decl = false;
  89.   parser_state_tos->decl_on_line = false;
  90.   parser_state_tos->in_or_st = false;
  91.   parser_state_tos->bl_line = true;
  92.   parser_state_tos->want_blank = false;
  93.   parser_state_tos->in_stmt = false;
  94.   parser_state_tos->ind_stmt = false;
  95.   parser_state_tos->procname = "\0";
  96.   parser_state_tos->procname_end = "\0";
  97.   parser_state_tos->pcase = false;
  98.   parser_state_tos->dec_nest = 0;
  99.   di_stack[parser_state_tos->dec_nest] = 0;
  100.  
  101.   l_com = combuf + INITIAL_BUFFER_SIZE - 5;
  102.   l_lab = labbuf + INITIAL_BUFFER_SIZE - 5;
  103.   l_code = codebuf + INITIAL_BUFFER_SIZE - 5;
  104.   combuf[0] = codebuf[0] = labbuf[0] = ' ';
  105.   combuf[1] = codebuf[1] = labbuf[1] = '\0';
  106.  
  107.   else_if = 1;
  108.   else_or_endif = false;
  109.   s_lab = e_lab = labbuf + 1;
  110.   s_code = e_code = codebuf + 1;
  111.   s_com = e_com = combuf + 1;
  112.  
  113.   line_no = 1;
  114.   had_eof = false;
  115.   break_comma = false;
  116.   bp_save = 0;
  117.   be_save = 0;
  118.   if (tabsize <= 0)
  119.     tabsize = 1;
  120. }
  121.  
  122. /* like ++parser_state_tos->tos but checks for stack overflow and extends
  123.    stack if necessary.  */
  124.  
  125. int
  126. inc_pstack ()
  127. {
  128.   if (++parser_state_tos->tos >= parser_state_tos->p_stack_size)
  129.     {
  130.       parser_state_tos->p_stack_size *= 2;
  131.       parser_state_tos->p_stack = (enum codes *)
  132.     xrealloc ((char *) parser_state_tos->p_stack,
  133.           parser_state_tos->p_stack_size * sizeof (enum codes));
  134.       parser_state_tos->il = (int *)
  135.     xrealloc ((char *) parser_state_tos->il,
  136.           parser_state_tos->p_stack_size * sizeof (int));
  137.       parser_state_tos->cstk = (int *)
  138.     xrealloc ((char *) parser_state_tos->cstk,
  139.           parser_state_tos->p_stack_size * sizeof (int));
  140.     }
  141.   return parser_state_tos->tos;
  142. }
  143.  
  144. #ifdef DEBUG
  145. static char **debug_symbol_strings;
  146.  
  147. void
  148. debug_init ()
  149. {
  150.   int size = ((int) period + 4) * sizeof (char *);
  151.  
  152.   debug_symbol_strings = (char **) xmalloc (size);
  153.  
  154.   debug_symbol_strings[code_eof] = "code_eof";
  155.   debug_symbol_strings[newline] = "newline";
  156.   debug_symbol_strings[lparen] = "lparen";
  157.   debug_symbol_strings[rparen] = "rparen";
  158.   debug_symbol_strings[unary_op] = "unary_op";
  159.   debug_symbol_strings[binary_op] = "binary_op";
  160.   debug_symbol_strings[postop] = "postop";
  161.   debug_symbol_strings[question] = "question";
  162.   debug_symbol_strings[casestmt] = "casestmt";
  163.   debug_symbol_strings[colon] = "colon";
  164.   debug_symbol_strings[semicolon] = "semicolon";
  165.   debug_symbol_strings[lbrace] = "lbrace";
  166.   debug_symbol_strings[rbrace] = "rbrace";
  167.   debug_symbol_strings[ident] = "ident";
  168.   debug_symbol_strings[comma] = "comma";
  169.   debug_symbol_strings[comment] = "comment";
  170.   debug_symbol_strings[swstmt] = "swstmt";
  171.   debug_symbol_strings[preesc] = "preesc";
  172.   debug_symbol_strings[form_feed] = "form_feed";
  173.   debug_symbol_strings[decl] = "decl";
  174.   debug_symbol_strings[sp_paren] = "sp_paren";
  175.   debug_symbol_strings[sp_nparen] = "sp_nparen";
  176.   debug_symbol_strings[ifstmt] = "ifstmt";
  177.   debug_symbol_strings[whilestmt] = "whilestmt";
  178.   debug_symbol_strings[forstmt] = "forstmt";
  179.   debug_symbol_strings[stmt] = "stmt";
  180.   debug_symbol_strings[stmtl] = "stmtl";
  181.   debug_symbol_strings[elselit] = "elselit";
  182.   debug_symbol_strings[dolit] = "dolit";
  183.   debug_symbol_strings[dohead] = "dohead";
  184.   debug_symbol_strings[dostmt] = "dostmt";
  185.   debug_symbol_strings[ifhead] = "ifhead";
  186.   debug_symbol_strings[elsehead] = "elsehead";
  187.   debug_symbol_strings[period] = "period";
  188. }
  189.  
  190. #endif
  191.  
  192. void
  193. parse (tk)
  194.      enum codes tk;        /* the code for the construct scanned */
  195. {
  196.   int i;
  197.  
  198. #ifdef DEBUG
  199.   if (debug)
  200.     {
  201.       if (tk >= code_eof && tk <= period)
  202.     printf ("Parse: %s\n", debug_symbol_strings[tk]);
  203.       else
  204.     printf ("Parse: Unknown code: %d for %s\n",
  205.         (int) tk, token ? token : "NULL");
  206.     }
  207. #endif
  208.  
  209.   while (parser_state_tos->p_stack[parser_state_tos->tos] == ifhead
  210.      && tk != elselit)
  211.     {
  212.       /* true if we have an if without an else */
  213.  
  214.       /* apply the if(..) stmt ::= stmt reduction */
  215.       parser_state_tos->p_stack[parser_state_tos->tos] = stmt;
  216.       reduce ();        /* see if this allows any reduction */
  217.     }
  218.  
  219.  
  220.   switch (tk)
  221.     {                /* go on and figure out what to do with the
  222.                    input */
  223.  
  224.     case decl:            /* scanned a declaration word */
  225.       parser_state_tos->search_brace = btype_2;
  226.       /* indicate that following brace should be on same line */
  227.       if (parser_state_tos->p_stack[parser_state_tos->tos] != decl)
  228.     {            /* only put one declaration onto stack */
  229.       break_comma = true;    /* while in declaration, newline should be
  230.                    forced after comma */
  231.       inc_pstack ();
  232.       parser_state_tos->p_stack[parser_state_tos->tos] = decl;
  233.       parser_state_tos->il[parser_state_tos->tos] = parser_state_tos->i_l_follow;
  234.  
  235.       if (ljust_decl)
  236.         {            /* only do if we want left justified
  237.                    declarations */
  238.           parser_state_tos->ind_level = 0;
  239.           for (i = parser_state_tos->tos - 1; i > 0; --i)
  240.         if (parser_state_tos->p_stack[i] == decl)
  241.           /* indentation is number of declaration levels deep we are
  242.              times spaces per level */
  243.           parser_state_tos->ind_level += ind_size;
  244.           parser_state_tos->i_l_follow = parser_state_tos->ind_level;
  245.         }
  246.     }
  247.       break;
  248.  
  249.     case ifstmt:        /* scanned if (...) */
  250.       if (parser_state_tos->p_stack[parser_state_tos->tos] == elsehead
  251.       && else_if)        /* "else if ..." */
  252.     parser_state_tos->i_l_follow
  253.       = parser_state_tos->il[parser_state_tos->tos];
  254.     case dolit:        /* 'do' */
  255.     case forstmt:        /* for (...) */
  256.       inc_pstack ();
  257.       parser_state_tos->p_stack[parser_state_tos->tos] = tk;
  258.       parser_state_tos->il[parser_state_tos->tos]
  259.     = parser_state_tos->ind_level = parser_state_tos->i_l_follow;
  260.       parser_state_tos->i_l_follow += ind_size;    /* subsequent statements
  261.                            should be indented 1 */
  262.       parser_state_tos->search_brace = btype_2;
  263.       break;
  264.  
  265.     case lbrace:        /* scanned { */
  266.       break_comma = false;    /* don't break comma in an initial list */
  267.       if (parser_state_tos->p_stack[parser_state_tos->tos] == stmt
  268.       || parser_state_tos->p_stack[parser_state_tos->tos] == stmtl)
  269.     /* it is a random, isolated stmt group or a declaration */
  270.     parser_state_tos->i_l_follow += ind_size;
  271.       else if (parser_state_tos->p_stack[parser_state_tos->tos] == decl)
  272.     {
  273.       parser_state_tos->i_l_follow += ind_size;
  274.       if (parser_state_tos->last_rw == rw_struct_like
  275.           && parser_state_tos->block_init_level == 0
  276.           && parser_state_tos->last_token != rparen
  277.           && !btype_2)
  278. #if 0
  279.           && !parser_state_tos->col_1)
  280. #endif
  281.         {
  282.           parser_state_tos->ind_level += brace_indent;
  283.           parser_state_tos->i_l_follow += brace_indent;
  284.         }
  285.     }
  286.       else
  287.     {
  288.       if (s_code == e_code)
  289.         {
  290.           /* only do this if there is nothing on the line */
  291.  
  292.           parser_state_tos->ind_level -= ind_size;
  293.           /* it is a group as part of a while, for, etc. */
  294.  
  295.           /* For -bl formatting, indent by brace_indent additional spaces
  296.              e.g. if (foo == bar) { <--> brace_indent spaces (in this
  297.              example, 4) */
  298.           if (!btype_2)
  299.         {
  300.           parser_state_tos->ind_level += brace_indent;
  301.           parser_state_tos->i_l_follow += brace_indent;
  302.           if (parser_state_tos->p_stack[parser_state_tos->tos]
  303.               == swstmt)
  304.             case_ind += brace_indent;
  305.         }
  306.  
  307.           if (parser_state_tos->p_stack[parser_state_tos->tos] == swstmt
  308.           && case_indent
  309.           >= ind_size)
  310.         parser_state_tos->ind_level -= ind_size;
  311.           /* for a switch, brace should be two levels out from the code */
  312.         }
  313.     }
  314.  
  315.       inc_pstack ();
  316.       parser_state_tos->p_stack[parser_state_tos->tos] = lbrace;
  317.       parser_state_tos->il[parser_state_tos->tos] = parser_state_tos->ind_level;
  318.       inc_pstack ();
  319.       parser_state_tos->p_stack[parser_state_tos->tos] = stmt;
  320.       /* allow null stmt between braces */
  321.       parser_state_tos->il[parser_state_tos->tos] = parser_state_tos->i_l_follow;
  322.       break;
  323.  
  324.     case whilestmt:        /* scanned while (...) */
  325.       if (parser_state_tos->p_stack[parser_state_tos->tos] == dohead)
  326.     {
  327.       /* it is matched with do stmt */
  328.       parser_state_tos->ind_level = parser_state_tos->i_l_follow
  329.         = parser_state_tos->il[parser_state_tos->tos];
  330.       inc_pstack ();
  331.       parser_state_tos->p_stack[parser_state_tos->tos] = whilestmt;
  332.       parser_state_tos->il[parser_state_tos->tos]
  333.         = parser_state_tos->ind_level = parser_state_tos->i_l_follow;
  334.     }
  335.       else
  336.     {            /* it is a while loop */
  337.       inc_pstack ();
  338.       parser_state_tos->p_stack[parser_state_tos->tos] = whilestmt;
  339.       parser_state_tos->il[parser_state_tos->tos] = parser_state_tos->i_l_follow;
  340.       parser_state_tos->i_l_follow += ind_size;
  341.       parser_state_tos->search_brace = btype_2;
  342.     }
  343.  
  344.       break;
  345.  
  346.     case elselit:        /* scanned an else */
  347.  
  348.       if (parser_state_tos->p_stack[parser_state_tos->tos] != ifhead)
  349.     diag (1, "Unmatched 'else'", 0, 0);
  350.       else
  351.     {
  352.       /* indentation for else should be same as for if */
  353.       parser_state_tos->ind_level
  354.         = parser_state_tos->il[parser_state_tos->tos];
  355.       /* everything following should be in 1 level */
  356.       parser_state_tos->i_l_follow = (parser_state_tos->ind_level
  357.                       + ind_size);
  358.  
  359.       parser_state_tos->p_stack[parser_state_tos->tos] = elsehead;
  360.       /* remember if with else */
  361.       parser_state_tos->search_brace = btype_2 | else_if;
  362.     }
  363.       break;
  364.  
  365.     case rbrace:        /* scanned a } */
  366.       /* stack should have <lbrace> <stmt> or <lbrace> <stmtl> */
  367.       if (parser_state_tos->p_stack[parser_state_tos->tos - 1] == lbrace)
  368.     {
  369.       parser_state_tos->ind_level = parser_state_tos->i_l_follow
  370.         = parser_state_tos->il[--parser_state_tos->tos];
  371.       parser_state_tos->p_stack[parser_state_tos->tos] = stmt;
  372.     }
  373.       else
  374.     diag (1, "Stmt nesting error.", 0, 0);
  375.       break;
  376.  
  377.     case swstmt:        /* had switch (...) */
  378.       inc_pstack ();
  379.       parser_state_tos->p_stack[parser_state_tos->tos] = swstmt;
  380.       parser_state_tos->cstk[parser_state_tos->tos] = case_ind;
  381.       /* save current case indent level */
  382.       parser_state_tos->il[parser_state_tos->tos] = parser_state_tos->i_l_follow;
  383.       case_ind = parser_state_tos->i_l_follow + case_indent;    /* cases should be one
  384.                                    level down from
  385.                                    switch */
  386.       /* statements should be two levels in */
  387.       parser_state_tos->i_l_follow += case_indent + ind_size;
  388.  
  389.       parser_state_tos->search_brace = btype_2;
  390.       break;
  391.  
  392.     case semicolon:        /* this indicates a simple stmt */
  393.       break_comma = false;    /* turn off flag to break after commas in a
  394.                    declaration */
  395.       if (parser_state_tos->p_stack[parser_state_tos->tos] == dostmt)
  396.     {
  397.       parser_state_tos->p_stack[parser_state_tos->tos] = stmt;
  398.     }
  399.       else
  400.     {
  401.       inc_pstack ();
  402.       parser_state_tos->p_stack[parser_state_tos->tos] = stmt;
  403.       parser_state_tos->il[parser_state_tos->tos]
  404.         = parser_state_tos->ind_level;
  405.     }
  406.       break;
  407.  
  408.     default:            /* this is an error */
  409.       diag (1, "Unknown code to parser", 0, 0);
  410.       return;
  411.  
  412.  
  413.     }                /* end of switch */
  414.  
  415.   reduce ();            /* see if any reduction can be done */
  416.  
  417. #ifdef DEBUG
  418.   if (debug)
  419.     {
  420.       printf ("\nParseStack [%d]:\n", (int) parser_state_tos->p_stack_size);
  421.       for (i = 1; i <= parser_state_tos->tos; ++i)
  422.     printf ("  stack[%d] =>   stack: %d   ind_level: %d\n",
  423.         (int) i, (int) parser_state_tos->p_stack[i],
  424.         (int) parser_state_tos->il[i]);
  425.       printf ("\n");
  426.     }
  427. #endif
  428.  
  429.   return;
  430. }
  431.  
  432. /* NAME: reduce
  433.  
  434. FUNCTION: Implements the reduce part of the parsing algorithm
  435.  
  436. ALGORITHM: The following reductions are done.  Reductions are repeated until
  437.    no more are possible.
  438.  
  439. Old TOS             New TOS <stmt> <stmt>         <stmtl> <stmtl> <stmt>
  440.    <stmtl> do <stmt>             dohead <dohead> <whilestmt>
  441.    <dostmt> if <stmt>             "ifstmt" switch <stmt>         <stmt>
  442.    decl <stmt>             <stmt> "ifelse" <stmt>         <stmt> for
  443.    <stmt>             <stmt> while <stmt>             <stmt>
  444.    "dostmt" while         <stmt>
  445.  
  446. On each reduction, parser_state_tos->i_l_follow (the indentation for the
  447.    following line) is set to the indentation level associated with the old
  448.    TOS.
  449.  
  450. PARAMETERS: None
  451.  
  452. RETURNS: Nothing
  453.  
  454. GLOBALS: parser_state_tos->cstk parser_state_tos->i_l_follow =
  455.    parser_state_tos->il parser_state_tos->p_stack = parser_state_tos->tos =
  456.  
  457. CALLS: None
  458.  
  459. CALLED BY: parse
  460.  
  461. HISTORY: initial coding     November 1976    D A Willcox of CAC
  462.  
  463. */
  464. /*----------------------------------------------*\
  465. |   REDUCTION PHASE                    |
  466. \*----------------------------------------------*/
  467. reduce ()
  468. {
  469.  
  470.   register int i;
  471.  
  472.   for (;;)
  473.     {                /* keep looping until there is nothing left
  474.                    to reduce */
  475.  
  476.       switch (parser_state_tos->p_stack[parser_state_tos->tos])
  477.     {
  478.  
  479.     case stmt:
  480.       switch (parser_state_tos->p_stack[parser_state_tos->tos - 1])
  481.         {
  482.  
  483.         case stmt:
  484.         case stmtl:
  485.           /* stmtl stmt or stmt stmt */
  486.           parser_state_tos->p_stack[--parser_state_tos->tos] = stmtl;
  487.           break;
  488.  
  489.         case dolit:    /* <do> <stmt> */
  490.           parser_state_tos->p_stack[--parser_state_tos->tos] = dohead;
  491.           parser_state_tos->i_l_follow
  492.         = parser_state_tos->il[parser_state_tos->tos];
  493.           break;
  494.  
  495.         case ifstmt:
  496.           /* <if> <stmt> */
  497.           parser_state_tos->p_stack[--parser_state_tos->tos] = ifhead;
  498.           for (i = parser_state_tos->tos - 1;
  499.            (parser_state_tos->p_stack[i] != stmt
  500.             && parser_state_tos->p_stack[i] != stmtl
  501.             && parser_state_tos->p_stack[i] != lbrace);
  502.            --i);
  503.           parser_state_tos->i_l_follow = parser_state_tos->il[i];
  504.           /* for the time being, we will assume that there is no else on
  505.              this if, and set the indentation level accordingly. If an
  506.              else is scanned, it will be fixed up later */
  507.           break;
  508.  
  509.         case swstmt:
  510.           /* <switch> <stmt> */
  511.           case_ind = parser_state_tos->cstk[parser_state_tos->tos - 1];
  512.  
  513.         case decl:        /* finish of a declaration */
  514.         case elsehead:
  515.           /* <<if> <stmt> else> <stmt> */
  516.         case forstmt:
  517.           /* <for> <stmt> */
  518.         case whilestmt:
  519.           /* <while> <stmt> */
  520.           parser_state_tos->p_stack[--parser_state_tos->tos] = stmt;
  521.           parser_state_tos->i_l_follow = parser_state_tos->il[parser_state_tos->tos];
  522.           break;
  523.  
  524.         default:        /* <anything else> <stmt> */
  525.           return;
  526.  
  527.         }            /* end of section for <stmt> on top of stack */
  528.       break;
  529.  
  530.     case whilestmt:    /* while (...) on top */
  531.       if (parser_state_tos->p_stack[parser_state_tos->tos - 1] == dohead)
  532.         {
  533.           /* it is termination of a do while */
  534. #if 0
  535.           parser_state_tos->p_stack[--parser_state_tos->tos] = stmt;
  536. #endif
  537.           parser_state_tos->p_stack[--parser_state_tos->tos] = dostmt;
  538.           break;
  539.         }
  540.       else
  541.         return;
  542.  
  543.     default:        /* anything else on top */
  544.       return;
  545.  
  546.     }
  547.     }
  548. }
  549.  
  550. /* This kludge is called from main.  It is just like parse(semicolon) except
  551.    that it does not clear break_comma.  Leaving break_comma alone is
  552.    necessary to make sure that "int foo(), bar()" gets formatted correctly
  553.    under -bc.  */
  554.  
  555. INLINE void
  556. parse_lparen_in_decl ()
  557. {
  558.   inc_pstack ();
  559.   parser_state_tos->p_stack[parser_state_tos->tos] = stmt;
  560.   parser_state_tos->il[parser_state_tos->tos] = parser_state_tos->ind_level;
  561.  
  562.   reduce ();
  563. }
  564.