From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c469fdacc2f3302b X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!195.71.90.67.MISMATCH!news.unit0.net!feeder.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Warren Newsgroups: comp.lang.ada Subject: Re: Dynamic Variant Record Creation Date: Wed, 17 Mar 2010 16:30:26 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: Injection-Date: Wed, 17 Mar 2010 16:30:26 +0000 (UTC) Injection-Info: feeder.eternal-september.org; posting-host="9f8M0iN5t54V+4DF/iqO8g"; logging-data="5867"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX191z3WLmUGgoX1kZSYnwjO7MWfSZxIf58s=" User-Agent: Xnews/5.04.25 X-Face: &6@]C2>ZS=NM|HE-^zWuryN#Z/2_.s9E|G&~DRi|sav9{E}XQJb*\_>=a5"q]\%A;5}LKP][1mA{gZ,Q!j Cancel-Lock: sha1:3ttbc3tpoHjA5T/zKy63r5nhrw8= Xref: g2news1.google.com comp.lang.ada:9632 Date: 2010-03-17T16:30:26+00:00 List-Id: Robert A Duff expounded in news:wcchbof2ec4.fsf@shell01.TheWorld.com: > Charmed Snark writes: > >> Robert A Duff expounded in news:wcceijk0vze.fsf@shell01.TheWorld.com: >>> But I don't think it does what you want! The 'Pos of the >>> Character '!' is not the same as the 'Pos of the Token '!'. >> >> Oh yes it does, hee hee. My awk script goes to great lengths >> to define the Token_Type to align with the characters (it >> generates the type specification from #defines, sorted and >> munged from the yacc output y.tab.h). I did alude to this >> in the first post as a FYI, that it has a for Token_Type >> use (...) statement to ensure this. > > But "for Token_Type use (...)" has no effect on the 'Pos/'Val > attributes. It sets the internal representations, not the > position numbers. > > - Bob True, but Character'Pos(NUL) is still zero etc. I could get into trouble though if I were to skip (in Token_Type) any ranges of [printable] characters, but this is not the case. After the last non-printable character, this is unimportant because I don't apply those. Up until the first printable character, I fill in values, where I don't have actual token values. Values like LEX_009 for example. So it does work in this particular case. Warren