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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham 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-29 08:50:08 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!newsfeed2.skycache.com!Cidera!dca1-hub1.news.digex.net!intermedia!cpk-news-hub1.bbnplanet.com!news.gtei.net!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: Mon, 29 Jan 2001 16:41:29 GMT Organization: Deja.com Message-ID: <9546fo$nl$1@nnrp1.deja.com> References: <9543p4$u4u$1@nnrp1.deja.com> NNTP-Posting-Host: 204.48.27.130 X-Article-Creation-Date: Mon Jan 29 16:41:29 2001 GMT X-Http-User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; 0.7) Gecko/20010109 X-Http-Proxy: 1.0 x62.deja.com:80 (Squid/1.1.22) for client 204.48.27.130 X-MyDeja-Info: XMYDJUIDtedennison Xref: supernews.google.com comp.lang.ada:4661 Date: 2001-01-29T16:41:29+00:00 List-Id: In article <9543p4$u4u$1@nnrp1.deja.com>, Ted Dennison wrote: > I just tried the test_ada_lexer from the OpenToken examples directory > on the following input: > > A'L; ... > That looks like the right output to me. Am I missing some parameter of > the problem? Ahhh, yes I was. I tried it on: A'L'M; and got: Found IDENTIFIER_T A Found CHARACTER_T 'L' Found IDENTIFIER_T M Found SEMICOLON_T ; Found END_OF_FILE_T * I suppose the original author of the Ada syntax (Christop, I think) was more or less forced to do it that way because the OpenToken lexical analyzer keeps no record of what the last token was. That can certainly be fixed. It will add a bit of processing time on each token. But (thanks to Robert Dewar) I now have some ideas for optimizing the scanning that ought to speed things up significantly, so the processing time delta in the next release ought to still be in the good direction. Note that OpenToken is not all about analyzing Ada; its a general lexical analysis/parsing utility along the lines of lex/yacc and ANTLR (except that it is totally API-based). In fact, it was initially developed to help parse configuration files, and all my commercial work with it still centers around that. The Ada tokenizer is just one of the many user-submitted extensions that are included in the distribution. I won't complain if it gets to the point where most users are downloading OpenToken just to get the the Ada analyzer. However, there's a lot more to it than just that. I'd like to give kudos to Christoph for investigating this issue in the first place. Many developers I know would have just let it slide, since it works fine with all current Ada compilers. -- T.E.D. http://www.telepath.com/~dennison/Ted/TED.html Sent via Deja.com http://www.deja.com/