1*3d8817e4Smiod 2*3d8817e4Smiod: SYNOPSIS 3*3d8817e4Smiod skip_past_newline 4*3d8817e4Smiod get_stuff_in_command 5*3d8817e4Smiod paramstuff 6*3d8817e4Smiod indent 7*3d8817e4Smiod maybecatstr 8*3d8817e4Smiod; 9*3d8817e4Smiod 10*3d8817e4Smiod: ignore 11*3d8817e4Smiod skip_past_newline 12*3d8817e4Smiod get_stuff_in_command 13*3d8817e4Smiod outputdots 14*3d8817e4Smiod maybecatstr 15*3d8817e4Smiod ; 16*3d8817e4Smiod 17*3d8817e4Smiod: CODE_FRAGMENT 18*3d8817e4Smiod ignore ; 19*3d8817e4Smiod 20*3d8817e4Smiod: external 21*3d8817e4Smiod 0 internalmode ignore ; 22*3d8817e4Smiod 23*3d8817e4Smiod: internal 24*3d8817e4Smiod 1 internalmode ignore ; 25*3d8817e4Smiod 26*3d8817e4Smiod- input stack { a b } output b if internal, a if external 27*3d8817e4Smiod: ifinternal 28*3d8817e4Smiod "" swap 1 internalmode maybecatstr 29*3d8817e4Smiod swap 30*3d8817e4Smiod "" swap 0 internalmode maybecatstr 31*3d8817e4Smiod catstr 32*3d8817e4Smiod ; 33*3d8817e4Smiod 34*3d8817e4Smiod- Put note in output string, regardless of internal mode. 35*3d8817e4Smiod: COMMENT 36*3d8817e4Smiod skip_past_newline 37*3d8817e4Smiod get_stuff_in_command 38*3d8817e4Smiod translatecomments 39*3d8817e4Smiod catstr 40*3d8817e4Smiod ; 41*3d8817e4Smiod 42*3d8817e4Smiod- SENUM enum-type-name 43*3d8817e4Smiod- ENUM enum-name 44*3d8817e4Smiod- ENUMX addl-enum-name 45*3d8817e4Smiod- ENUMDOC doc for preceding enums 46*3d8817e4Smiod- ENDSENUM max-enum-name 47*3d8817e4Smiod 48*3d8817e4Smiod: make_enum_header 49*3d8817e4Smiod dup 50*3d8817e4Smiod "enum " swap catstr 51*3d8817e4Smiod " {\n" catstr 52*3d8817e4Smiod swap " _dummy_first_" swap catstr catstr 53*3d8817e4Smiod ",\n" catstr 54*3d8817e4Smiod ; 55*3d8817e4Smiod: make_string_table_header 56*3d8817e4Smiod dup 57*3d8817e4Smiod "#ifdef _BFD_MAKE_TABLE_" swap catstr swap 58*3d8817e4Smiod "\n\nstatic const char *const " swap catstr catstr 59*3d8817e4Smiod "_names[] = { \"@@uninitialized@@\",\n" catstr 60*3d8817e4Smiod ; 61*3d8817e4Smiod: SENUM 62*3d8817e4Smiod skip_past_newline 63*3d8817e4Smiod copy_past_newline 64*3d8817e4Smiod remchar 65*3d8817e4Smiod dup 66*3d8817e4Smiod make_enum_header 67*3d8817e4Smiod swap 68*3d8817e4Smiod make_string_table_header 69*3d8817e4Smiod ifinternal 70*3d8817e4Smiod catstr 71*3d8817e4Smiod get_stuff_in_command catstr 72*3d8817e4Smiod translatecomments ; 73*3d8817e4Smiod: ENDSENUM 74*3d8817e4Smiod skip_past_newline 75*3d8817e4Smiod copy_past_newline strip_trailing_newlines 76*3d8817e4Smiod dup 77*3d8817e4Smiod " " swap catstr " };\n" catstr swap 78*3d8817e4Smiod " \"@@overflow: " swap catstr "@@\",\n};\n#endif\n\n" catstr 79*3d8817e4Smiod ifinternal 80*3d8817e4Smiod catstr 81*3d8817e4Smiod ; 82*3d8817e4Smiod: make_enumerator 83*3d8817e4Smiod " " swap catstr 84*3d8817e4Smiod ",\n" catstr 85*3d8817e4Smiod ; 86*3d8817e4Smiod: make_enumerator_string 87*3d8817e4Smiod " \"" swap catstr 88*3d8817e4Smiod "\",\n" catstr 89*3d8817e4Smiod ; 90*3d8817e4Smiod: ENUM 91*3d8817e4Smiod skip_past_newline 92*3d8817e4Smiod copy_past_newline 93*3d8817e4Smiod remchar 94*3d8817e4Smiod dup 95*3d8817e4Smiod make_enumerator 96*3d8817e4Smiod swap 97*3d8817e4Smiod make_enumerator_string 98*3d8817e4Smiod ifinternal 99*3d8817e4Smiod ; 100*3d8817e4Smiod: ENUMX ENUM catstr ; 101*3d8817e4Smiod: ENUMEQ 102*3d8817e4Smiod skip_past_newline 103*3d8817e4Smiod "#define " 104*3d8817e4Smiod copy_past_newline remchar 105*3d8817e4Smiod catstr 106*3d8817e4Smiod " " 107*3d8817e4Smiod catstr 108*3d8817e4Smiod copy_past_newline 109*3d8817e4Smiod catstr 110*3d8817e4Smiod "" swap 0 internalmode maybecatstr 111*3d8817e4Smiod ; 112*3d8817e4Smiod: ENUMEQX ENUMEQ catstr ; 113*3d8817e4Smiod: ENUMDOC 114*3d8817e4Smiod skip_past_newline 115*3d8817e4Smiod get_stuff_in_command 116*3d8817e4Smiod strip_trailing_newlines 117*3d8817e4Smiod "\n{* " swap catstr " *}\n" catstr 118*3d8817e4Smiod translatecomments 119*3d8817e4Smiod - discard it if we're doing internal mode 120*3d8817e4Smiod "" swap 0 internalmode maybecatstr 121*3d8817e4Smiod swap 122*3d8817e4Smiod catstr catstr 123*3d8817e4Smiod ; 124*3d8817e4Smiod: ENDDD external ; 125*3d8817e4Smiod: SECTION ignore ; 126*3d8817e4Smiod: SUBSECTION ignore ; 127*3d8817e4Smiod: SUBSUBSECTION ignore ; 128*3d8817e4Smiod: INTERNAL_DEFINITION internal ; 129*3d8817e4Smiod: DESCRIPTION ignore ; 130*3d8817e4Smiod: FUNCTION external ; 131*3d8817e4Smiod: RETURNS ignore ; 132*3d8817e4Smiod: TYPEDEF external ; 133*3d8817e4Smiod: INTERNAL_FUNCTION internal ; 134*3d8817e4Smiod: INTERNAL internal ; 135*3d8817e4Smiod: INODE ignore ; 136