|what are parsing generators? Drum.Sefex@btinternet.com (Paul Drummond) (2000-10-31)|
|Re: what are parsing generators? email@example.com (Orlando Llanes) (2000-11-01)|
|Re: what are parsing generators? Drum.Sefex@btinternet.com (Paul Drummond) (2000-11-05)|
|From:||Paul Drummond <Drum.Sefex@btinternet.com>|
|Date:||31 Oct 2000 14:47:08 -0500|
|Posted-Date:||31 Oct 2000 14:47:08 EST|
I am writing a C++ documentation tool for my Bsc final year project
and I am getting a bit confused with all this lex and yacc talk!
I have read about lexers, grammars and parsing and I am starting to
understand (a little) about what goes on. Then I find out that you
can use programs to do it all for you! If anyone could help me
understand this subject a little better, I would appreciate it. I
have some questions to give you an idea of what I am babbling about:
1) In order to learn parsing I am reading COMPILER books. The
question is, how much of this do I need to know to write a doctool?
The tool will insert comments above functions, classes and variables,
and also generate skeliton HTML documentation like KDOC and Doxygen.
2) Should I learn lex and yacc and make use of them, or should I do it
myself? I am gonna do it myself anyway (requirement of the
project)!!, but I'm interested to know whether it is better to use
lex/yacc or not.
3) What are parser trees used for? I understand that lexers break
code into symbols. I understand that the parser uses the symbols and
a grammar to generate a tree. But what can I do with this tree? I
will probably learn this with further research but a brief explanation
would be nice :)
Note that I am only interested in C++, and I understand that lex and
yacc can produce output for any language, so maybe they arn't
Thanx in advance for any help - as you can see from these lame
questions, I haven't got a clue :(
Return to the
Search the comp.compilers archives again.