Version française
Home     About     Download     Resources     Contact us    
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 
question.

> 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 
Brian

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners