Changeset 02d19d8 in rtems


Ignore:
Timestamp:
Feb 5, 1998, 8:05:26 PM (22 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
f02ffca
Parents:
b37137b
Message:

Added code to more correctly process abstract types (handle, range, etc).

Location:
doc/tools/pdl2texi
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • doc/tools/pdl2texi/Makefile

    rb37137b r02d19d8  
    6565        ./$(PROG) -w -v -p "Turret Subsystem" -u "Turret Subsystem" $(BASE).d
    6666
     67enum:
     68        ./$(PROG) -w -v -p "Magic Subsystem" \
     69            -u "Magic Subsystem" test_cases/enum.d
     70        ./$(PROG) -w -v -p "Magic Subsystem" \
     71            -u "Magic Subsystem" test_cases/enumbad.d
     72       
     73avdas:
     74        ./$(PROG) -v -p "Magic Subsystem" \
     75            -u "Magic Subsystem" test_cases/avdas.d
     76       
    6777clean:
    6878        rm -f *.o $(PROG) *.txt core *.html $(PROJECT) Drive.texi
    6979        rm -f *.dvi *.ps *.log *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr $(BASE)
     80        rm -f test_cases/*.txt test_cases/*.texi
    7081
  • doc/tools/pdl2texi/main.c

    rb37137b r02d19d8  
    1010 *    + rudimentary statistics
    1111 *    + forgiveness features
     12 *    + output in Texinfo format
     13 *    + output in a form that a sibling MS-Word VBA program can format
    1214 *
    1315 *  CHECKS PERFORMED:
     
    1517 *    + unexpected end of file
    1618 *    + line should have a colon
    17  *    + basic text (to right or below) associated with keyword improperly placed
     19 *    + basic text (to right or below) associated with keyword
     20 *      improperly placed
    1821 *    + an "incomplete marker" is still in place
    1922 *    + missing keywords within a subsection
     
    29412944        strcpy( new_line->Contents, "@Example = " );
    29422945
    2943         do {
     2946        while ( !line->keyword ) {
    29442947          if ( strlen( line->Contents ) ) {
    29452948            new_line->keyword = line->keyword;
     
    29602963            strcpy( new_line->Contents, "@Example = " );
    29612964          }
    2962         } while ( !line->keyword );
     2965        }
    29632966
    29642967        /* at this point line points to the next keyword */
     
    32533256  boolean       members_found = FALSE;
    32543257  boolean       enumerated_found = FALSE;
     3258  boolean       no_range_or_members = FALSE;
    32553259  boolean       true_found = FALSE;
    32563260  boolean       false_found = FALSE;
     
    32653269    else if ( line->keyword == MEMBERS ) {
    32663270      members_found = TRUE;
    3267     } else if ( line->keyword == TYPE || line->keyword == DERIVATION ) {
     3271    } else if ( line->keyword == TYPE ) {
    32683272      if ( strstr( line->Contents, "enumerated" ) ||
    32693273           strstr( line->Contents, "structure" ) )
    32703274        enumerated_found = TRUE;
    3271     }
    3272   }
    3273 
    3274   if ( !range_found && !members_found ) {
    3275     fprintf(
    3276        stderr,
    3277        "Neither range nor members keyword present in "
    3278          "subsection starting at line %d\n",
    3279        start->number
    3280      );
    3281      errors++;
     3275    } else if ( line->keyword == DERIVATION ) {
     3276      if ( strstr( line->Contents, "enumerated" ) ||
     3277           strstr( line->Contents, "structure" ) ) {
     3278        enumerated_found = TRUE;
     3279      } else if ( strstr( line->Contents, "handle" ) ||
     3280                  strstr( line->Contents, "array" ) ||
     3281                  strstr( line->Contents, "string" ) ) {
     3282        no_range_or_members = TRUE;
     3283      }
     3284    }
     3285  }
     3286
     3287  if ( no_range_or_members ) {
     3288/* This code does not like:
     3289
     3290ABSTRACT TYPE: Times
     3291  DESCRIPTION:
     3292    This type specifies mode elapsed times.
     3293  VISIBILITY: public
     3294  DERIVATION: array of Elapsed_Seconds of Timeutil
     3295  RANGE: COMM - ENGAGE of Current_mode_t
     3296
     3297    if ( range_found ) {
     3298       fprintf(
     3299         stderr,
     3300         "Range should not be specified in subsection starting at line %d\n",
     3301         start->number
     3302       );
     3303       errors++;
     3304    }
     3305*/
     3306    if ( members_found ) {
     3307       fprintf(
     3308         stderr,
     3309         "Members should not be specified in subsection starting at line %d\n",
     3310         start->number
     3311       );
     3312       errors++;
     3313    }
     3314  } else {
     3315    if ( !range_found && !members_found ) {
     3316      fprintf(
     3317         stderr,
     3318         "Neither range nor members keyword present in "
     3319           "subsection starting at line %d\n",
     3320         start->number
     3321       );
     3322       errors++;
     3323    }
     3324
     3325    if ( !enumerated_found  && !range_found ) {
     3326      fprintf(
     3327         stderr,
     3328         "Type does not have range specified in "
     3329           "subsection starting at line %d\n",
     3330         start->number
     3331       );
     3332       errors++;
     3333    }
     3334
    32823335  }
    32833336
     
    32983351       stderr,
    32993352       "Enumerated type without list of members in "
    3300          "subsection starting at line %d\n",
    3301        start->number
    3302      );
    3303      errors++;
    3304   }
    3305 
    3306   if ( !enumerated_found  && !range_found ) {
    3307     fprintf(
    3308        stderr,
    3309        "Type does not have range specified in "
    33103353         "subsection starting at line %d\n",
    33113354       start->number
Note: See TracChangeset for help on using the changeset viewer.