Forum > General

Tinkering with fcl-passrc

(1/3) > >>

MarkMLl:
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: ---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"

--- End code ---

Does anybody have an idiot's guide to getting this built out-of-tree and testable?

MarkMLl

marcov:
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:
Will build trunk later today and report back, thanks :-)

MarkMLl

marcov:
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:
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

Navigation

[0] Message Index

[#] Next page

Go to full version