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