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.7 required=5.0 tests=BAYES_00,MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6d9eb594a33cb947 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-01-30 11:30:12 PST Path: supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!hermes.visi.com!news-out.visi.com!nycmny1-snh1.gtei.net!cpk-news-hub1.bbnplanet.com!news.gtei.net!news.maxwell.syr.edu!nntp2.deja.com!nnrp1.deja.com!not-for-mail From: Ted Dennison Newsgroups: comp.lang.ada Subject: Re: very specific question on Ada syntax Date: Tue, 30 Jan 2001 19:16:11 GMT Organization: Deja.com Message-ID: <9573th$isv$1@nnrp1.deja.com> References: <956vav$e7q$1@nnrp1.deja.com> NNTP-Posting-Host: 204.48.27.130 X-Article-Creation-Date: Tue Jan 30 19:16:11 2001 GMT X-Http-User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; 0.7) Gecko/20010109 X-Http-Proxy: 1.0 x65.deja.com:80 (Squid/1.1.22) for client 204.48.27.130 X-MyDeja-Info: XMYDJUIDtedennison Xref: supernews.google.com comp.lang.ada:4723 Date: 2001-01-30T19:16:11+00:00 List-Id: In article <956vav$e7q$1@nnrp1.deja.com>, Robert Dewar wrote: > will have trouble. Note that if you are using a tool like > flex, there is absolutely no problem in dealing with this. To the best of my knowledge, flex has no "last token" function in its API. It can do *character* context, but not token context. Thus to properly handle this situation with lex, you'd have to hack it in manually with inserted C code (most likely by passing info back from the parser). I just checked the Ada95 lex spec available from the AdaIC site (http://www.adaic.org/standards/95lrm_rat/lexer9x.l ). It indeed contains no context information in the token definitions, and thus should have the same problem. The relevent entries are: ------------------------------------------- "'" return(TIC); "'"."'" return(char_lit); ------------------------------------------- -- T.E.D. http://www.telepath.com/~dennison/Ted/TED.html Sent via Deja.com http://www.deja.com/