diff options
Diffstat (limited to 'contrib/gcc/f/stb.c')
-rw-r--r-- | contrib/gcc/f/stb.c | 7439 |
1 files changed, 23 insertions, 7416 deletions
diff --git a/contrib/gcc/f/stb.c b/contrib/gcc/f/stb.c index bf456a1..673f96c 100644 --- a/contrib/gcc/f/stb.c +++ b/contrib/gcc/f/stb.c @@ -1,5 +1,6 @@ /* stb.c -- Implementation File (module.c template V1.0) - Copyright (C) 1995, 1996, 2002 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 2002, 2003 + Free Software Foundation, Inc. Contributed by James Craig Burley. This file is part of GNU Fortran. @@ -216,13 +217,6 @@ union ffestb_local_u_ ffestrOther kw; } varlist; -#if FFESTR_F90 - struct - { - ffestrOther kw; - } - type; -#endif struct { ffelexHandler next; @@ -241,13 +235,6 @@ union ffestb_local_u_ bool complained; /* If run-time expr seen in nonexec context. */ } format; -#if FFESTR_F90 - struct - { - bool started; - } - moduleprocedure; -#endif struct { ffebld expr; @@ -258,47 +245,11 @@ union ffestb_local_u_ ffesttCaseList cases; } case_stmt; -#if FFESTR_F90 - struct - { - ffesttExprList exprs; - ffebld expr; - } - heap; -#endif -#if FFESTR_F90 - struct - { - ffesttExprList exprs; - } - R624; -#endif -#if FFESTR_F90 - struct - { - ffestpDefinedOperator operator; - bool assignment; /* TRUE for INTERFACE ASSIGNMENT, FALSE for - ...OPERATOR. */ - bool slash; /* TRUE if OPEN_ARRAY, FALSE if OPEN_PAREN. */ - } - interface; -#endif struct { bool is_cblock; } V014; -#if FFESTR_VXT - struct - { - bool started; - ffebld u; - ffebld m; - ffebld n; - ffebld asv; - } - V025; -#endif struct { ffestpBeruIx ix; @@ -380,13 +331,6 @@ union ffestb_local_u_ ffeexprContext context; } write; -#if FFESTR_F90 - struct - { - bool started; - } - structure; -#endif struct { bool started; @@ -481,10 +425,6 @@ static ffelexHandler ffestb_decl_typeparams_2_ (ffelexToken ft, ffebld expr, ffelexToken t); static ffelexHandler ffestb_decl_typeparams_3_ (ffelexToken ft, ffebld expr, ffelexToken t); -#if FFESTR_F90 -static ffelexHandler ffestb_decl_typetype1_ (ffelexToken t); -static ffelexHandler ffestb_decl_typetype2_ (ffelexToken t); -#endif static ffelexHandler ffestb_subr_label_list_ (ffelexToken t); static ffelexHandler ffestb_subr_label_list_1_ (ffelexToken t); static ffelexHandler ffestb_do1_ (ffelexToken t); @@ -529,26 +469,8 @@ static ffelexHandler ffestb_let1_ (ffelexToken ft, ffebld expr, ffelexToken t); static ffelexHandler ffestb_let2_ (ffelexToken ft, ffebld expr, ffelexToken t); -#if FFESTR_F90 -static ffelexHandler ffestb_type1_ (ffelexToken t); -static ffelexHandler ffestb_type2_ (ffelexToken t); -static ffelexHandler ffestb_type3_ (ffelexToken t); -static ffelexHandler ffestb_type4_ (ffelexToken t); -#endif -#if FFESTR_F90 -static ffelexHandler ffestb_varlist1_ (ffelexToken t); -static ffelexHandler ffestb_varlist2_ (ffelexToken t); -static ffelexHandler ffestb_varlist3_ (ffelexToken t); -static ffelexHandler ffestb_varlist4_ (ffelexToken t); -#endif static ffelexHandler ffestb_varlist5_ (ffelexToken t); static ffelexHandler ffestb_varlist6_ (ffelexToken t); -#if FFESTR_F90 -static ffelexHandler ffestb_where1_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_where2_ (ffelexToken t); -static ffelexHandler ffestb_where3_ (ffelexToken t); -#endif static ffelexHandler ffestb_R5221_ (ffelexToken t); static ffelexHandler ffestb_R5222_ (ffelexToken t); static ffelexHandler ffestb_R5223_ (ffelexToken t); @@ -599,20 +521,6 @@ static ffelexHandler ffestb_R12271_ (ffelexToken ft, ffebld expr, ffelexToken t); static ffelexHandler ffestb_construct1_ (ffelexToken t); static ffelexHandler ffestb_construct2_ (ffelexToken t); -#if FFESTR_F90 -static ffelexHandler ffestb_heap1_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_heap2_ (ffelexToken t); -static ffelexHandler ffestb_heap3_ (ffelexToken t); -static ffelexHandler ffestb_heap4_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_heap5_ (ffelexToken t); -#endif -#if FFESTR_F90 -static ffelexHandler ffestb_module1_ (ffelexToken t); -static ffelexHandler ffestb_module2_ (ffelexToken t); -static ffelexHandler ffestb_module3_ (ffelexToken t); -#endif static ffelexHandler ffestb_R8091_ (ffelexToken t); static ffelexHandler ffestb_R8092_ (ffelexToken ft, ffebld expr, ffelexToken t); @@ -645,48 +553,12 @@ static ffelexHandler ffestb_R100117_ (ffelexToken ft, ffebld expr, ffelexToken t); static ffelexHandler ffestb_R100118_ (ffelexToken ft, ffebld expr, ffelexToken t); -#if FFESTR_F90 -static ffelexHandler ffestb_R11071_ (ffelexToken t); -static ffelexHandler ffestb_R11072_ (ffelexToken t); -static ffelexHandler ffestb_R11073_ (ffelexToken t); -static ffelexHandler ffestb_R11074_ (ffelexToken t); -static ffelexHandler ffestb_R11075_ (ffelexToken t); -static ffelexHandler ffestb_R11076_ (ffelexToken t); -static ffelexHandler ffestb_R11077_ (ffelexToken t); -static ffelexHandler ffestb_R11078_ (ffelexToken t); -static ffelexHandler ffestb_R11079_ (ffelexToken t); -static ffelexHandler ffestb_R110710_ (ffelexToken t); -static ffelexHandler ffestb_R110711_ (ffelexToken t); -static ffelexHandler ffestb_R110712_ (ffelexToken t); -#endif -#if FFESTR_F90 -static ffelexHandler ffestb_R12021_ (ffelexToken t); -static ffelexHandler ffestb_R12022_ (ffelexToken t); -static ffelexHandler ffestb_R12023_ (ffelexToken t); -static ffelexHandler ffestb_R12024_ (ffelexToken t); -static ffelexHandler ffestb_R12025_ (ffelexToken t); -static ffelexHandler ffestb_R12026_ (ffelexToken t); -#endif static ffelexHandler ffestb_S3P41_ (ffelexToken ft, ffebld expr, ffelexToken t); static ffelexHandler ffestb_V0141_ (ffelexToken t); static ffelexHandler ffestb_V0142_ (ffelexToken t); static ffelexHandler ffestb_V0143_ (ffelexToken t); static ffelexHandler ffestb_V0144_ (ffelexToken t); -#if FFESTR_VXT -static ffelexHandler ffestb_V0251_ (ffelexToken t); -static ffelexHandler ffestb_V0252_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_V0253_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_V0254_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_V0255_ (ffelexToken t); -static ffelexHandler ffestb_V0256_ (ffelexToken t); -static ffelexHandler ffestb_V0257_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_V0258_ (ffelexToken t); -#endif #if FFESTB_KILL_EASY_ static void ffestb_subr_kill_easy_ (ffestpInquireIx max); #else @@ -717,23 +589,6 @@ static ffelexHandler ffestb_beru7_ (ffelexToken ft, ffebld expr, static ffelexHandler ffestb_beru8_ (ffelexToken t); static ffelexHandler ffestb_beru9_ (ffelexToken t); static ffelexHandler ffestb_beru10_ (ffelexToken t); -#if FFESTR_VXT -static ffelexHandler ffestb_vxtcode1_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_vxtcode2_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_vxtcode3_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_vxtcode4_ (ffelexToken t); -static ffelexHandler ffestb_vxtcode5_ (ffelexToken t); -static ffelexHandler ffestb_vxtcode6_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_vxtcode7_ (ffelexToken t); -static ffelexHandler ffestb_vxtcode8_ (ffelexToken t); -static ffelexHandler ffestb_vxtcode9_ (ffelexToken t); -static ffelexHandler ffestb_vxtcode10_ (ffelexToken ft, ffebld expr, - ffelexToken t); -#endif static ffelexHandler ffestb_R9041_ (ffelexToken t); static ffelexHandler ffestb_R9042_ (ffelexToken t); static ffelexHandler ffestb_R9043_ (ffelexToken ft, ffebld expr, @@ -814,63 +669,10 @@ static ffelexHandler ffestb_R9239_ (ffelexToken t); static ffelexHandler ffestb_R92310_ (ffelexToken t); static ffelexHandler ffestb_R92311_ (ffelexToken ft, ffebld expr, ffelexToken t); -#if FFESTR_VXT -static ffelexHandler ffestb_V0181_ (ffelexToken t); -static ffelexHandler ffestb_V0182_ (ffelexToken t); -static ffelexHandler ffestb_V0183_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_V0184_ (ffelexToken t); -static ffelexHandler ffestb_V0185_ (ffelexToken t); -static ffelexHandler ffestb_V0186_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_V0187_ (ffelexToken t); -static ffelexHandler ffestb_V0188_ (ffelexToken t); -static ffelexHandler ffestb_V0189_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_V01810_ (ffelexToken t); -static ffelexHandler ffestb_V01811_ (ffelexToken t); -static ffelexHandler ffestb_V01812_ (ffelexToken t); -static ffelexHandler ffestb_V01813_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_V0191_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_V0192_ (ffelexToken ft, ffebld expr, - ffelexToken t); -#endif static ffelexHandler ffestb_V0201_ (ffelexToken ft, ffebld expr, ffelexToken t); static ffelexHandler ffestb_V0202_ (ffelexToken ft, ffebld expr, ffelexToken t); -#if FFESTR_VXT -static ffelexHandler ffestb_V0211_ (ffelexToken t); -static ffelexHandler ffestb_V0212_ (ffelexToken t); -static ffelexHandler ffestb_V0213_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_V0214_ (ffelexToken t); -static ffelexHandler ffestb_V0215_ (ffelexToken t); -static ffelexHandler ffestb_V0216_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_V0217_ (ffelexToken t); -static ffelexHandler ffestb_V0218_ (ffelexToken t); -static ffelexHandler ffestb_V0219_ (ffelexToken t); -static ffelexHandler ffestb_V0261_ (ffelexToken t); -static ffelexHandler ffestb_V0262_ (ffelexToken t); -static ffelexHandler ffestb_V0263_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_V0264_ (ffelexToken t); -static ffelexHandler ffestb_V0265_ (ffelexToken t); -static ffelexHandler ffestb_V0266_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_V0267_ (ffelexToken t); -static ffelexHandler ffestb_V0268_ (ffelexToken t); -static ffelexHandler ffestb_V0269_ (ffelexToken t); -#endif -#if FFESTR_F90 -static ffelexHandler ffestb_dimlist1_ (ffelexToken t); -static ffelexHandler ffestb_dimlist2_ (ffelexToken t); -static ffelexHandler ffestb_dimlist3_ (ffelexToken t); -static ffelexHandler ffestb_dimlist4_ (ffelexToken t); -#endif static ffelexHandler ffestb_dummy1_ (ffelexToken t); static ffelexHandler ffestb_dummy2_ (ffelexToken t); static ffelexHandler ffestb_R5241_ (ffelexToken t); @@ -884,30 +686,13 @@ static ffelexHandler ffestb_R5474_ (ffelexToken t); static ffelexHandler ffestb_R5475_ (ffelexToken t); static ffelexHandler ffestb_R5476_ (ffelexToken t); static ffelexHandler ffestb_R5477_ (ffelexToken t); -#if FFESTR_F90 -static ffelexHandler ffestb_R6241_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R6242_ (ffelexToken t); -#endif static ffelexHandler ffestb_R12291_ (ffelexToken t); static ffelexHandler ffestb_R12292_ (ffelexToken ft, ffebld expr, ffelexToken t); static ffelexHandler ffestb_decl_chartype1_ (ffelexToken t); -#if FFESTR_F90 -static ffelexHandler ffestb_decl_recursive1_ (ffelexToken t); -static ffelexHandler ffestb_decl_recursive2_ (ffelexToken t); -static ffelexHandler ffestb_decl_recursive3_ (ffelexToken t); -static ffelexHandler ffestb_decl_recursive4_ (ffelexToken t); -#endif static ffelexHandler ffestb_decl_attrs_ (ffelexToken t); static ffelexHandler ffestb_decl_attrs_1_ (ffelexToken t); static ffelexHandler ffestb_decl_attrs_2_ (ffelexToken t); -#if FFESTR_F90 -static ffelexHandler ffestb_decl_attrs_3_ (ffelexToken t); -static ffelexHandler ffestb_decl_attrs_4_ (ffelexToken t); -static ffelexHandler ffestb_decl_attrs_5_ (ffelexToken t); -static ffelexHandler ffestb_decl_attrs_6_ (ffelexToken t); -#endif static ffelexHandler ffestb_decl_attrs_7_ (ffelexToken t); static ffelexHandler ffestb_decl_attrsp_ (ffelexToken t); static ffelexHandler ffestb_decl_ents_ (ffelexToken t); @@ -936,9 +721,6 @@ static ffelexHandler ffestb_decl_entsp_5_ (ffelexToken t); static ffelexHandler ffestb_decl_entsp_6_ (ffelexToken t); static ffelexHandler ffestb_decl_entsp_7_ (ffelexToken t); static ffelexHandler ffestb_decl_entsp_8_ (ffelexToken t); -#if FFESTR_F90 -static ffelexHandler ffestb_decl_func_ (ffelexToken t); -#endif static ffelexHandler ffestb_decl_funcname_ (ffelexToken t); static ffelexHandler ffestb_decl_funcname_1_ (ffelexToken t); static ffelexHandler ffestb_decl_funcname_2_ (ffelexToken t); @@ -950,29 +732,12 @@ static ffelexHandler ffestb_decl_funcname_6_ (ffelexToken t); static ffelexHandler ffestb_decl_funcname_7_ (ffelexToken t); static ffelexHandler ffestb_decl_funcname_8_ (ffelexToken t); static ffelexHandler ffestb_decl_funcname_9_ (ffelexToken t); -#if FFESTR_VXT -static ffelexHandler ffestb_V0031_ (ffelexToken t); -static ffelexHandler ffestb_V0032_ (ffelexToken t); -static ffelexHandler ffestb_V0033_ (ffelexToken t); -static ffelexHandler ffestb_V0034_ (ffelexToken t); -static ffelexHandler ffestb_V0035_ (ffelexToken t); -static ffelexHandler ffestb_V0036_ (ffelexToken t); -static ffelexHandler ffestb_V0161_ (ffelexToken t); -static ffelexHandler ffestb_V0162_ (ffelexToken t); -static ffelexHandler ffestb_V0163_ (ffelexToken t); -static ffelexHandler ffestb_V0164_ (ffelexToken t); -static ffelexHandler ffestb_V0165_ (ffelexToken t); -static ffelexHandler ffestb_V0166_ (ffelexToken t); -#endif static ffelexHandler ffestb_V0271_ (ffelexToken t); static ffelexHandler ffestb_V0272_ (ffelexToken ft, ffebld expr, ffelexToken t); static ffelexHandler ffestb_V0273_ (ffelexToken t); static ffelexHandler ffestb_decl_R5391_ (ffelexToken t); static ffelexHandler ffestb_decl_R5392_ (ffelexToken t); -#if FFESTR_F90 -static ffelexHandler ffestb_decl_R5393_ (ffelexToken t); -#endif static ffelexHandler ffestb_decl_R5394_ (ffelexToken t); static ffelexHandler ffestb_decl_R5395_ (ffelexToken t); static ffelexHandler ffestb_decl_R539letters_ (ffelexToken t); @@ -1050,7 +815,7 @@ ffestb_subr_ambig_nope_ (ffelexToken t) in _ents_ (perform housekeeping tasks). */ static void -ffestb_subr_ambig_to_ents_ () +ffestb_subr_ambig_to_ents_ (void) { ffelexToken nt; @@ -1737,67 +1502,6 @@ ffestb_decl_typeparams_3_ (ffelexToken ft, ffebld expr, ffelexToken t) return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); } -/* ffestb_decl_typetype1_ -- "TYPE" OPEN_PAREN - - return ffestb_decl_typetype1_; // to lexer - - Handle NAME. */ - -#if FFESTR_F90 -static ffelexHandler -ffestb_decl_typetype1_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffestb_local_.decl.kindt = ffelex_token_use (t); - return (ffelexHandler) ffestb_decl_typetype2_; - - default: - break; - } - - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, - ffestb_local_.decl.badname, - t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_typetype2_ -- "TYPE" OPEN_PAREN NAME - - return ffestb_decl_typetype2_; // to lexer - - Handle CLOSE_PAREN. */ - -static ffelexHandler -ffestb_decl_typetype2_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_PAREN: - ffestb_local_.decl.type = FFESTP_typeTYPE; - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.len = NULL; - ffestb_local_.decl.lent = NULL; - ffelex_set_names (TRUE); - return (ffelexHandler) ffestb_local_.decl.handler; - - default: - break; - } - - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - ffelex_token_kill (ffestb_local_.decl.kindt); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, - ffestb_local_.decl.badname, - t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -#endif /* ffestb_subr_label_list_ -- Collect a tokenlist of labels and close-paren return ffestb_subr_label_list_; // to lexer after seeing OPEN_PAREN @@ -2664,11 +2368,6 @@ ffestb_elsexyz (ffelexToken t) p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlELSE); ffesta_tokens[1] = ffelex_token_name_from_names (ffesta_tokens[0], i, 0); -#if FFESTR_F90 - if ((ffestb_args.elsexyz.second == FFESTR_secondWHERE) - && (ffelex_token_length (ffesta_tokens[1]) != FFESTR_secondlWHERE)) - ffestb_args.elsexyz.second = FFESTR_secondNone; -#endif return (ffelexHandler) ffestb_else1_ (t); default: @@ -2727,16 +2426,6 @@ ffestb_else1_ (ffelexToken t) switch (ffestb_args.elsexyz.second) { -#if FFESTR_F90 - case FFESTR_secondWHERE: - if (!ffesta_is_inhibited ()) - if ((ffesta_first_kw == FFESTR_firstELSEWHERE) - && (ffelex_token_type (ffesta_tokens[0]) == FFELEX_typeNAME)) - ffestc_R744 (); - else - ffestc_elsewhere (ffesta_tokens[1]); /* R744 or R805. */ - break; -#endif default: if (!ffesta_is_inhibited ()) @@ -2936,20 +2625,6 @@ ffestb_end (ffelexToken t) case FFESTR_secondBLOCK: return (ffelexHandler) ffestb_end1_; -#if FFESTR_F90 - case FFESTR_secondINTERFACE: -#endif -#if FFESTR_VXT - case FFESTR_secondMAP: - case FFESTR_secondSTRUCTURE: - case FFESTR_secondUNION: -#endif -#if FFESTR_F90 - case FFESTR_secondWHERE: - ffesta_tokens[1] = NULL; - return (ffelexHandler) ffestb_end3_; -#endif - case FFESTR_secondNone: goto bad_1; /* :::::::::::::::::::: */ @@ -3030,19 +2705,6 @@ ffestb_endxyz (ffelexToken t) ffesta_confirmed (); switch (ffestb_args.endxyz.second) { -#if FFESTR_F90 - case FFESTR_secondINTERFACE: -#endif -#if FFESTR_VXT - case FFESTR_secondMAP: - case FFESTR_secondSTRUCTURE: - case FFESTR_secondUNION: -#endif -#if FFESTR_F90 - case FFESTR_secondWHERE: - goto bad_1; /* :::::::::::::::::::: */ -#endif - case FFESTR_secondBLOCK: if (ffesta_second_kw != FFESTR_secondDATA) goto bad_1; /* :::::::::::::::::::: */ @@ -3086,24 +2748,6 @@ ffestb_endxyz (ffelexToken t) { p = ffelex_token_text (ffesta_tokens[0]) + (i = ffestb_args.endxyz.len); - switch (ffestb_args.endxyz.second) - { -#if FFESTR_F90 - case FFESTR_secondINTERFACE: -#endif -#if FFESTR_VXT - case FFESTR_secondMAP: - case FFESTR_secondSTRUCTURE: - case FFESTR_secondUNION: -#endif -#if FFESTR_F90 - case FFESTR_secondWHERE: - goto bad_i; /* :::::::::::::::::::: */ -#endif - - default: - break; - } if (!ffesrc_is_name_init (*p)) goto bad_i; /* :::::::::::::::::::: */ ffesta_tokens[1] @@ -3211,20 +2855,6 @@ ffestb_end3_ (ffelexToken t) switch (ffestb_args.endxyz.second) { -#if FFESTR_F90 - case FFESTR_secondTYPE: - if (!ffesta_is_inhibited ()) - ffestc_R425 (ffesta_tokens[1]); - break; -#endif - -#if FFESTR_F90 - case FFESTR_secondWHERE: - if (!ffesta_is_inhibited ()) - ffestc_R745 (); - break; -#endif - case FFESTR_secondIF: if (!ffesta_is_inhibited ()) ffestc_R806 (ffesta_tokens[1]); @@ -3245,25 +2875,12 @@ ffestb_end3_ (ffelexToken t) ffestc_R1103 (ffesta_tokens[1]); break; -#if FFESTR_F90 - case FFESTR_secondMODULE: - if (!ffesta_is_inhibited ()) - ffestc_R1106 (ffesta_tokens[1]); - break; -#endif case FFESTR_secondBLOCK: case FFESTR_secondBLOCKDATA: if (!ffesta_is_inhibited ()) ffestc_R1112 (ffesta_tokens[1]); break; -#if FFESTR_F90 - case FFESTR_secondINTERFACE: - if (!ffesta_is_inhibited ()) - ffestc_R1203 (); - break; -#endif - case FFESTR_secondFUNCTION: if (!ffesta_is_inhibited ()) ffestc_R1221 (ffesta_tokens[1]); @@ -3274,27 +2891,6 @@ ffestb_end3_ (ffelexToken t) ffestc_R1225 (ffesta_tokens[1]); break; -#if FFESTR_VXT - case FFESTR_secondSTRUCTURE: - if (!ffesta_is_inhibited ()) - ffestc_V004 (); - break; -#endif - -#if FFESTR_VXT - case FFESTR_secondUNION: - if (!ffesta_is_inhibited ()) - ffestc_V010 (); - break; -#endif - -#if FFESTR_VXT - case FFESTR_secondMAP: - if (!ffesta_is_inhibited ()) - ffestc_V013 (); - break; -#endif - default: ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "END", ffesta_tokens[0]); if (ffesta_tokens[1] != NULL) @@ -3990,155 +3586,6 @@ ffestb_if3_ (ffelexToken t) return (ffelexHandler) next; } -/* ffestb_where -- Parse a WHERE statement - - return ffestb_where; // to lexer - - Make sure the statement has a valid form for a WHERE statement. - If it does, implement the statement. */ - -#if FFESTR_F90 -ffelexHandler -ffestb_where (ffelexToken t) -{ - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstWHERE) - goto bad_0; /* :::::::::::::::::::: */ - break; - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstWHERE) - goto bad_0; /* :::::::::::::::::::: */ - if (ffelex_token_length (ffesta_tokens[0]) != FFESTR_firstlWHERE) - goto bad_0; /* :::::::::::::::::::: */ - break; - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - break; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, FFEEXPR_contextWHERE, - (ffeexprCallback) ffestb_where1_); - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "WHERE", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "WHERE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ -} - -#endif -/* ffestb_where1_ -- "WHERE" OPEN_PAREN expr - - (ffestb_where1_) // to expression handler - - Make sure the next token is CLOSE_PAREN. */ - -#if FFESTR_F90 -static ffelexHandler -ffestb_where1_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - ffestb_local_.if_stmt.expr = expr; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - break; - ffesta_tokens[1] = ffelex_token_use (ft); - ffelex_set_names (TRUE); - return (ffelexHandler) ffestb_where2_; - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "WHERE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -#endif -/* ffestb_where2_ -- "WHERE" OPEN_PAREN expr CLOSE_PAREN - - return ffestb_where2_; // to lexer - - Make sure the next token is NAME. */ - -#if FFESTR_F90 -static ffelexHandler -ffestb_where2_ (ffelexToken t) -{ - ffelex_set_names (FALSE); - - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - case FFELEX_typeNAMES: - ffesta_confirmed (); - ffesta_tokens[2] = ffelex_token_use (t); - return (ffelexHandler) ffestb_where3_; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R742 (ffestb_local_.if_stmt.expr, ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "WHERE", t); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -#endif -/* ffestb_where3_ -- "WHERE" OPEN_PAREN expr CLOSE_PAREN NAME - - return ffestb_where3_; // to lexer - - Implement R742. */ - -#if FFESTR_F90 -static ffelexHandler -ffestb_where3_ (ffelexToken t) -{ - ffelexHandler next; - ffelexToken my_2 = ffesta_tokens[2]; - - if (!ffesta_is_inhibited ()) - ffestc_R740 (ffestb_local_.if_stmt.expr, ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[1]); - next = (ffelexHandler) ffesta_two (my_2, t); - ffelex_token_kill (my_2); - return (ffelexHandler) next; -} - -#endif /* ffestb_let -- Parse an assignment statement return ffestb_let; // to lexer @@ -4220,9 +3667,6 @@ ffestb_let1_ (ffelexToken ft UNUSED, ffebld expr, ffelexToken t) switch (ffelex_token_type (t)) { -#if FFESTR_F90 - case FFELEX_typePOINTS: -#endif case FFELEX_typeEQUALS: if (expr == NULL) break; @@ -4257,14 +3701,7 @@ ffestb_let2_ (ffelexToken ft, ffebld expr, ffelexToken t) break; ffesta_confirmed (); if (!ffesta_is_inhibited ()) -#if FFESTR_F90 - if (ffelex_token_type (ffesta_tokens[1]) == FFELEX_typeEQUALS) -#endif - ffestc_let (ffestb_local_.let.dest, expr, ft); -#if FFESTR_F90 - else - ffestc_R738 (ffestb_local_.let.dest, expr, ft); -#endif + ffestc_let (ffestb_local_.let.dest, expr, ft); ffelex_token_kill (ffesta_tokens[1]); return (ffelexHandler) ffesta_zero (t); @@ -4280,251 +3717,6 @@ ffestb_let2_ (ffelexToken ft, ffebld expr, ffelexToken t) return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); } -/* ffestb_type -- Parse the TYPE statement - - return ffestb_type; // to lexer - - Make sure the statement has a valid form for the TYPE statement. If - it does, implement the statement. */ - -#if FFESTR_F90 -ffelexHandler -ffestb_type (ffelexToken t) -{ - ffeTokenLength i; - const char *p; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstTYPE) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeCOMMA: - ffesta_confirmed (); - return (ffelexHandler) ffestb_type1_; - - case FFELEX_typeNAME: /* No confirm here, because ambig w/V020 VXT - TYPE. */ - ffesta_tokens[1] = NULL; - ffesta_tokens[2] = ffelex_token_use (t); - return (ffelexHandler) ffestb_type4_; - } - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstTYPE) - goto bad_0; /* :::::::::::::::::::: */ - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlTYPE); - switch (ffelex_token_type (t)) - { - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeCOMMA: - if (*p != '\0') - goto bad_i; /* :::::::::::::::::::: */ - ffesta_confirmed (); - ffelex_set_names (TRUE); - return (ffelexHandler) ffestb_type1_; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - break; - } - if (!ffesrc_is_name_init (*p)) - goto bad_i; /* :::::::::::::::::::: */ - ffesta_tokens[1] = NULL; - ffesta_tokens[2] - = ffelex_token_name_from_names (ffesta_tokens[0], i, 0); - return (ffelexHandler) ffestb_type4_ (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "TYPE", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "TYPE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "TYPE", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_type1_ -- "TYPE" COMMA - - return ffestb_type1_; // to lexer - - Make sure the next token is a NAME. */ - -static ffelexHandler -ffestb_type1_ (ffelexToken t) -{ - ffeTokenLength i; - const char *p; - - ffelex_set_names (FALSE); - - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - ffestb_local_.type.kw = ffestr_other (t); - switch (ffestb_local_.varlist.kw) - { - case FFESTR_otherPUBLIC: - case FFESTR_otherPRIVATE: - return (ffelexHandler) ffestb_type2_; - - default: - ffelex_token_kill (ffesta_tokens[1]); - break; - } - break; - - case FFELEX_typeNAMES: - ffesta_tokens[1] = ffelex_token_use (t); - ffestb_local_.type.kw = ffestr_other (t); - switch (ffestb_local_.varlist.kw) - { - case FFESTR_otherPUBLIC: - p = ffelex_token_text (t) + (i = FFESTR_otherlPUBLIC); - if (*p == '\0') - return (ffelexHandler) ffestb_type2_; - if (!ffesrc_is_name_init (*p)) - goto bad_i1; /* :::::::::::::::::::: */ - ffesta_tokens[2] = ffelex_token_name_from_names (t, i, 0); - return (ffelexHandler) ffestb_type4_; - - case FFESTR_otherPRIVATE: - p = ffelex_token_text (t) + (i = FFESTR_otherlPRIVATE); - if (*p == '\0') - return (ffelexHandler) ffestb_type2_; - if (!ffesrc_is_name_init (*p)) - goto bad_i1; /* :::::::::::::::::::: */ - ffesta_tokens[2] = ffelex_token_name_from_names (t, i, 0); - return (ffelexHandler) ffestb_type4_; - - default: - ffelex_token_kill (ffesta_tokens[1]); - break; - } - break; - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "TYPE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_i1: /* :::::::::::::::::::: */ - ffelex_token_kill (ffesta_tokens[1]); - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "TYPE", t, i, NULL); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_type2_ -- "TYPE" COMMA NAME - - return ffestb_type2_; // to lexer - - Handle COLONCOLON or NAME. */ - -static ffelexHandler -ffestb_type2_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOLONCOLON: - return (ffelexHandler) ffestb_type3_; - - case FFELEX_typeNAME: - return (ffelexHandler) ffestb_type3_ (t); - - default: - break; - } - - if (ffesta_tokens[1] != NULL) - ffelex_token_kill (ffesta_tokens[1]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "TYPE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_type3_ -- "TYPE" [COMMA NAME [COLONCOLON]] - - return ffestb_type3_; // to lexer - - Make sure the next token is a NAME. */ - -static ffelexHandler -ffestb_type3_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[2] = ffelex_token_use (t); - return (ffelexHandler) ffestb_type4_; - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "TYPE", t); - break; - } - - if (ffesta_tokens[1] != NULL) - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_type4_ -- "TYPE" [COMMA NAME [COLONCOLON]] NAME - - return ffestb_type4_; // to lexer - - Make sure the next token is an EOS or SEMICOLON. */ - -static ffelexHandler -ffestb_type4_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R424 (ffesta_tokens[1], ffestb_local_.type.kw, - ffesta_tokens[2]); - if (ffesta_tokens[1] != NULL) - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[2]); - return (ffelexHandler) ffesta_zero (t); - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "TYPE", t); - break; - } - - if (ffesta_tokens[1] != NULL) - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[2]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -#endif /* ffestb_varlist -- Parse EXTERNAL/INTENT/INTRINSIC/OPTIONAL/PUBLIC/PRIVATE statement @@ -4549,23 +3741,7 @@ ffestb_varlist (ffelexToken t) case FFELEX_typeEOS: case FFELEX_typeSEMICOLON: ffesta_confirmed (); - switch (ffesta_first_kw) - { -#if FFESTR_F90 - case FFESTR_firstPUBLIC: - if (!ffesta_is_inhibited ()) - ffestc_R521A (); - return (ffelexHandler) ffesta_zero (t); - - case FFESTR_firstPRIVATE: - if (!ffesta_is_inhibited ()) - ffestc_private (); /* Either R523A or R521B. */ - return (ffelexHandler) ffesta_zero (t); -#endif - - default: - goto bad_1; /* :::::::::::::::::::: */ - } + goto bad_1; /* :::::::::::::::::::: */ case FFELEX_typeCOMMA: ffesta_confirmed (); /* Error, but clearly intended. */ @@ -4573,45 +3749,14 @@ ffestb_varlist (ffelexToken t) case FFELEX_typeCOLONCOLON: ffesta_confirmed (); - switch (ffesta_first_kw) - { -#if FFESTR_F90 - case FFESTR_firstOPTIONAL: - if (!ffesta_is_inhibited ()) - ffestc_R520_start (); - break; - - case FFESTR_firstPUBLIC: - if (!ffesta_is_inhibited ()) - ffestc_R521Astart (); - break; - - case FFESTR_firstPRIVATE: - if (!ffesta_is_inhibited ()) - ffestc_R521Bstart (); - break; -#endif - - default: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - } - return (ffelexHandler) ffestb_varlist5_; + ffesta_confirmed (); /* Error, but clearly intended. */ + goto bad_1; /* :::::::::::::::::::: */ default: goto bad_1; /* :::::::::::::::::::: */ case FFELEX_typeOPEN_PAREN: - switch (ffesta_first_kw) - { -#if FFESTR_F90 - case FFESTR_firstINTENT: - return (ffelexHandler) ffestb_varlist1_; -#endif - - default: - goto bad_1; /* :::::::::::::::::::: */ - } + goto bad_1; /* :::::::::::::::::::: */ case FFELEX_typeNAME: ffesta_confirmed (); @@ -4622,35 +3767,11 @@ ffestb_varlist (ffelexToken t) ffestc_R1207_start (); break; -#if FFESTR_F90 - case FFESTR_firstINTENT: - goto bad_1; /* :::::::::::::::::::: */ -#endif - case FFESTR_firstINTRINSIC: if (!ffesta_is_inhibited ()) ffestc_R1208_start (); break; -#if FFESTR_F90 - case FFESTR_firstOPTIONAL: - if (!ffesta_is_inhibited ()) - ffestc_R520_start (); - break; -#endif - -#if FFESTR_F90 - case FFESTR_firstPUBLIC: - if (!ffesta_is_inhibited ()) - ffestc_R521Astart (); - break; - - case FFESTR_firstPRIVATE: - if (!ffesta_is_inhibited ()) - ffestc_R521Bstart (); - break; -#endif - default: break; } @@ -4664,93 +3785,23 @@ ffestb_varlist (ffelexToken t) case FFELEX_typeEOS: case FFELEX_typeSEMICOLON: ffesta_confirmed (); - switch (ffesta_first_kw) - { -#if FFESTR_F90 - case FFESTR_firstINTENT: - goto bad_1; /* :::::::::::::::::::: */ -#endif - - default: - break; - } if (*p != '\0') break; - switch (ffesta_first_kw) - { -#if FFESTR_F90 - case FFESTR_firstPUBLIC: - if (!ffesta_is_inhibited ()) - ffestc_R521A (); - return (ffelexHandler) ffesta_zero (t); - - case FFESTR_firstPRIVATE: - if (!ffesta_is_inhibited ()) - ffestc_private (); /* Either R423A or R521B. */ - return (ffelexHandler) ffesta_zero (t); -#endif - - default: - goto bad_1; /* :::::::::::::::::::: */ - } + goto bad_1; /* :::::::::::::::::::: */ case FFELEX_typeCOMMA: ffesta_confirmed (); /* Error, but clearly intended. */ - switch (ffesta_first_kw) - { -#if FFESTR_F90 - case FFESTR_firstINTENT: - goto bad_1; /* :::::::::::::::::::: */ -#endif - default: - break; - } if (*p != '\0') break; goto bad_1; /* :::::::::::::::::::: */ case FFELEX_typeCOLONCOLON: ffesta_confirmed (); - switch (ffesta_first_kw) - { -#if FFESTR_F90 - case FFESTR_firstOPTIONAL: - if (!ffesta_is_inhibited ()) - ffestc_R520_start (); - break; -#endif - -#if FFESTR_F90 - case FFESTR_firstPUBLIC: - if (!ffesta_is_inhibited ()) - ffestc_R521Astart (); - break; - - case FFESTR_firstPRIVATE: - if (!ffesta_is_inhibited ()) - ffestc_R521Bstart (); - break; -#endif - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - return (ffelexHandler) ffestb_varlist5_; + goto bad_1; /* :::::::::::::::::::: */ case FFELEX_typeOPEN_PAREN: - switch (ffesta_first_kw) - { -#if FFESTR_F90 - case FFESTR_firstINTENT: - if (*p != '\0') - goto bad_1; /* :::::::::::::::::::: */ - return (ffelexHandler) ffestb_varlist1_; -#endif - - default: - goto bad_1; /* :::::::::::::::::::: */ - } + goto bad_1; /* :::::::::::::::::::: */ case FFELEX_typeNAME: ffesta_confirmed (); @@ -4761,35 +3812,11 @@ ffestb_varlist (ffelexToken t) ffestc_R1207_start (); break; -#if FFESTR_F90 - case FFESTR_firstINTENT: - goto bad_1; /* :::::::::::::::::::: */ -#endif - case FFESTR_firstINTRINSIC: if (!ffesta_is_inhibited ()) ffestc_R1208_start (); break; -#if FFESTR_F90 - case FFESTR_firstOPTIONAL: - if (!ffesta_is_inhibited ()) - ffestc_R520_start (); - break; -#endif - -#if FFESTR_F90 - case FFESTR_firstPUBLIC: - if (!ffesta_is_inhibited ()) - ffestc_R521Astart (); - break; - - case FFESTR_firstPRIVATE: - if (!ffesta_is_inhibited ()) - ffestc_R521Bstart (); - break; -#endif - default: break; } @@ -4819,22 +3846,6 @@ ffestb_varlist (ffelexToken t) ffestc_R1208_start (); break; -#if FFESTR_F90 - case FFESTR_firstOPTIONAL: - ffestc_R520_start (); - break; -#endif - -#if FFESTR_F90 - case FFESTR_firstPUBLIC: - ffestc_R521Astart (); - break; - - case FFESTR_firstPRIVATE: - ffestc_R521Bstart (); - break; -#endif - default: assert (FALSE); } @@ -4861,139 +3872,6 @@ bad_i: /* :::::::::::::::::::: */ return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); } -/* ffestb_varlist1_ -- "INTENT" OPEN_PAREN - - return ffestb_varlist1_; // to lexer - - Handle NAME. */ - -#if FFESTR_F90 -static ffelexHandler -ffestb_varlist1_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - ffestb_local_.varlist.kw = ffestr_other (t); - switch (ffestb_local_.varlist.kw) - { - case FFESTR_otherIN: - return (ffelexHandler) ffestb_varlist2_; - - case FFESTR_otherINOUT: - return (ffelexHandler) ffestb_varlist3_; - - case FFESTR_otherOUT: - return (ffelexHandler) ffestb_varlist3_; - - default: - ffelex_token_kill (ffesta_tokens[1]); - break; - } - break; - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.varlist.badname, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_varlist2_ -- "INTENT" OPEN_PAREN "IN" - - return ffestb_varlist2_; // to lexer - - Handle NAME. */ - -static ffelexHandler -ffestb_varlist2_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - switch (ffestr_other (t)) - { - case FFESTR_otherOUT: - ffestb_local_.varlist.kw = FFESTR_otherINOUT; - return (ffelexHandler) ffestb_varlist3_; - - default: - break; - } - break; - - case FFELEX_typeCLOSE_PAREN: - return (ffelexHandler) ffestb_varlist4_; - - default: - break; - } - - ffelex_token_kill (ffesta_tokens[1]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.varlist.badname, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_varlist3_ -- "INTENT" OPEN_PAREN NAME ["OUT"] - - return ffestb_varlist3_; // to lexer - - Handle CLOSE_PAREN. */ - -static ffelexHandler -ffestb_varlist3_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_PAREN: - return (ffelexHandler) ffestb_varlist4_; - - default: - break; - } - - ffelex_token_kill (ffesta_tokens[1]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.varlist.badname, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_varlist4_ -- "INTENT" OPEN_PAREN NAME ["OUT"] CLOSE_PAREN - - return ffestb_varlist4_; // to lexer - - Handle COLONCOLON or NAME. */ - -static ffelexHandler -ffestb_varlist4_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R519_start (ffesta_tokens[1], ffestb_local_.varlist.kw); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffestb_varlist5_; - - case FFELEX_typeNAME: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R519_start (ffesta_tokens[1], ffestb_local_.varlist.kw); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffestb_varlist5_ (t); - - default: - break; - } - - ffelex_token_kill (ffesta_tokens[1]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.varlist.badname, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -#endif /* ffestb_varlist5_ -- Handles the list of variable names return ffestb_varlist5_; // to lexer @@ -5022,32 +3900,10 @@ ffestb_varlist5_ (ffelexToken t) ffestc_R1207_finish (); break; -#if FFESTR_F90 - case FFESTR_firstINTENT: - ffestc_R519_finish (); - break; -#endif - case FFESTR_firstINTRINSIC: ffestc_R1208_finish (); break; -#if FFESTR_F90 - case FFESTR_firstOPTIONAL: - ffestc_R520_finish (); - break; -#endif - -#if FFESTR_F90 - case FFESTR_firstPUBLIC: - ffestc_R521Afinish (); - break; - - case FFESTR_firstPRIVATE: - ffestc_R521Bfinish (); - break; -#endif - default: assert (FALSE); } @@ -5075,32 +3931,10 @@ ffestb_varlist6_ (ffelexToken t) ffestc_R1207_item (ffesta_tokens[1]); break; -#if FFESTR_F90 - case FFESTR_firstINTENT: - ffestc_R519_item (ffesta_tokens[1]); - break; -#endif - case FFESTR_firstINTRINSIC: ffestc_R1208_item (ffesta_tokens[1]); break; -#if FFESTR_F90 - case FFESTR_firstOPTIONAL: - ffestc_R520_item (ffesta_tokens[1]); - break; -#endif - -#if FFESTR_F90 - case FFESTR_firstPUBLIC: - ffestc_R521Aitem (ffesta_tokens[1]); - break; - - case FFESTR_firstPRIVATE: - ffestc_R521Bitem (ffesta_tokens[1]); - break; -#endif - default: assert (FALSE); } @@ -5119,37 +3953,11 @@ ffestb_varlist6_ (ffelexToken t) ffestc_R1207_finish (); break; -#if FFESTR_F90 - case FFESTR_firstINTENT: - ffestc_R519_item (ffesta_tokens[1]); - ffestc_R519_finish (); - break; -#endif - case FFESTR_firstINTRINSIC: ffestc_R1208_item (ffesta_tokens[1]); ffestc_R1208_finish (); break; -#if FFESTR_F90 - case FFESTR_firstOPTIONAL: - ffestc_R520_item (ffesta_tokens[1]); - ffestc_R520_finish (); - break; -#endif - -#if FFESTR_F90 - case FFESTR_firstPUBLIC: - ffestc_R521Aitem (ffesta_tokens[1]); - ffestc_R521Afinish (); - break; - - case FFESTR_firstPRIVATE: - ffestc_R521Bitem (ffesta_tokens[1]); - ffestc_R521Bfinish (); - break; -#endif - default: assert (FALSE); } @@ -5170,32 +3978,10 @@ ffestb_varlist6_ (ffelexToken t) ffestc_R1207_finish (); break; -#if FFESTR_F90 - case FFESTR_firstINTENT: - ffestc_R519_finish (); - break; -#endif - case FFESTR_firstINTRINSIC: ffestc_R1208_finish (); break; -#if FFESTR_F90 - case FFESTR_firstOPTIONAL: - ffestc_R520_finish (); - break; -#endif - -#if FFESTR_F90 - case FFESTR_firstPUBLIC: - ffestc_R521Afinish (); - break; - - case FFESTR_firstPRIVATE: - ffestc_R521Bfinish (); - break; -#endif - default: assert (FALSE); } @@ -5204,75 +3990,6 @@ ffestb_varlist6_ (ffelexToken t) return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); } -/* ffestb_R423B -- Parse the SEQUENCE statement - - return ffestb_R423B; // to lexer - - Make sure the statement has a valid form for the SEQUENCE statement. If - it does, implement the statement. */ - -#if FFESTR_F90 -ffelexHandler -ffestb_R423B (ffelexToken t) -{ - const char *p; - ffeTokenLength i; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstSEQUENCE) - goto bad_0; /* :::::::::::::::::::: */ - break; - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstSEQUENCE) - goto bad_0; /* :::::::::::::::::::: */ - if (ffelex_token_length (ffesta_tokens[0]) != FFESTR_firstlSEQUENCE) - { - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlSEQUENCE); - goto bad_i; /* :::::::::::::::::::: */ - } - break; - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R423B (); - return (ffelexHandler) ffesta_zero (t); - - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "SEQUENCE", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid first token. */ - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "SEQUENCE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "SEQUENCE", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -#endif /* ffestb_R522 -- Parse the SAVE statement return ffestb_R522; // to lexer @@ -7669,144 +6386,6 @@ ffestb_R12271_ (ffelexToken ft, ffebld expr, ffelexToken t) return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); } -/* ffestb_R1228 -- Parse the CONTAINS statement - - return ffestb_R1228; // to lexer - - Make sure the statement has a valid form for the CONTAINS statement. If - it does, implement the statement. */ - -#if FFESTR_F90 -ffelexHandler -ffestb_R1228 (ffelexToken t) -{ - const char *p; - ffeTokenLength i; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstCONTAINS) - goto bad_0; /* :::::::::::::::::::: */ - break; - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstCONTAINS) - goto bad_0; /* :::::::::::::::::::: */ - if (ffelex_token_length (ffesta_tokens[0]) != FFESTR_firstlCONTAINS) - { - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlCONTAINS); - goto bad_i; /* :::::::::::::::::::: */ - } - break; - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R1228 (); - return (ffelexHandler) ffesta_zero (t); - - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "CONTAINS", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid first token. */ - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "CONTAINS", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "CONTAINS", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -#endif -/* ffestb_V009 -- Parse the UNION statement - - return ffestb_V009; // to lexer - - Make sure the statement has a valid form for the UNION statement. If - it does, implement the statement. */ - -#if FFESTR_VXT -ffelexHandler -ffestb_V009 (ffelexToken t) -{ - const char *p; - ffeTokenLength i; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstUNION) - goto bad_0; /* :::::::::::::::::::: */ - break; - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstUNION) - goto bad_0; /* :::::::::::::::::::: */ - if (ffelex_token_length (ffesta_tokens[0]) != FFESTR_firstlUNION) - { - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlUNION); - goto bad_i; /* :::::::::::::::::::: */ - } - break; - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_V009 (); - return (ffelexHandler) ffesta_zero (t); - - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "UNION", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid first token. */ - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "UNION", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "UNION", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -#endif /* ffestb_construct -- Parse a construct name return ffestb_construct; // to lexer @@ -7924,505 +6503,6 @@ ffestb_construct2_ (ffelexToken t) return (ffelexHandler) (*ffestb_local_.construct.next) (t); } -/* ffestb_heap -- Parse an ALLOCATE/DEALLOCATE statement - - return ffestb_heap; // to lexer - - Make sure the statement has a valid form for an ALLOCATE/DEALLOCATE - statement. If it does, implement the statement. */ - -#if FFESTR_F90 -ffelexHandler -ffestb_heap (ffelexToken t) -{ - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - break; - - case FFELEX_typeNAMES: - if (ffelex_token_length (ffesta_tokens[0]) != ffestb_args.heap.len) - goto bad_0; /* :::::::::::::::::::: */ - break; - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - break; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - - ffestb_local_.heap.exprs = ffestt_exprlist_create (); - return (ffelexHandler) ffeexpr_lhs (ffesta_output_pool, - ffestb_args.heap.ctx, - (ffeexprCallback) ffestb_heap1_); - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.heap.badname, ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.heap.badname, t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ -} - -/* ffestb_heap1_ -- "ALLOCATE/DEALLOCATE" OPEN_PAREN expr - - (ffestb_heap1_) // to expression handler - - Make sure the next token is COMMA. */ - -static ffelexHandler -ffestb_heap1_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - if (expr == NULL) - break; - ffestt_exprlist_append (ffestb_local_.heap.exprs, expr, - ffelex_token_use (t)); - return (ffelexHandler) ffestb_heap2_; - - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - break; - ffestt_exprlist_append (ffestb_local_.heap.exprs, expr, - ffelex_token_use (t)); - ffesta_tokens[1] = NULL; - ffestb_local_.heap.expr = NULL; - return (ffelexHandler) ffestb_heap5_; - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.heap.badname, t); - ffestt_exprlist_kill (ffestb_local_.heap.exprs); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_heap2_ -- "ALLOCATE/DEALLOCATE" OPEN_PAREN expr COMMA - - return ffestb_heap2_; // to lexer - - Make sure the next token is NAME. */ - -static ffelexHandler -ffestb_heap2_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_heap3_; - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.heap.badname, t); - ffestt_exprlist_kill (ffestb_local_.heap.exprs); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_heap3_ -- "ALLOCATE/DEALLOCATE" OPEN_PAREN expr COMMA NAME - - return ffestb_heap3_; // to lexer - - If token is EQUALS, make sure NAME was "STAT" and handle STAT variable; - else pass NAME and token to expression handler. */ - -static ffelexHandler -ffestb_heap3_ (ffelexToken t) -{ - ffelexHandler next; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEQUALS: - ffesta_confirmed (); - if (ffestr_other (ffesta_tokens[1]) != FFESTR_otherSTAT) - break; - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffeexpr_lhs (ffesta_output_pool, - FFEEXPR_contextHEAPSTAT, - (ffeexprCallback) ffestb_heap4_); - - default: - next = (ffelexHandler) - (*((ffelexHandler) ffeexpr_lhs (ffesta_output_pool, - ffestb_args.heap.ctx, - (ffeexprCallback) ffestb_heap1_))) - (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) (*next) (t); - } - - ffelex_token_kill (ffesta_tokens[1]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.heap.badname, t); - ffestt_exprlist_kill (ffestb_local_.heap.exprs); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_heap4_ -- "ALLOCATE/DEALLOCATE" OPEN_PAREN ... COMMA "STAT" EQUALS - expr - - (ffestb_heap4_) // to expression handler - - Make sure the next token is CLOSE_PAREN. */ - -static ffelexHandler -ffestb_heap4_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - break; - ffesta_tokens[1] = ffelex_token_use (ft); - ffestb_local_.heap.expr = expr; - return (ffelexHandler) ffestb_heap5_; - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.heap.badname, t); - ffestt_exprlist_kill (ffestb_local_.heap.exprs); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_heap5_ -- "ALLOCATE/DEALLOCATE" OPEN_PAREN ... CLOSE_PAREN - - return ffestb_heap5_; // to lexer - - Make sure the next token is EOS/SEMICOLON. */ - -static ffelexHandler -ffestb_heap5_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - if (ffesta_first_kw == FFESTR_firstALLOCATE) - ffestc_R620 (ffestb_local_.heap.exprs, ffestb_local_.heap.expr, - ffesta_tokens[1]); - else - ffestc_R625 (ffestb_local_.heap.exprs, ffestb_local_.heap.expr, - ffesta_tokens[1]); - ffestt_exprlist_kill (ffestb_local_.heap.exprs); - if (ffesta_tokens[1] != NULL) - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.heap.badname, t); - ffestt_exprlist_kill (ffestb_local_.heap.exprs); - if (ffesta_tokens[1] != NULL) - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -#endif -/* ffestb_module -- Parse the MODULEPROCEDURE statement - - return ffestb_module; // to lexer - - Make sure the statement has a valid form for the MODULEPROCEDURE statement. - If it does, implement the statement. - - 31-May-90 JCB 1.1 - Confirm NAME==MODULE followed by standard four invalid tokens, so we - get decent message if somebody forgets that MODULE requires a name. */ - -#if FFESTR_F90 -ffelexHandler -ffestb_module (ffelexToken t) -{ - ffeTokenLength i; - const char *p; - ffelexToken nt; - ffelexToken mt; /* Name in MODULE PROCEDUREname, i.e. - includes "PROCEDURE". */ - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstMODULE) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - break; - - case FFELEX_typeCOLONCOLON: - case FFELEX_typeCOMMA: - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - goto bad_1m; /* :::::::::::::::::::: */ - - default: - goto bad_1m; /* :::::::::::::::::::: */ - } - - ffesta_confirmed (); - if (ffesta_second_kw != FFESTR_secondPROCEDURE) - { - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_module3_; - } - ffestb_local_.moduleprocedure.started = FALSE; - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_module1_; - - case FFELEX_typeNAMES: - p = ffelex_token_text (ffesta_tokens[0]) - + (i = FFESTR_firstlMODULEPROCEDURE); - if ((ffesta_first_kw == FFESTR_firstMODULE) - || ((ffesta_first_kw == FFESTR_firstMODULEPROCEDURE) - && !ffesrc_is_name_init (*p))) - { /* Definitely not "MODULE PROCEDURE name". */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1m; /* :::::::::::::::::::: */ - - default: - goto bad_1m; /* :::::::::::::::::::: */ - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - break; - } - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlMODULE); - if (!ffesrc_is_name_init (*p)) - goto bad_im; /* :::::::::::::::::::: */ - nt = ffelex_token_name_from_names (ffesta_tokens[0], i, 0); - if (!ffesta_is_inhibited ()) - ffestc_R1105 (nt); - ffelex_token_kill (nt); - return (ffelexHandler) ffesta_zero (t); - } - - /* Here we know that we're indeed looking at a MODULEPROCEDURE - statement rather than MODULE and that the character following - MODULEPROCEDURE in the NAMES token is a valid first character for a - NAME. This means that unless the second token is COMMA, we have an - ambiguous statement that can be read either as MODULE PROCEDURE name - or MODULE PROCEDUREname, the former being an R1205, the latter an - R1105. */ - - if (ffesta_first_kw != FFESTR_firstMODULEPROCEDURE) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeCOMMA: /* Aha, clearly not MODULE PROCEDUREname. */ - ffesta_confirmed (); - ffestb_local_.moduleprocedure.started = FALSE; - ffesta_tokens[1] - = ffelex_token_name_from_names (ffesta_tokens[0], i, 0); - return (ffelexHandler) ffestb_module2_ (t); - - case FFELEX_typeEOS: /* MODULE PROCEDURE name or MODULE - PROCEDUREname. */ - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - break; - } - nt = ffelex_token_name_from_names (ffesta_tokens[0], i, 0); - mt = ffelex_token_name_from_names (ffesta_tokens[0], FFESTR_firstlMODULE, - 0); - if (!ffesta_is_inhibited ()) - ffestc_module (mt, nt); /* Implement ambiguous statement. */ - ffelex_token_kill (nt); - ffelex_token_kill (mt); - return (ffelexHandler) ffesta_zero (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "MODULE PROCEDURE", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "MODULE PROCEDURE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_1m: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "MODULE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_im: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "MODULE", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_module1_ -- "MODULEPROCEDURE" or "MODULE" "PROCEDURE" - - return ffestb_module1_; // to lexer - - Make sure the statement has a valid form for the MODULEPROCEDURE statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_module1_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - if (!ffestb_local_.moduleprocedure.started - && (ffelex_token_type (ffesta_tokens[0]) == FFELEX_typeNAME)) - { - ffesta_confirmed (); - ffelex_token_kill (ffesta_tokens[1]); - } - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_module2_; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (ffestb_local_.moduleprocedure.started) - break; /* Error if we've already seen NAME COMMA. */ - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R1105 (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffesta_zero (t); - - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - break; - - default: - break; - } - - if (ffestb_local_.moduleprocedure.started && !ffesta_is_inhibited ()) - ffestc_R1205_finish (); - else if (!ffestb_local_.moduleprocedure.started) - ffelex_token_kill (ffesta_tokens[1]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "MODULE PROCEDURE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_module2_ -- "MODULE/PROCEDURE" NAME - - return ffestb_module2_; // to lexer - - Make sure the statement has a valid form for the MODULEPROCEDURE statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_module2_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffestb_local_.moduleprocedure.started) - { - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R1205_start (); - } - if (!ffesta_is_inhibited ()) - { - ffestc_R1205_item (ffesta_tokens[1]); - ffestc_R1205_finish (); - } - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffesta_zero (t); - - case FFELEX_typeCOMMA: - if (!ffestb_local_.moduleprocedure.started) - { - ffestb_local_.moduleprocedure.started = TRUE; - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R1205_start (); - } - if (!ffesta_is_inhibited ()) - ffestc_R1205_item (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffestb_module1_; - - default: - break; - } - - if (ffestb_local_.moduleprocedure.started && !ffesta_is_inhibited ()) - ffestc_R1205_finish (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "MODULE PROCEDURE", t); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_module3_ -- "MODULE" NAME - - return ffestb_module3_; // to lexer - - Make sure the statement has a valid form for the MODULE statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_module3_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffesta_is_inhibited ()) - ffestc_R1105 (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "MODULE", t); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -#endif /* ffestb_R809 -- Parse the SELECTCASE statement return ffestb_R809; // to lexer @@ -10514,7 +8594,7 @@ ffestb_R100110_ (ffelexToken t) case FFESTP_formattypeX: err = FFEBAD_FORMAT_BAD_X_SPEC; - pre = required; + pre = ffe_is_pedantic() ? required : optional; post = disallowed; dot = disallowed; exp = disallowed; @@ -10978,987 +9058,6 @@ ffestb_R100118_ (ffelexToken ft UNUSED, ffebld expr, ffelexToken t) } } -/* ffestb_R1107 -- Parse the USE statement - - return ffestb_R1107; // to lexer - - Make sure the statement has a valid form for the USE statement. - If it does, implement the statement. */ - -#if FFESTR_F90 -ffelexHandler -ffestb_R1107 (ffelexToken t) -{ - ffeTokenLength i; - const char *p; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstUSE) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - break; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - ffesta_confirmed (); - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_R11071_; - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstUSE) - goto bad_0; /* :::::::::::::::::::: */ - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlUSE); - if (!ffesrc_is_name_init (*p)) - goto bad_i; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeCOMMA: - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - break; - } - ffesta_confirmed (); - ffesta_tokens[1] - = ffelex_token_name_from_names (ffesta_tokens[0], i, 0); - return (ffelexHandler) ffestb_R11071_ (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "USE", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "USE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "USE", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R11071_ -- "USE" NAME - - return ffestb_R11071_; // to lexer - - Make sure the statement has a valid form for the USE statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_R11071_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffesta_is_inhibited ()) - { - ffestc_R1107_start (ffesta_tokens[1], FALSE); - ffestc_R1107_finish (); - } - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffesta_zero (t); - - case FFELEX_typeCOMMA: - return (ffelexHandler) ffestb_R11072_; - - default: - break; - } - - ffelex_token_kill (ffesta_tokens[1]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "USE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R11072_ -- "USE" NAME COMMA - - return ffestb_R11072_; // to lexer - - Make sure the statement has a valid form for the USE statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_R11072_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[2] = ffelex_token_use (t); - return (ffelexHandler) ffestb_R11073_; - - default: - break; - } - - ffelex_token_kill (ffesta_tokens[1]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "USE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R11073_ -- "USE" NAME COMMA NAME - - return ffestb_R11073_; // to lexer - - Make sure the statement has a valid form for the USE statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_R11073_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOLON: - if (ffestr_other (ffesta_tokens[2]) != FFESTR_otherONLY) - break; - if (!ffesta_is_inhibited ()) - ffestc_R1107_start (ffesta_tokens[1], TRUE); - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[2]); - return (ffelexHandler) ffestb_R11074_; - - case FFELEX_typePOINTS: - if (!ffesta_is_inhibited ()) - ffestc_R1107_start (ffesta_tokens[1], FALSE); - ffelex_token_kill (ffesta_tokens[1]); - ffesta_tokens[1] = ffesta_tokens[2]; - return (ffelexHandler) ffestb_R110711_; - - default: - break; - } - - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[2]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "USE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R11074_ -- "USE" NAME COMMA "ONLY" COLON - - return ffestb_R11074_; // to lexer - - Make sure the statement has a valid form for the USE statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_R11074_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_R11075_; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffesta_is_inhibited ()) - ffestc_R1107_finish (); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "USE", t); - ffestc_R1107_finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R11075_ -- "USE" NAME COMMA "ONLY" COLON NAME - - return ffestb_R11075_; // to lexer - - Make sure the statement has a valid form for the USE statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_R11075_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffesta_is_inhibited ()) - { - ffestc_R1107_item (NULL, ffesta_tokens[1]); - ffestc_R1107_finish (); - } - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffesta_zero (t); - - case FFELEX_typeCOMMA: - if (!ffesta_is_inhibited ()) - ffestc_R1107_item (NULL, ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffestb_R11078_; - - case FFELEX_typePOINTS: - return (ffelexHandler) ffestb_R11076_; - - default: - break; - } - - ffelex_token_kill (ffesta_tokens[1]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "USE", t); - ffestc_R1107_finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R11076_ -- "USE" NAME COMMA "ONLY" COLON NAME POINTS - - return ffestb_R11076_; // to lexer - - Make sure the statement has a valid form for the USE statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_R11076_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - if (!ffesta_is_inhibited ()) - ffestc_R1107_item (ffesta_tokens[1], t); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffestb_R11077_; - - default: - break; - } - - ffelex_token_kill (ffesta_tokens[1]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "USE", t); - ffestc_R1107_finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R11077_ -- "USE" NAME COMMA "ONLY" COLON NAME POINTS NAME - - return ffestb_R11077_; // to lexer - - Make sure the statement has a valid form for the USE statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_R11077_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffesta_is_inhibited ()) - ffestc_R1107_finish (); - return (ffelexHandler) ffesta_zero (t); - - case FFELEX_typeCOMMA: - return (ffelexHandler) ffestb_R11078_; - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "USE", t); - ffestc_R1107_finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R11078_ -- "USE" NAME COMMA "ONLY" COLON NAME POINTS NAME COMMA - - return ffestb_R11078_; // to lexer - - Make sure the statement has a valid form for the USE statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_R11078_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_R11075_; - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "USE", t); - ffestc_R1107_finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R11079_ -- "USE" NAME COMMA - - return ffestb_R11079_; // to lexer - - Make sure the statement has a valid form for the USE statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_R11079_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_R110710_; - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "USE", t); - ffestc_R1107_finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R110710_ -- "USE" NAME COMMA NAME - - return ffestb_R110710_; // to lexer - - Make sure the statement has a valid form for the USE statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_R110710_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typePOINTS: - return (ffelexHandler) ffestb_R110711_; - - default: - break; - } - - ffelex_token_kill (ffesta_tokens[1]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "USE", t); - ffestc_R1107_finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R110711_ -- "USE" NAME COMMA NAME POINTS - - return ffestb_R110711_; // to lexer - - Make sure the statement has a valid form for the USE statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_R110711_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - if (!ffesta_is_inhibited ()) - ffestc_R1107_item (ffesta_tokens[1], t); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffestb_R110712_; - - default: - break; - } - - ffelex_token_kill (ffesta_tokens[1]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "USE", t); - ffestc_R1107_finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R110712_ -- "USE" NAME COMMA NAME POINTS NAME - - return ffestb_R110712_; // to lexer - - Make sure the statement has a valid form for the USE statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_R110712_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffesta_is_inhibited ()) - ffestc_R1107_finish (); - return (ffelexHandler) ffesta_zero (t); - - case FFELEX_typeCOMMA: - return (ffelexHandler) ffestb_R11079_; - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "USE", t); - ffestc_R1107_finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -#endif -/* ffestb_R1202 -- Parse the INTERFACE statement - - return ffestb_R1202; // to lexer - - Make sure the statement has a valid form for the INTERFACE statement. - If it does, implement the statement. - - 15-May-90 JCB 1.1 - Allow INTERFACE by itself; missed this - valid form when originally doing syntactic analysis code. */ - -#if FFESTR_F90 -ffelexHandler -ffestb_R1202 (ffelexToken t) -{ - ffeTokenLength i; - const char *p; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstINTERFACE) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - break; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R1202 (FFESTP_definedoperatorNone, NULL); - return (ffelexHandler) ffesta_zero (t); - - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - - ffesta_confirmed (); - switch (ffesta_second_kw) - { - case FFESTR_secondOPERATOR: - ffestb_local_.interface.operator = FFESTP_definedoperatorOPERATOR; - break; - - case FFESTR_secondASSIGNMENT: - ffestb_local_.interface.operator = FFESTP_definedoperatorASSIGNMENT; - break; - - default: - ffestb_local_.interface.operator = FFESTP_definedoperatorNone; - break; - } - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_R12021_; - - case FFELEX_typeNAMES: - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlINTERFACE); - switch (ffesta_first_kw) - { - case FFESTR_firstINTERFACEOPERATOR: - if (*(ffelex_token_text (ffesta_tokens[0]) - + FFESTR_firstlINTERFACEOPERATOR) == '\0') - ffestb_local_.interface.operator - = FFESTP_definedoperatorOPERATOR; - break; - - case FFESTR_firstINTERFACEASSGNMNT: - if (*(ffelex_token_text (ffesta_tokens[0]) - + FFESTR_firstlINTERFACEASSGNMNT) == '\0') - ffestb_local_.interface.operator - = FFESTP_definedoperatorASSIGNMENT; - break; - - case FFESTR_firstINTERFACE: - ffestb_local_.interface.operator = FFESTP_definedoperatorNone; - break; - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeOPEN_PAREN: - case FFELEX_typeOPEN_ARRAY: /* Sigh. */ - break; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (*p == '\0') - { - if (!ffesta_is_inhibited ()) - ffestc_R1202 (FFESTP_definedoperatorNone, NULL); - return (ffelexHandler) ffesta_zero (t); - } - break; - } - if (!ffesrc_is_name_init (*p)) - goto bad_i; /* :::::::::::::::::::: */ - ffesta_tokens[1] = ffelex_token_name_from_names (ffesta_tokens[0], i, 0); - return (ffelexHandler) ffestb_R12021_ (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "INTERFACE", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "INTERFACE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "INTERFACE", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R12021_ -- "INTERFACE" NAME - - return ffestb_R12021_; // to lexer - - Make sure the statement has a valid form for the INTERFACE statement. If - it does, implement the statement. */ - -static ffelexHandler -ffestb_R12021_ (ffelexToken t) -{ - ffestb_local_.interface.slash = TRUE; /* Slash follows open paren. */ - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffesta_is_inhibited ()) - ffestc_R1202 (FFESTP_definedoperatorNone, ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffesta_zero (t); - - case FFELEX_typeOPEN_PAREN: - ffestb_local_.interface.slash = FALSE; /* Slash doesn't follow. */ - /* Fall through. */ - case FFELEX_typeOPEN_ARRAY: - switch (ffestb_local_.interface.operator) - { - case FFESTP_definedoperatorNone: - break; - - case FFESTP_definedoperatorOPERATOR: - ffestb_local_.interface.assignment = FALSE; - return (ffelexHandler) ffestb_R12022_; - - case FFESTP_definedoperatorASSIGNMENT: - ffestb_local_.interface.assignment = TRUE; - return (ffelexHandler) ffestb_R12022_; - - default: - assert (FALSE); - } - break; - - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - break; - - default: - break; - } - - ffelex_token_kill (ffesta_tokens[1]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "INTERFACE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R12022_ -- "INTERFACE" "OPERATOR/ASSIGNMENT" OPEN_PAREN - - return ffestb_R12022_; // to lexer - - Make sure the statement has a valid form for the INTERFACE statement. If - it does, implement the statement. */ - -static ffelexHandler -ffestb_R12022_ (ffelexToken t) -{ - ffesta_tokens[2] = ffelex_token_use (t); - - switch (ffelex_token_type (t)) - { - case FFELEX_typePERIOD: - if (ffestb_local_.interface.slash) - break; - return (ffelexHandler) ffestb_R12023_; - - case FFELEX_typePOWER: - if (ffestb_local_.interface.slash) - break; - ffestb_local_.interface.operator = FFESTP_definedoperatorPOWER; - return (ffelexHandler) ffestb_R12025_; - - case FFELEX_typeASTERISK: - if (ffestb_local_.interface.slash) - break; - ffestb_local_.interface.operator = FFESTP_definedoperatorMULT; - return (ffelexHandler) ffestb_R12025_; - - case FFELEX_typePLUS: - if (ffestb_local_.interface.slash) - break; - ffestb_local_.interface.operator = FFESTP_definedoperatorADD; - return (ffelexHandler) ffestb_R12025_; - - case FFELEX_typeCONCAT: - if (ffestb_local_.interface.slash) - break; - ffestb_local_.interface.operator = FFESTP_definedoperatorCONCAT; - return (ffelexHandler) ffestb_R12025_; - - case FFELEX_typeSLASH: - if (ffestb_local_.interface.slash) - { - ffestb_local_.interface.operator = FFESTP_definedoperatorCONCAT; - return (ffelexHandler) ffestb_R12025_; - } - ffestb_local_.interface.operator = FFESTP_definedoperatorDIVIDE; - return (ffelexHandler) ffestb_R12025_; - - case FFELEX_typeMINUS: - if (ffestb_local_.interface.slash) - break; - ffestb_local_.interface.operator = FFESTP_definedoperatorSUBTRACT; - return (ffelexHandler) ffestb_R12025_; - - case FFELEX_typeREL_EQ: - if (ffestb_local_.interface.slash) - break; - ffestb_local_.interface.operator = FFESTP_definedoperatorEQ; - return (ffelexHandler) ffestb_R12025_; - - case FFELEX_typeREL_NE: - if (ffestb_local_.interface.slash) - break; - ffestb_local_.interface.operator = FFESTP_definedoperatorNE; - return (ffelexHandler) ffestb_R12025_; - - case FFELEX_typeOPEN_ANGLE: - if (ffestb_local_.interface.slash) - break; - ffestb_local_.interface.operator = FFESTP_definedoperatorLT; - return (ffelexHandler) ffestb_R12025_; - - case FFELEX_typeREL_LE: - if (ffestb_local_.interface.slash) - break; - ffestb_local_.interface.operator = FFESTP_definedoperatorLE; - return (ffelexHandler) ffestb_R12025_; - - case FFELEX_typeCLOSE_ANGLE: - if (ffestb_local_.interface.slash) - break; - ffestb_local_.interface.operator = FFESTP_definedoperatorGT; - return (ffelexHandler) ffestb_R12025_; - - case FFELEX_typeREL_GE: - if (ffestb_local_.interface.slash) - break; - ffestb_local_.interface.operator = FFESTP_definedoperatorGE; - return (ffelexHandler) ffestb_R12025_; - - case FFELEX_typeEQUALS: - if (ffestb_local_.interface.slash) - { - ffestb_local_.interface.operator = FFESTP_definedoperatorNE; - return (ffelexHandler) ffestb_R12025_; - } - ffestb_local_.interface.operator = FFESTP_definedoperatorASSIGNMENT; - return (ffelexHandler) ffestb_R12025_; - - case FFELEX_typeCLOSE_ARRAY: - if (!ffestb_local_.interface.slash) - { - ffestb_local_.interface.operator = FFESTP_definedoperatorDIVIDE; - return (ffelexHandler) ffestb_R12026_; - } - ffestb_local_.interface.operator = FFESTP_definedoperatorCONCAT; - return (ffelexHandler) ffestb_R12026_; - - case FFELEX_typeCLOSE_PAREN: - if (!ffestb_local_.interface.slash) - break; - ffestb_local_.interface.operator = FFESTP_definedoperatorDIVIDE; - return (ffelexHandler) ffestb_R12026_; - - default: - break; - } - - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[2]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "INTERFACE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R12023_ -- "INTERFACE" NAME OPEN_PAREN PERIOD - - return ffestb_R12023_; // to lexer - - Make sure the statement has a valid form for the INTERFACE statement. If - it does, implement the statement. */ - -static ffelexHandler -ffestb_R12023_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffelex_token_kill (ffesta_tokens[2]); - ffesta_tokens[2] = ffelex_token_use (t); - return (ffelexHandler) ffestb_R12024_; - - default: - break; - } - - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[2]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "INTERFACE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R12024_ -- "INTERFACE" NAME OPEN_PAREN PERIOD NAME - - return ffestb_R12024_; // to lexer - - Make sure the statement has a valid form for the INTERFACE statement. If - it does, implement the statement. */ - -static ffelexHandler -ffestb_R12024_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typePERIOD: - return (ffelexHandler) ffestb_R12025_; - - default: - break; - } - - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[2]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "INTERFACE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R12025_ -- "INTERFACE" NAME OPEN_PAREN operator - - return ffestb_R12025_; // to lexer - - Make sure the statement has a valid form for the INTERFACE statement. If - it does, implement the statement. */ - -static ffelexHandler -ffestb_R12025_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_PAREN: - return (ffelexHandler) ffestb_R12026_; - - default: - break; - } - - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[2]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "INTERFACE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R12026_ -- "INTERFACE" NAME OPEN_PAREN operator CLOSE_PAREN - - return ffestb_R12026_; // to lexer - - Make sure the statement has a valid form for the INTERFACE statement. If - it does, implement the statement. */ - -static ffelexHandler -ffestb_R12026_ (ffelexToken t) -{ - const char *p; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (ffestb_local_.interface.assignment - && (ffestb_local_.interface.operator - != FFESTP_definedoperatorASSIGNMENT)) - { - ffebad_start (FFEBAD_INTERFACE_ASSIGNMENT); - ffebad_here (0, ffelex_token_where_line (ffesta_tokens[1]), - ffelex_token_where_column (ffesta_tokens[1])); - ffebad_here (1, ffelex_token_where_line (ffesta_tokens[2]), - ffelex_token_where_column (ffesta_tokens[2])); - ffebad_finish (); - } - switch (ffelex_token_type (ffesta_tokens[2])) - { - case FFELEX_typeNAME: - switch (ffestr_other (ffesta_tokens[2])) - { - case FFESTR_otherNOT: - if (!ffesta_is_inhibited ()) - ffestc_R1202 (FFESTP_definedoperatorNOT, NULL); - break; - - case FFESTR_otherAND: - if (!ffesta_is_inhibited ()) - ffestc_R1202 (FFESTP_definedoperatorAND, NULL); - break; - - case FFESTR_otherOR: - if (!ffesta_is_inhibited ()) - ffestc_R1202 (FFESTP_definedoperatorOR, NULL); - break; - - case FFESTR_otherEQV: - if (!ffesta_is_inhibited ()) - ffestc_R1202 (FFESTP_definedoperatorEQV, NULL); - break; - - case FFESTR_otherNEQV: - if (!ffesta_is_inhibited ()) - ffestc_R1202 (FFESTP_definedoperatorNEQV, NULL); - break; - - case FFESTR_otherEQ: - if (!ffesta_is_inhibited ()) - ffestc_R1202 (FFESTP_definedoperatorEQ, NULL); - break; - - case FFESTR_otherNE: - if (!ffesta_is_inhibited ()) - ffestc_R1202 (FFESTP_definedoperatorNE, NULL); - break; - - case FFESTR_otherLT: - if (!ffesta_is_inhibited ()) - ffestc_R1202 (FFESTP_definedoperatorLT, NULL); - break; - - case FFESTR_otherLE: - if (!ffesta_is_inhibited ()) - ffestc_R1202 (FFESTP_definedoperatorLE, NULL); - break; - - case FFESTR_otherGT: - if (!ffesta_is_inhibited ()) - ffestc_R1202 (FFESTP_definedoperatorGT, NULL); - break; - - case FFESTR_otherGE: - if (!ffesta_is_inhibited ()) - ffestc_R1202 (FFESTP_definedoperatorGE, NULL); - break; - - default: - for (p = ffelex_token_text (ffesta_tokens[2]); *p != '\0'; ++p) - { - if (! ISALPHA (*p)) - { - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[2]); - ffesta_ffebad_1t (FFEBAD_INTERFACE_NONLETTER, - ffesta_tokens[2]); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); - } - } - if (!ffesta_is_inhibited ()) - ffestc_R1202 (FFESTP_definedoperatorOPERATOR, - ffesta_tokens[2]); - } - break; - - case FFELEX_typeEQUALS: - if (!ffestb_local_.interface.assignment - && (ffestb_local_.interface.operator - == FFESTP_definedoperatorASSIGNMENT)) - { - ffebad_start (FFEBAD_INTERFACE_OPERATOR); - ffebad_here (0, ffelex_token_where_line (ffesta_tokens[1]), - ffelex_token_where_column (ffesta_tokens[1])); - ffebad_here (1, ffelex_token_where_line (ffesta_tokens[2]), - ffelex_token_where_column (ffesta_tokens[2])); - ffebad_finish (); - } - if (!ffesta_is_inhibited ()) - ffestc_R1202 (ffestb_local_.interface.operator, NULL); - break; - - default: - if (!ffesta_is_inhibited ()) - ffestc_R1202 (ffestb_local_.interface.operator, NULL); - } - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[2]); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[2]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "INTERFACE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -#endif /* ffestb_S3P4 -- Parse the INCLUDE line return ffestb_S3P4; // to lexer @@ -12092,75 +9191,6 @@ ffestb_S3P41_ (ffelexToken ft, ffebld expr, ffelexToken t) return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); } -/* ffestb_V012 -- Parse the MAP statement - - return ffestb_V012; // to lexer - - Make sure the statement has a valid form for the MAP statement. If - it does, implement the statement. */ - -#if FFESTR_VXT -ffelexHandler -ffestb_V012 (ffelexToken t) -{ - const char *p; - ffeTokenLength i; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstMAP) - goto bad_0; /* :::::::::::::::::::: */ - break; - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstMAP) - goto bad_0; /* :::::::::::::::::::: */ - if (ffelex_token_length (ffesta_tokens[0]) != FFESTR_firstlMAP) - { - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlMAP); - goto bad_i; /* :::::::::::::::::::: */ - } - break; - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_V012 (); - return (ffelexHandler) ffesta_zero (t); - - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "MAP", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid first token. */ - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "MAP", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "MAP", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -#endif /* ffestb_V014 -- Parse the VOLATILE statement return ffestb_V014; // to lexer @@ -12394,344 +9424,6 @@ ffestb_V0144_ (ffelexToken t) return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); } -/* ffestb_V025 -- Parse the DEFINEFILE statement - - return ffestb_V025; // to lexer - - Make sure the statement has a valid form for the DEFINEFILE statement. - If it does, implement the statement. */ - -#if FFESTR_VXT -ffelexHandler -ffestb_V025 (ffelexToken t) -{ - ffeTokenLength i; - const char *p; - ffelexToken nt; - ffelexHandler next; - - ffestb_local_.V025.started = FALSE; - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - switch (ffesta_first_kw) - { - case FFESTR_firstDEFINE: - if ((ffelex_token_type (t) != FFELEX_typeNAME) - || (ffesta_second_kw != FFESTR_secondFILE)) - goto bad_1; /* :::::::::::::::::::: */ - ffesta_confirmed (); - return (ffelexHandler) ffestb_V0251_; - - case FFESTR_firstDEFINEFILE: - return (ffelexHandler) ffestb_V0251_ (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstDEFINEFILE) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeOPEN_PAREN: - break; - } - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlDEFINEFILE); - if (ISDIGIT (*p)) - nt = ffelex_token_number_from_names (ffesta_tokens[0], i); - else if (ffesrc_is_name_init (*p)) - nt = ffelex_token_name_from_names (ffesta_tokens[0], i, 0); - else - goto bad_i; /* :::::::::::::::::::: */ - next = (ffelexHandler) ffestb_V0251_ (nt); - ffelex_token_kill (nt); - return (ffelexHandler) (*next) (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DEFINE FILE", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DEFINE FILE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "DEFINE FILE", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0251_ -- "DEFINEFILE" or "DEFINE" "FILE" - - return ffestb_V0251_; // to lexer - - Make sure the statement has a valid form for the DEFINEFILE statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_V0251_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - case FFELEX_typeNUMBER: - if (ffelex_token_type (ffesta_tokens[0]) == FFELEX_typeNAME) - ffesta_confirmed (); - return (ffelexHandler) (*((ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILEUNIT_DF, (ffeexprCallback) ffestb_V0252_))) - (t); - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - break; - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DEFINE FILE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0252_ -- "DEFINEFILE" expr - - (ffestb_V0252_) // to expression handler - - Make sure the statement has a valid form for the DEFINEFILE statement. If - it does, implement the statement. */ - -static ffelexHandler -ffestb_V0252_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - ffestb_local_.V025.u = expr; - ffesta_tokens[1] = ffelex_token_use (ft); - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILENUM, (ffeexprCallback) ffestb_V0253_); - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DEFINE FILE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0253_ -- "DEFINEFILE" expr OPEN_PAREN expr - - (ffestb_V0253_) // to expression handler - - Make sure the statement has a valid form for the DEFINEFILE statement. If - it does, implement the statement. */ - -static ffelexHandler -ffestb_V0253_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - ffestb_local_.V025.m = expr; - ffesta_tokens[2] = ffelex_token_use (ft); - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILENUM, (ffeexprCallback) ffestb_V0254_); - - default: - break; - } - - ffelex_token_kill (ffesta_tokens[1]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DEFINE FILE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0254_ -- "DEFINEFILE" expr OPEN_PAREN expr COMMA expr - - (ffestb_V0254_) // to expression handler - - Make sure the statement has a valid form for the DEFINEFILE statement. If - it does, implement the statement. */ - -static ffelexHandler -ffestb_V0254_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - ffestb_local_.V025.n = expr; - ffesta_tokens[3] = ffelex_token_use (ft); - return (ffelexHandler) ffestb_V0255_; - - default: - break; - } - - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[2]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DEFINE FILE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0255_ -- "DEFINEFILE" expr OPEN_PAREN expr COMMA expr COMMA - - return ffestb_V0255_; // to lexer - - Make sure the statement has a valid form for the DEFINEFILE statement. If - it does, implement the statement. */ - -static ffelexHandler -ffestb_V0255_ (ffelexToken t) -{ - const char *p; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - p = ffelex_token_text (t); - if (!ffesrc_char_match_init (*p, 'U', 'u') || (*++p != '\0')) - break; - return (ffelexHandler) ffestb_V0256_; - - default: - break; - } - - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[2]); - ffelex_token_kill (ffesta_tokens[3]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DEFINE FILE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0256_ -- "DEFINEFILE" expr OPEN_PAREN expr COMMA expr COMMA "U" - - return ffestb_V0256_; // to lexer - - Make sure the statement has a valid form for the DEFINEFILE statement. If - it does, implement the statement. */ - -static ffelexHandler -ffestb_V0256_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - return (ffelexHandler) ffeexpr_lhs (ffesta_output_pool, - FFEEXPR_contextFILEASSOC, - (ffeexprCallback) ffestb_V0257_); - - default: - break; - } - - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[2]); - ffelex_token_kill (ffesta_tokens[3]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DEFINE FILE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0257_ -- "DEFINEFILE" expr OPEN_PAREN expr COMMA expr COMMA "U" - COMMA expr - - (ffestb_V0257_) // to expression handler - - Make sure the statement has a valid form for the DEFINEFILE statement. If - it does, implement the statement. */ - -static ffelexHandler -ffestb_V0257_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_PAREN: - ffestb_local_.V025.asv = expr; - ffesta_tokens[4] = ffelex_token_use (ft); - return (ffelexHandler) ffestb_V0258_; - - default: - break; - } - - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[2]); - ffelex_token_kill (ffesta_tokens[3]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DEFINE FILE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0258_ -- "DEFINEFILE" expr OPEN_PAREN expr COMMA expr COMMA "U" - COMMA expr CLOSE_PAREN - - return ffestb_V0258_; // to lexer - - Make sure the statement has a valid form for the DEFINEFILE statement. If - it does, implement the statement. */ - -static ffelexHandler -ffestb_V0258_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffestb_local_.V025.started) - { - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_V025_start (); - ffestb_local_.V025.started = TRUE; - } - if (!ffesta_is_inhibited ()) - ffestc_V025_item (ffestb_local_.V025.u, ffesta_tokens[1], - ffestb_local_.V025.m, ffesta_tokens[2], - ffestb_local_.V025.n, ffesta_tokens[3], - ffestb_local_.V025.asv, ffesta_tokens[4]); - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[2]); - ffelex_token_kill (ffesta_tokens[3]); - ffelex_token_kill (ffesta_tokens[4]); - if (ffelex_token_type (t) == FFELEX_typeCOMMA) - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILEUNIT_DF, (ffeexprCallback) ffestb_V0252_); - if (!ffesta_is_inhibited ()) - ffestc_V025_finish (); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[2]); - ffelex_token_kill (ffesta_tokens[3]); - ffelex_token_kill (ffesta_tokens[4]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DEFINE FILE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -#endif /* ffestb_subr_kill_easy_ -- Kill I/O statement data structure ffestb_subr_kill_easy_(); @@ -12768,7 +9460,7 @@ ffestb_subr_kill_easy_ (ffestpInquireIx max) #if !FFESTB_KILL_EASY_ static void -ffestb_subr_kill_accept_ () +ffestb_subr_kill_accept_ (void) { ffestpAcceptIx ix; @@ -12794,7 +9486,7 @@ ffestb_subr_kill_accept_ () #if !FFESTB_KILL_EASY_ static void -ffestb_subr_kill_beru_ () +ffestb_subr_kill_beru_ (void) { ffestpBeruIx ix; @@ -12819,7 +9511,7 @@ ffestb_subr_kill_beru_ () #if !FFESTB_KILL_EASY_ static void -ffestb_subr_kill_close_ () +ffestb_subr_kill_close_ (void) { ffestpCloseIx ix; @@ -12844,7 +9536,7 @@ ffestb_subr_kill_close_ () #if !FFESTB_KILL_EASY_ static void -ffestb_subr_kill_delete_ () +ffestb_subr_kill_delete_ (void) { ffestpDeleteIx ix; @@ -12869,7 +9561,7 @@ ffestb_subr_kill_delete_ () #if !FFESTB_KILL_EASY_ static void -ffestb_subr_kill_inquire_ () +ffestb_subr_kill_inquire_ (void) { ffestpInquireIx ix; @@ -12894,7 +9586,7 @@ ffestb_subr_kill_inquire_ () #if !FFESTB_KILL_EASY_ static void -ffestb_subr_kill_open_ () +ffestb_subr_kill_open_ (void) { ffestpOpenIx ix; @@ -12919,7 +9611,7 @@ ffestb_subr_kill_open_ () #if !FFESTB_KILL_EASY_ static void -ffestb_subr_kill_print_ () +ffestb_subr_kill_print_ (void) { ffestpPrintIx ix; @@ -12944,7 +9636,7 @@ ffestb_subr_kill_print_ () #if !FFESTB_KILL_EASY_ static void -ffestb_subr_kill_read_ () +ffestb_subr_kill_read_ (void) { ffestpReadIx ix; @@ -12969,7 +9661,7 @@ ffestb_subr_kill_read_ () #if !FFESTB_KILL_EASY_ static void -ffestb_subr_kill_rewrite_ () +ffestb_subr_kill_rewrite_ (void) { ffestpRewriteIx ix; @@ -12994,7 +9686,7 @@ ffestb_subr_kill_rewrite_ () #if !FFESTB_KILL_EASY_ static void -ffestb_subr_kill_type_ () +ffestb_subr_kill_type_ (void) { ffestpTypeIx ix; @@ -13019,7 +9711,7 @@ ffestb_subr_kill_type_ () #if !FFESTB_KILL_EASY_ static void -ffestb_subr_kill_write_ () +ffestb_subr_kill_write_ (void) { ffestpWriteIx ix; @@ -13187,12 +9879,6 @@ ffestb_beru1_ (ffelexToken ft, ffebld expr, ffelexToken t) ffestc_R921 (); break; -#if FFESTR_VXT - case FFESTR_firstUNLOCK: - ffestc_V022 (); - break; -#endif - default: assert (FALSE); } @@ -13549,12 +10235,6 @@ ffestb_beru10_ (ffelexToken t) ffestc_R921 (); break; -#if FFESTR_VXT - case FFESTR_firstUNLOCK: - ffestc_V022 (); - break; -#endif - default: assert (FALSE); } @@ -13571,504 +10251,6 @@ ffestb_beru10_ (ffelexToken t) return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); } -/* ffestb_vxtcode -- Parse the VXT DECODE/ENCODE statement - - return ffestb_vxtcode; // to lexer - - Make sure the statement has a valid form for the VXT DECODE/ENCODE - statement. If it does, implement the statement. */ - -#if FFESTR_VXT -ffelexHandler -ffestb_vxtcode (ffelexToken t) -{ - ffestpVxtcodeIx ix; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeNAME: - case FFELEX_typeNUMBER: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeOPEN_PAREN: - for (ix = 0; ix < FFESTP_vxtcodeix; ++ix) - ffestp_file.vxtcode.vxtcode_spec[ix].kw_or_val_present = FALSE; - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILENUM, (ffeexprCallback) ffestb_vxtcode1_); - } - - case FFELEX_typeNAMES: - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeOPEN_PAREN: - if (ffelex_token_length (ffesta_tokens[0]) - != ffestb_args.vxtcode.len) - goto bad_0; /* :::::::::::::::::::: */ - - for (ix = 0; ix < FFESTP_vxtcodeix; ++ix) - ffestp_file.vxtcode.vxtcode_spec[ix].kw_or_val_present = FALSE; - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILENUM, (ffeexprCallback) ffestb_vxtcode1_); - } - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.vxtcode.badname, ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.vxtcode.badname, t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ -} - -/* ffestb_vxtcode1_ -- "VXTCODE" OPEN_PAREN expr - - (ffestb_vxtcode1_) // to expression handler - - Handle COMMA here. */ - -static ffelexHandler -ffestb_vxtcode1_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - if (expr == NULL) - break; - ffestp_file.vxtcode.vxtcode_spec[FFESTP_vxtcodeixC].kw_or_val_present - = TRUE; - ffestp_file.vxtcode.vxtcode_spec[FFESTP_vxtcodeixC].kw_present = FALSE; - ffestp_file.vxtcode.vxtcode_spec[FFESTP_vxtcodeixC].value_present = TRUE; - ffestp_file.vxtcode.vxtcode_spec[FFESTP_vxtcodeixC].value_is_label - = FALSE; - ffestp_file.vxtcode.vxtcode_spec[FFESTP_vxtcodeixC].value - = ffelex_token_use (ft); - ffestp_file.vxtcode.vxtcode_spec[FFESTP_vxtcodeixC].u.expr = expr; - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILEFORMAT, (ffeexprCallback) ffestb_vxtcode2_); - - default: - break; - } - - ffestb_subr_kill_vxtcode_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.vxtcode.badname, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_vxtcode2_ -- "VXTCODE" OPEN_PAREN expr COMMA expr - - (ffestb_vxtcode2_) // to expression handler - - Handle COMMA here. */ - -static ffelexHandler -ffestb_vxtcode2_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - ffestp_file.vxtcode.vxtcode_spec[FFESTP_vxtcodeixF].kw_or_val_present - = TRUE; - ffestp_file.vxtcode.vxtcode_spec[FFESTP_vxtcodeixF].kw_present = FALSE; - ffestp_file.vxtcode.vxtcode_spec[FFESTP_vxtcodeixF].value_present = TRUE; - ffestp_file.vxtcode.vxtcode_spec[FFESTP_vxtcodeixF].value_is_label - = (expr == NULL); - ffestp_file.vxtcode.vxtcode_spec[FFESTP_vxtcodeixF].value - = ffelex_token_use (ft); - ffestp_file.vxtcode.vxtcode_spec[FFESTP_vxtcodeixF].u.expr = expr; - if (ffesta_first_kw == FFESTR_firstENCODE) - return (ffelexHandler) ffeexpr_lhs (ffesta_output_pool, - FFEEXPR_contextFILEVXTCODE, - (ffeexprCallback) ffestb_vxtcode3_); - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILEVXTCODE, - (ffeexprCallback) ffestb_vxtcode3_); - - default: - break; - } - - ffestb_subr_kill_vxtcode_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.vxtcode.badname, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_vxtcode3_ -- "VXTCODE" OPEN_PAREN expr COMMA expr COMMA expr - - (ffestb_vxtcode3_) // to expression handler - - Handle COMMA or CLOSE_PAREN here. */ - -static ffelexHandler -ffestb_vxtcode3_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - break; - ffestp_file.vxtcode.vxtcode_spec[FFESTP_vxtcodeixB].kw_or_val_present - = TRUE; - ffestp_file.vxtcode.vxtcode_spec[FFESTP_vxtcodeixB].kw_present = FALSE; - ffestp_file.vxtcode.vxtcode_spec[FFESTP_vxtcodeixB].value_present = TRUE; - ffestp_file.vxtcode.vxtcode_spec[FFESTP_vxtcodeixB].value_is_label - = FALSE; - ffestp_file.vxtcode.vxtcode_spec[FFESTP_vxtcodeixB].value - = ffelex_token_use (ft); - ffestp_file.vxtcode.vxtcode_spec[FFESTP_vxtcodeixB].u.expr = expr; - if (ffelex_token_type (t) == FFELEX_typeCOMMA) - return (ffelexHandler) ffestb_vxtcode4_; - return (ffelexHandler) ffestb_vxtcode9_; - - default: - break; - } - - ffestb_subr_kill_vxtcode_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.vxtcode.badname, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_vxtcode4_ -- "VXTCODE" OPEN_PAREN ... - - return ffestb_vxtcode4_; // to lexer - - Handle NAME=expr construct here. */ - -static ffelexHandler -ffestb_vxtcode4_ (ffelexToken t) -{ - ffestrGenio kw; - - ffestb_local_.vxtcode.label = FALSE; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - kw = ffestr_genio (t); - switch (kw) - { - case FFESTR_genioERR: - ffestb_local_.vxtcode.ix = FFESTP_vxtcodeixERR; - ffestb_local_.vxtcode.label = TRUE; - break; - - case FFESTR_genioIOSTAT: - ffestb_local_.vxtcode.ix = FFESTP_vxtcodeixIOSTAT; - ffestb_local_.vxtcode.left = TRUE; - ffestb_local_.vxtcode.context = FFEEXPR_contextFILEINT; - break; - - default: - goto bad; /* :::::::::::::::::::: */ - } - if (ffestp_file.vxtcode.vxtcode_spec[ffestb_local_.vxtcode.ix] - .kw_or_val_present) - break; /* Can't specify a keyword twice! */ - ffestp_file.vxtcode.vxtcode_spec[ffestb_local_.vxtcode.ix] - .kw_or_val_present = TRUE; - ffestp_file.vxtcode.vxtcode_spec[ffestb_local_.vxtcode.ix] - .kw_present = TRUE; - ffestp_file.vxtcode.vxtcode_spec[ffestb_local_.vxtcode.ix] - .value_present = FALSE; - ffestp_file.vxtcode.vxtcode_spec[ffestb_local_.vxtcode.ix].value_is_label - = ffestb_local_.vxtcode.label; - ffestp_file.vxtcode.vxtcode_spec[ffestb_local_.vxtcode.ix].kw - = ffelex_token_use (t); - return (ffelexHandler) ffestb_vxtcode5_; - - default: - break; - } - -bad: /* :::::::::::::::::::: */ - ffestb_subr_kill_vxtcode_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.vxtcode.badname, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_vxtcode5_ -- "VXTCODE" OPEN_PAREN [external-file-unit COMMA [format - COMMA]] NAME - - return ffestb_vxtcode5_; // to lexer - - Make sure EQUALS here, send next token to expression handler. */ - -static ffelexHandler -ffestb_vxtcode5_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEQUALS: - ffesta_confirmed (); - if (ffestb_local_.vxtcode.label) - return (ffelexHandler) ffestb_vxtcode7_; - if (ffestb_local_.vxtcode.left) - return (ffelexHandler) ffeexpr_lhs (ffesta_output_pool, - ffestb_local_.vxtcode.context, - (ffeexprCallback) ffestb_vxtcode6_); - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - ffestb_local_.vxtcode.context, - (ffeexprCallback) ffestb_vxtcode6_); - - default: - break; - } - - ffestb_subr_kill_vxtcode_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.vxtcode.badname, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_vxtcode6_ -- "VXTCODE" OPEN_PAREN ... NAME EQUALS expr - - (ffestb_vxtcode6_) // to expression handler - - Handle COMMA or CLOSE_PAREN here. */ - -static ffelexHandler -ffestb_vxtcode6_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - break; - ffestp_file.vxtcode.vxtcode_spec[ffestb_local_.vxtcode.ix].value_present - = TRUE; - ffestp_file.vxtcode.vxtcode_spec[ffestb_local_.vxtcode.ix].value - = ffelex_token_use (ft); - ffestp_file.vxtcode.vxtcode_spec[ffestb_local_.vxtcode.ix].u.expr = expr; - if (ffelex_token_type (t) == FFELEX_typeCOMMA) - return (ffelexHandler) ffestb_vxtcode4_; - return (ffelexHandler) ffestb_vxtcode9_; - - default: - break; - } - - ffestb_subr_kill_vxtcode_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.vxtcode.badname, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_vxtcode7_ -- "VXTCODE" OPEN_PAREN ... NAME EQUALS - - return ffestb_vxtcode7_; // to lexer - - Handle NUMBER for label here. */ - -static ffelexHandler -ffestb_vxtcode7_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNUMBER: - ffestp_file.vxtcode.vxtcode_spec[ffestb_local_.vxtcode.ix].value_present - = TRUE; - ffestp_file.vxtcode.vxtcode_spec[ffestb_local_.vxtcode.ix].value - = ffelex_token_use (t); - return (ffelexHandler) ffestb_vxtcode8_; - - default: - break; - } - - ffestb_subr_kill_vxtcode_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.vxtcode.badname, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_vxtcode8_ -- "VXTCODE" OPEN_PAREN ... NAME EQUALS NUMBER - - return ffestb_vxtcode8_; // to lexer - - Handle COMMA or CLOSE_PAREN here. */ - -static ffelexHandler -ffestb_vxtcode8_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - return (ffelexHandler) ffestb_vxtcode4_; - - case FFELEX_typeCLOSE_PAREN: - return (ffelexHandler) ffestb_vxtcode9_; - - default: - break; - } - - ffestb_subr_kill_vxtcode_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.vxtcode.badname, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_vxtcode9_ -- "VXTCODE" OPEN_PAREN ... CLOSE_PAREN - - return ffestb_vxtcode9_; // to lexer - - Handle EOS or SEMICOLON here. - - 07-Jun-90 JCB 1.1 - Context for ENCODE/DECODE expressions is now IOLISTDF instead of IOLIST - since they apply to internal files. */ - -static ffelexHandler -ffestb_vxtcode9_ (ffelexToken t) -{ - ffelexHandler next; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - { - if (ffesta_first_kw == FFESTR_firstENCODE) - { - ffestc_V023_start (); - ffestc_V023_finish (); - } - else - { - ffestc_V024_start (); - ffestc_V024_finish (); - } - } - ffestb_subr_kill_vxtcode_ (); - return (ffelexHandler) ffesta_zero (t); - - case FFELEX_typeNAME: - case FFELEX_typeOPEN_PAREN: - case FFELEX_typeCOMMA: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - if (ffesta_first_kw == FFESTR_firstENCODE) - ffestc_V023_start (); - else - ffestc_V024_start (); - ffestb_subr_kill_vxtcode_ (); - if (ffesta_first_kw == FFESTR_firstDECODE) - next = (ffelexHandler) ffeexpr_lhs (ffesta_output_pool, - FFEEXPR_contextIOLISTDF, - (ffeexprCallback) ffestb_vxtcode10_); - else - next = (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextIOLISTDF, - (ffeexprCallback) ffestb_vxtcode10_); - - /* EXTENSION: Allow an optional preceding COMMA here if not pedantic. - (f2c provides this extension, as do other compilers, supposedly.) */ - - if (!ffe_is_pedantic () && (ffelex_token_type (t) == FFELEX_typeCOMMA)) - return next; - - return (ffelexHandler) (*next) (t); - - default: - break; - } - - ffestb_subr_kill_vxtcode_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.vxtcode.badname, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_vxtcode10_ -- "VXTCODE(...)" expr - - (ffestb_vxtcode10_) // to expression handler - - Handle COMMA or EOS/SEMICOLON here. - - 07-Jun-90 JCB 1.1 - Context for ENCODE/DECODE expressions is now IOLISTDF instead of IOLIST - since they apply to internal files. */ - -static ffelexHandler -ffestb_vxtcode10_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - if (ffesta_first_kw == FFESTR_firstENCODE) - ffestc_V023_item (expr, ft); - else - ffestc_V024_item (expr, ft); - if (ffesta_first_kw == FFESTR_firstDECODE) - return (ffelexHandler) ffeexpr_lhs (ffesta_output_pool, - FFEEXPR_contextIOLISTDF, - (ffeexprCallback) ffestb_vxtcode10_); - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextIOLISTDF, - (ffeexprCallback) ffestb_vxtcode10_); - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - { - if (ffesta_first_kw == FFESTR_firstENCODE) - { - ffestc_V023_item (expr, ft); - ffestc_V023_finish (); - } - else - { - ffestc_V024_item (expr, ft); - ffestc_V024_finish (); - } - } - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - if (!ffesta_is_inhibited ()) - if (ffesta_first_kw == FFESTR_firstENCODE) - ffestc_V023_finish (); - else - ffestc_V024_finish (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.vxtcode.badname, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -#endif /* ffestb_R904 -- Parse an OPEN statement return ffestb_R904; // to lexer @@ -17183,728 +13365,6 @@ ffestb_R92311_ (ffelexToken ft, ffebld expr, ffelexToken t) return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); } -/* ffestb_V018 -- Parse the REWRITE statement - - return ffestb_V018; // to lexer - - Make sure the statement has a valid form for the REWRITE - statement. If it does, implement the statement. */ - -#if FFESTR_VXT -ffelexHandler -ffestb_V018 (ffelexToken t) -{ - ffestpRewriteIx ix; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstREWRITE) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeNAME: - case FFELEX_typeNUMBER: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeOPEN_PAREN: - for (ix = 0; ix < FFESTP_rewriteix; ++ix) - ffestp_file.rewrite.rewrite_spec[ix].kw_or_val_present = FALSE; - return (ffelexHandler) ffestb_V0181_; - } - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstREWRITE) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeOPEN_PAREN: - if (ffelex_token_length (ffesta_tokens[0]) != FFESTR_firstlREWRITE) - goto bad_0; /* :::::::::::::::::::: */ - - for (ix = 0; ix < FFESTP_rewriteix; ++ix) - ffestp_file.rewrite.rewrite_spec[ix].kw_or_val_present = FALSE; - return (ffelexHandler) ffestb_V0181_; - } - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "REWRITE", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "REWRITE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ -} - -/* ffestb_V0181_ -- "REWRITE" OPEN_PAREN - - return ffestb_V0181_; // to lexer - - Handle expr construct (not NAME=expr construct) here. */ - -static ffelexHandler -ffestb_V0181_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_V0182_; - - default: - return (ffelexHandler) (*((ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILENUM, (ffeexprCallback) ffestb_V0183_))) - (t); - } -} - -/* ffestb_V0182_ -- "REWRITE" OPEN_PAREN NAME - - return ffestb_V0182_; // to lexer - - If EQUALS here, go to states that handle it. Else, send NAME and this - token thru expression handler. */ - -static ffelexHandler -ffestb_V0182_ (ffelexToken t) -{ - ffelexHandler next; - ffelexToken nt; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEQUALS: - nt = ffesta_tokens[1]; - next = (ffelexHandler) ffestb_V0187_ (nt); - ffelex_token_kill (nt); - return (ffelexHandler) (*next) (t); - - default: - nt = ffesta_tokens[1]; - next = (ffelexHandler) (*((ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILENUM, (ffeexprCallback) ffestb_V0183_))) - (nt); - ffelex_token_kill (nt); - return (ffelexHandler) (*next) (t); - } -} - -/* ffestb_V0183_ -- "REWRITE" OPEN_PAREN expr [CLOSE_PAREN] - - (ffestb_V0183_) // to expression handler - - Handle COMMA or EOS/SEMICOLON here. */ - -static ffelexHandler -ffestb_V0183_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - break; - ffestp_file.rewrite.rewrite_spec[FFESTP_rewriteixUNIT].kw_or_val_present - = TRUE; - ffestp_file.rewrite.rewrite_spec[FFESTP_rewriteixUNIT].kw_present = FALSE; - ffestp_file.rewrite.rewrite_spec[FFESTP_rewriteixUNIT].value_present = TRUE; - ffestp_file.rewrite.rewrite_spec[FFESTP_rewriteixUNIT].value_is_label - = FALSE; - ffestp_file.rewrite.rewrite_spec[FFESTP_rewriteixUNIT].value - = ffelex_token_use (ft); - ffestp_file.rewrite.rewrite_spec[FFESTP_rewriteixUNIT].u.expr = expr; - if (ffelex_token_type (t) == FFELEX_typeCOMMA) - return (ffelexHandler) ffestb_V0184_; - return (ffelexHandler) ffestb_V01812_; - - default: - break; - } - - ffestb_subr_kill_rewrite_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "REWRITE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0184_ -- "REWRITE" OPEN_PAREN expr COMMA - - return ffestb_V0184_; // to lexer - - Handle expr construct (not NAME=expr construct) here. */ - -static ffelexHandler -ffestb_V0184_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_V0185_; - - default: - return (ffelexHandler) (*((ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILEFORMAT, (ffeexprCallback) ffestb_V0186_))) - (t); - } -} - -/* ffestb_V0185_ -- "REWRITE" OPEN_PAREN expr COMMA NAME - - return ffestb_V0185_; // to lexer - - If EQUALS here, go to states that handle it. Else, send NAME and this - token thru expression handler. */ - -static ffelexHandler -ffestb_V0185_ (ffelexToken t) -{ - ffelexHandler next; - ffelexToken nt; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEQUALS: - nt = ffesta_tokens[1]; - next = (ffelexHandler) ffestb_V0187_ (nt); - ffelex_token_kill (nt); - return (ffelexHandler) (*next) (t); - - default: - nt = ffesta_tokens[1]; - next = (ffelexHandler) (*((ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILEFORMAT, (ffeexprCallback) ffestb_V0186_))) - (nt); - ffelex_token_kill (nt); - return (ffelexHandler) (*next) (t); - } -} - -/* ffestb_V0186_ -- "REWRITE" OPEN_PAREN expr COMMA expr - - (ffestb_V0186_) // to expression handler - - Handle COMMA or CLOSE_PAREN here. */ - -static ffelexHandler -ffestb_V0186_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCLOSE_PAREN: - ffestp_file.rewrite.rewrite_spec[FFESTP_rewriteixFMT].kw_or_val_present - = TRUE; - ffestp_file.rewrite.rewrite_spec[FFESTP_rewriteixFMT].kw_present = FALSE; - ffestp_file.rewrite.rewrite_spec[FFESTP_rewriteixFMT].value_present = TRUE; - ffestp_file.rewrite.rewrite_spec[FFESTP_rewriteixFMT].value_is_label - = (expr == NULL); - ffestp_file.rewrite.rewrite_spec[FFESTP_rewriteixFMT].value - = ffelex_token_use (ft); - ffestp_file.rewrite.rewrite_spec[FFESTP_rewriteixFMT].u.expr = expr; - if (ffelex_token_type (t) == FFELEX_typeCOMMA) - return (ffelexHandler) ffestb_V0187_; - return (ffelexHandler) ffestb_V01812_; - - default: - break; - } - - ffestb_subr_kill_rewrite_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "REWRITE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0187_ -- "REWRITE" OPEN_PAREN [external-file-unit COMMA [format - COMMA]] - - return ffestb_V0187_; // to lexer - - Handle expr construct (not NAME=expr construct) here. */ - -static ffelexHandler -ffestb_V0187_ (ffelexToken t) -{ - ffestrGenio kw; - - ffestb_local_.rewrite.label = FALSE; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - kw = ffestr_genio (t); - switch (kw) - { - case FFESTR_genioERR: - ffestb_local_.rewrite.ix = FFESTP_rewriteixERR; - ffestb_local_.rewrite.label = TRUE; - break; - - case FFESTR_genioFMT: - ffestb_local_.rewrite.ix = FFESTP_rewriteixFMT; - ffestb_local_.rewrite.left = FALSE; - ffestb_local_.rewrite.context = FFEEXPR_contextFILEFORMAT; - break; - - case FFESTR_genioIOSTAT: - ffestb_local_.rewrite.ix = FFESTP_rewriteixIOSTAT; - ffestb_local_.rewrite.left = TRUE; - ffestb_local_.rewrite.context = FFEEXPR_contextFILEINT; - break; - - case FFESTR_genioUNIT: - ffestb_local_.rewrite.ix = FFESTP_rewriteixUNIT; - ffestb_local_.rewrite.left = FALSE; - ffestb_local_.rewrite.context = FFEEXPR_contextFILENUM; - break; - - default: - goto bad; /* :::::::::::::::::::: */ - } - if (ffestp_file.rewrite.rewrite_spec[ffestb_local_.rewrite.ix] - .kw_or_val_present) - break; /* Can't specify a keyword twice! */ - ffestp_file.rewrite.rewrite_spec[ffestb_local_.rewrite.ix] - .kw_or_val_present = TRUE; - ffestp_file.rewrite.rewrite_spec[ffestb_local_.rewrite.ix] - .kw_present = TRUE; - ffestp_file.rewrite.rewrite_spec[ffestb_local_.rewrite.ix] - .value_present = FALSE; - ffestp_file.rewrite.rewrite_spec[ffestb_local_.rewrite.ix].value_is_label - = ffestb_local_.rewrite.label; - ffestp_file.rewrite.rewrite_spec[ffestb_local_.rewrite.ix].kw - = ffelex_token_use (t); - return (ffelexHandler) ffestb_V0188_; - - default: - break; - } - -bad: /* :::::::::::::::::::: */ - ffestb_subr_kill_rewrite_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "REWRITE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0188_ -- "REWRITE" OPEN_PAREN [external-file-unit COMMA [format - COMMA]] NAME - - return ffestb_V0188_; // to lexer - - Make sure EQUALS here, send next token to expression handler. */ - -static ffelexHandler -ffestb_V0188_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEQUALS: - ffesta_confirmed (); - if (ffestb_local_.rewrite.label) - return (ffelexHandler) ffestb_V01810_; - if (ffestb_local_.rewrite.left) - return (ffelexHandler) ffeexpr_lhs (ffesta_output_pool, - ffestb_local_.rewrite.context, - (ffeexprCallback) ffestb_V0189_); - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - ffestb_local_.rewrite.context, - (ffeexprCallback) ffestb_V0189_); - - default: - break; - } - - ffestb_subr_kill_rewrite_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "REWRITE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0189_ -- "REWRITE" OPEN_PAREN ... NAME EQUALS expr - - (ffestb_V0189_) // to expression handler - - Handle COMMA or CLOSE_PAREN here. */ - -static ffelexHandler -ffestb_V0189_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - if (ffestb_local_.rewrite.context == FFEEXPR_contextFILEFORMAT) - ffestp_file.rewrite.rewrite_spec[ffestb_local_.rewrite.ix] - .value_is_label = TRUE; - else - break; - ffestp_file.rewrite.rewrite_spec[ffestb_local_.rewrite.ix].value_present - = TRUE; - ffestp_file.rewrite.rewrite_spec[ffestb_local_.rewrite.ix].value - = ffelex_token_use (ft); - ffestp_file.rewrite.rewrite_spec[ffestb_local_.rewrite.ix].u.expr = expr; - if (ffelex_token_type (t) == FFELEX_typeCOMMA) - return (ffelexHandler) ffestb_V0187_; - return (ffelexHandler) ffestb_V01812_; - - default: - break; - } - - ffestb_subr_kill_rewrite_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "REWRITE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V01810_ -- "REWRITE" OPEN_PAREN ... NAME EQUALS - - return ffestb_V01810_; // to lexer - - Handle NUMBER for label here. */ - -static ffelexHandler -ffestb_V01810_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNUMBER: - ffestp_file.rewrite.rewrite_spec[ffestb_local_.rewrite.ix].value_present - = TRUE; - ffestp_file.rewrite.rewrite_spec[ffestb_local_.rewrite.ix].value - = ffelex_token_use (t); - return (ffelexHandler) ffestb_V01811_; - - default: - break; - } - - ffestb_subr_kill_rewrite_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "REWRITE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V01811_ -- "REWRITE" OPEN_PAREN ... NAME EQUALS NUMBER - - return ffestb_V01811_; // to lexer - - Handle COMMA or CLOSE_PAREN here. */ - -static ffelexHandler -ffestb_V01811_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - return (ffelexHandler) ffestb_V0187_; - - case FFELEX_typeCLOSE_PAREN: - return (ffelexHandler) ffestb_V01812_; - - default: - break; - } - - ffestb_subr_kill_rewrite_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "REWRITE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V01812_ -- "REWRITE" OPEN_PAREN ... CLOSE_PAREN - - return ffestb_V01812_; // to lexer - - Handle EOS or SEMICOLON here. */ - -static ffelexHandler -ffestb_V01812_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - { - ffestc_V018_start (); - ffestc_V018_finish (); - } - ffestb_subr_kill_rewrite_ (); - return (ffelexHandler) ffesta_zero (t); - - case FFELEX_typeNAME: - case FFELEX_typeOPEN_PAREN: - case FFELEX_typeCOMMA: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_V018_start (); - ffestb_subr_kill_rewrite_ (); - - /* EXTENSION: Allow an optional preceding COMMA here if not pedantic. - (f2c provides this extension, as do other compilers, supposedly.) */ - - if (!ffe_is_pedantic () && (ffelex_token_type (t) == FFELEX_typeCOMMA)) - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextIOLIST, (ffeexprCallback) ffestb_V01813_); - - return (ffelexHandler) (*((ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextIOLIST, (ffeexprCallback) ffestb_V01813_))) - (t); - - default: - break; - } - - ffestb_subr_kill_rewrite_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "REWRITE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V01813_ -- "REWRITE(...)" expr - - (ffestb_V01813_) // to expression handler - - Handle COMMA or EOS/SEMICOLON here. */ - -static ffelexHandler -ffestb_V01813_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - ffestc_V018_item (expr, ft); - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextIOLIST, (ffeexprCallback) ffestb_V01813_); - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - { - ffestc_V018_item (expr, ft); - ffestc_V018_finish (); - } - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_V018_finish (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "REWRITE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V019 -- Parse the ACCEPT statement - - return ffestb_V019; // to lexer - - Make sure the statement has a valid form for the ACCEPT - statement. If it does, implement the statement. */ - -ffelexHandler -ffestb_V019 (ffelexToken t) -{ - ffelexHandler next; - ffestpAcceptIx ix; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstACCEPT) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeEQUALS: - case FFELEX_typePOINTS: - case FFELEX_typeCOLON: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeNAME: - case FFELEX_typeNUMBER: - ffesta_confirmed (); - break; - - default: - break; - } - - for (ix = 0; ix < FFESTP_acceptix; ++ix) - ffestp_file.accept.accept_spec[ix].kw_or_val_present = FALSE; - return (ffelexHandler) (*((ffelexHandler) - ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILEFORMATNML, (ffeexprCallback) ffestb_V0191_))) - (t); - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstACCEPT) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - ffesta_confirmed (); - if (ffelex_token_length (ffesta_tokens[0]) != FFESTR_firstlACCEPT) - break; - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeEQUALS: - case FFELEX_typePOINTS: - case FFELEX_typeCOLON: - goto bad_1; /* :::::::::::::::::::: */ - - default: - break; - } - for (ix = 0; ix < FFESTP_acceptix; ++ix) - ffestp_file.accept.accept_spec[ix].kw_or_val_present = FALSE; - next = (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILEFORMATNML, (ffeexprCallback) ffestb_V0191_); - next = (ffelexHandler) ffelex_splice_tokens (next, ffesta_tokens[0], - FFESTR_firstlACCEPT); - if (next == NULL) - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); - return (ffelexHandler) (*next) (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "ACCEPT", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "ACCEPT", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ -} - -/* ffestb_V0191_ -- "ACCEPT" expr - - (ffestb_V0191_) // to expression handler - - Make sure the next token is a COMMA or EOS/SEMICOLON. */ - -static ffelexHandler -ffestb_V0191_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - ffesta_confirmed (); - ffestp_file.accept.accept_spec[FFESTP_acceptixFORMAT].kw_or_val_present - = TRUE; - ffestp_file.accept.accept_spec[FFESTP_acceptixFORMAT].kw_present = FALSE; - ffestp_file.accept.accept_spec[FFESTP_acceptixFORMAT].value_present = TRUE; - ffestp_file.accept.accept_spec[FFESTP_acceptixFORMAT].value_is_label - = (expr == NULL); - ffestp_file.accept.accept_spec[FFESTP_acceptixFORMAT].value - = ffelex_token_use (ft); - ffestp_file.accept.accept_spec[FFESTP_acceptixFORMAT].u.expr = expr; - if (!ffesta_is_inhibited ()) - ffestc_V019_start (); - ffestb_subr_kill_accept_ (); - if (ffelex_token_type (t) == FFELEX_typeCOMMA) - return (ffelexHandler) ffeexpr_lhs (ffesta_output_pool, - FFEEXPR_contextIOLIST, - (ffeexprCallback) ffestb_V0192_); - if (!ffesta_is_inhibited ()) - ffestc_V019_finish (); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - ffestb_subr_kill_accept_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "ACCEPT", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0192_ -- "ACCEPT" expr COMMA expr - - (ffestb_V0192_) // to expression handler - - Handle COMMA or EOS/SEMICOLON here. */ - -static ffelexHandler -ffestb_V0192_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - ffestc_V019_item (expr, ft); - return (ffelexHandler) ffeexpr_lhs (ffesta_output_pool, - FFEEXPR_contextIOLIST, - (ffeexprCallback) ffestb_V0192_); - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - { - ffestc_V019_item (expr, ft); - ffestc_V019_finish (); - } - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_V019_finish (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "ACCEPT", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -#endif /* ffestb_V020 -- Parse the TYPE statement return ffestb_V020; // to lexer @@ -18107,1294 +13567,6 @@ ffestb_V0202_ (ffelexToken ft, ffebld expr, ffelexToken t) return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); } -/* ffestb_V021 -- Parse a DELETE statement - - return ffestb_V021; // to lexer - - Make sure the statement has a valid form for a DELETE statement. - If it does, implement the statement. */ - -#if FFESTR_VXT -ffelexHandler -ffestb_V021 (ffelexToken t) -{ - ffestpDeleteIx ix; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstDELETE) - goto bad_0; /* :::::::::::::::::::: */ - break; - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstDELETE) - goto bad_0; /* :::::::::::::::::::: */ - if (ffelex_token_length (ffesta_tokens[0]) != FFESTR_firstlDELETE) - goto bad_0; /* :::::::::::::::::::: */ - break; - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - break; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - - for (ix = 0; ix < FFESTP_deleteix; ++ix) - ffestp_file.delete.delete_spec[ix].kw_or_val_present = FALSE; - - return (ffelexHandler) ffestb_V0211_; - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DELETE", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DELETE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ -} - -/* ffestb_V0211_ -- "DELETE" OPEN_PAREN - - return ffestb_V0211_; // to lexer - - Handle expr construct (not NAME=expr construct) here. */ - -static ffelexHandler -ffestb_V0211_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_V0212_; - - default: - return (ffelexHandler) (*((ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILENUM, (ffeexprCallback) ffestb_V0213_))) - (t); - } -} - -/* ffestb_V0212_ -- "DELETE" OPEN_PAREN NAME - - return ffestb_V0212_; // to lexer - - If EQUALS here, go to states that handle it. Else, send NAME and this - token thru expression handler. */ - -static ffelexHandler -ffestb_V0212_ (ffelexToken t) -{ - ffelexHandler next; - ffelexToken nt; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEQUALS: - nt = ffesta_tokens[1]; - next = (ffelexHandler) ffestb_V0214_ (nt); - ffelex_token_kill (nt); - return (ffelexHandler) (*next) (t); - - default: - next = (ffelexHandler) (*((ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILENUM, (ffeexprCallback) ffestb_V0213_))) - (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) (*next) (t); - } -} - -/* ffestb_V0213_ -- "DELETE" OPEN_PAREN expr - - (ffestb_V0213_) // to expression handler - - Handle COMMA or DELETE_PAREN here. */ - -static ffelexHandler -ffestb_V0213_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - break; - ffestp_file.delete.delete_spec[FFESTP_deleteixUNIT].kw_or_val_present - = TRUE; - ffestp_file.delete.delete_spec[FFESTP_deleteixUNIT].kw_present = FALSE; - ffestp_file.delete.delete_spec[FFESTP_deleteixUNIT].value_present = TRUE; - ffestp_file.delete.delete_spec[FFESTP_deleteixUNIT].value_is_label - = FALSE; - ffestp_file.delete.delete_spec[FFESTP_deleteixUNIT].value - = ffelex_token_use (ft); - ffestp_file.delete.delete_spec[FFESTP_deleteixUNIT].u.expr = expr; - if (ffelex_token_type (t) == FFELEX_typeCOMMA) - return (ffelexHandler) ffestb_V0214_; - return (ffelexHandler) ffestb_V0219_; - - default: - break; - } - - ffestb_subr_kill_delete_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DELETE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0214_ -- "DELETE" OPEN_PAREN [external-file-unit COMMA] - - return ffestb_V0214_; // to lexer - - Handle expr construct (not NAME=expr construct) here. */ - -static ffelexHandler -ffestb_V0214_ (ffelexToken t) -{ - ffestrGenio kw; - - ffestb_local_.delete.label = FALSE; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - kw = ffestr_genio (t); - switch (kw) - { - case FFESTR_genioERR: - ffestb_local_.delete.ix = FFESTP_deleteixERR; - ffestb_local_.delete.label = TRUE; - break; - - case FFESTR_genioIOSTAT: - ffestb_local_.delete.ix = FFESTP_deleteixIOSTAT; - ffestb_local_.delete.left = TRUE; - ffestb_local_.delete.context = FFEEXPR_contextFILEINT; - break; - - case FFESTR_genioREC: - ffestb_local_.delete.ix = FFESTP_deleteixREC; - ffestb_local_.delete.left = FALSE; - ffestb_local_.delete.context = FFEEXPR_contextFILENUM; - break; - - case FFESTR_genioUNIT: - ffestb_local_.delete.ix = FFESTP_deleteixUNIT; - ffestb_local_.delete.left = FALSE; - ffestb_local_.delete.context = FFEEXPR_contextFILENUM; - break; - - default: - goto bad; /* :::::::::::::::::::: */ - } - if (ffestp_file.delete.delete_spec[ffestb_local_.delete.ix] - .kw_or_val_present) - break; /* Can't specify a keyword twice! */ - ffestp_file.delete.delete_spec[ffestb_local_.delete.ix] - .kw_or_val_present = TRUE; - ffestp_file.delete.delete_spec[ffestb_local_.delete.ix] - .kw_present = TRUE; - ffestp_file.delete.delete_spec[ffestb_local_.delete.ix] - .value_present = FALSE; - ffestp_file.delete.delete_spec[ffestb_local_.delete.ix].value_is_label - = ffestb_local_.delete.label; - ffestp_file.delete.delete_spec[ffestb_local_.delete.ix].kw - = ffelex_token_use (t); - return (ffelexHandler) ffestb_V0215_; - - default: - break; - } - -bad: /* :::::::::::::::::::: */ - ffestb_subr_kill_delete_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DELETE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0215_ -- "DELETE" OPEN_PAREN [external-file-unit COMMA] NAME - - return ffestb_V0215_; // to lexer - - Make sure EQUALS here, send next token to expression handler. */ - -static ffelexHandler -ffestb_V0215_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEQUALS: - ffesta_confirmed (); - if (ffestb_local_.delete.label) - return (ffelexHandler) ffestb_V0217_; - if (ffestb_local_.delete.left) - return (ffelexHandler) ffeexpr_lhs (ffesta_output_pool, - ffestb_local_.delete.context, - (ffeexprCallback) ffestb_V0216_); - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - ffestb_local_.delete.context, (ffeexprCallback) ffestb_V0216_); - - default: - break; - } - - ffestb_subr_kill_delete_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DELETE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0216_ -- "DELETE" OPEN_PAREN ... NAME EQUALS expr - - (ffestb_V0216_) // to expression handler - - Handle COMMA or CLOSE_PAREN here. */ - -static ffelexHandler -ffestb_V0216_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - break; - ffestp_file.delete.delete_spec[ffestb_local_.delete.ix].value_present - = TRUE; - ffestp_file.delete.delete_spec[ffestb_local_.delete.ix].value - = ffelex_token_use (ft); - ffestp_file.delete.delete_spec[ffestb_local_.delete.ix].u.expr = expr; - if (ffelex_token_type (t) == FFELEX_typeCOMMA) - return (ffelexHandler) ffestb_V0214_; - return (ffelexHandler) ffestb_V0219_; - - default: - break; - } - - ffestb_subr_kill_delete_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DELETE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0217_ -- "DELETE" OPEN_PAREN ... NAME EQUALS - - return ffestb_V0217_; // to lexer - - Handle NUMBER for label here. */ - -static ffelexHandler -ffestb_V0217_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNUMBER: - ffestp_file.delete.delete_spec[ffestb_local_.delete.ix].value_present - = TRUE; - ffestp_file.delete.delete_spec[ffestb_local_.delete.ix].value - = ffelex_token_use (t); - return (ffelexHandler) ffestb_V0218_; - - default: - break; - } - - ffestb_subr_kill_delete_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DELETE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0218_ -- "DELETE" OPEN_PAREN ... NAME EQUALS NUMBER - - return ffestb_V0218_; // to lexer - - Handle COMMA or CLOSE_PAREN here. */ - -static ffelexHandler -ffestb_V0218_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - return (ffelexHandler) ffestb_V0214_; - - case FFELEX_typeCLOSE_PAREN: - return (ffelexHandler) ffestb_V0219_; - - default: - break; - } - - ffestb_subr_kill_delete_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DELETE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0219_ -- "DELETE" OPEN_PAREN ... CLOSE_PAREN - - return ffestb_V0219_; // to lexer - - Handle EOS or SEMICOLON here. */ - -static ffelexHandler -ffestb_V0219_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_V021 (); - ffestb_subr_kill_delete_ (); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - ffestb_subr_kill_delete_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DELETE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V026 -- Parse a FIND statement - - return ffestb_V026; // to lexer - - Make sure the statement has a valid form for a FIND statement. - If it does, implement the statement. */ - -ffelexHandler -ffestb_V026 (ffelexToken t) -{ - ffestpFindIx ix; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstFIND) - goto bad_0; /* :::::::::::::::::::: */ - break; - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstFIND) - goto bad_0; /* :::::::::::::::::::: */ - if (ffelex_token_length (ffesta_tokens[0]) != FFESTR_firstlFIND) - goto bad_0; /* :::::::::::::::::::: */ - break; - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - break; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - - for (ix = 0; ix < FFESTP_findix; ++ix) - ffestp_file.find.find_spec[ix].kw_or_val_present = FALSE; - - return (ffelexHandler) ffestb_V0261_; - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FIND", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FIND", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ -} - -/* ffestb_V0261_ -- "FIND" OPEN_PAREN - - return ffestb_V0261_; // to lexer - - Handle expr construct (not NAME=expr construct) here. */ - -static ffelexHandler -ffestb_V0261_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_V0262_; - - default: - return (ffelexHandler) (*((ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILENUM, (ffeexprCallback) ffestb_V0263_))) - (t); - } -} - -/* ffestb_V0262_ -- "FIND" OPEN_PAREN NAME - - return ffestb_V0262_; // to lexer - - If EQUALS here, go to states that handle it. Else, send NAME and this - token thru expression handler. */ - -static ffelexHandler -ffestb_V0262_ (ffelexToken t) -{ - ffelexHandler next; - ffelexToken nt; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEQUALS: - nt = ffesta_tokens[1]; - next = (ffelexHandler) ffestb_V0264_ (nt); - ffelex_token_kill (nt); - return (ffelexHandler) (*next) (t); - - default: - next = (ffelexHandler) (*((ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILENUM, (ffeexprCallback) ffestb_V0263_))) - (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) (*next) (t); - } -} - -/* ffestb_V0263_ -- "FIND" OPEN_PAREN expr - - (ffestb_V0263_) // to expression handler - - Handle COMMA or FIND_PAREN here. */ - -static ffelexHandler -ffestb_V0263_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - break; - ffestp_file.find.find_spec[FFESTP_findixUNIT].kw_or_val_present - = TRUE; - ffestp_file.find.find_spec[FFESTP_findixUNIT].kw_present = FALSE; - ffestp_file.find.find_spec[FFESTP_findixUNIT].value_present = TRUE; - ffestp_file.find.find_spec[FFESTP_findixUNIT].value_is_label - = FALSE; - ffestp_file.find.find_spec[FFESTP_findixUNIT].value - = ffelex_token_use (ft); - ffestp_file.find.find_spec[FFESTP_findixUNIT].u.expr = expr; - if (ffelex_token_type (t) == FFELEX_typeCOMMA) - return (ffelexHandler) ffestb_V0264_; - return (ffelexHandler) ffestb_V0269_; - - default: - break; - } - - ffestb_subr_kill_find_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FIND", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0264_ -- "FIND" OPEN_PAREN [external-file-unit COMMA] - - return ffestb_V0264_; // to lexer - - Handle expr construct (not NAME=expr construct) here. */ - -static ffelexHandler -ffestb_V0264_ (ffelexToken t) -{ - ffestrGenio kw; - - ffestb_local_.find.label = FALSE; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - kw = ffestr_genio (t); - switch (kw) - { - case FFESTR_genioERR: - ffestb_local_.find.ix = FFESTP_findixERR; - ffestb_local_.find.label = TRUE; - break; - - case FFESTR_genioIOSTAT: - ffestb_local_.find.ix = FFESTP_findixIOSTAT; - ffestb_local_.find.left = TRUE; - ffestb_local_.find.context = FFEEXPR_contextFILEINT; - break; - - case FFESTR_genioREC: - ffestb_local_.find.ix = FFESTP_findixREC; - ffestb_local_.find.left = FALSE; - ffestb_local_.find.context = FFEEXPR_contextFILENUM; - break; - - case FFESTR_genioUNIT: - ffestb_local_.find.ix = FFESTP_findixUNIT; - ffestb_local_.find.left = FALSE; - ffestb_local_.find.context = FFEEXPR_contextFILENUM; - break; - - default: - goto bad; /* :::::::::::::::::::: */ - } - if (ffestp_file.find.find_spec[ffestb_local_.find.ix] - .kw_or_val_present) - break; /* Can't specify a keyword twice! */ - ffestp_file.find.find_spec[ffestb_local_.find.ix] - .kw_or_val_present = TRUE; - ffestp_file.find.find_spec[ffestb_local_.find.ix] - .kw_present = TRUE; - ffestp_file.find.find_spec[ffestb_local_.find.ix] - .value_present = FALSE; - ffestp_file.find.find_spec[ffestb_local_.find.ix].value_is_label - = ffestb_local_.find.label; - ffestp_file.find.find_spec[ffestb_local_.find.ix].kw - = ffelex_token_use (t); - return (ffelexHandler) ffestb_V0265_; - - default: - break; - } - -bad: /* :::::::::::::::::::: */ - ffestb_subr_kill_find_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FIND", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0265_ -- "FIND" OPEN_PAREN [external-file-unit COMMA] NAME - - return ffestb_V0265_; // to lexer - - Make sure EQUALS here, send next token to expression handler. */ - -static ffelexHandler -ffestb_V0265_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEQUALS: - ffesta_confirmed (); - if (ffestb_local_.find.label) - return (ffelexHandler) ffestb_V0267_; - if (ffestb_local_.find.left) - return (ffelexHandler) ffeexpr_lhs (ffesta_output_pool, - ffestb_local_.find.context, - (ffeexprCallback) ffestb_V0266_); - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - ffestb_local_.find.context, - (ffeexprCallback) ffestb_V0266_); - - default: - break; - } - - ffestb_subr_kill_find_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FIND", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0266_ -- "FIND" OPEN_PAREN ... NAME EQUALS expr - - (ffestb_V0266_) // to expression handler - - Handle COMMA or CLOSE_PAREN here. */ - -static ffelexHandler -ffestb_V0266_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - break; - ffestp_file.find.find_spec[ffestb_local_.find.ix].value_present - = TRUE; - ffestp_file.find.find_spec[ffestb_local_.find.ix].value - = ffelex_token_use (ft); - ffestp_file.find.find_spec[ffestb_local_.find.ix].u.expr = expr; - if (ffelex_token_type (t) == FFELEX_typeCOMMA) - return (ffelexHandler) ffestb_V0264_; - return (ffelexHandler) ffestb_V0269_; - - default: - break; - } - - ffestb_subr_kill_find_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FIND", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0267_ -- "FIND" OPEN_PAREN ... NAME EQUALS - - return ffestb_V0267_; // to lexer - - Handle NUMBER for label here. */ - -static ffelexHandler -ffestb_V0267_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNUMBER: - ffestp_file.find.find_spec[ffestb_local_.find.ix].value_present - = TRUE; - ffestp_file.find.find_spec[ffestb_local_.find.ix].value - = ffelex_token_use (t); - return (ffelexHandler) ffestb_V0268_; - - default: - break; - } - - ffestb_subr_kill_find_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FIND", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0268_ -- "FIND" OPEN_PAREN ... NAME EQUALS NUMBER - - return ffestb_V0268_; // to lexer - - Handle COMMA or CLOSE_PAREN here. */ - -static ffelexHandler -ffestb_V0268_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - return (ffelexHandler) ffestb_V0264_; - - case FFELEX_typeCLOSE_PAREN: - return (ffelexHandler) ffestb_V0269_; - - default: - break; - } - - ffestb_subr_kill_find_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FIND", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0269_ -- "FIND" OPEN_PAREN ... CLOSE_PAREN - - return ffestb_V0269_; // to lexer - - Handle EOS or SEMICOLON here. */ - -static ffelexHandler -ffestb_V0269_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_V026 (); - ffestb_subr_kill_find_ (); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - ffestb_subr_kill_find_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FIND", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -#endif -/* ffestb_dimlist -- Parse the ALLOCATABLE/POINTER/TARGET statement - - return ffestb_dimlist; // to lexer - - Make sure the statement has a valid form for the ALLOCATABLE/POINTER/ - TARGET statement. If it does, implement the statement. */ - -#if FFESTR_F90 -ffelexHandler -ffestb_dimlist (ffelexToken t) -{ - ffeTokenLength i; - const char *p; - ffelexToken nt; - ffelexHandler next; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - { - switch (ffesta_first_kw) - { - case FFESTR_firstALLOCATABLE: - ffestc_R525_start (); - break; - - case FFESTR_firstPOINTER: - ffestc_R526_start (); - break; - - case FFESTR_firstTARGET: - ffestc_R527_start (); - break; - - default: - assert (FALSE); - } - } - ffestb_local_.dimlist.started = TRUE; - return (ffelexHandler) ffestb_dimlist1_; - - case FFELEX_typeNAME: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - { - switch (ffesta_first_kw) - { - case FFESTR_firstALLOCATABLE: - ffestc_R525_start (); - break; - - case FFESTR_firstPOINTER: - ffestc_R526_start (); - break; - - case FFESTR_firstTARGET: - ffestc_R527_start (); - break; - - default: - assert (FALSE); - } - } - ffestb_local_.dimlist.started = TRUE; - return (ffelexHandler) ffestb_dimlist1_ (t); - } - - case FFELEX_typeNAMES: - p = ffelex_token_text (ffesta_tokens[0]) + (i = ffestb_args.dimlist.len); - switch (ffelex_token_type (t)) - { - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - ffesta_confirmed (); - if (!ffesrc_is_name_init (*p)) - goto bad_i; /* :::::::::::::::::::: */ - nt = ffelex_token_name_from_names (ffesta_tokens[0], i, 0); - if (!ffesta_is_inhibited ()) - { - switch (ffesta_first_kw) - { - case FFESTR_firstALLOCATABLE: - ffestc_R525_start (); - break; - - case FFESTR_firstPOINTER: - ffestc_R526_start (); - break; - - case FFESTR_firstTARGET: - ffestc_R527_start (); - break; - - default: - assert (FALSE); - } - } - ffestb_local_.dimlist.started = TRUE; - next = (ffelexHandler) ffestb_dimlist1_ (nt); - ffelex_token_kill (nt); - return (ffelexHandler) (*next) (t); - - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); - if (*p != '\0') - goto bad_i; /* :::::::::::::::::::: */ - if (!ffesta_is_inhibited ()) - { - switch (ffesta_first_kw) - { - case FFESTR_firstALLOCATABLE: - ffestc_R525_start (); - break; - - case FFESTR_firstPOINTER: - ffestc_R526_start (); - break; - - case FFESTR_firstTARGET: - ffestc_R527_start (); - break; - - default: - assert (FALSE); - } - } - ffestb_local_.dimlist.started = TRUE; - return (ffelexHandler) ffestb_dimlist1_; - - case FFELEX_typeOPEN_PAREN: - if (!ffesrc_is_name_init (*p)) - goto bad_i; /* :::::::::::::::::::: */ - nt = ffelex_token_name_from_names (ffesta_tokens[0], i, 0); - ffestb_local_.dimlist.started = FALSE; - next = (ffelexHandler) ffestb_dimlist1_ (nt); - ffelex_token_kill (nt); - return (ffelexHandler) (*next) (t); - } - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.dimlist.badname, ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.dimlist.badname, t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, ffestb_args.dimlist.badname, ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_dimlist1_ -- "ALLOCATABLE/POINTER/TARGET" [COLONCOLON] - - return ffestb_dimlist1_; // to lexer - - Handle NAME. */ - -static ffelexHandler -ffestb_dimlist1_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_dimlist2_; - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.dimlist.badname, t); - break; - } - - if (!ffesta_is_inhibited ()) - { - switch (ffesta_first_kw) - { - case FFESTR_firstALLOCATABLE: - ffestc_R525_finish (); - break; - - case FFESTR_firstPOINTER: - ffestc_R526_finish (); - break; - - case FFESTR_firstTARGET: - ffestc_R527_finish (); - break; - - default: - assert (FALSE); - } - } - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_dimlist2_ -- "ALLOCATABLE/POINTER/TARGET" ... NAME - - return ffestb_dimlist2_; // to lexer - - Handle OPEN_PAREN. */ - -static ffelexHandler -ffestb_dimlist2_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - ffestb_subrargs_.dim_list.dims = ffestt_dimlist_create (); - ffestb_subrargs_.dim_list.handler = (ffelexHandler) ffestb_dimlist3_; - ffestb_subrargs_.dim_list.pool = ffesta_output_pool; - ffestb_subrargs_.dim_list.ctx = FFEEXPR_contextDIMLIST; -#ifdef FFECOM_dimensionsMAX - ffestb_subrargs_.dim_list.ndims = 0; -#endif - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextDIMLIST, (ffeexprCallback) ffestb_subr_dimlist_); - - case FFELEX_typeCOMMA: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - { - if (!ffestb_local_.dimlist.started) - { - switch (ffesta_first_kw) - { - case FFESTR_firstALLOCATABLE: - ffestc_R525_start (); - break; - - case FFESTR_firstPOINTER: - ffestc_R526_start (); - break; - - case FFESTR_firstTARGET: - ffestc_R527_start (); - break; - - default: - assert (FALSE); - } - ffestb_local_.dimlist.started = TRUE; - } - switch (ffesta_first_kw) - { - case FFESTR_firstALLOCATABLE: - ffestc_R525_item (ffesta_tokens[1], NULL); - break; - - case FFESTR_firstPOINTER: - ffestc_R526_item (ffesta_tokens[1], NULL); - break; - - case FFESTR_firstTARGET: - ffestc_R527_item (ffesta_tokens[1], NULL); - break; - - default: - assert (FALSE); - } - } - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffestb_dimlist4_; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - { - if (!ffestb_local_.dimlist.started) - { - switch (ffesta_first_kw) - { - case FFESTR_firstALLOCATABLE: - ffestc_R525_start (); - break; - - case FFESTR_firstPOINTER: - ffestc_R526_start (); - break; - - case FFESTR_firstTARGET: - ffestc_R527_start (); - break; - - default: - assert (FALSE); - } - } - switch (ffesta_first_kw) - { - case FFESTR_firstALLOCATABLE: - ffestc_R525_item (ffesta_tokens[1], NULL); - ffestc_R525_finish (); - break; - - case FFESTR_firstPOINTER: - ffestc_R526_item (ffesta_tokens[1], NULL); - ffestc_R526_finish (); - break; - - case FFESTR_firstTARGET: - ffestc_R527_item (ffesta_tokens[1], NULL); - ffestc_R527_finish (); - break; - - default: - assert (FALSE); - } - } - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffesta_zero (t); - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.dimlist.badname, t); - break; - } - - if (!ffesta_is_inhibited ()) - { - switch (ffesta_first_kw) - { - case FFESTR_firstALLOCATABLE: - ffestc_R525_finish (); - break; - - case FFESTR_firstPOINTER: - ffestc_R526_finish (); - break; - - case FFESTR_firstTARGET: - ffestc_R527_finish (); - break; - - default: - assert (FALSE); - } - } - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_dimlist3_ -- "ALLOCATABLE/POINTER/TARGET" ... NAME OPEN_PAREN - dimlist CLOSE_PAREN - - return ffestb_dimlist3_; // to lexer - - Handle COMMA or EOS/SEMICOLON. */ - -static ffelexHandler -ffestb_dimlist3_ (ffelexToken t) -{ - if (!ffestb_subrargs_.dim_list.ok) - goto bad; /* :::::::::::::::::::: */ - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - { - if (!ffestb_local_.dimlist.started) - { - switch (ffesta_first_kw) - { - case FFESTR_firstALLOCATABLE: - ffestc_R525_start (); - break; - - case FFESTR_firstPOINTER: - ffestc_R526_start (); - break; - - case FFESTR_firstTARGET: - ffestc_R527_start (); - break; - - default: - assert (FALSE); - } - ffestb_local_.dimlist.started = TRUE; - } - switch (ffesta_first_kw) - { - case FFESTR_firstALLOCATABLE: - ffestc_R525_item (ffesta_tokens[1], - ffestb_subrargs_.dim_list.dims); - break; - - case FFESTR_firstPOINTER: - ffestc_R526_item (ffesta_tokens[1], - ffestb_subrargs_.dim_list.dims); - break; - - case FFESTR_firstTARGET: - ffestc_R527_item (ffesta_tokens[1], - ffestb_subrargs_.dim_list.dims); - break; - - default: - assert (FALSE); - } - } - ffelex_token_kill (ffesta_tokens[1]); - ffestt_dimlist_kill (ffestb_subrargs_.dim_list.dims); - return (ffelexHandler) ffestb_dimlist4_; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - { - if (!ffestb_local_.dimlist.started) - { - switch (ffesta_first_kw) - { - case FFESTR_firstALLOCATABLE: - ffestc_R525_start (); - break; - - case FFESTR_firstPOINTER: - ffestc_R526_start (); - break; - - case FFESTR_firstTARGET: - ffestc_R527_start (); - break; - - default: - assert (FALSE); - } - } - switch (ffesta_first_kw) - { - case FFESTR_firstALLOCATABLE: - ffestc_R525_item (ffesta_tokens[1], - ffestb_subrargs_.dim_list.dims); - ffestc_R525_finish (); - break; - - case FFESTR_firstPOINTER: - ffestc_R526_item (ffesta_tokens[1], - ffestb_subrargs_.dim_list.dims); - ffestc_R526_finish (); - break; - - case FFESTR_firstTARGET: - ffestc_R527_item (ffesta_tokens[1], - ffestb_subrargs_.dim_list.dims); - ffestc_R527_finish (); - break; - - default: - assert (FALSE); - } - } - ffelex_token_kill (ffesta_tokens[1]); - ffestt_dimlist_kill (ffestb_subrargs_.dim_list.dims); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - -bad: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.dimlist.badname, t); - if (ffestb_local_.dimlist.started && !ffesta_is_inhibited ()) - { - switch (ffesta_first_kw) - { - case FFESTR_firstALLOCATABLE: - ffestc_R525_finish (); - break; - - case FFESTR_firstPOINTER: - ffestc_R526_finish (); - break; - - case FFESTR_firstTARGET: - ffestc_R527_finish (); - break; - - default: - assert (FALSE); - } - } - ffestt_dimlist_kill (ffestb_subrargs_.dim_list.dims); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_dimlist4_ -- "ALLOCATABLE/POINTER/TARGET" ... COMMA - - return ffestb_dimlist4_; // to lexer - - Make sure we don't have EOS or SEMICOLON. */ - -static ffelexHandler -ffestb_dimlist4_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffesta_is_inhibited ()) - { - switch (ffesta_first_kw) - { - case FFESTR_firstALLOCATABLE: - ffestc_R525_finish (); - break; - - case FFESTR_firstPOINTER: - ffestc_R526_finish (); - break; - - case FFESTR_firstTARGET: - ffestc_R527_finish (); - break; - - default: - assert (FALSE); - } - } - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.dimlist.badname, t); - return (ffelexHandler) ffesta_zero (t); - - default: - return (ffelexHandler) ffestb_dimlist1_ (t); - } -} - -#endif /* ffestb_dummy -- Parse an ENTRY/FUNCTION/SUBROUTINE statement return ffestb_dummy; // to lexer @@ -20220,146 +14392,6 @@ ffestb_R5477_ (ffelexToken t) } } -/* ffestb_R624 -- Parse a NULLIFY statement - - return ffestb_R624; // to lexer - - Make sure the statement has a valid form for a NULLIFY - statement. If it does, implement the statement. - - 31-May-90 JCB 2.0 - Rewrite to produce a list of expressions rather than just names; this - eases semantic checking, putting it in expression handling where that - kind of thing gets done anyway, and makes it easier to support more - flexible extensions to Fortran 90 like NULLIFY(FOO%BAR). */ - -#if FFESTR_F90 -ffelexHandler -ffestb_R624 (ffelexToken t) -{ - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstNULLIFY) - goto bad_0; /* :::::::::::::::::::: */ - break; - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstNULLIFY) - goto bad_0; /* :::::::::::::::::::: */ - if (ffelex_token_length (ffesta_tokens[0]) != FFESTR_firstlNULLIFY) - goto bad_0; /* :::::::::::::::::::: */ - break; - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - break; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - case FFELEX_typeNAME: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - - ffestb_local_.R624.exprs = ffestt_exprlist_create (); - return (ffelexHandler) ffeexpr_lhs (ffesta_output_pool, - FFEEXPR_contextNULLIFY, - (ffeexprCallback) ffestb_R6241_); - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "NULLIFY", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "NULLIFY", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ -} - -/* ffestb_R6241_ -- "NULLIFY" OPEN_PAREN expr - - return ffestb_R6241_; // to lexer - - Make sure the statement has a valid form for a NULLIFY statement. If it - does, implement the statement. - - 31-May-90 JCB 2.0 - Rewrite to produce a list of expressions rather than just names; this - eases semantic checking, putting it in expression handling where that - kind of thing gets done anyway, and makes it easier to support more - flexible extensions to Fortran 90 like NULLIFY(FOO%BAR). */ - -static ffelexHandler -ffestb_R6241_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - break; - ffestt_exprlist_append (ffestb_local_.R624.exprs, expr, - ffelex_token_use (t)); - return (ffelexHandler) ffestb_R6242_; - - case FFELEX_typeCOMMA: - if (expr == NULL) - break; - ffestt_exprlist_append (ffestb_local_.R624.exprs, expr, - ffelex_token_use (t)); - return (ffelexHandler) ffeexpr_lhs (ffesta_output_pool, - FFEEXPR_contextNULLIFY, - (ffeexprCallback) ffestb_R6241_); - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "NULLIFY", t); - ffestt_exprlist_kill (ffestb_local_.R624.exprs); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R6242_ -- "NULLIFY" OPEN_PAREN expr-list CLOSE_PAREN - - return ffestb_R6242_; // to lexer - - Make sure the statement has a valid form for a NULLIFY statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_R6242_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R624 (ffestb_local_.R624.exprs); - ffestt_exprlist_kill (ffestb_local_.R624.exprs); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "NULLIFY", t); - ffestt_exprlist_kill (ffestb_local_.R624.exprs); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -#endif /* ffestb_R1229 -- Parse a STMTFUNCTION statement return ffestb_R1229; // to lexer @@ -21004,496 +15036,6 @@ bad_i: /* :::::::::::::::::::: */ return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); } -/* ffestb_decl_recursive -- Parse the RECURSIVE FUNCTION statement - - return ffestb_decl_recursive; // to lexer - - Make sure the statement has a valid form for the RECURSIVE FUNCTION - statement. If it does, implement the statement. */ - -#if FFESTR_F90 -ffelexHandler -ffestb_decl_recursive (ffelexToken t) -{ - ffeTokenLength i; - const char *p; - ffelexToken nt; - ffelexToken ot; - ffelexHandler next; - bool needfunc; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstRECURSIVE) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeNAME: - break; - } - ffesta_confirmed (); - ffestb_local_.decl.recursive = ffelex_token_use (ffesta_tokens[0]); - switch (ffesta_second_kw) - { - case FFESTR_secondINTEGER: - ffestb_local_.decl.type = FFESTP_typeINTEGER; - return (ffelexHandler) ffestb_decl_recursive1_; - - case FFESTR_secondBYTE: - ffestb_local_.decl.type = FFESTP_typeBYTE; - return (ffelexHandler) ffestb_decl_recursive1_; - - case FFESTR_secondWORD: - ffestb_local_.decl.type = FFESTP_typeWORD; - return (ffelexHandler) ffestb_decl_recursive1_; - - case FFESTR_secondREAL: - ffestb_local_.decl.type = FFESTP_typeREAL; - return (ffelexHandler) ffestb_decl_recursive1_; - - case FFESTR_secondCOMPLEX: - ffestb_local_.decl.type = FFESTP_typeCOMPLEX; - return (ffelexHandler) ffestb_decl_recursive1_; - - case FFESTR_secondLOGICAL: - ffestb_local_.decl.type = FFESTP_typeLOGICAL; - return (ffelexHandler) ffestb_decl_recursive1_; - - case FFESTR_secondCHARACTER: - ffestb_local_.decl.type = FFESTP_typeCHARACTER; - return (ffelexHandler) ffestb_decl_recursive1_; - - case FFESTR_secondDOUBLE: - return (ffelexHandler) ffestb_decl_recursive2_; - - case FFESTR_secondDOUBLEPRECISION: - ffestb_local_.decl.type = FFESTP_typeDBLPRCSN; - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.kindt = NULL; - ffestb_local_.decl.len = NULL; - ffestb_local_.decl.lent = NULL; - return (ffelexHandler) ffestb_decl_func_; - - case FFESTR_secondDOUBLECOMPLEX: - ffestb_local_.decl.type = FFESTP_typeDBLCMPLX; - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.kindt = NULL; - ffestb_local_.decl.len = NULL; - ffestb_local_.decl.lent = NULL; - return (ffelexHandler) ffestb_decl_func_; - - case FFESTR_secondTYPE: - ffestb_local_.decl.type = FFESTP_typeTYPE; - return (ffelexHandler) ffestb_decl_recursive3_; - - case FFESTR_secondFUNCTION: - ffestb_local_.dummy.first_kw = FFESTR_firstFUNCTION; - ffestb_local_.dummy.badname = "FUNCTION"; - ffestb_local_.dummy.is_subr = FALSE; - return (ffelexHandler) ffestb_decl_recursive4_; - - case FFESTR_secondSUBROUTINE: - ffestb_local_.dummy.first_kw = FFESTR_firstSUBROUTINE; - ffestb_local_.dummy.badname = "SUBROUTINE"; - ffestb_local_.dummy.is_subr = TRUE; - return (ffelexHandler) ffestb_decl_recursive4_; - - default: - ffelex_token_kill (ffestb_local_.decl.recursive); - goto bad_1; /* :::::::::::::::::::: */ - } - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstRECURSIVE) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - case FFELEX_typeASTERISK: - case FFELEX_typeSEMICOLON: - case FFELEX_typeEOS: - ffesta_confirmed (); - break; - - default: - break; - } - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlRECURSIVE); - if (!ffesrc_is_name_init (*p)) - goto bad_0; /* :::::::::::::::::::: */ - ffestb_local_.decl.recursive - = ffelex_token_name_from_names (ffesta_tokens[0], 0, - FFESTR_firstlRECURSIVE); - nt = ffelex_token_names_from_names (ffesta_tokens[0], - FFESTR_firstlRECURSIVE, 0); - switch (ffestr_first (nt)) - { - case FFESTR_firstINTGR: - p = ffelex_token_text (nt) + (i = FFESTR_firstlINTGR); - ffestb_local_.decl.type = FFESTP_typeINTEGER; - needfunc = FALSE; - goto typefunc; /* :::::::::::::::::::: */ - - case FFESTR_firstBYTE: - p = ffelex_token_text (nt) + (i = FFESTR_firstlBYTE); - ffestb_local_.decl.type = FFESTP_typeBYTE; - needfunc = FALSE; - goto typefunc; /* :::::::::::::::::::: */ - - case FFESTR_firstWORD: - p = ffelex_token_text (nt) + (i = FFESTR_firstlWORD); - ffestb_local_.decl.type = FFESTP_typeWORD; - needfunc = FALSE; - goto typefunc; /* :::::::::::::::::::: */ - - case FFESTR_firstREAL: - p = ffelex_token_text (nt) + (i = FFESTR_firstlREAL); - ffestb_local_.decl.type = FFESTP_typeREAL; - needfunc = FALSE; - goto typefunc; /* :::::::::::::::::::: */ - - case FFESTR_firstCMPLX: - p = ffelex_token_text (nt) + (i = FFESTR_firstlCMPLX); - ffestb_local_.decl.type = FFESTP_typeCOMPLEX; - needfunc = FALSE; - goto typefunc; /* :::::::::::::::::::: */ - - case FFESTR_firstLGCL: - p = ffelex_token_text (nt) + (i = FFESTR_firstlLGCL); - ffestb_local_.decl.type = FFESTP_typeLOGICAL; - needfunc = FALSE; - goto typefunc; /* :::::::::::::::::::: */ - - case FFESTR_firstCHRCTR: - p = ffelex_token_text (nt) + (i = FFESTR_firstlCHRCTR); - ffestb_local_.decl.type = FFESTP_typeCHARACTER; - needfunc = FALSE; - goto typefunc; /* :::::::::::::::::::: */ - - case FFESTR_firstDBLPRCSN: - p = ffelex_token_text (nt) + (i = FFESTR_firstlDBLPRCSN); - ffestb_local_.decl.type = FFESTP_typeDBLPRCSN; - needfunc = TRUE; - goto typefunc; /* :::::::::::::::::::: */ - - case FFESTR_firstDBLCMPLX: - p = ffelex_token_text (nt) + (i = FFESTR_firstlDBLCMPLX); - ffestb_local_.decl.type = FFESTP_typeDBLCMPLX; - needfunc = TRUE; - goto typefunc; /* :::::::::::::::::::: */ - - case FFESTR_firstTYPE: - p = ffelex_token_text (nt) + (i = FFESTR_firstlTYPE); - ffestb_local_.decl.type = FFESTP_typeTYPE; - next = (ffelexHandler) ffestb_decl_recursive3_; - break; - - case FFESTR_firstFUNCTION: - p = ffelex_token_text (nt) + (i = FFESTR_firstlFUNCTION); - ffestb_local_.dummy.first_kw = FFESTR_firstFUNCTION; - ffestb_local_.dummy.badname = "FUNCTION"; - ffestb_local_.dummy.is_subr = FALSE; - next = (ffelexHandler) ffestb_decl_recursive4_; - break; - - case FFESTR_firstSUBROUTINE: - p = ffelex_token_text (nt) + (i = FFESTR_firstlSUBROUTINE); - ffestb_local_.dummy.first_kw = FFESTR_firstSUBROUTINE; - ffestb_local_.dummy.badname = "SUBROUTINE"; - ffestb_local_.dummy.is_subr = TRUE; - next = (ffelexHandler) ffestb_decl_recursive4_; - break; - - default: - ffelex_token_kill (ffestb_local_.decl.recursive); - ffelex_token_kill (nt); - goto bad_1; /* :::::::::::::::::::: */ - } - if (*p == '\0') - { - ffelex_token_kill (nt); - return (ffelexHandler) (*next) (t); - } - if (!ffesrc_is_name_init (*p)) - goto bad_i; /* :::::::::::::::::::: */ - ot = ffelex_token_name_from_names (nt, i, 0); - ffelex_token_kill (nt); - next = (ffelexHandler) (*next) (ot); - ffelex_token_kill (ot); - return (ffelexHandler) (*next) (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -typefunc: /* :::::::::::::::::::: */ - if (*p == '\0') - { - ffelex_token_kill (nt); - if (needfunc) /* DOUBLE PRECISION or DOUBLE COMPLEX? */ - { - ffelex_token_kill (ffestb_local_.decl.recursive); - goto bad_1; /* :::::::::::::::::::: */ - } - return (ffelexHandler) ffestb_decl_recursive1_ (t); - } - if (!ffesrc_is_name_init (*p)) - goto bad_i; /* :::::::::::::::::::: */ - ot = ffelex_token_names_from_names (nt, i, 0); - ffelex_token_kill (nt); - if (ffestr_first (ot) != FFESTR_firstFUNCTION) - goto bad_o; /* :::::::::::::::::::: */ - p = ffelex_token_text (ot) + (i = FFESTR_firstlFUNCTION); - if (!ffesrc_is_name_init (*p)) - goto bad_i; /* :::::::::::::::::::: */ - ffesta_tokens[1] = ffelex_token_name_from_names (ot, i, 0); - ffelex_token_kill (ot); - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.kindt = NULL; - ffestb_local_.decl.len = NULL; - ffestb_local_.decl.lent = NULL; - return (ffelexHandler) ffestb_decl_funcname_1_ (t); - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FUNCTION", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FUNCTION", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffelex_token_kill (ffestb_local_.decl.recursive); - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "type-declaration", nt, i, t); - ffelex_token_kill (nt); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_o: /* :::::::::::::::::::: */ - ffelex_token_kill (ffestb_local_.decl.recursive); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FUNCTION", ot); - ffelex_token_kill (ot); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_recursive1_ -- "RECURSIVE" generic-type - - return ffestb_decl_recursive1_; // to lexer - - Handle ASTERISK, OPEN_PAREN, or NAME. */ - -static ffelexHandler -ffestb_decl_recursive1_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeASTERISK: - ffesta_confirmed (); - ffestb_local_.decl.handler = (ffelexHandler) ffestb_decl_func_; - ffestb_local_.decl.badname = "TYPEFUNC"; - if (ffestb_local_.decl.type == FFESTP_typeCHARACTER) - return (ffelexHandler) ffestb_decl_starlen_; - return (ffelexHandler) ffestb_decl_starkind_; - - case FFELEX_typeOPEN_PAREN: - ffestb_local_.decl.handler = (ffelexHandler) ffestb_decl_func_; - ffestb_local_.decl.badname = "TYPEFUNC"; - if (ffestb_local_.decl.type == FFESTP_typeCHARACTER) - { - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.kindt = NULL; - ffestb_local_.decl.len = NULL; - ffestb_local_.decl.lent = NULL; - return (ffelexHandler) ffestb_decl_typeparams_; - } - return (ffelexHandler) ffestb_decl_kindparam_; - - case FFELEX_typeNAME: - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.kindt = NULL; - ffestb_local_.decl.len = NULL; - ffestb_local_.decl.lent = NULL; - return (ffelexHandler) ffestb_decl_func_ (t); - - default: - break; - } - - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FUNCTION", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_recursive2_ -- "RECURSIVE" "DOUBLE" - - return ffestb_decl_recursive2_; // to lexer - - Handle NAME. */ - -static ffelexHandler -ffestb_decl_recursive2_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - switch (ffestr_second (t)) - { - case FFESTR_secondPRECISION: - ffestb_local_.decl.type = FFESTP_typeDBLPRCSN; - break; - - case FFESTR_secondCOMPLEX: - ffestb_local_.decl.type = FFESTP_typeDBLCMPLX; - break; - - default: - goto bad; /* :::::::::::::::::::: */ - } - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.kindt = NULL; - ffestb_local_.decl.len = NULL; - ffestb_local_.decl.lent = NULL; - return (ffelexHandler) ffestb_decl_func_; - - default: - break; - } - -bad: /* :::::::::::::::::::: */ - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FUNCTION", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_recursive3_ -- "RECURSIVE" "TYPE" - - return ffestb_decl_recursive3_; // to lexer - - Handle OPEN_PAREN. */ - -static ffelexHandler -ffestb_decl_recursive3_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - ffestb_local_.decl.handler = (ffelexHandler) ffestb_decl_func_; - ffestb_local_.decl.badname = "TYPEFUNC"; - return (ffelexHandler) ffestb_decl_typetype1_; - - default: - break; - } - - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FUNCTION", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_recursive4_ -- "RECURSIVE" "FUNCTION/SUBROUTINE" - - return ffestb_decl_recursive4_; // to lexer - - Handle OPEN_PAREN. */ - -static ffelexHandler -ffestb_decl_recursive4_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_dummy1_; - - default: - break; - } - - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FUNCTION", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -#endif -/* ffestb_decl_typetype -- Parse the R426/R501/R1219 TYPE statement - - return ffestb_decl_typetype; // to lexer - - Make sure the statement has a valid form for the TYPE statement. If it - does, implement the statement. */ - -#if FFESTR_F90 -ffelexHandler -ffestb_decl_typetype (ffelexToken t) -{ - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstTYPE) - goto bad_0; /* :::::::::::::::::::: */ - break; - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstTYPE) - goto bad_0; /* :::::::::::::::::::: */ - if (ffelex_token_length (ffesta_tokens[0]) != FFESTR_firstlTYPE) - goto bad_0; /* :::::::::::::::::::: */ - break; - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - break; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOLONCOLON:/* Not COMMA: R424 "TYPE,PUBLIC::A". */ - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - - ffestb_local_.decl.recursive = NULL; - ffestb_local_.decl.parameter = FALSE; /* No PARAMETER attribute seen. */ - ffestb_local_.decl.coloncolon = FALSE; /* No COLONCOLON seen. */ - - ffestb_local_.decl.handler = (ffelexHandler) ffestb_decl_attrsp_; - ffestb_local_.decl.badname = "type-declaration"; - return (ffelexHandler) ffestb_decl_typetype1_; - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "type-declaration", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "type-declaration", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ -} - -#endif /* ffestb_decl_attrs_ -- "type" [type parameters] COMMA return ffestb_decl_attrs_; // to lexer @@ -21508,14 +15050,6 @@ ffestb_decl_attrs_ (ffelexToken t) case FFELEX_typeNAME: switch (ffestr_first (t)) { -#if FFESTR_F90 - case FFESTR_firstALLOCATABLE: - if (!ffesta_is_inhibited ()) - ffestc_decl_attrib (FFESTP_attribALLOCATABLE, t, - FFESTR_otherNone, NULL); - return (ffelexHandler) ffestb_decl_attrs_7_; -#endif - case FFESTR_firstDIMENSION: ffesta_tokens[1] = ffelex_token_use (t); return (ffelexHandler) ffestb_decl_attrs_1_; @@ -21526,26 +15060,12 @@ ffestb_decl_attrs_ (ffelexToken t) FFESTR_otherNone, NULL); return (ffelexHandler) ffestb_decl_attrs_7_; -#if FFESTR_F90 - case FFESTR_firstINTENT: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_decl_attrs_3_; -#endif - case FFESTR_firstINTRINSIC: if (!ffesta_is_inhibited ()) ffestc_decl_attrib (FFESTP_attribINTRINSIC, t, FFESTR_otherNone, NULL); return (ffelexHandler) ffestb_decl_attrs_7_; -#if FFESTR_F90 - case FFESTR_firstOPTIONAL: - if (!ffesta_is_inhibited ()) - ffestc_decl_attrib (FFESTP_attribOPTIONAL, t, - FFESTR_otherNone, NULL); - return (ffelexHandler) ffestb_decl_attrs_7_; -#endif - case FFESTR_firstPARAMETER: ffestb_local_.decl.parameter = TRUE; if (!ffesta_is_inhibited ()) @@ -21553,42 +15073,12 @@ ffestb_decl_attrs_ (ffelexToken t) FFESTR_otherNone, NULL); return (ffelexHandler) ffestb_decl_attrs_7_; -#if FFESTR_F90 - case FFESTR_firstPOINTER: - if (!ffesta_is_inhibited ()) - ffestc_decl_attrib (FFESTP_attribPOINTER, t, - FFESTR_otherNone, NULL); - return (ffelexHandler) ffestb_decl_attrs_7_; -#endif - -#if FFESTR_F90 - case FFESTR_firstPRIVATE: - if (!ffesta_is_inhibited ()) - ffestc_decl_attrib (FFESTP_attribPRIVATE, t, - FFESTR_otherNone, NULL); - return (ffelexHandler) ffestb_decl_attrs_7_; - - case FFESTR_firstPUBLIC: - if (!ffesta_is_inhibited ()) - ffestc_decl_attrib (FFESTP_attribPUBLIC, t, - FFESTR_otherNone, NULL); - return (ffelexHandler) ffestb_decl_attrs_7_; -#endif - case FFESTR_firstSAVE: if (!ffesta_is_inhibited ()) ffestc_decl_attrib (FFESTP_attribSAVE, t, FFESTR_otherNone, NULL); return (ffelexHandler) ffestb_decl_attrs_7_; -#if FFESTR_F90 - case FFESTR_firstTARGET: - if (!ffesta_is_inhibited ()) - ffestc_decl_attrib (FFESTP_attribTARGET, t, - FFESTR_otherNone, NULL); - return (ffelexHandler) ffestb_decl_attrs_7_; -#endif - default: ffesta_ffebad_1t (FFEBAD_INVALID_TYPEDECL_ATTR, t); return (ffelexHandler) ffestb_decl_attrs_7_; @@ -21683,155 +15173,6 @@ bad: /* :::::::::::::::::::: */ return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); } -/* ffestb_decl_attrs_3_ -- "type" [type parameters] ",INTENT" - - return ffestb_decl_attrs_3_; // to lexer - - Handle OPEN_PAREN. */ - -#if FFESTR_F90 -static ffelexHandler -ffestb_decl_attrs_3_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - return (ffelexHandler) ffestb_decl_attrs_4_; - - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_ffebad_1t (FFEBAD_INVALID_TYPEDECL_ATTR, ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffestb_decl_attrs_7_ (t); - - default: - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_decl_finish (); - ffelex_token_kill (ffesta_tokens[1]); - ffesta_ffebad_1t (FFEBAD_INVALID_TYPEDECL_ATTR, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_attrs_4_ -- "type" [type parameters] ",INTENT" OPEN_PAREN - - return ffestb_decl_attrs_4_; // to lexer - - Handle NAME. */ - -static ffelexHandler -ffestb_decl_attrs_4_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffestb_local_.decl.kw = ffestr_other (t); - switch (ffestb_local_.decl.kw) - { - case FFESTR_otherIN: - return (ffelexHandler) ffestb_decl_attrs_5_; - - case FFESTR_otherINOUT: - return (ffelexHandler) ffestb_decl_attrs_6_; - - case FFESTR_otherOUT: - return (ffelexHandler) ffestb_decl_attrs_6_; - - default: - ffestb_local_.decl.kw = FFESTR_otherNone; - ffesta_ffebad_1t (FFEBAD_INVALID_TYPEDECL_ATTR, t); - return (ffelexHandler) ffestb_decl_attrs_5_; - } - break; - - default: - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_decl_finish (); - ffelex_token_kill (ffesta_tokens[1]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "type-declaration", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_attrs_5_ -- "type" [type parameters] ",INTENT" OPEN_PAREN "IN" - - return ffestb_decl_attrs_5_; // to lexer - - Handle NAME or CLOSE_PAREN. */ - -static ffelexHandler -ffestb_decl_attrs_5_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - switch (ffestr_other (t)) - { - case FFESTR_otherOUT: - if (ffestb_local_.decl.kw != FFESTR_otherNone) - ffestb_local_.decl.kw = FFESTR_otherINOUT; - return (ffelexHandler) ffestb_decl_attrs_6_; - - default: - if (ffestb_local_.decl.kw != FFESTR_otherNone) - { - ffestb_local_.decl.kw = FFESTR_otherNone; - ffesta_ffebad_1t (FFEBAD_INVALID_TYPEDECL_ATTR, t); - } - return (ffelexHandler) ffestb_decl_attrs_5_; - } - break; - - case FFELEX_typeCLOSE_PAREN: - return (ffelexHandler) ffestb_decl_attrs_6_ (t); - - default: - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_decl_finish (); - ffelex_token_kill (ffesta_tokens[1]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "type-declaration", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_attrs_6_ -- "type" [type parameters] ",INTENT" OPEN_PAREN "IN" - ["OUT"] - - return ffestb_decl_attrs_6_; // to lexer - - Handle CLOSE_PAREN. */ - -static ffelexHandler -ffestb_decl_attrs_6_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_PAREN: - if ((ffestb_local_.decl.kw != FFESTR_otherNone) - && !ffesta_is_inhibited ()) - ffestc_decl_attrib (FFESTP_attribINTENT, ffesta_tokens[1], - ffestb_local_.decl.kw, NULL); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffestb_decl_attrs_7_; - - default: - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_decl_finish (); - ffelex_token_kill (ffesta_tokens[1]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "type-declaration", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -#endif /* ffestb_decl_attrs_7_ -- "type" [type parameters] attribute return ffestb_decl_attrs_7_; // to lexer @@ -22616,17 +15957,6 @@ ffestb_decl_entsp_1_ (ffelexToken t) case FFELEX_typeNAME: switch (ffestr_first (ffesta_tokens[1])) { -#if FFESTR_F90 - case FFESTR_firstRECURSIVE: - if (ffestr_first (t) != FFESTR_firstFUNCTION) - { - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FUNCTION", t); - break; - } - ffestb_local_.decl.recursive = ffesta_tokens[1]; - return (ffelexHandler) ffestb_decl_funcname_; -#endif - case FFESTR_firstFUNCTION: ffelex_token_kill (ffesta_tokens[1]); return (ffelexHandler) ffestb_decl_funcname_ (t); @@ -22702,23 +16032,6 @@ ffestb_decl_entsp_2_ (ffelexToken t) } switch (ffestr_first (ffesta_tokens[1])) { -#if FFESTR_F90 - case FFESTR_firstRECURSIVEFNCTN: - if (!asterisk_ok) - break; /* For our own convenience, treat as non-FN - stmt. */ - p = ffelex_token_text (ffesta_tokens[1]) - + (i = FFESTR_firstlRECURSIVEFNCTN); - if (!ffesrc_is_name_init (*p)) - break; - ffestb_local_.decl.recursive - = ffelex_token_name_from_names (ffesta_tokens[1], 0, - FFESTR_firstlRECURSIVEFNCTN); - ffesta_tokens[2] = ffelex_token_name_from_names (ffesta_tokens[1], - FFESTR_firstlRECURSIVEFNCTN, 0); - return (ffelexHandler) ffestb_decl_entsp_3_; -#endif - case FFESTR_firstFUNCTION: if (!asterisk_ok) break; /* For our own convenience, treat as non-FN @@ -22741,20 +16054,6 @@ ffestb_decl_entsp_2_ (ffelexToken t) ffestb_local_.decl.aster_after = FALSE; switch (ffestr_first (ffesta_tokens[1])) { -#if FFESTR_F90 - case FFESTR_firstRECURSIVEFNCTN: - p = ffelex_token_text (ffesta_tokens[1]) - + (i = FFESTR_firstlRECURSIVEFNCTN); - if (!ffesrc_is_name_init (*p)) - break; - ffestb_local_.decl.recursive - = ffelex_token_name_from_names (ffesta_tokens[1], 0, - FFESTR_firstlRECURSIVEFNCTN); - ffesta_tokens[2] = ffelex_token_name_from_names (ffesta_tokens[1], - FFESTR_firstlRECURSIVEFNCTN, 0); - return (ffelexHandler) ffestb_decl_entsp_5_ (t); -#endif - case FFESTR_firstFUNCTION: p = ffelex_token_text (ffesta_tokens[1]) + (i = FFESTR_firstlFUNCTION); @@ -23091,65 +16390,6 @@ ffestb_decl_entsp_8_ (ffelexToken t) return (ffelexHandler) (*next) (t); } -/* ffestb_decl_func_ -- ["type" [type parameters]] RECURSIVE - - return ffestb_decl_func_; // to lexer - - Handle "FUNCTION". */ - -#if FFESTR_F90 -static ffelexHandler -ffestb_decl_func_ (ffelexToken t) -{ - const char *p; - ffeTokenLength i; - - ffelex_set_names (FALSE); - - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - if (ffestr_first (t) != FFESTR_firstFUNCTION) - break; - return (ffelexHandler) ffestb_decl_funcname_; - - case FFELEX_typeNAMES: - ffesta_confirmed (); - if (ffestr_first (t) != FFESTR_firstFUNCTION) - break; - p = ffelex_token_text (t) + (i = FFESTR_firstlFUNCTION); - if (*p == '\0') - break; - if (!ffesrc_is_name_init (*p)) - goto bad_i; /* :::::::::::::::::::: */ - ffesta_tokens[1] = ffelex_token_name_from_names (t, i, 0); - return (ffelexHandler) ffestb_decl_funcname_1_; - - default: - break; - } - - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FUNCTION", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_i: /* :::::::::::::::::::: */ - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "FUNCTION", t, i, NULL); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -#endif /* ffestb_decl_funcname_ -- "type" [type parameters] [RECURSIVE] FUNCTION return ffestb_decl_funcname_; // to lexer @@ -23566,593 +16806,6 @@ ffestb_decl_funcname_9_ (ffelexToken t) ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FUNCTION", t); return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); } - -/* ffestb_V003 -- Parse the STRUCTURE statement - - return ffestb_V003; // to lexer - - Make sure the statement has a valid form for the STRUCTURE statement. - If it does, implement the statement. */ - -#if FFESTR_VXT -ffelexHandler -ffestb_V003 (ffelexToken t) -{ - ffeTokenLength i; - const char *p; - ffelexToken nt; - ffelexHandler next; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstSTRUCTURE) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeNAME: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_V003_start (NULL); - ffestb_local_.structure.started = TRUE; - return (ffelexHandler) ffestb_V0034_ (t); - - case FFELEX_typeSLASH: - ffesta_confirmed (); - return (ffelexHandler) ffestb_V0031_; - } - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstSTRUCTURE) - goto bad_0; /* :::::::::::::::::::: */ - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlSTRUCTURE); - switch (ffelex_token_type (t)) - { - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); - break; - - case FFELEX_typeSLASH: - ffesta_confirmed (); - if (*p != '\0') - goto bad_1; /* :::::::::::::::::::: */ - return (ffelexHandler) ffestb_V0031_; - - case FFELEX_typeOPEN_PAREN: - break; - } - - /* Here, we have at least one char after "STRUCTURE" and t is COMMA, - EOS/SEMICOLON, or OPEN_PAREN. */ - - if (!ffesrc_is_name_init (*p)) - goto bad_i; /* :::::::::::::::::::: */ - nt = ffelex_token_name_from_names (ffesta_tokens[0], i, 0); - if (ffelex_token_type (t) == FFELEX_typeOPEN_PAREN) - ffestb_local_.structure.started = FALSE; - else - { - if (!ffesta_is_inhibited ()) - ffestc_V003_start (NULL); - ffestb_local_.structure.started = TRUE; - } - next = (ffelexHandler) ffestb_V0034_ (nt); - ffelex_token_kill (nt); - return (ffelexHandler) (*next) (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "STRUCTURE", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "STRUCTURE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "STRUCTURE", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0031_ -- "STRUCTURE" SLASH - - return ffestb_V0031_; // to lexer - - Handle NAME. */ - -static ffelexHandler -ffestb_V0031_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_V0032_; - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "STRUCTURE", t); - break; - } - - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0032_ -- "STRUCTURE" SLASH NAME - - return ffestb_V0032_; // to lexer - - Handle SLASH. */ - -static ffelexHandler -ffestb_V0032_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeSLASH: - if (!ffesta_is_inhibited ()) - ffestc_V003_start (ffesta_tokens[1]); - ffestb_local_.structure.started = TRUE; - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffestb_V0033_; - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "STRUCTURE", t); - break; - } - - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0033_ -- "STRUCTURE" SLASH NAME SLASH - - return ffestb_V0033_; // to lexer - - Handle NAME or EOS/SEMICOLON. */ - -static ffelexHandler -ffestb_V0033_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - return (ffelexHandler) ffestb_V0034_ (t); - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffesta_is_inhibited ()) - ffestc_V003_finish (); - return (ffelexHandler) ffesta_zero (t); - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "STRUCTURE", t); - break; - } - - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0034_ -- "STRUCTURE" [SLASH NAME SLASH] - - return ffestb_V0034_; // to lexer - - Handle NAME. */ - -static ffelexHandler -ffestb_V0034_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_V0035_; - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "STRUCTURE", t); - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_V003_finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0035_ -- "STRUCTURE" ... NAME - - return ffestb_V0035_; // to lexer - - Handle OPEN_PAREN. */ - -static ffelexHandler -ffestb_V0035_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - ffestb_subrargs_.dim_list.dims = ffestt_dimlist_create (); - ffestb_subrargs_.dim_list.handler = (ffelexHandler) ffestb_V0036_; - ffestb_subrargs_.dim_list.pool = ffesta_output_pool; - ffestb_subrargs_.dim_list.ctx = FFEEXPR_contextDIMLISTCOMMON; -#ifdef FFECOM_dimensionsMAX - ffestb_subrargs_.dim_list.ndims = 0; -#endif - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextDIMLISTCOMMON, (ffeexprCallback) ffestb_subr_dimlist_); - - case FFELEX_typeCOMMA: - if (!ffesta_is_inhibited ()) - ffestc_V003_item (ffesta_tokens[1], NULL); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffestb_V0034_; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffesta_is_inhibited ()) - { - ffestc_V003_item (ffesta_tokens[1], NULL); - ffestc_V003_finish (); - } - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffesta_zero (t); - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "STRUCTURE", t); - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_V003_finish (); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0036_ -- "STRUCTURE" ... NAME OPEN_PAREN dimlist CLOSE_PAREN - - return ffestb_V0036_; // to lexer - - Handle COMMA or EOS/SEMICOLON. */ - -static ffelexHandler -ffestb_V0036_ (ffelexToken t) -{ - if (!ffestb_subrargs_.dim_list.ok) - goto bad; /* :::::::::::::::::::: */ - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - { - if (!ffestb_local_.structure.started) - { - ffestc_V003_start (NULL); - ffestb_local_.structure.started = TRUE; - } - ffestc_V003_item (ffesta_tokens[1], - ffestb_subrargs_.dim_list.dims); - } - ffelex_token_kill (ffesta_tokens[1]); - ffestt_dimlist_kill (ffestb_subrargs_.dim_list.dims); - return (ffelexHandler) ffestb_V0034_; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - { - if (!ffestb_local_.structure.started) - ffestc_V003_start (NULL); - ffestc_V003_item (ffesta_tokens[1], - ffestb_subrargs_.dim_list.dims); - ffestc_V003_finish (); - } - ffelex_token_kill (ffesta_tokens[1]); - ffestt_dimlist_kill (ffestb_subrargs_.dim_list.dims); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - -bad: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "STRUCTURE", t); - if (ffestb_local_.structure.started && !ffesta_is_inhibited ()) - ffestc_V003_finish (); - ffestt_dimlist_kill (ffestb_subrargs_.dim_list.dims); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V016 -- Parse the RECORD statement - - return ffestb_V016; // to lexer - - Make sure the statement has a valid form for the RECORD statement. If it - does, implement the statement. */ - -ffelexHandler -ffestb_V016 (ffelexToken t) -{ - const char *p; - ffeTokenLength i; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstRECORD) - goto bad_0; /* :::::::::::::::::::: */ - break; - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstRECORD) - goto bad_0; /* :::::::::::::::::::: */ - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlRECORD); - if (*p != '\0') - goto bad_i; /* :::::::::::::::::::: */ - break; - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeSLASH: - break; - } - - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_V016_start (); - return (ffelexHandler) ffestb_V0161_; - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "RECORD", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "RECORD", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "RECORD", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0161_ -- "RECORD" SLASH - - return ffestb_V0161_; // to lexer - - Handle NAME. */ - -static ffelexHandler -ffestb_V0161_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - if (!ffesta_is_inhibited ()) - ffestc_V016_item_structure (t); - return (ffelexHandler) ffestb_V0162_; - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "RECORD", t); - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_V016_finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0162_ -- "RECORD" SLASH NAME - - return ffestb_V0162_; // to lexer - - Handle SLASH. */ - -static ffelexHandler -ffestb_V0162_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeSLASH: - return (ffelexHandler) ffestb_V0163_; - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "RECORD", t); - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_V016_finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0163_ -- "RECORD" SLASH NAME SLASH - - return ffestb_V0163_; // to lexer - - Handle NAME. */ - -static ffelexHandler -ffestb_V0163_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_V0164_; - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "RECORD", t); - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_V016_finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0164_ -- "RECORD" ... NAME - - return ffestb_V0164_; // to lexer - - Handle OPEN_PAREN. */ - -static ffelexHandler -ffestb_V0164_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - ffestb_subrargs_.dim_list.dims = ffestt_dimlist_create (); - ffestb_subrargs_.dim_list.handler = (ffelexHandler) ffestb_V0165_; - ffestb_subrargs_.dim_list.pool = ffesta_output_pool; - ffestb_subrargs_.dim_list.ctx = FFEEXPR_contextDIMLISTCOMMON; -#ifdef FFECOM_dimensionsMAX - ffestb_subrargs_.dim_list.ndims = 0; -#endif - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextDIMLISTCOMMON, (ffeexprCallback) ffestb_subr_dimlist_); - - case FFELEX_typeCOMMA: - if (!ffesta_is_inhibited ()) - ffestc_V016_item_object (ffesta_tokens[1], NULL); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffestb_V0166_; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffesta_is_inhibited ()) - { - ffestc_V016_item_object (ffesta_tokens[1], NULL); - ffestc_V016_finish (); - } - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffesta_zero (t); - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "RECORD", t); - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_V016_finish (); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0165_ -- "RECORD" ... NAME OPEN_PAREN dimlist CLOSE_PAREN - - return ffestb_V0165_; // to lexer - - Handle COMMA or EOS/SEMICOLON. */ - -static ffelexHandler -ffestb_V0165_ (ffelexToken t) -{ - if (!ffestb_subrargs_.dim_list.ok) - goto bad; /* :::::::::::::::::::: */ - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - if (!ffesta_is_inhibited ()) - ffestc_V016_item_object (ffesta_tokens[1], - ffestb_subrargs_.dim_list.dims); - ffelex_token_kill (ffesta_tokens[1]); - ffestt_dimlist_kill (ffestb_subrargs_.dim_list.dims); - return (ffelexHandler) ffestb_V0166_; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffesta_is_inhibited ()) - { - ffestc_V016_item_object (ffesta_tokens[1], - ffestb_subrargs_.dim_list.dims); - ffestc_V016_finish (); - } - ffelex_token_kill (ffesta_tokens[1]); - ffestt_dimlist_kill (ffestb_subrargs_.dim_list.dims); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - -bad: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "RECORD", t); - if (ffestb_local_.structure.started && !ffesta_is_inhibited ()) - ffestc_V016_finish (); - ffestt_dimlist_kill (ffestb_subrargs_.dim_list.dims); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0166_ -- "RECORD" SLASH NAME SLASH NAME [OPEN_PAREN dimlist - CLOSE_PAREN] COMMA - - return ffestb_V0166_; // to lexer - - Handle NAME or SLASH. */ - -static ffelexHandler -ffestb_V0166_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_V0164_; - - case FFELEX_typeSLASH: - return (ffelexHandler) ffestb_V0161_; - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "RECORD", t); - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_V016_finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -#endif /* ffestb_V027 -- Parse the VXT PARAMETER statement return ffestb_V027; // to lexer @@ -24423,12 +17076,6 @@ ffestb_decl_R539 (ffelexToken t) case FFESTR_secondNONE: return (ffelexHandler) ffestb_decl_R5394_; -#if FFESTR_F90 - case FFESTR_secondTYPE: - ffestb_local_.decl.type = FFESTP_typeTYPE; - return (ffelexHandler) ffestb_decl_R5393_; -#endif - default: goto bad_1; /* :::::::::::::::::::: */ } @@ -24509,12 +17156,6 @@ ffestb_decl_R539 (ffelexToken t) case FFESTR_secondNONE: return (ffelexHandler) ffestb_decl_R5394_ (t); -#if FFESTR_F90 - case FFESTR_secondTYPE: - ffestb_local_.decl.type = FFESTP_typeTYPE; - return (ffelexHandler) ffestb_decl_R5393_ (t); -#endif - default: goto bad_1; /* :::::::::::::::::::: */ } @@ -24619,34 +17260,6 @@ bad: /* :::::::::::::::::::: */ return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); } -/* ffestb_decl_R5393_ -- "IMPLICIT" "TYPE" - - return ffestb_decl_R5393_; // to lexer - - Handle OPEN_PAREN. */ - -#if FFESTR_F90 -static ffelexHandler -ffestb_decl_R5393_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - ffestb_local_.decl.handler = (ffelexHandler) ffestb_decl_R539letters_; - ffestb_local_.decl.badname = "IMPLICIT"; - return (ffelexHandler) ffestb_decl_typetype1_; - - default: - break; - } - - if (ffestb_local_.decl.imp_started && !ffesta_is_inhibited ()) - ffestc_R539finish (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "IMPLICIT", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -#endif /* ffestb_decl_R5394_ -- "IMPLICIT" "NONE" return ffestb_decl_R5394_; // to lexer @@ -24734,12 +17347,6 @@ ffestb_decl_R5395_ (ffelexToken t) ffestb_local_.decl.lent = NULL; return (ffelexHandler) ffestb_decl_R539letters_; -#if FFESTR_F90 - case FFESTR_secondTYPE: - ffestb_local_.decl.type = FFESTP_typeTYPE; - return (ffelexHandler) ffestb_decl_R5393_; -#endif - default: break; } |