Re: Why put type information into syntax?

"Ira D. Baxter" <idbaxter@semdesigns.com>
14 Apr 2000 00:59:55 -0400

          From comp.compilers

Related articles
[3 earlier articles]
Re: Why put type information into syntax? RobertADuffbobduff@world.std.com> (2000-03-28)
Re: Why put type information into syntax? tlh20@cam.ac.uk (Tim Harris) (2000-04-01)
Re: Why put type information into syntax? kst@cts.com (Keith Thompson) (2000-04-01)
Re: Why put type information into syntax? michael.prqa@indigo.ie (Michael Spencer) (2000-04-05)
Re: Why put type information into syntax? rod.bates@wichita.boeing.com (Rodney M. Bates) (2000-04-05)
Re: Why put type information into syntax? kst@cts.com (Keith Thompson) (2000-04-11)
Re: Why put type information into syntax? idbaxter@semdesigns.com (Ira D. Baxter) (2000-04-14)
Re: Why put type information into syntax? world!bobduff@uunet.uu.net (Robert A Duff) (2000-04-14)
Re: Why put type information into syntax? maratb@CS.Berkeley.EDU (Marat Boshernitsan) (2000-04-15)
Re: Why put type information into syntax? mspencer@eircom.net (Michael Spencer) (2000-04-15)
| List of all articles for this month |

From: "Ira D. Baxter" <idbaxter@semdesigns.com>
Newsgroups: comp.compilers
Date: 14 Apr 2000 00:59:55 -0400
Organization: Posted via Supernews, http://www.supernews.com
References: 00-03-133 00-03-146 00-04-017 00-04-050 00-04-073
Keywords: parse

We use a GLR parser in the DMS Reengineering toolkit. Rather than
backtracking, it forks whenever it can't immediately decide what to do
(i.e., an inconsistent LR state). In the case below, it finds two
separate parses for "foo(x);"; one parse as a function call and
expression for the function, and one parse as a type declaration
having only an identifier. It retains both parses in the parse tree
(well, parse dag). This allows us to parse without symbol
information.


The attribute evaluator used with DMS can reject a tree based on an
attribute. We typically compute the symbol table using the attribute
evaluator *after* a full parse has completed, and at the same time,
dump the "wrong" subtrees.


--
Ira Baxter, Ph.D., CTO idbaxter@semdesigns.com 512-250-1018x140
Semantic Designs, Inc., www.semdesigns.com FAX 512-250-1191
12636 Research Blvd #C214, Austin, Texas 78759


Keith Thompson <kst@cts.com> wrote
> In either C or C++, the fact that the names of the predefined types
> are keywords (or sequences of keywords) doesn't really make parsing
> any easier, since the names of user-defined types are *not* keywords.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.