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.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!mcvax!unido!siedap!kern From: kern@siedap.UUCP Newsgroups: net.lang.ada Subject: Re: Orphaned Response Message-ID: <8000005@siedap.UUCP> Date: Fri, 8-Aug-86 06:41:00 EDT Article-I.D.: siedap.8000005 Posted: Fri Aug 8 06:41:00 1986 Date-Received: Wed, 13-Aug-86 06:22:13 EDT References: <18077548@jade.UUCP> Nf-ID: #R:jade:18077548:siedap:8000005:37777777600:1666 Nf-From: siedap!kern Aug 8 10:41:00 1986 List-Id: I am interested in the LEX/YACC sources too. Here are two little lex sources I wrote, though I am a newcomer to unix. The first is to translate all characters into upper case except Ada reserved words, comments and strings. (I forgot character literals.) Known bugs: Character literals are translated, first word of text sometimes treated erroneously The second is to remove/add comment starters "--" to lines. (To enable i.e. adjustment procedures in comment blocks.) Horst Mailing address: mcvax!unido!ztivax!siedap!kern SEP [ \n()*+-./:;<=>|&] KEYW (abort|abs|access|all|and|array|at|begin|accept|body|case|constant|declare|delay|delta|digits|do|else|elsif|end|entry|exception|exit|for|function|generic|goto|if|in|is|limited|loop|mod|new|not|null|of|or|others|out|package|pragma|private|procedure|raise|raise|range|record|rem|renames|return|reverse|select|separate|subtype|task|terminate|then|type|use|when|while|with|xor) %% ^{KEYW}/{SEP} ECHO; {SEP}{KEYW}/{SEP} ECHO; [a-z] putchar (yytext [0] + 'A' - 'a'); --.* | \"[^"\n]*\" | [^a-z] ECHO; --------------------- 2nd crime--------------------- %START TAB %% ^[ \t]*-- { int i; for (i=0; i1; yyleng--) output ('\t'); BEGIN TAB; } " "* ECHO; [^ ] {printf (" -- "); ECHO; BEGIN 0; } ^" "* { int i; for (i=0; i