Article View: alt.comp.programming
Article #37Re: How to do lexical analysis
From: Dann Corbit
Date: Wed, 07 Nov 2001 18:48
Date: Wed, 07 Nov 2001 18:48
37 lines
2499 bytes
2499 bytes
"Ginfan" <no.reply@no.spam.org> wrote in message news:MPG.165395d4d8f441d989680@news.orangenet.dk... > Hi, > > I'm writing a progam to help me document my code. What I want to do is > parse the entire code for functions, classes, variables, control > structures and so forth. > So far I have managed some, but my skills are lacking. > > From what I understand I need to learn about lexical analysis. Is this > correct ? > > If so can anybody guide me to some tutorials (Preferably with examples, > and preferably in Delphi) or suggest books. > I have not been lucky in my search so far. > > If not, could you please tell me what I should be looking into instead. > > Thanks in advance, > Johnny > > This message is crossposted in alt.comp.programming, > borland.public.delphi.objectpascal and comp.programming. Why not news:comp.compilers where they talk about lexing? If there is a formal grammar for Delphi it won't be very hard. If you have to figure it out yourself, you've got quite a job on your hands. You might look at projects like p2c, which will probably give you a good head start. Try this query: http://www.google.com/search?q=parser+generator -- C-FAQ: http://www.eskimo.com/~scs/C-faq/top.html "The C-FAQ Book" ISBN 0-201-84519-9 C.A.P. FAQ: ftp://cap.connx.com/pub/Chess%20Analysis%20Project%20FAQ.htm
Technical Details
Message-ID:
<9sbvjf02has@enews4.newsguy.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!pln-e!spln!dex!extra.newsguy.com!newsp.newsguy.com!enews4References:
<MPG.165395d4d8f441d989680@news.orangenet.dk>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10dce5,ca91295a89196623 X-Google-Attributes: gid10dce5,public X-Google-Thread: 1043cf,ca91295a89196623 X-Google-Attributes: gid1043cf,public X-Google-Thread: 108717,ca91295a89196623 X-Google-Attributes: gid108717,public X-Google-ArrivalTime: 2001-11-07 11:06:21 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!pln-e!spln!dex!extra.newsguy.com!newsp.newsguy.com!enews4 From: "Dann Corbit" <dcorbit@connx.com> Newsgroups: alt.comp.programming,borland.public.delphi.objectpascal,comp.programming Subject: Re: How to do lexical analysis Date: Wed, 7 Nov 2001 10:48:10 -0800 Organization: http://extra.newsguy.com Lines: 39 Message-ID: <9sbvjf02has@enews4.newsguy.com> References: <MPG.165395d4d8f441d989680@news.orangenet.dk> NNTP-Posting-Host: p-819.newsdawg.com Mime-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000