Related articles |
---|
byacc help needed thewalt@ce.Berkeley.EDU (1992-11-22) |
Re: byacc help needed bliss@sp64.csrd.uiuc.edu (1992-11-23) |
Newsgroups: | comp.compilers |
From: | thewalt@ce.Berkeley.EDU (C. Thewalt) |
Organization: | Dept. of Civil Engineering, University of California, Berkeley |
Date: | Sun, 22 Nov 1992 17:43:03 GMT |
Keywords: | yacc, errors, question, comment |
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]
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.