home *** CD-ROM | disk | FTP | other *** search
/ back2roots/padua / padua.7z / padua / lang / grammars.lzh / GRAMMARS / C / README < prev    next >
Encoding:
Text File  |  1988-10-01  |  1.3 KB  |  29 lines

  1. The files in this directory contain the ANSI C grammar from the April 30, 1985
  2. draft of the proposed standard. This copy also incorporates all bug fixes I
  3. have seen since the last two postings. With a little work this grammar can
  4. be made to parse the C that most of us know and love (sort of).
  5.  
  6. There is one bug fix to the grammar that is in this posting. On line 295
  7. of gram.y it previously read declaration_specifiers instead of
  8. type_specifier_list as it does now. I believe the folks at the ANSI committee
  9. made a mistake since if you replace the line with what the original read
  10. you will end up with 16 shift/reduce errors and 2 reduce/reduce errors
  11. (the good ones). As it is, it only has 1 shift/reduce error that occurs
  12. on the if/else construct. YACC creates the correct parser and I don't want
  13. to ugly my grammar up.
  14.  
  15. Anyway, all cumquats unite and generate this sucker. Then just sit and play
  16. with it. Remember, the grammar accepts things like
  17.  
  18.     "Hello, world"++;
  19.     --1.23456;
  20.     *'a'
  21.  
  22. but this is not a bug, but simply a shuffling of the checking into the
  23. semantic analysis. If you want to hack it up to do lvalue and rvalue
  24. checking, I'm sure the ANSI committee would be glad to have your changes.
  25. Don't send'em to me though. I don't want'em. Wear this in good health.
  26.  
  27. Jeff Lee
  28. gatech!jeff    jeff@gatech    jeff%gatech.CSNet@CSNet-Relay.ARPA
  29.