Browse thread
[Caml-list] Context Free Grammars?
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | David McClain <David.McClain@A...> |
| Subject: | Re: [Caml-list] Context Free Grammars? |
> Out of curiosity, why not use recursive descent parsing instead of > ocamlyacc? > Well, not a bad idea... I suppose. It would give me better control over the course of things. I had the impression that YACC was a much faster system, being table driven and all. And possibly less bulky in generated code, but that isn't much of an argument in its favor today... The problems I am seeing have to do with factoring the grammar, similar to factoring threaded code. However the parent trees of these factors have very different semantic notions about what that fragment should mean. Recursive descent would certainly handle this better. I am not a YACC expert (no kidding!?) but I always had the notion that nonterminal reduction trees would somehow guide the reduce decisions. Now, however, it appears that YACC is simply looking blindly for syntactic token chains and reducing on them with absolutely no notion of who might be interested in the result. Kind of takes the wind out of my ancient understandings of YACC. [So I guess I was writing my grammars as though there were some kind of recursive descent engine in control. Not apparently so...] David McClain Senior Corporate Scientist Avisere, Inc. david.mcclain@avisere.com +1.520.390.7738 (USA) ------------------- 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