fcl-passrc parser expects semicolon before "end" in "try ... finally ... end"
Original Reporter info from Mantis: Michalis @michaliskambi
-
Reporter name: Michalis Kamburelis
Original Reporter info from Mantis: Michalis @michaliskambi
- Reporter name: Michalis Kamburelis
Description:
The parser from fcl-passrc cannot parse the code
begin
try
except raise end;
end.
It fails with
EParserError: Identifier expected at token "end" in file no_semicolon_before_end.pas at line 3 column 18
It can parse it if you place ";" between "raise" and "end".
The FPC compiler handles the same code without any problems.
To reproduce: use my test program from http://wiki.freepascal.org/fcl-passrc (attached also to this bugreport for comfort:) and run it on no_semicolon_before_end.pas .
$ fpc test_passrc.lpr
$ ./test_passrc no_semicolon_before_end.pas
An unhandled exception occurred at $0000000000474E35:
EParserError: Identifier expected at token "end" in file no_semicolon_before_end.pas at line 3 column 18
Note: adding '-Mobjfpc ' to options inside test_passrc.lpr doesn't make any difference.
Mantis conversion info:
- Mantis ID: 30693
- OS: Debian GNU/Linux
- OS Build: (testing)
- Build: from around 2016/08/20
- Platform: x86-64
- Version: 3.1.1
- Fixed in version: 3.1.1
- Fixed in revision: 34672 (#a725887d)