Generic Parser
W. Tasin
Walter.Tasin at t-online.de
Sun Mar 11 01:37:23 UTC 2001
Hi together,
as I already told you I'm working on a parser experiment.
A generic one, where you can specify two text files and depending on
these files you can parse some stuff.
One file is the lexem part, which splits the parsing text into lexems
(non-terminal symbols) and
the second one parses it with a rule-list (like yacc does)
To demostrate the functionality I've putted this on
ftp://fara.cs.uni-potsdam.de/incoming/kdev2_parser-0.1.tar.gz
The demonstration parses Makefile.am's of a project (w/o *.kdevprj).
Simply open the toplevel Makefile.am of a project and it parses all the
other Makefile.am's which are declared in
SUBDIRS = .....
At the end it should show a project tree with targets and their sources
(more I haven't implemented now).
This is only a demonstration of the parser, so don't expect much from it.
But it should be possible now to create *.lexemfile and *.rulefile to
parse different textfiles.
*
<?a=96328767300002&w=2&r=1>
*To make it work you have to install the binary, because it searches
Makefile_am.lexlist and Makefile_am.rulelist in the
$(kde_datadir)/kdev2_parser directory.
Informations:
The binary uses three new libraries:
newtreeview: an updatable treeview
(adding or removing an element can be done
without collapsing all)
parse_n_lex: the generic part of the parser, which can read *.lexfile
and *.rulefile
(to parse a textfile in the way the control
files says)
classparser: in this case the Makefile.am parser which interprets the
results from the generic parser
What will not be done by this program:
symbol resolution will not be done:
e.g. some project are using
SUBDIRS = $(TOPSUBDIRS)
these projects cannot be parsed!
etc. etc. etc.
The parser is made as shared lib and works with the QT signals/slots
(and I guess with some modifications it can be changed to a DCOP client)
Please let me know what do you think about it.
Questions/suggestions are welcome. The next I want to do is trying to
create a rulefile for parsing a programming language.
Till now I didn't include this to kdevelop, because many things have
changed in the HEAD part, so I still don't know how I should implement
it to the tree.
Due to the power problems at our institute I can read mail sent to
tasin at fhm.edu (or posted to this list) on Monday.
For urgent stuff please mail to the address above.
Ciao
Walter
-
to unsubscribe from this list send an email to kdevelop-devel-request at kdevelop.org with the following body:
unsubscribe »your-email-address«
More information about the KDevelop-devel
mailing list