comp.lang.ada
 help / color / mirror / Atom feed
From: dennison@telepath.com
Subject: Re: Ada type (yacc)YYSTYPE is ?
Date: 1999/01/18
Date: 1999-01-18T00:00:00+00:00	[thread overview]
Message-ID: <77vmri$sc3$1@nnrp1.dejanews.com> (raw)
In-Reply-To: 77qu4d$jt8@lotho.delphi.com

In article <77qu4d$jt8@lotho.delphi.com>,
  tmoran@bix.com wrote:
> YACC is designed with a C 'union' type as a typeless, semantic
> token information holder variable.  What's a good way in Ada to
> handle that, hopefully with some help from Ada type checking?
> One obvious one is a variant record.  Any better ideas?
>

What I did for my token analysis packages is I created an abstract tagged
"token" type. That way the tag acts as the variant, and you can put whatever
you want in the child types. Plus this allows you to define routines that
will work on all tokens, individual tokens, or subsets of individual tokens.

BTW, For those of you interested in this: I have no response yet on "opening"
the token packages from my boss here. The prognisis doesn't look good.
However, it looks like I will be working on making open-source lexical
analysis and parsing packages for Ada for my master's thesis. Assuming
everyone at UCF signs off, I'd be officially starting work on it after this
semester ends. My plan is to get a (mostly) working set of lexical analysis
packages publicly available by the middle of June. The parsing packages would
probably follow during the fall semester.


T.E.D.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




  parent reply	other threads:[~1999-01-18  0:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-16  0:00 Ada type (yacc)YYSTYPE is ? tmoran
1999-01-17  0:00 ` Steven Hovater
1999-01-18  0:00 ` Tucker Taft
1999-01-18  0:00   ` Tom Moran
1999-01-19  0:00     ` Andrew W. Reynolds
1999-01-19  0:00       ` Tom Moran
1999-01-19  0:00         ` rdt
1999-01-19  0:00           ` Martin C. Carlisle
1999-01-18  0:00 ` dennison [this message]
1999-01-18  0:00   ` Tom Moran
1999-01-19  0:00     ` dennison
replies disabled

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