Annotation of researchv10no/cmd/cpp/:yyfix, revision 1.1.1.1

1.1       root        1: #ident "@(#)cpp:common/:yyfix  1.4"
                      2: #
                      3: #      standard out from this shell script produces the static tables files
                      4: 
                      5: grep 'typedef.*yytabelem;' y.tab.c
                      6: grep 'typedef.*yytoktype;' y.tab.c
                      7: 
                      8: #      assume that the arrays wanted are:
                      9: #      yyexca, yyact, yypact, yypgo, yyr1, yyr2, yychk, yydef,
                     10: #      and the debugging arrays and #if ... #endif pairs are
                     11: #      (in order):  yytoks, yyreds - optional, printed under g/.../
                     12: 
                     13: ed - y.tab.c <<DONE
                     14: /^\(.*\)yyexca[        ]*\[]/s//extern \1 yyexca[];\\
                     15: \1 yyexca []/
                     16: .ka
                     17: /}/kb
                     18: 'a,'bp
                     19: 'a,'bd
                     20: /^\(.*\)yyact[         ]*\[]/s//extern \1 yyact[];\\
                     21: \1 yyact []/
                     22: .ka
                     23: /}/kb
                     24: 'a,'bp
                     25: 'a,'bd
                     26: /^\(.*\)yypact[        ]*\[]/s//extern \1 yypact[];\\
                     27: \1 yypact []/
                     28: .ka
                     29: /}/kb
                     30: 'a,'bp
                     31: 'a,'bd
                     32: /^\(.*\)yypgo[         ]*\[]/s//extern \1 yypgo[];\\
                     33: \1 yypgo []/
                     34: .ka
                     35: /}/kb
                     36: 'a,'bp
                     37: 'a,'bd
                     38: /^\(.*\)yyr1[  ]*\[]/s//extern \1 yyr1[];\\
                     39: \1 yyr1 []/
                     40: .ka
                     41: /}/kb
                     42: 'a,'bp
                     43: 'a,'bd
                     44: /^\(.*\)yyr2[  ]*\[]/s//extern \1 yyr2[];\\
                     45: \1 yyr2 []/
                     46: .ka
                     47: /}/kb
                     48: 'a,'bp
                     49: 'a,'bd
                     50: /^\(.*\)yychk[         ]*\[]/s//extern \1 yychk[];\\
                     51: \1 yychk []/
                     52: .ka
                     53: /}/kb
                     54: 'a,'bp
                     55: 'a,'bd
                     56: /^\(.*\)yydef[         ]*\[]/s//extern \1 yydef[];\\
                     57: \1 yydef []/
                     58: .ka
                     59: /}/kb
                     60: 'a,'bp
                     61: 'a,'bd
                     62: g/^#[  ]*ifndef[       ][      ]*YYDEBUG/.,;/^#[       ]*endif/p
                     63: g/^#[  ]*if[   ][      ]*YYDEBUG/p
                     64: g/^\(.*\)yytoks[       ]*\[]/s//extern \1 yytoks[];\\
                     65: \1 yytoks []/\\
                     66: .ka\\
                     67: /^}/kb\\
                     68: 'a,'bp\\
                     69: 'a,'bd
                     70: g/^\(.*\)yyreds[       ]*\[]/s//extern \1 yyreds[];\\
                     71: \1 yyreds []/\\
                     72: .ka\\
                     73: /^}/kb\\
                     74: 'a,'bp\\
                     75: 'a,'bd
                     76: g/^#[  ]*ifndef[       ][      ]*YYDEBUG//^#[  ]*endif/p
                     77: w
                     78: q
                     79: DONE

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.