Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] CFG's and OCaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Brian Hurt <bhurt@s...>
Subject: Re: [Caml-list] CFG's and OCaml
On Sat, 14 Aug 2004, Jon Harrop wrote:

My answers (YMMV):

> I have some (probably trivial) questions about parsers:
> 1. Are most programming languages designed to be implementable using lex and 
> yacc?

They used to be...

> 2. If so, are their designs restricted by this?

Less so than you might think, IMHO.  Mainly they push languages away from 
"bad" constructs.

> 3. If so, is the fact that most languages disallow "a<b<c" due to this?

No.  "a<b<c" is parsed the same way as "a+b+c".

> 4. Could that be added to OCaml? ;-)

Not my call.  Technically, yes it could.  Practically is a different 

> 5. Is it productive to think in terms of coercing lex and yacc into doing as 
> much of the work as possible and then using postprocessing to do the rest 
> (e.g. this is the way I'd implement a<b<c)?

No.  I dislike coercing tools.  

"Usenet is like a herd of performing elephants with diarrhea -- massive,
difficult to redirect, awe-inspiring, entertaining, and a source of
mind-boggling amounts of excrement when you least expect it."
                                - Gene Spafford 

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: