home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / historic / v941.tgz / icon.v941src.tar / icon.v941src / ipl / data / pt6.gmr < prev    next >
Text File  |  2000-07-29  |  701b  |  24 lines

  1. program -> PROGRAM ID ; declarations compound_stmt .
  2. declarations -> declarations VAR id_list : INTEGER ;
  3. declarations -> EPSILON
  4. id_list -> ID
  5. id_list -> id_list , ID
  6. compound_stmt -> BEGIN optional_stmts END
  7. optional_stmts -> stmt_list
  8. optional_stmts -> EPSILON
  9. stmt_list -> stmt
  10. stmt_list -> stmt_list ; stmt
  11. stmt -> ID := simple_expression
  12. stmt -> compound_stmt
  13. stmt -> IF expression THEN stmt ELSE stmt
  14. stmt -> IF expression THEN stmt 
  15. expression -> simple_expression
  16. expression -> simple_expression RELOP simple_expression
  17. simple_expression -> term
  18. simple_expression -> simple_expression ADDOP term
  19. term -> factor
  20. term -> term MULOP factor
  21. factor -> ID
  22. factor -> INTCON
  23. factor -> ( expression )
  24.