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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.52.120.112 with SMTP id lb16mr18397534vdb.4.1438181970294; Wed, 29 Jul 2015 07:59:30 -0700 (PDT) X-Received: by 10.140.19.208 with SMTP id 74mr614219qgh.0.1438181970275; Wed, 29 Jul 2015 07:59:30 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!69no2628555qgl.1!news-out.google.com!4ni82592qgh.1!nntp.google.com!69no2628553qgl.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 29 Jul 2015 07:59:30 -0700 (PDT) In-Reply-To: <87bnev8ix7.fsf@adaheads.sparre-andersen.dk> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=192.35.17.16; posting-account=1V3XLwoAAADQ5b5iSAirxtMuLX-CLAcj NNTP-Posting-Host: 192.35.17.16 References: <43911d5c-44ff-4be0-883e-a35447acdca3@googlegroups.com> <87bnev8ix7.fsf@adaheads.sparre-andersen.dk> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Pascal to ADA Converter From: Fernando Arroyo Injection-Date: Wed, 29 Jul 2015 14:59:30 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 7687 X-Received-Body-CRC: 1589915717 Xref: news.eternal-september.org comp.lang.ada:27128 Date: 2015-07-29T07:59:30-07:00 List-Id: On Wednesday, July 29, 2015 at 10:30:45 AM UTC+2, Jacob Sparre Andersen wro= te: > Fernando Arroyo wrote: > > On Monday, July 20, 2015 at 2:47:13 PM UTC+2, gautier...@hotmail.com wr= ote: >=20 > >> Especially, you can grab the P2Ada sources there: > >>=20 > >> http://sourceforge.net/projects/p2ada/files/p2ada/Sources/ >=20 > > I have downloaded p2ada for Win32 and it works properly in Windows 7 > > and XP. The problem is that I would like to run this program in linux >=20 > Why don't you download the sources and compile the program? The output > from the program will not really be relevant anyway, if you don't have > an Ada compiler on the system. >=20 > Greetings, >=20 > Jacob > --=20 > The so-called "desktop metaphor" of today's workstation > is instead an "airplane-seat" metaphor. I did't want to compile the sources since I have problems building it, I ha= d to make some changes and I was afraid of modify the program behaviour. Therefore, I have decided to use the previous version in the repository at = http://sourceforge.net/projects/p2ada/files/p2ada/Sources/ (newp2ada-24-aug= -2008.zip), and according the instructions (newp2ada.txt), I unzipped the z= ip (unzip -aaLL) and in the newp2ada folder I have done "gnatmake p2ada" an= d it is built and runs properly. However, I would like to use the 2010 version (p2ada-aug-2010-src.tgz) but = according the instructions (newp2ada/README), I unzipped the zip (unzip -aa= LL) and in the newp2ada folder I have done "gnatmake p2ada" and gives probl= ems: gnatmake p2ada gcc -c p2ada.adb p2ada.adb:27:06: file "pascal_io.ads" not found gnatmake: "p2ada.adb" compilation error Therefore I decided follow the instructions of "How to make P2Ada translato= r work?" First of all the instructions says about a file newp2ada.zip which I don't = have. I assume that file is equvalent to the one that I downloaded p2ada-au= g-2010-src.tgz (So here the first weird thing). I have decided to uncompre= ss the tgz, compress again to .zip and decompress with "unzip -aaLL".=20 Then, I create the folder acu and modify the file p2ada_options.ads. Accord= ing the instrucctions, we have replace one string DOS by Unix, but the inst= rucctions are not clear, I assume that is the second one (here the second w= eird thing): type Line_endings is (Unix,DOS,Mac); -- LF,CR/LF,CR new_line_endings: Line_endings:=3D DOS; -- <-----This one Then next step is make and if I do it(here the third weird thing):=20 $ make make: *** No rule to make target `aflex', needed by `pascal_dfa.adb'. Stop= . Since the readme says that "aflex and ayacc must have been made (see below)= and copy or link them here" I follow the instructions "How to change P2Ada= for yet another Pascal dialect ?": 1. building AYACC : - go to directory ayacc - run "gnatmake ayacc" =09 it looks ok:=20 $ gnatmake ayacc gcc -c ayacc.adb gcc -c ayacc_file_names.adb gcc -c command_line_interface.adb gcc -c error_report_file.adb gcc -c options.adb gcc -c output_file.adb gcc -c parse_table.adb gcc -c parser.adb gcc -c rule_table.adb gcc -c source_file.adb gcc -c string_pkg.adb gcc -c symbol_table.adb gcc -c tokens_file.adb gcc -c str_pack.adb gcc -c string_scanner.adb gcc -c string_lists.ads gcc -c actions_file.adb gcc -c parse_template_file.adb gcc -c goto_file.adb gcc -c lalr_symbol_info.adb gcc -c lr0_machine.adb gcc -c shift_reduce_file.adb gcc -c symbol_info.adb gcc -c verbose_file.adb gcc -c lexical_analyzer.adb gcc -c lists.adb gcc -c stack_pkg.adb gcc -c ragged.adb gcc -c stack_pack.adb gcc -c set_pack.adb gnatbind -x ayacc.ali gnatlink ayacc.ali - move the executable in a reachable directory (see: path) 2. building AFLEX : - go to directory aflex - run "gnatmake aflex" - move the executable in a reachable directory (see: path) it looks ok: $ gnatmake aflex gcc -c aflex.adb gcc -c dfa.adb=09 gcc -c gen.adb gcc -c main_body.adb gcc -c misc.adb gcc -c misc_defs.adb gcc -c template_manager.adb gcc -c ccl.adb gcc -c ecs.adb gcc -c int_io.ads gcc -c nfa.adb gcc -c skeleton_manager.adb gcc -c tblcmp.adb gcc -c tstring.ads gcc -c parse_tokens.ads gcc -c scanner.adb gcc -c command_line_interface.adb gcc -c external_file_manager.adb gcc -c parser.adb gcc -c file_string.ads gcc -c vstrings.adb gcc -c ascan_dfa.adb gcc -c ascan_io.adb gcc -c sym.adb gcc -c aflex_scanner.adb gcc -c parse_goto.ads gcc -c parse_shift_reduce.ads gnatbind -x aflex.ali gnatlink aflex.ali Then I follow the instructions: -go to directory lypascal - type "ayacc pascal.y" $ ayacc pascal.y Ayacc (File =3D> "pascal.y", C_Lex =3D> Off, Debug =3D> Off, Summary =3D> On, Verbose =3D> Off, Error_Recovery =3D> Off, Extension =3D> ".a"); 637 Productions 420 Nonterminals 105 Terminals 866 States 76 Shift/Reduce conflicts 92 Reduce/Reduce conflicts =09 - type "aflex -i -E pascal.l" (No output) - change the file extensions (.a) of new Ada files if needed (e.g. for GNA= T) and move them to upper directory ls: pascal.a pascal_io.a pascal.l01 pascal.l06 pascal_shift_reduce.a= ds pascal.y00 pascal.y03 pascal.y07 pascal_dfa.a pascal.l pascal.l02 pascal.l97 pascal_tokens.ads = pascal.y01 pascal.y05 pascal.y97 pascal_goto.ads pascal.l00 pascal.l03 pascal.l99 pascal.y = pascal.y02 pascal.y06 pascal.y99 (I assume that I have to change pascal.a, pascal_io.a and pascal_dfa.a to = .ads and move to the upper directory., here the forth weird thing) - build P2Ada ("gnatmake p2ada").and then: $ gnatmake p2ada gcc -c p2ada.adb pascal_io.ads:91:01: end of file expected, file can have only one compilati= on unit gnatmake: "p2ada.adb" compilation error I don't understand what happends, it looks that the steps of the README doe= s not correspond to this version. Any idea? The status of my files are the following:=20 https://www.dropbox.com/s/9h25jpumt1pzayp/p2ada-aug-2010-src.zip?dl=3D0 Thanks