comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Dewar <robert_dewar@my-deja.com>
Subject: Re: Ada syntax checker: Help!
Date: 2000/05/12
Date: 2000-05-12T00:00:00+00:00	[thread overview]
Message-ID: <8fh3m6$vao$1@nnrp1.deja.com> (raw)
In-Reply-To: 8fh1c1$sik$1@nnrp1.deja.com

In article <8fh1c1$sik$1@nnrp1.deja.com>,
  Ted Dennison <dennison@telepath.com> wrote:
> So by "syntax checker" here, do you just mean verifying that
> the file can be properly tokenized?

Of course not! That's lexical analysis. The notion of syntax
is very well defined in the Ada 83 RM Annex E, and what DASC
does, no more and no less, is to determine if the submitted
text can be generated by the grammar of Annex E.

Now it is true in fact that nearly all the time (in fact
about 90% is taken up on I/O and lexical analysis, so the
parsing does not add much). This is as expected.

The exact test file I used in presenting the results was
a million line file made up of multiple copies of the following
procedure:

   procedure a is
   begin
      x := y + z;
   --  that was an addition
   end;

with no blank lines

The time for a full parse of this file (wall clock time
including input/output) is:

   3.05 seconds (file is not in file cache)
   1.47 seconds (file is in file cache)

The measurements were done on a 300MHz thinkpad 770X (that's
an older model with a slow front side bus and a fairly slow
disk). But I was using OS/2, with HPFS386, which is considerably
faster file system than Linux or any of the Microsoft stuff.

> I dobut it is even a twentieth as fast as your checker
> hand-coded in x86 assebly though.

If you can come within a factor of 20 of this with your
tokenizer I would say that's excellent performance :-)

I am trying to dig up the sources of DASC, and if I can find
them I will make them available under the GPL for people to
play with!

I know they are on ancient backup media, but the question is
whether I have a convenient version that I can find easily!

Robert Dewar


Sent via Deja.com http://www.deja.com/
Before you buy.




      reply	other threads:[~2000-05-12  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-10  0:00 Ada syntax checker: Help! unix_boy
2000-05-10  0:00 ` Ted Dennison
2000-05-12  0:00 ` Robert Dewar
2000-05-12  0:00 ` Robert Dewar
2000-05-12  0:00   ` Ted Dennison
2000-05-12  0:00     ` Robert Dewar [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox