Tinkering with fcl-passrc lazarus / 21-General ---------------------------------------------------------------------- MarkMLl · 2021-05-06 07:36 I've made myself an out-of-tree copy of fcl-passrc from 3.2.0 to play with, with no particular urgency or objective. If I use the supplied .lpi, I can build pasrewrite without problems, but am disappointed- nay, devastated- :-) to receive errors like Expected "Semicolon" at token "Identifier otherwise" in file watchRelative.lpr at line 145 column 5 line:145 column:5 file:watchRelative.lpr and Exception at 00000000004E2731: EPasWriter: Writing not yet implemented for TPasImplCaseOf implementation elements. from perfectly legal code with which the compiler is entirely satisfied. At that point I turned my attention to test_parser. To make life easy I set up a Lazarus project based on pasrewrite's .lpi, but I'm getting stuck on this line with the indicated error message: Code: [Select]procedure GetHiddenModifiers(Mfs:TProcedureModifiers);   begin    if pmInline in Mfs then WriteFmt(true,'inline;',false);    if pmAssembler in Mfs then WriteFmt(true,'assembler;',false);    if pmVarargs in Mfs then WriteFmt(true,'varargs;',false);     // <================    if pmCompilerProc in Mfs then WriteFmt(true,'compilerproc;',false);   end; test_parser.pp(1305,7) Error: Identifier not found "pmVarargs" Does anybody have an idiot's guide to getting this built out-of-tree and testable? MarkMLl ---------------------------------------------------------------------- marcov · 2021-05-06 08:10 I don't know its error handling that well (since for fpdoc it is mostly irrelevant, since the code it processes is supposed to compile) But the gap between 3.2.0 and trunk is enormous for fcl-passrc . I believe 3.2.0 is roughly trunk state early 2020, 3.2.2 will contain the trunk state september 2020, and there are already 142 commits past that. So in short: for relevance, use trunk ---------------------------------------------------------------------- MarkMLl · 2021-05-06 08:13 Will build trunk later today and report back, thanks :-) MarkMLl ---------------------------------------------------------------------- marcov · 2021-05-06 09:30 Note that trunk fcl-passrc might build fine with 3.2.x. If 3.2.2 is released and we are still using SVN, I'll sync fcl-passrc and pas2js again with trunk. ---------------------------------------------------------------------- MarkMLl · 2021-05-07 15:52 Built trunk which describes itself as 3.3.1 and installed it: /usr/local/src/fcl-passrc/examples$ fpc -i Free Pascal Compiler version 3.3.1 Compiler date      : 2021/05/07 Compiler CPU target: x86_64 ... I've copied fcl-passrc out-of-tree so that I can tinker with it, I can compile pasrewrite but not test_parser. /usr/local/src/fcl-passrc/examples$ fpc pasrewrite.pp Free Pascal Compiler version 3.3.1 [2021/05/07] for x86_64 Copyright (c) 1993-2021 by Florian Klaempfl and others Target OS: Linux for x86-64 Compiling pasrewrite.pp Linking pasrewrite 482 lines compiled, 0.6 sec, 924208 bytes code, 512200 bytes data /usr/local/src/fcl-passrc/examples$ fpc test_parser.pp Free Pascal Compiler version 3.3.1 [2021/05/07] for x86_64 Copyright (c) 1993-2021 by Florian Klaempfl and others Target OS: Linux for x86-64 Compiling test_parser.pp test_parser.pp(264,3) Warning: Case statement does not handle all possible cases test_parser.pp(316,4) Warning: Case statement does not handle all possible cases test_parser.pp(295,4) Warning: Case statement does not handle all possible cases test_parser.pp(1028,3) Warning: Case statement does not handle all possible cases test_parser.pp(1290,4) Warning: Case statement does not handle all possible cases test_parser.pp(1305,7) Error: Identifier not found "pmVarargs" test_parser.pp(1446,21) Error: Identifier not found "okGeneric" test_parser.pp(1893,12) Warning: Symbol "ParseSource" is deprecated: "use version with options" test_parser.pp(1970) Fatal: There were 2 errors compiling module, stopping Fatal: Compilation aborted Error: /usr/local/bin/ppcx64 returned an error exitcode Can also build parsepp, the description implies that testunit1 is a test file rather than useful program. Any thoughts or suggestions would be appreciated. MarkMLl ---------------------------------------------------------------------- marcov · 2021-05-07 19:00 What can I say ? Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Free Pascal Compiler version 3.3.1 [2021/04/22] for i386Copyright (c) 1993-2021 by Florian Klaempfl and othersTarget OS: Win32 for i386Compiling pasrewrite.ppLinking pasrewrite.exe482 lines compiled, 0.5 sec, 396224 bytes code, 12788 bytes data ---------------------------------------------------------------------- MarkMLl · 2021-05-07 19:20 Err... rather a lot by the looks of it :-) How on Earth did /that/ happen... it was from trunk svn. More in the morning :-/ MarkMLl ---------------------------------------------------------------------- MarkMLl · 2021-05-08 08:14 I've just worked though it again. My trunk build /did/ have problems but I've redone from scratch, but I still get Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i /usr/local/src/fcl-passrc/examples$ fpc test_parser.ppFree Pascal Compiler version 3.3.1 [2021/05/08] for x86_64Copyright (c) 1993-2021 by Florian Klaempfl and othersTarget OS: Linux for x86-64Compiling test_parser.pptest_parser.pp(264,3) Warning: Case statement does not handle all possible casestest_parser.pp(316,4) Warning: Case statement does not handle all possible casestest_parser.pp(295,4) Warning: Case statement does not handle all possible casestest_parser.pp(1028,3) Warning: Case statement does not handle all possible casestest_parser.pp(1290,4) Warning: Case statement does not handle all possible casestest_parser.pp(1305,7) Error: Identifier not found "pmVarargs"test_parser.pp(1446,21) Error: Identifier not found "okGeneric"test_parser.pp(1893,12) Warning: Symbol "ParseSource" is deprecated: "use version with options"test_parser.pp(1970) Fatal: There were 2 errors compiling module, stoppingFatal: Compilation abortedError: /usr/local/bin/ppcx64 returned an error exitcode Also Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i /usr/local/src/fcl-passrc/examples$ fpc -vt test_parser.pp | grep -v 'not found' | grep -v Unitsearch | grep -v ^UsingConfigfile search: /home/markMLl/.fpc.cfgConfigfile search: /usr/local/lib/fpc/etc/fpc.cfgConfigfile search: /etc/fpc.cfgReading options from file /etc/fpc.cfgFree Pascal Compiler version 3.3.1 [2021/05/08] for x86_64Copyright (c) 1993-2021 by Florian Klaempfl and othersSearching file /lib64/ld-linux-x86-64.so.2... foundCompiler: /usr/local/lib/fpc/3.3.1/ppcx64Target OS: Linux for x86-64Compiling test_parser.ppSearching file test_parser.pp... foundSearching file /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/system.ppu... foundPPU Loading /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/system.ppuSearching file test_parser.pp... foundSearching file test_parser.pp... foundSearching file /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/fpintres.ppu... foundPPU Loading /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/fpintres.ppuSearching file test_parser.pp... foundSearching file /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/objpas.ppu... foundPPU Loading /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/objpas.ppuSearching file test_parser.pp... foundSearching file /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/sysutils.ppu... foundPPU Loading /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/sysutils.ppuSearching file /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/linux.ppu... foundPPU Loading /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/linux.ppuSearching file /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/baseunix.ppu... foundPPU Loading /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/baseunix.ppuSearching file /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/unixtype.ppu... foundPPU Loading /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/unixtype.ppuSearching file /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/syscall.ppu... foundPPU Loading /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/syscall.ppuSearching file /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/unix.ppu... foundPPU Loading /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/unix.ppuSearching file /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/errors.ppu... foundPPU Loading /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/errors.ppuSearching file /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/sysconst.ppu... foundPPU Loading /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/sysconst.ppuSearching file /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/unixutil.ppu... foundPPU Loading /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/unixutil.ppuSearching file test_parser.pp... foundSearching file /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/classes.ppu... foundPPU Loading /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/classes.ppuSearching file /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/types.ppu... foundPPU Loading /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/types.ppuSearching file /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/math.ppu... foundPPU Loading /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/math.ppuSearching file /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/typinfo.ppu... foundPPU Loading /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/typinfo.ppuSearching file /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/rtlconsts.ppu... foundPPU Loading /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/rtlconsts.ppuSearching file /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/sortbase.ppu... foundPPU Loading /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl/sortbase.ppuSearching file test_parser.pp... foundSearching file /usr/local/lib/fpc/3.3.1/units/x86_64-linux/fcl-passrc/pparser.ppu... foundPPU Loading /usr/local/lib/fpc/3.3.1/units/x86_64-linux/fcl- passrc/pparser.ppuSearching file /usr/local/lib/fpc/3.3.1/units/x86_64-linux/fcl-passrc/pastree.ppu... foundPPU Loading /usr/local/lib/fpc/3.3.1/units/x86_64-linux/fcl- passrc/pastree.ppuSearching file /usr/local/lib/fpc/3.3.1/units/x86_64-linux/fcl-passrc/pscanner.ppu... foundPPU Loading /usr/local/lib/fpc/3.3.1/units/x86_64-linux/fcl- passrc/pscanner.ppuSearching file /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl-objpas/strutils.ppu... foundPPU Loading /usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl- objpas/strutils.ppuSearching file test_parser.pp... foundtest_parser.pp(264,3) Warning: Case statement does not handle all possible casestest_parser.pp(316,4) Warning: Case statement does not handle all possible casestest_parser.pp(295,4) Warning: Case statement does not handle all possible casestest_parser.pp(1028,3) Warning: Case statement does not handle all possible casestest_parser.pp(1290,4) Warning: Case statement does not handle all possible casestest_parser.pp(1893,12) Warning: Symbol "ParseSource" is deprecated: "use version with options"test_parser.pp(1970) Fatal: There were 2 errors compiling module, stoppingFatal: Compilation abortedError: /usr/local/bin/ppcx64 returned an error exitcode where $ ls -l /usr/local/lib/fpc/3.3.1/units/x86_64-linux/fcl-passrc confirms that those files were built during the last hour; trunk was built using 3.2.0 and (as expected) objects to an attempt to do a complete self-build using 3.3.1 MarkMLl ---------------------------------------------------------------------- lucamar · 2021-05-08 09:57 Mark, please, use code tags for such long outputs. Help us keep our fingers and wrists nimble ---------------------------------------------------------------------- MarkMLl · 2021-05-08 11:29 Quote from: lucamar on May 08, 2021, 11:57:21 amMark, please, use code tags for such long outputs. Help us keep our fingers and wrists nimble It wasn't code, it was text output and I used the tt tag. MarkMLl ---------------------------------------------------------------------- marcov · 2021-05-08 13:06 I updated my SVN, and now it fails here too, so my guess is that the change is relatively recent phenomenon. Probably one of these: Code: [Select]r49253 mattias 2021-04-24 12:55:03 +0200 (Sat, 24 Apr 2021) pastojs: specialize try except on, issue 38795 r49254 mattias 2021-04-24 13:49:01 +0200 (Sat, 24 Apr 2021) fcl-passrc: started example issue 38784 r49256 mattias 2021-04-24 15:53:28 +0200 (Sat, 24 Apr 2021) fcl-passrc: started specialize type reference a>b<.c r49272 mattias 2021-04-26 23:16:28 +0200 (Mon, 26 Apr 2021) fcl-passrc: fixed (intf as tobject).ClassType, issue 38805 ---------------------------------------------------------------------- PascalDragon · 2021-05-08 13:18 Quote from: MarkMLl on May 08, 2021, 01:29:18 pmQuote from: lucamar on May 08, 2021, 11:57:21 amMark, please, use code tags for such long outputs. Help us keep our fingers and wrists nimble It wasn't code, it was text output and I used the tt tag. It's a good style to use code-tags nevertheless, cause this way the forum software will use a scrollable area and thus one can more easily scroll through posts. ---------------------------------------------------------------------- MarkMLl · 2021-05-08 14:03 Quote from: PascalDragon on May 08, 2021, 03:18:46 pmIt's a good style to use code-tags nevertheless, cause this way the forum software will use a scrollable area and thus one can more easily scroll through posts. I'm sorry, it did occur to me after I'd posted that scrolling and the magic "+" button were of course relevant. I've just been tinkering and I notice that code=text and code=plain are accepted and synonymous. My particular apologies to anybody afflicted with RSI etc. (BT, DT and managed to improve things with postural changes etc.). MarkMLl ---------------------------------------------------------------------- MarkMLl · 2021-05-08 17:36 Quote from: marcov on May 08, 2021, 03:06:54 pmI updated my SVN, and now it fails here too, so my guess is that the change is relatively recent phenomenon. Probably one of these: Code: [Select]r49253 mattias 2021-04-24 12:55:03 +0200 (Sat, 24 Apr 2021) pastojs: specialize try except on, issue 38795 r49254 mattias 2021-04-24 13:49:01 +0200 (Sat, 24 Apr 2021) fcl-passrc: started example issue 38784 r49256 mattias 2021-04-24 15:53:28 +0200 (Sat, 24 Apr 2021) fcl-passrc: started specialize type reference a>b<.c r49272 mattias 2021-04-26 23:16:28 +0200 (Mon, 26 Apr 2021) fcl-passrc: fixed (intf as tobject).ClassType, issue 38805 Still fails at r49253. I've got multiple releases on my system, so I'll try working backwards. It has to be somewhere before 3.2.0 got tagged... any idea when that was? Later: building test_parser.pp, 3.0.2 is OK but 3.0.4 isn't. MarkMLl ---------------------------------------------------------------------- MarkMLl · 2021-05-17 09:09 Reported as https://bugs.freepascal.org/view.php?id=38887, now fixed in trunk. MarkMLl