[prog] Yacc - double errors (EOF detection)

Kathryn Andersen kat_lists at katspace.com
Thu Feb 12 22:17:07 EST 2004


On Thu, Feb 12, 2004 at 01:10:00AM -0800, Daniel. wrote:
> >Let me phrase my question/comment about the use of Yacc a diferent way.  
> >Can
> >anyof you give me any stories of instances when you have needed (or chosen)
> >to write a compiler, or use Lex or Yacc.
> 
> Not outside a CS class, except a compiler in pure C for the tiny 
> language Yaroslav and I were mentioning, which I wrote because there 
> wasn't one for Sun machines. Unless you have a particular interest in 
> languages it's very unlikely that you'll ever need to write a 
> compiler. It's a little more likely that you would want to use 
> lex/yacc to read some complex input format sometime, but I don't know 
> how likely. Sorry to be so unhelpful.

(waves hand in the air) Me!  Me!  Me!  I know!

We (at work) use lex/yacc to do precisely that: to read in "complex
input format".  They are "rule" files, which define not only the
supporting data for this suite of programs, but also the constraints.
However, I also have to say that this stuff is actually pretty old, and
I suspect that if we were writing something new which required file
input where we were allowed to define what the file data looked like,
we'd probably use XML instead.

Kathryn Andersen
-=-=-=-=-=-=-=-=-
"Krist has disappeared into his box of cornflakes."
              -- Alex         (6-6-91)
-- 
 _--_|\     | Kathryn Andersen	<http://www.katspace.com>
/      \    | 
\_.--.*/    | GenFicCrit mailing list <http://www.katspace.com/gen_fic_crit/>
      v     | 
------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha!  |	-> Earth -> Sol -> Milky Way Galaxy -> Universe


More information about the Programming mailing list