comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Dewar <robert_dewar@my-deja.com>
Subject: Re: Ada 95 grammar for aflex?
Date: Mon, 22 Jan 2001 17:32:39 GMT
Date: 2001-01-22T17:32:39+00:00	[thread overview]
Message-ID: <94hqrn$s8s$1@nnrp1.deja.com> (raw)
In-Reply-To: t6olt4ohqu4la7@corp.supernews.com

In article <t6olt4ohqu4la7@corp.supernews.com>,
  "Ira D. Baxter" <idbaxter@semdesigns.com> wrote:

> Even if you are interested in error recovery, you can build
> good error recovery in a table driven parser.

This is arguable. Here's a specific challenge. In the context
of a bottom up table driven parser, implement the error
recovery that GNAT does for semicolon used in place of IS and
vice versa (this is a particularly tough one).

Reall the issue is good vs excellent :-)

> That's impressively fast, but it depends on what you mean by
> "parsing".

I mean determining whether the given string is in the language
and giving a semi-decent error msg if it is not.

> Our automatically generated
> parsers automatically capture identifier
> and other kinds of strings and place them in string
> dictionaries,
> carry out integer and floating point value conversions,
> produce abstract syntax trees,
> capture and attach comments and source line information
> to AST nodes, etc.

This would indeed slow things down (by probably a factor of 2
at most), so we would still be at millions of lines per minute.

> Its still OK.  Even with all
> extra work, and not a lot of optimization, we manage
> to generate parsers that do several thousand lines per second
> (180K lines/minute).   We assume with hard work
> (the kind you do to produce "assembly langauge parsers"),
> we can generate parsers that are twice as fast.

Right, so that is perhaps a factor of 10-100 away from what
I can achieve in my asm program, which is what I would expect.

It is definitely the case that parsing efficiency is not
critical (or should not be :-), so the issue driving table
driven vs hand written parsers is indeed dealing with error
detection and recovery in an excellent manner!



Sent via Deja.com
http://www.deja.com/



  reply	other threads:[~2001-01-22 17:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-18 14:54 Ada 95 grammar for aflex? Ralf Reißing
2001-01-18 15:07 ` Frode Tenneboe
2001-01-18 15:37 ` Ted Dennison
2001-01-19 11:15 ` Mario Amado Alves
2001-01-19 16:36   ` Robert Dewar
2001-01-19 18:29     ` Cesar Rabak
2001-01-20 14:30       ` Robert Dewar
2001-01-20 16:19         ` Cesar Rabak
2001-01-20 19:25           ` Robert Dewar
2001-01-21  1:55             ` Cesar Rabak
2001-01-21 16:01               ` Robert Dewar
2001-01-22 15:58               ` Ira D. Baxter
2001-01-22 17:32                 ` Robert Dewar [this message]
2001-01-21  4:46             ` Larry Hazel
2001-01-21 16:02               ` Robert Dewar
2001-01-21 17:30                 ` Larry Hazel
2001-01-21 22:42                   ` Larry Kilgallen
2001-01-23  4:16                     ` Warren W. Gay VE3WWG
replies disabled

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