home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / compiler / 1935 < prev    next >
Encoding:
Text File  |  1992-11-22  |  1.6 KB  |  41 lines

  1. Newsgroups: comp.compilers
  2. Path: sparky!uunet!world!iecc!compilers-sender
  3. From: thewalt@ce.Berkeley.EDU (C. Thewalt)
  4. Subject: byacc help needed
  5. Reply-To: thewalt@ce.Berkeley.EDU (C. Thewalt)
  6. Organization: Dept. of Civil Engineering, University of California, Berkeley
  7. Date: Sun, 22 Nov 1992 17:43:03 GMT
  8. Approved: compilers@iecc.cambridge.ma.us
  9. Message-ID: <92-11-127@comp.compilers>
  10. Keywords: yacc, errors, question, comment
  11. Sender: compilers-sender@iecc.cambridge.ma.us
  12. Lines: 27
  13.  
  14. I tried to reach the author of byacc (corbett@berkeley.edu) but that
  15. account is dead, so I'd appreciate the help of any yacc experts out there,
  16. byacc in particular.
  17.  
  18. It appears that the parse state in y.tab.c is controlled by a few scalar
  19. variables.  If this is the case, it would seem possible to squirrel away
  20. copies and do a setjmp whenever we are in an acceptable state, and when
  21. syntax errors occur do a longjmp back to the saved state and reset the
  22. variables.
  23.  
  24. I'd really like to do this on a line by line basis, and in the event of a
  25. syntax error on a line eat input to the newline and then reset at the
  26. state of the previous line.
  27.  
  28. Is this feasible?
  29.  
  30. Chris
  31. thewalt@ce.berkeley.edu
  32. --
  33. Christopher Robin Thewalt               (thewalt@ce.berkeley.edu)
  34. Dept. of Civil Engineering, University of California, Berkeley
  35. [It might be possible, but I'd think it'd be a lot easier to use the yacc
  36. ``error'' token.  Corbett's address as of July is Robert.Corbett@Eng.Sun.COM
  37. but he no longer actively supports byacc. -John]
  38. -- 
  39. Send compilers articles to compilers@iecc.cambridge.ma.us or
  40. {ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
  41.