home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / net / ansi.c.grammar < prev    next >
Internet Message Format  |  1987-03-03  |  16KB

  1. From tps@sdchemf.UUCP Tue Mar  3 16:31:17 1987
  2. Path: beno!seismo!lll-lcc!ames!ucbcad!ucbvax!sdcsvax!sdchem!tps
  3. From: tps@sdchem.UUCP (Tom Stockfisch)
  4. Newsgroups: net.sources
  5. Subject: ANSI C draft yacc grammar
  6. Message-ID: <645@sdchema.sdchem.UUCP>
  7. Date: 3 Mar 87 21:31:17 GMT
  8. References: <403@ubc-vision.UUCP>
  9. Sender: news@sdchem.UUCP
  10. Reply-To: tps@sdchemf.UUCP (Tom Stockfisch)
  11. Organization: UC San Diego
  12. Lines: 775
  13.  
  14. People keep asking me for a copy, so I am reposting a yacc grammar (actually,
  15. a complete program) for the April 1985 draft of the ANSI C standard.  It
  16. finds syntax errors in its input.
  17.  
  18. Oh yeah, this was originally posted by Jeff Lee.
  19.  
  20. || Tom Stockfisch, UCSD Chemistry    tps%chem@sdcsvax.UCSD
  21.  
  22. #!/bin/sh
  23. # to extract, remove the header and type "sh filename"
  24. if `test ! -s ./Makefile`
  25. then
  26. echo "writting ./Makefile"
  27. cat > ./Makefile << '\Rogue\Monster\'
  28. YFLAGS    = -dv
  29. CFLAGS    = -O
  30. LFLAGS    =
  31.  
  32. SRC    = gram.y scan.l main.c
  33. OBJ    = gram.o scan.o main.o
  34.  
  35. $(BIN)/ansi_c :    $(OBJ)
  36.     cc $(CFLAGS) $(OBJ)/ansi_c
  37.  
  38. scan.o    : y.tab.h
  39.  
  40. clean    :
  41.     rm -f y.tab.h y.output *.o
  42. \Rogue\Monster\
  43. else
  44.   echo "will not over write ./Makefile"
  45. fi
  46. if `test ! -s ./README`
  47. then
  48. echo "writting ./README"
  49. cat > ./README << '\Rogue\Monster\'
  50. The files in this directory contain the ANSI C grammar from the April 30, 1985
  51. draft of the proposed standard. This copy also incorporates all bug fixes I
  52. have seen since the last two postings. With a little work this grammar can
  53. be made to parse the C that most of us know and love (sort of).
  54.  
  55. There is one bug fix to the grammar that is in this posting. On line 295
  56. of gram.y it previously read declaration_specifiers instead of
  57. type_specifier_list as it does now. I believe the folks at the ANSI committee
  58. made a mistake since if you replace the line with what the original read
  59. you will end up with 16 shift/reduce errors and 2 reduce/reduce errors
  60. (the good ones). As it is, it only has 1 shift/reduce error that occurs
  61. on the if/else construct. YACC creates the correct parser and I don't want
  62. to ugly my grammar up.
  63.  
  64. Anyway, all cumquats unite and generate this sucker. Then just sit and play
  65. with it. Remember, the grammar accepts things like
  66.  
  67.     "Hello, world"++;
  68.     --1.23456;
  69.     *'a'
  70.  
  71. but this is not a bug, but simply a shuffling of the checking into the
  72. semantic analysis. If you want to hack it up to do lvalue and rvalue
  73. checking, I'm sure the ANSI committee would be glad to have your changes.
  74. Don't send'em to me though. I don't want'em. Wear this in good health.
  75.  
  76. Jeff Lee
  77. gatech!jeff    jeff@gatech    jeff%gatech.CSNet@CSNet-Relay.ARPA
  78. \Rogue\Monster\
  79. else
  80.   echo "will not over write ./README"
  81. fi
  82. if `test ! -s ./gram.y`
  83. then
  84. echo "writting ./gram.y"
  85. cat > ./gram.y << '\Rogue\Monster\'
  86. %token IDENTIFIER CONSTANT STRING_LITERAL SIZEOF
  87. %token PTR_OP INC_OP DEC_OP LEFT_OP RIGHT_OP LE_OP GE_OP EQ_OP NE_OP
  88. %token AND_OP OR_OP MUL_ASSIGN DIV_ASSIGN MOD_ASSIGN ADD_ASSIGN
  89. %token SUB_ASSIGN LEFT_ASSIGN RIGHT_ASSIGN AND_ASSIGN
  90. %token XOR_ASSIGN OR_ASSIGN TYPE_NAME
  91.  
  92. %token TYPEDEF EXTERN STATIC AUTO REGISTER
  93. %token CHAR SHORT INT LONG SIGNED UNSIGNED FLOAT DOUBLE CONST VOLATILE VOID
  94. %token STRUCT UNION ENUM ELIPSIS RANGE
  95.  
  96. %token CASE DEFAULT IF ELSE SWITCH WHILE DO FOR GOTO CONTINUE BREAK RETURN
  97.  
  98. %start file
  99. %%
  100.  
  101. primary_expr
  102.     : identifier
  103.     | CONSTANT
  104.     | STRING_LITERAL
  105.     | '(' expr ')'
  106.     ;
  107.  
  108. postfix_expr
  109.     : primary_expr
  110.     | postfix_expr '[' expr ']'
  111.     | postfix_expr '(' ')'
  112.     | postfix_expr '(' argument_expr_list ')'
  113.     | postfix_expr '.' identifier
  114.     | postfix_expr PTR_OP identifier
  115.     | postfix_expr INC_OP
  116.     | postfix_expr DEC_OP
  117.     ;
  118.  
  119. argument_expr_list
  120.     : assignment_expr
  121.     | argument_expr_list ',' assignment_expr
  122.     ;
  123.  
  124. unary_expr
  125.     : postfix_expr
  126.     | INC_OP unary_expr
  127.     | DEC_OP unary_expr
  128.     | unary_operator cast_expr
  129.     | SIZEOF unary_expr
  130.     | SIZEOF '(' type_name ')'
  131.     ;
  132.  
  133. unary_operator
  134.     : '&'
  135.     | '*'
  136.     | '+'
  137.     | '-'
  138.     | '~'
  139.     | '!'
  140.     ;
  141.  
  142. cast_expr
  143.     : unary_expr
  144.     | '(' type_name ')' cast_expr
  145.     ;
  146.  
  147. multiplicative_expr
  148.     : cast_expr
  149.     | multiplicative_expr '*' cast_expr
  150.     | multiplicative_expr '/' cast_expr
  151.     | multiplicative_expr '%' cast_expr
  152.     ;
  153.  
  154. additive_expr
  155.     : multiplicative_expr
  156.     | additive_expr '+' multiplicative_expr
  157.     | additive_expr '-' multiplicative_expr
  158.     ;
  159.  
  160. shift_expr
  161.     : additive_expr
  162.     | shift_expr LEFT_OP additive_expr
  163.     | shift_expr RIGHT_OP additive_expr
  164.     ;
  165.  
  166. relational_expr
  167.     : shift_expr
  168.     | relational_expr '<' shift_expr
  169.     | relational_expr '>' shift_expr
  170.     | relational_expr LE_OP shift_expr
  171.     | relational_expr GE_OP shift_expr
  172.     ;
  173.  
  174. equality_expr
  175.     : relational_expr
  176.     | equality_expr EQ_OP relational_expr
  177.     | equality_expr NE_OP relational_expr
  178.     ;
  179.  
  180. and_expr
  181.     : equality_expr
  182.     | and_expr '&' equality_expr
  183.     ;
  184.  
  185. exclusive_or_expr
  186.     : and_expr
  187.     | exclusive_or_expr '^' and_expr
  188.     ;
  189.  
  190. inclusive_or_expr
  191.     : exclusive_or_expr
  192.     | inclusive_or_expr '|' exclusive_or_expr
  193.     ;
  194.  
  195. logical_and_expr
  196.     : inclusive_or_expr
  197.     | logical_and_expr AND_OP inclusive_or_expr
  198.     ;
  199.  
  200. logical_or_expr
  201.     : logical_and_expr
  202.     | logical_or_expr OR_OP logical_and_expr
  203.     ;
  204.  
  205. conditional_expr
  206.     : logical_or_expr
  207.     | logical_or_expr '?' logical_or_expr ':' conditional_expr
  208.     ;
  209.  
  210. assignment_expr
  211.     : conditional_expr
  212.     | unary_expr assignment_operator assignment_expr
  213.     ;
  214.  
  215. assignment_operator
  216.     : '='
  217.     | MUL_ASSIGN
  218.     | DIV_ASSIGN
  219.     | MOD_ASSIGN
  220.     | ADD_ASSIGN
  221.     | SUB_ASSIGN
  222.     | LEFT_ASSIGN
  223.     | RIGHT_ASSIGN
  224.     | AND_ASSIGN
  225.     | XOR_ASSIGN
  226.     | OR_ASSIGN
  227.     ;
  228.  
  229. expr
  230.     : assignment_expr
  231.     | expr ',' assignment_expr
  232.     ;
  233.  
  234. constant_expr
  235.     : conditional_expr
  236.     ;
  237.  
  238. declaration
  239.     : declaration_specifiers ';'
  240.     | declaration_specifiers init_declarator_list ';'
  241.     ;
  242.  
  243. declaration_specifiers
  244.     : storage_class_specifier
  245.     | storage_class_specifier declaration_specifiers
  246.     | type_specifier
  247.     | type_specifier declaration_specifiers
  248.     ;
  249.  
  250. init_declarator_list
  251.     : init_declarator
  252.     | init_declarator_list ',' init_declarator
  253.     ;
  254.  
  255. init_declarator
  256.     : declarator
  257.     | declarator '=' initializer
  258.     ;
  259.  
  260. storage_class_specifier
  261.     : TYPEDEF
  262.     | EXTERN
  263.     | STATIC
  264.     | AUTO
  265.     | REGISTER
  266.     ;
  267.  
  268. type_specifier
  269.     : CHAR
  270.     | SHORT
  271.     | INT
  272.     | LONG
  273.     | SIGNED
  274.     | UNSIGNED
  275.     | FLOAT
  276.     | DOUBLE
  277.     | CONST
  278.     | VOLATILE
  279.     | VOID
  280.     | struct_or_union_specifier
  281.     | enum_specifier
  282.     | TYPE_NAME
  283.     ;
  284.  
  285. struct_or_union_specifier
  286.     : struct_or_union identifier '{' struct_declaration_list '}'
  287.     | struct_or_union '{' struct_declaration_list '}'
  288.     | struct_or_union identifier
  289.     ;
  290.  
  291. struct_or_union
  292.     : STRUCT
  293.     | UNION
  294.     ;
  295.  
  296. struct_declaration_list
  297.     : struct_declaration
  298.     | struct_declaration_list struct_declaration
  299.     ;
  300.  
  301. struct_declaration
  302.     : type_specifier_list struct_declarator_list ';'
  303.     ;
  304.  
  305. struct_declarator_list
  306.     : struct_declarator
  307.     | struct_declarator_list ',' struct_declarator
  308.     ;
  309.  
  310. struct_declarator
  311.     : declarator
  312.     | ':' constant_expr
  313.     | declarator ':' constant_expr
  314.     ;
  315.  
  316. enum_specifier
  317.     : ENUM '{' enumerator_list '}'
  318.     | ENUM identifier '{' enumerator_list '}'
  319.     | ENUM identifier
  320.     ;
  321.  
  322. enumerator_list
  323.     : enumerator
  324.     | enumerator_list ',' enumerator
  325.     ;
  326.  
  327. enumerator
  328.     : identifier
  329.     | identifier '=' constant_expr
  330.     ;
  331.  
  332. declarator
  333.     : declarator2
  334.     | pointer declarator2
  335.     ;
  336.  
  337. declarator2
  338.     : identifier
  339.     | '(' declarator ')'
  340.     | declarator2 '[' ']'
  341.     | declarator2 '[' constant_expr ']'
  342.     | declarator2 '(' ')'
  343.     | declarator2 '(' parameter_type_list ')'
  344.     | declarator2 '(' parameter_identifier_list ')'
  345.     ;
  346.  
  347. pointer
  348.     : '*'
  349.     | '*' type_specifier_list
  350.     | '*' pointer
  351.     | '*' type_specifier_list pointer
  352.     ;
  353.  
  354. type_specifier_list
  355.     : type_specifier
  356.     | type_specifier_list type_specifier
  357.     ;
  358.  
  359. parameter_identifier_list
  360.     : identifier_list
  361.     | identifier_list ',' ELIPSIS
  362.     ;
  363.  
  364. identifier_list
  365.     : identifier
  366.     | identifier_list ',' identifier
  367.     ;
  368.  
  369. parameter_type_list
  370.     : parameter_list
  371.     | parameter_list ',' ELIPSIS
  372.     ;
  373.  
  374. parameter_list
  375.     : parameter_declaration
  376.     | parameter_list ',' parameter_declaration
  377.     ;
  378.  
  379. parameter_declaration
  380.     : type_specifier_list declarator
  381.     | type_name
  382.     ;
  383.  
  384. type_name
  385.     : type_specifier_list
  386.     | type_specifier_list abstract_declarator
  387.     ;
  388.  
  389. abstract_declarator
  390.     : pointer
  391.     | abstract_declarator2
  392.     | pointer abstract_declarator2
  393.     ;
  394.  
  395. abstract_declarator2
  396.     : '(' abstract_declarator ')'
  397.     | '[' ']'
  398.     | '[' constant_expr ']'
  399.     | abstract_declarator2 '[' ']'
  400.     | abstract_declarator2 '[' constant_expr ']'
  401.     | '(' ')'
  402.     | '(' parameter_type_list ')'
  403.     | abstract_declarator2 '(' ')'
  404.     | abstract_declarator2 '(' parameter_type_list ')'
  405.     ;
  406.  
  407. initializer
  408.     : assignment_expr
  409.     | '{' initializer_list '}'
  410.     | '{' initializer_list ',' '}'
  411.     ;
  412.  
  413. initializer_list
  414.     : initializer
  415.     | initializer_list ',' initializer
  416.     ;
  417.  
  418. statement
  419.     : labeled_statement
  420.     | compound_statement
  421.     | expression_statement
  422.     | selection_statement
  423.     | iteration_statement
  424.     | jump_statement
  425.     ;
  426.  
  427. labeled_statement
  428.     : identifier ':' statement
  429.     | CASE constant_expr ':' statement
  430.     | DEFAULT ':' statement
  431.     ;
  432.  
  433. compound_statement
  434.     : '{' '}'
  435.     | '{' statement_list '}'
  436.     | '{' declaration_list '}'
  437.     | '{' declaration_list statement_list '}'
  438.     ;
  439.  
  440. declaration_list
  441.     : declaration
  442.     | declaration_list declaration
  443.     ;
  444.  
  445. statement_list
  446.     : statement
  447.     | statement_list statement
  448.     ;
  449.  
  450. expression_statement
  451.     : ';'
  452.     | expr ';'
  453.     ;
  454.  
  455. selection_statement
  456.     : IF '(' expr ')' statement
  457.     | IF '(' expr ')' statement ELSE statement
  458.     | SWITCH '(' expr ')' statement
  459.     ;
  460.  
  461. iteration_statement
  462.     : WHILE '(' expr ')' statement
  463.     | DO statement WHILE '(' expr ')' ';'
  464.     | FOR '(' ';' ';' ')' statement
  465.     | FOR '(' ';' ';' expr ')' statement
  466.     | FOR '(' ';' expr ';' ')' statement
  467.     | FOR '(' ';' expr ';' expr ')' statement
  468.     | FOR '(' expr ';' ';' ')' statement
  469.     | FOR '(' expr ';' ';' expr ')' statement
  470.     | FOR '(' expr ';' expr ';' ')' statement
  471.     | FOR '(' expr ';' expr ';' expr ')' statement
  472.     ;
  473.  
  474. jump_statement
  475.     : GOTO identifier ';'
  476.     | CONTINUE ';'
  477.     | BREAK ';'
  478.     | RETURN ';'
  479.     | RETURN expr ';'
  480.     ;
  481.  
  482. file
  483.     : external_definition
  484.     | file external_definition
  485.     ;
  486.  
  487. external_definition
  488.     : function_definition
  489.     | declaration
  490.     ;
  491.  
  492. function_definition
  493.     : declarator function_body
  494.     | declaration_specifiers declarator function_body
  495.     ;
  496.  
  497. function_body
  498.     : compound_statement
  499.     | declaration_list compound_statement
  500.     ;
  501.  
  502. identifier
  503.     : IDENTIFIER
  504.     ;
  505. %%
  506.  
  507. #include <stdio.h>
  508.  
  509. extern char yytext[];
  510. extern int column;
  511.  
  512. yyerror(s)
  513. char *s;
  514. {
  515.     fflush(stdout);
  516.     printf("\n%*s\n%*s\n", column, "^", column, s);
  517. }
  518. \Rogue\Monster\
  519. else
  520.   echo "will not over write ./gram.y"
  521. fi
  522. if `test ! -s ./main.c`
  523. then
  524. echo "writting ./main.c"
  525. cat > ./main.c << '\Rogue\Monster\'
  526. main()
  527. {
  528.     int yyparse();
  529.  
  530.     return(yyparse());
  531. }
  532. \Rogue\Monster\
  533. else
  534.   echo "will not over write ./main.c"
  535. fi
  536. if `test ! -s ./scan.l`
  537. then
  538. echo "writting ./scan.l"
  539. cat > ./scan.l << '\Rogue\Monster\'
  540. D            [0-9]
  541. L            [a-zA-Z_]
  542. H            [a-fA-F0-9]
  543. E            [Ee][+-]?{D}+
  544. FS            (f|F|l|L)
  545. IS            (u|U|l|L)*
  546.  
  547. %{
  548. #include <stdio.h>
  549. #include "y.tab.h"
  550.  
  551. void count();
  552. %}
  553.  
  554. %%
  555. "/*"            { comment(); }
  556.  
  557. "auto"            { count(); return(AUTO); }
  558. "break"            { count(); return(BREAK); }
  559. "case"            { count(); return(CASE); }
  560. "char"            { count(); return(CHAR); }
  561. "const"            { count(); return(CONST); }
  562. "continue"        { count(); return(CONTINUE); }
  563. "default"        { count(); return(DEFAULT); }
  564. "do"            { count(); return(DO); }
  565. "double"        { count(); return(DOUBLE); }
  566. "else"            { count(); return(ELSE); }
  567. "enum"            { count(); return(ENUM); }
  568. "extern"        { count(); return(EXTERN); }
  569. "float"            { count(); return(FLOAT); }
  570. "for"            { count(); return(FOR); }
  571. "goto"            { count(); return(GOTO); }
  572. "if"            { count(); return(IF); }
  573. "int"            { count(); return(INT); }
  574. "long"            { count(); return(LONG); }
  575. "register"        { count(); return(REGISTER); }
  576. "return"        { count(); return(RETURN); }
  577. "short"            { count(); return(SHORT); }
  578. "signed"        { count(); return(SIGNED); }
  579. "sizeof"        { count(); return(SIZEOF); }
  580. "static"        { count(); return(STATIC); }
  581. "struct"        { count(); return(STRUCT); }
  582. "switch"        { count(); return(SWITCH); }
  583. "typedef"        { count(); return(TYPEDEF); }
  584. "union"            { count(); return(UNION); }
  585. "unsigned"        { count(); return(UNSIGNED); }
  586. "void"            { count(); return(VOID); }
  587. "volatile"        { count(); return(VOLATILE); }
  588. "while"            { count(); return(WHILE); }
  589.  
  590. {L}({L}|{D})*        { count(); return(check_type()); }
  591.  
  592. 0[xX]{H}+{IS}?        { count(); return(CONSTANT); }
  593. 0[xX]{H}+{IS}?        { count(); return(CONSTANT); }
  594. 0{D}+{IS}?        { count(); return(CONSTANT); }
  595. 0{D}+{IS}?        { count(); return(CONSTANT); }
  596. {D}+{IS}?        { count(); return(CONSTANT); }
  597. {D}+{IS}?        { count(); return(CONSTANT); }
  598. '(\\.|[^\\'])+'        { count(); return(CONSTANT); }
  599.  
  600. {D}+{E}{FS}?        { count(); return(CONSTANT); }
  601. {D}*"."{D}+({E})?{FS}?    { count(); return(CONSTANT); }
  602. {D}+"."{D}*({E})?{FS}?    { count(); return(CONSTANT); }
  603.  
  604. \"(\\.|[^\\"])*\"    { count(); return(STRING_LITERAL); }
  605.  
  606. ">>="            { count(); return(RIGHT_ASSIGN); }
  607. "<<="            { count(); return(LEFT_ASSIGN); }
  608. "+="            { count(); return(ADD_ASSIGN); }
  609. "-="            { count(); return(SUB_ASSIGN); }
  610. "*="            { count(); return(MUL_ASSIGN); }
  611. "/="            { count(); return(DIV_ASSIGN); }
  612. "%="            { count(); return(MOD_ASSIGN); }
  613. "&="            { count(); return(AND_ASSIGN); }
  614. "^="            { count(); return(XOR_ASSIGN); }
  615. "|="            { count(); return(OR_ASSIGN); }
  616. ">>"            { count(); return(RIGHT_OP); }
  617. "<<"            { count(); return(LEFT_OP); }
  618. "++"            { count(); return(INC_OP); }
  619. "--"            { count(); return(DEC_OP); }
  620. "->"            { count(); return(PTR_OP); }
  621. "&&"            { count(); return(AND_OP); }
  622. "||"            { count(); return(OR_OP); }
  623. "<="            { count(); return(LE_OP); }
  624. ">="            { count(); return(GE_OP); }
  625. "=="            { count(); return(EQ_OP); }
  626. "!="            { count(); return(NE_OP); }
  627. ";"            { count(); return(';'); }
  628. "{"            { count(); return('{'); }
  629. "}"            { count(); return('}'); }
  630. ","            { count(); return(','); }
  631. ":"            { count(); return(':'); }
  632. "="            { count(); return('='); }
  633. "("            { count(); return('('); }
  634. ")"            { count(); return(')'); }
  635. "["            { count(); return('['); }
  636. "]"            { count(); return(']'); }
  637. "."            { count(); return('.'); }
  638. "&"            { count(); return('&'); }
  639. "!"            { count(); return('!'); }
  640. "~"            { count(); return('~'); }
  641. "-"            { count(); return('-'); }
  642. "+"            { count(); return('+'); }
  643. "*"            { count(); return('*'); }
  644. "/"            { count(); return('/'); }
  645. "%"            { count(); return('%'); }
  646. "<"            { count(); return('<'); }
  647. ">"            { count(); return('>'); }
  648. "^"            { count(); return('^'); }
  649. "|"            { count(); return('|'); }
  650. "?"            { count(); return('?'); }
  651.  
  652. [ \t\v\n\f]        { count(); }
  653. .            { /* ignore bad characters */ }
  654.  
  655. %%
  656.  
  657. yywrap()
  658. {
  659.     return(1);
  660. }
  661.  
  662. comment()
  663. {
  664.     char c, c1;
  665.  
  666. loop:
  667.     while ((c = input()) != '*' && c != 0)
  668.         putchar(c);
  669.  
  670.     if ((c1 = input()) != '/' && c != 0)
  671.     {
  672.         unput(c1);
  673.         goto loop;
  674.     }
  675.  
  676.     if (c != 0)
  677.         putchar(c1);
  678. }
  679.  
  680. int column = 0;
  681.  
  682. void count()
  683. {
  684.     int i;
  685.  
  686.     for (i = 0; yytext[i] != '\0'; i++)
  687.         if (yytext[i] == '\n')
  688.             column = 0;
  689.         else if (yytext[i] == '\t')
  690.             column += 8 - (column % 8);
  691.         else
  692.             column++;
  693.  
  694.     ECHO;
  695. }
  696.  
  697. int check_type()
  698. {
  699. /*
  700. * pseudo code --- this is what it should check
  701. *
  702. *    if (yytext == type_name)
  703. *        return(TYPE_NAME);
  704. *
  705. *    return(IDENTIFIER);
  706. */
  707.  
  708. /*
  709. *    it actually will only return IDENTIFIER
  710. */
  711.  
  712.     return(IDENTIFIER);
  713. }
  714. \Rogue\Monster\
  715. else
  716.   echo "will not over write ./scan.l"
  717. fi
  718. if `test ! -s ./y.tab.h`
  719. then
  720. echo "writting ./y.tab.h"
  721. cat > ./y.tab.h << '\Rogue\Monster\'
  722. # define IDENTIFIER 257
  723. # define CONSTANT 258
  724. # define STRING_LITERAL 259
  725. # define SIZEOF 260
  726. # define PTR_OP 261
  727. # define INC_OP 262
  728. # define DEC_OP 263
  729. # define LEFT_OP 264
  730. # define RIGHT_OP 265
  731. # define LE_OP 266
  732. # define GE_OP 267
  733. # define EQ_OP 268
  734. # define NE_OP 269
  735. # define AND_OP 270
  736. # define OR_OP 271
  737. # define MUL_ASSIGN 272
  738. # define DIV_ASSIGN 273
  739. # define MOD_ASSIGN 274
  740. # define ADD_ASSIGN 275
  741. # define SUB_ASSIGN 276
  742. # define LEFT_ASSIGN 277
  743. # define RIGHT_ASSIGN 278
  744. # define AND_ASSIGN 279
  745. # define XOR_ASSIGN 280
  746. # define OR_ASSIGN 281
  747. # define TYPE_NAME 282
  748. # define TYPEDEF 283
  749. # define EXTERN 284
  750. # define STATIC 285
  751. # define AUTO 286
  752. # define REGISTER 287
  753. # define CHAR 288
  754. # define SHORT 289
  755. # define INT 290
  756. # define LONG 291
  757. # define SIGNED 292
  758. # define UNSIGNED 293
  759. # define FLOAT 294
  760. # define DOUBLE 295
  761. # define CONST 296
  762. # define VOLATILE 297
  763. # define VOID 298
  764. # define STRUCT 299
  765. # define UNION 300
  766. # define ENUM 301
  767. # define ELIPSIS 302
  768. # define RANGE 303
  769. # define CASE 304
  770. # define DEFAULT 305
  771. # define IF 306
  772. # define ELSE 307
  773. # define SWITCH 308
  774. # define WHILE 309
  775. # define DO 310
  776. # define FOR 311
  777. # define GOTO 312
  778. # define CONTINUE 313
  779. # define BREAK 314
  780. # define RETURN 315
  781. \Rogue\Monster\
  782. else
  783.   echo "will not over write ./y.tab.h"
  784. fi
  785. echo "Finished archive 1 of 1"
  786. exit
  787.  
  788. || Tom Stockfisch, UCSD Chemistry    tps%chem@sdcsvax.UCSD
  789.  
  790.  
  791.