From: | Hans-Peter Diettrich <DrDiettrich1@aol.com> |
Newsgroups: | comp.compilers |
Date: | 29 Jul 2006 19:37:26 -0400 |
Organization: | Compilers Central |
References: | 06-07-059 06-07-065 06-07-071 06-07-083 06-07-095 06-07-099 |
Keywords: | yacc, Pascal |
Posted-Date: | 29 Jul 2006 19:37:26 EDT |
Arthur J. O'Dwyer schrieb:
> [then, on debugging yacc-alike parser generators...]
[...]
> Which I guess brings us back to "why are yacc-alikes so hard to
> use?", which is code for "why are yacc-alikes targeted at system hackers
> instead of normal people?", which practically answers itself: hackers
> wrote yacc in the first place, and yacc is mainly used by hardcore
> programmers who are going to spend a lot of time debugging anyway. :)
You mean, I simply should use a different tool?
Sounds good, but can you recommend me any one, usable to create an
parser in e.g. Pascal?
I really don't insist in a tool, written in Pascal, but it should at
least allow to output the parser tables and code (including the
semantical actions) in any appropriate language.
My dream were a tool which reads in a grammar, possibly in precompiled
form, and then interprets some input according to that grammar. It would
be sufficient, in the first place, if the engine would create an parse
tree, which then could be inspected and evaluated without language
restrictions. Furthermore it were nice to have hooks, so that parts of
the final parse tree can be processed, and possibly discarded, as
appropriate for the actual application.
> (And you're still better off than if the tools didn't exist at all,
right?)
Well, yes and no. Yes, I'm happy if I don't have to write an parser
generator myself, but no, I'm not really happy with a possibly
unreliable tool. We spend so much time in discussing and constructing
"safe" (unambiguous...) grammars, and in the next step we should rely on
unsafe tools?
> </software-engineering metadiscussion>
DoDi
Return to the
comp.compilers page.
Search the
comp.compilers archives again.